Commit 891cd966 authored by Xenofon Foukas's avatar Xenofon Foukas

Merge remote-tracking branch 'oai/develop' into feature-68-enb-agent

parents aa50fcf0 21680ffb
......@@ -8,6 +8,7 @@ job1:
- echo $EXTERNAL_SHARE_DIR
- echo $SHELL
- git rev-parse --abbrev-ref HEAD
- git_repo=`git config --get remote.origin.url`
- git_head=`git rev-parse HEAD`
- echo $git_head
- tmp=`git show-ref --head | grep $git_head`
......@@ -23,8 +24,8 @@ job1:
- echo $NRUNS_LTE_SOFTMODEM
- echo $TIMEOUT_CMD
- mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
- python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -c -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS $OAI_EXTRA_ARGS -g "$OAI_TEST_CASE_GROUP">& $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log
- python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -r -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g "$OAI_TEST_CASE_GROUP" --nrun_lte_softmodem $NRUNS_LTE_SOFTMODEM --timeout_cmd $TIMEOUT_CMD >& $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log
- python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -c -5GRepo $git_repo -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS $OAI_EXTRA_ARGS -g "$OAI_TEST_CASE_GROUP">& $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log
- python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -r -5GRepo $git_repo -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g "$OAI_TEST_CASE_GROUP" --nrun_lte_softmodem $NRUNS_LTE_SOFTMODEM --timeout_cmd $TIMEOUT_CMD >& $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log
- mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest.log
- mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest_cleanup.log
- sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR
......
......@@ -176,42 +176,65 @@ add_definitions(-DCMAKER)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O2")
Message("RF_BOARD is ${RF_BOARD}")
# Below has been put in comment because does not work with
# SVN authentication.
#
#find_package(Subversion)
#if(SUBVERSION_FOUND)
# Subversion_WC_INFO(${OPENAIR_DIR} openair)
# set (FIRMWARE_VERSION "${openair_WC_REVISION} - ${openair_WC_LAST_CHANGED_DATE}")
# Subversion_WC_LOG(${OPENAIR_DIR} Project)
#else()
# set (FIRMWARE_VERSION "No svn information")
#endif()
#add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"")
set(GIT_BRANCH "UNKNOWN")
set(GIT_COMMIT_HASH "UNKNOWN")
set(GIT_COMMIT_DATE "UNKNOWN")
find_package(Git)
if(GIT_FOUND)
message("git found: ${GIT_EXECUTABLE}")
# Get the current working branch
execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the latest abbreviated commit hash of the working branch
execute_process(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the latest commit date of the working branch
execute_process(
COMMAND git log -1 --format=%cd
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()
# Below is a hard-coded info
set (FIRMWARE_VERSION "No svn information")
add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"")
add_definitions("-DPACKAGE_VERSION=\"${FIRMWARE_VERSION}\"")
add_definitions("-DPACKAGE_BUGREPORT=\"OpenAirInterface web site\"")
add_definitions("-DPACKAGE_VERSION=\"Branch: ${GIT_BRANCH} Abrev. Hash: ${GIT_COMMIT_HASH} Date: ${GIT_COMMIT_DATE}\"")
add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
# Debug related options
#########################################
add_boolean_option(MSG_PRINT False "print debug messages")
add_boolean_option(DISABLE_XER_PRINT False "print XER Format")
add_boolean_option(XER_PRINT False "print XER Format")
add_boolean_option(RRC_MSG_PRINT False "print RRC messages")
add_boolean_option(PDCP_MSG_PRINT False "print PDCP messages to /tmp/pdcp.log")
add_boolean_option(DEBUG_PDCP_PAYLOAD False "print PDCP PDU to stdout") # if true, make sure that global and PDCP log levels are trace
add_boolean_option(ASN_DEBUG False "ASN1 coder/decoder Debug")
add_boolean_option(EMIT_ASN_DEBUG False "ASN1 coder/decoder Debug")
add_boolean_option(MSG_PRINT False "print debug messages")
add_boolean_option(DISABLE_XER_PRINT False "print XER Format")
add_boolean_option(XER_PRINT False "print XER Format")
add_boolean_option(RRC_MSG_PRINT False "print RRC messages")
add_boolean_option(PDCP_MSG_PRINT False "print PDCP messages to /tmp/pdcp.log")
add_boolean_option(DEBUG_PDCP_PAYLOAD False "print PDCP PDU to stdout") # if true, make sure that global and PDCP log levels are trace
add_boolean_option(DEBUG_MAC_INTERFACE False "print MAC-RLC PDU exchange to stdout") # if true, make sure that global and PDCP log levels are trace
add_boolean_option(TRACE_RLC_PAYLOAD False "print RLC PDU to stdout") # if true, make sure that global and PDCP log levels are trace
add_boolean_option(TEST_OMG False "???")
add_boolean_option(DEBUG_OMG False "???")
add_boolean_option(XFORMS False "This adds the possibility to see the signal oscilloscope")
add_boolean_option(PRINT_STATS False "This adds the possibility to see the status")
add_boolean_option(TRACE_RLC_PAYLOAD False "print RLC PDU to stdout") # if true, make sure that global and PDCP log levels are trace
add_boolean_option(TEST_OMG False "???")
add_boolean_option(DEBUG_OMG False "???")
add_boolean_option(XFORMS False "This adds the possibility to see the signal oscilloscope")
add_boolean_option(PRINT_STATS False "This adds the possibility to see the status")
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
......@@ -322,6 +345,7 @@ set(S1AP_OAI_generated
${S1AP_C_DIR}/s1ap_decoder.c
${S1AP_C_DIR}/s1ap_encoder.c
${S1AP_C_DIR}/s1ap_xer_print.c
${S1AP_C_DIR}/s1ap_compare.c
${S1AP_C_DIR}/s1ap_ies_defs.h
)
file(GLOB s1ap_h ${S1AP_C_DIR}/*.h)
......@@ -1174,7 +1198,6 @@ add_library(CN_UTILS
${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
)
......@@ -1532,6 +1555,9 @@ include(FindPkgConfig)
pkg_search_module(LIBXML2 libxml-2.0 REQUIRED)
include_directories(${LIBXML2_INCLUDE_DIRS})
pkg_search_module(LIBXSLT libxslt REQUIRED)
include_directories(${LIBXSLT_INCLUDE_DIRS})
pkg_search_module(OPENSSL openssl REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIRS})
......@@ -1824,6 +1850,7 @@ endforeach(myExe)
add_executable(test_epc_generate_scenario
${OPENAIR3_DIR}/TEST/EPC_TEST/generate_scenario.c
${OPENAIR3_DIR}/TEST/EPC_TEST/generate_scenario.h
${OPENAIR2_DIR}/ENB_APP/enb_config.h
${OPENAIR2_DIR}/COMMON/commonDef.h
${OPENAIR2_DIR}/COMMON/messages_def.h
......@@ -1832,7 +1859,28 @@ add_executable(test_epc_generate_scenario
${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}
-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 ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
)
add_executable(test_epc_play_scenario
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario.c
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_decode.c
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_display.c
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_fsm.c
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_parse.c
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_s1ap.c
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_s1ap_eNB_defs.h
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_sctp.c
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario.h
${OPENAIR2_DIR}/COMMON/commonDef.h
${OPENAIR2_DIR}/COMMON/messages_def.h
${OPENAIR2_DIR}/COMMON/messages_types.h
${OPENAIR_BIN_DIR}/messages_xml.h
)
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
target_link_libraries (test_epc_play_scenario
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
)
......
......@@ -189,6 +189,22 @@ Obj.# Case# Test# Description
01 75 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 75 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 80 00 lte-softmodem + RRH tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
01 80 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 80 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 80 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
01 80 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
01 80 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 80 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 85 00 lte-softmodem + RRH tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
01 85 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 85 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 85 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
01 85 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
01 85 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 85 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 64 lte-softmodem-noS1 tests
......
......@@ -388,6 +388,7 @@ until [ -z "$1" ]
-g | --run-group)
RUN_GROUP=1
test_case_group=$2
test_case_group=`sed "s/\+/\*/g" <<< "${test_case_group}"` # Replace + with * for bash string substituion
echo_info "Will execute test cases only in group $test_case_group"
shift 2;;
-p)
......@@ -423,9 +424,17 @@ rm -fr $tmpfile
xml_conf="$OPENAIR_DIR/cmake_targets/autotests/test_case_list.xml"
test_case_list=`xmlstarlet sel -T -t -m /testCaseList/testCase -s A:N:- "@id" -v "@id" -n $xml_conf`
test_case_excl_list=`xmlstarlet sel -t -v "/testCaseList/TestCaseExclusionList" $xml_conf`
echo "Test Case Exclusion List = $test_case_excl_list "
test_case_excl_list=`sed "s/\+/\*/g" <<< "$test_case_excl_list" ` # Replace + with * for bash string substituion
read -a test_case_excl_array <<< "$test_case_excl_list"
echo "test_case_list = $test_case_list"
echo "Test Case Exclusion List = $test_case_excl_list \n"
readarray -t test_case_array <<<"$test_case_list"
read -a test_case_group_array <<< "$test_case_group"
......@@ -447,6 +456,15 @@ for search_expr in "${test_case_array[@]}"
flag_run_test_case=1
fi
for search_excl in "${test_case_excl_array[@]}"
do
if [[ $search_expr == $search_excl ]];then
flag_run_test_case=0
echo_info "Test case $search_expr match found in test case excl group. Will skip the test case for execution..."
break
fi
done
#We skip this test case if it is not in the group list
if [ "$flag_run_test_case" -ne "1" ]; then
......
......@@ -216,7 +216,7 @@ def sftp_module (username, password, hostname, ports, paramList,logfile):
# \brief bash script stub put at the end of scripts to terminate it
# \param timeout_cmd terminate script after timeout_cmd seconds
# \param terminate_missing_procs if True terminate all the processes launched by script if one of them terminates prematurely (due to error)
def finalize_deploy_script (timeout_cmd, terminate_missing_procs='True'):
def finalize_deploy_script (timeout_cmd, terminate_missing_procs='False'):
cmd = 'declare -i timeout_cmd='+str(timeout_cmd) + '\n'
if terminate_missing_procs == 'True':
cmd = cmd + """
......@@ -1105,6 +1105,7 @@ pw =''
i = 0
dlsim=0
localshell=0
GitOAI5GRepo=''
GitOAI5GRepoBranch=''
GitOAI5GHeadVersion=''
user=''
......@@ -1141,6 +1142,9 @@ while i < len (sys.argv):
i = i +1
elif arg == '-c':
cleanUpRemoteMachines=True
elif arg == '-5GRepo':
GitOAI5GRepo = sys.argv[i+1]
i = i +1
elif arg == '-5GRepoBranch':
GitOAI5GRepoBranch = sys.argv[i+1]
i = i +1
......@@ -1190,6 +1194,7 @@ while i < len (sys.argv):
print "-r: Remove the log directory in autotests"
print "-g: Run test cases in a group"
print "-c: Run cleanup scripts on remote machines and exit"
print "-5GRepo: Repository for OAI 5G to use to run tests (overrides GitOAI5GRepo in test_case_list.xml)"
print "-5GRepoBranch: Branch for OAI 5G Repository to run tests (overrides the branch in test_case_list.xml)"
print "-5GRepoHeadVersion: Head commit on which to run tests (overrides the branch in test_case_list.xml)"
print "-u: use the user name passed as argument"
......@@ -1278,7 +1283,9 @@ if MachineList =='':
MachineList = xmlRoot.findtext('MachineList',default='')
NFSResultsShare = xmlRoot.findtext('NFSResultsShare',default='')
GitOpenaircnRepo = xmlRoot.findtext('GitOpenair-cnRepo',default='')
GitOAI5GRepo = xmlRoot.findtext('GitOAI5GRepo',default='')
if GitOAI5GRepo == '':
GitOAI5GRepo = xmlRoot.findtext('GitOAI5GRepo',default='')
if GitOAI5GRepoBranch == '':
GitOAI5GRepoBranch = xmlRoot.findtext('GitOAI5GRepoBranch',default='')
......@@ -1394,15 +1401,15 @@ for oai in oai_list:
#cmd = cmd + 'mkdir -p ' + logdir + '\n'
cmd = cmd + 'cd '+ logdir + '\n'
cmd = cmd + 'git config --global http.sslVerify false \n'
cmd = cmd + 'git clone --depth 1 '+ GitOAI5GRepo + ' -b ' + GitOAI5GRepoBranch +' \n'
cmd = cmd + 'git clone '+ GitOpenaircnRepo + ' -b ' +GitOpenaircnRepoBranch + ' \n'
cmd = cmd + 'git clone '+ GitOAI5GRepo +' \n'
cmd = cmd + 'git clone '+ GitOpenaircnRepo + ' \n'
cmd = cmd + 'cd ' + logdirOAI5GRepo + '\n'
cmd = cmd + 'git checkout ' + GitOAI5GRepoBranch + '\n'
#cmd = cmd + 'git checkout ' + GitOAI5GHeadVersion + '\n'
cmd = cmd + 'git_head=`git ls-remote |grep \'' + GitOAI5GRepoBranch + '\'` \n'
cmd = cmd + 'git_head=($git_head) \n'
cmd = cmd + 'git_head=${git_head[0]} \n'
cmd = cmd + 'echo \"GitOAI5GHeadVersion_remote = $git_head\"'
cmd = cmd + 'echo \"GitOAI5GHeadVersion_remote = $git_head\" \n'
cmd = cmd + 'echo \"GitOAI5GHeadVersion_local = ' + GitOAI5GHeadVersion + '\" \n'
if flag_skip_git_head_check==True:
cmd = cmd + 'echo \"skipping GitHead check...\" \n '
......
This source diff could not be displayed because it is too large. You can view the blob instead.
cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( ASN_DEBUG False)
set ( ADDR_CONF False )
set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( EMOS False )
set ( EMIT_ASN_DEBUG False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING True )
......@@ -47,9 +49,9 @@ 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 ( OPENAIR1 True )
set ( OPENAIR2 True )
set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "epc_test" )
set ( PBS_SIM False )
set ( PDCP_USE_NETLINK True )
......@@ -74,4 +76,4 @@ set ( SMBV False )
set ( TEST_OMG False )
set ( USE_MME "R10" )
set ( USER_MODE True )
set ( XER_PRINT False )
set ( XER_PRINT True )
......@@ -30,7 +30,7 @@
################################################################################
# file build_helper
# brief
# author Laurent Thomas
# authors Laurent Thomas, Lionel GAUTHIER
#
#######################################
SUDO='sudo -E'
......@@ -269,7 +269,9 @@ check_install_oai_software() {
pydb \
wvdial \
python-numpy \
sshpass
sshpass \
libxslt1-dev
$SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
if [ `lsb_release -rs` = '12.04' ] ; then
install_nettle_from_source
......@@ -288,13 +290,15 @@ install_asn1c_from_source(){
asn1_install_dir=$OPENAIR_DIR/cmake_targets/log/asn1c_install_log.txt
echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_dir "
(
rm -rf /tmp/asn1c-r1516
$SUDO rm -rf /tmp/asn1c-r1516
mkdir -p /tmp/asn1c-r1516
cd /tmp/asn1c-r1516
svn co https://github.com/vlm/asn1c/trunk /tmp/asn1c-r1516 -r 1516
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch.p0
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0
patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0
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/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
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch_3.p0 >> /tmp/log_compile_asn1c
./configure
make -j`nproc`
$SUDO make install
......@@ -324,7 +328,6 @@ install_nas_tools() {
}
################################
# set_openair_env
###############################
......@@ -397,4 +400,4 @@ if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
fi
return $stat
}
\ No newline at end of file
}
......@@ -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
#
......@@ -121,6 +121,7 @@ function main()
echo "Cleaning TEST_EPC"
fi
rm -f $OPENAIR_DIR/targets/bin/test_epc_generate_scenario
rm -f $OPENAIR_DIR/targets/bin/test_epc_play_scenario
rm -Rf build 2>&1
mkdir -m 777 -p -v build
fi
......@@ -140,6 +141,13 @@ function main()
compilations \
epc_test test_epc_generate_scenario \
test_epc_generate_scenario $dbin/test_epc_generate_scenario
compilations \
epc_test test_epc_play_scenario \
test_epc_play_scenario $dbin/test_epc_play_scenario
$SUDO cp -upv test_epc_generate_scenario /usr/local/bin
$SUDO cp -upv test_epc_play_scenario /usr/local/bin
}
......
......@@ -56,6 +56,7 @@ function help()
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 " -e, --ulsch-max-errors num-errs maximum allowed number of uplink errors"
echo_error " -f, --rf-config-file filename RF specific configuration file"
echo_error " -K, --itti-dump-file filename ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
echo_error " -M, --target-dl-mcs mcs Downlink target MCS."
......@@ -138,6 +139,12 @@ function main()
shift;
exit 0
;;
-e | --ulsch-max-errors)
ulsch_max_errors=$2
echo "setting --ulsch-max-errors to $ulsch_max_errors"
exe_arguments="$exe_arguments --ulsch-max-errors=$ulsch_max_errors"
shift 2;
;;
-f | --rf-config-file)
rf_config_file=$2
# can omit file name if last arg on the line
......
......@@ -719,13 +719,13 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
// PDSCH LLRs
if (pdsch_llr != NULL) {
for (i=0; i<coded_bits_per_codeword/4; i++) {
llr[i] = (float) pdsch_llr[4*i];
for (i=0; i<coded_bits_per_codeword; i++) {
llr[i] = (float) pdsch_llr[i];
bit[i] = (float) i;
}
fl_set_xyplot_xbounds(form->pdsch_llr,0,coded_bits_per_codeword/4);
fl_set_xyplot_data(form->pdsch_llr,bit,llr,coded_bits_per_codeword/4,"","","");
fl_set_xyplot_xbounds(form->pdsch_llr,0,coded_bits_per_codeword);
fl_set_xyplot_data(form->pdsch_llr,bit,llr,coded_bits_per_codeword,"","","");
}
// PDSCH I/Q of MF Output
......
......@@ -48,7 +48,19 @@ Description Contains global common definitions
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
typedef signed char boolean_t;
#if !defined(TRUE)
#define TRUE (boolean_t)0x01
#endif
#if !defined(FALSE)
#define FALSE (boolean_t)0x00
#endif
#define BOOL_NOT(b) (b^TRUE)
#define NAS_UE_ID_FMT "0x%06x"
......@@ -59,13 +71,6 @@ Description Contains global common definitions
#define RETURNok (0)
#define RETURNerror (-1)
#ifndef FALSE
#define FALSE (0)
#endif
#ifndef TRUE
#define TRUE (1)
#endif
/*
* Name of the environment variable which defines the default directory
* where the NAS application is executed and where are located files
......
......@@ -112,7 +112,7 @@ typedef struct net_ip_address_s {
unsigned ipv4:1;
unsigned ipv6:1;
char ipv4_address[16];
char ipv6_address[40];
char ipv6_address[46];
} net_ip_address_t;
typedef uint64_t bitrate_t;
......
......@@ -271,7 +271,7 @@ static const eutra_band_t eutra_bands[] = {
Enb_properties_array_t enb_properties;
static void enb_config_display(void)
void enb_config_display(void)
{
int i,j;
......
......@@ -268,6 +268,7 @@ typedef struct Enb_properties_array_s {
Enb_properties_t *properties[MAX_ENB];
} Enb_properties_array_t;
void enb_config_display(void);
const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP);
const Enb_properties_array_t *enb_config_get(void);
......
......@@ -60,6 +60,8 @@
# include "DRB-ToAddModList.h"
# include "SRB-ToAddMod.h"
# include "SRB-ToAddModList.h"
# include "DRB-ToReleaseList.h"
#ifdef Rel10
#include "PMCH-InfoList-r9.h"
#endif
......
......@@ -51,10 +51,6 @@
#include "UTIL/OPT/opt.h"
/*----------------------------------------------------------------------------*/
#ifndef HAVE_STRNDUP
char * strndup (const char *s, size_t size);
#endif
static int oai_emulation_; /*!< \brief indicating that the parsing position is now within OAI_Emulation_*/
static int environment_system_config_; /*!< \brief indicating that the parsing position is now within Envi_Config_*/
......
This diff is collapsed.
This diff is collapsed.
......@@ -72,9 +72,9 @@ s1ap_eNB_config_t s1ap_config;
static int s1ap_eNB_generate_s1_setup_request(
s1ap_eNB_instance_t *instance_p, s1ap_eNB_mme_data_t *s1ap_mme_data_p);
static
void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *s1ap_register_eNB);
static
void s1ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp);
uint32_t s1ap_generate_eNB_id(void)
......@@ -150,7 +150,7 @@ static void s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p,
itti_send_msg_to_task(TASK_SCTP, instance_p->instance, message_p);
}
static
void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *s1ap_register_eNB)
{
s1ap_eNB_instance_t *new_instance;
......@@ -210,7 +210,6 @@ void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *
}
}
static
void s1ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp)
{
s1ap_eNB_instance_t *instance_p;
......
......@@ -100,6 +100,7 @@ static STAILQ_HEAD(sctp_cnx_list_head, sctp_cnx_list_elm_s) sctp_cnx_list;
static uint16_t sctp_nb_cnx = 0;
//------------------------------------------------------------------------------
struct sctp_cnx_list_elm_s *sctp_get_cnx(int32_t assoc_id, int sd)
{
struct sctp_cnx_list_elm_s *elm;
......@@ -119,6 +120,7 @@ struct sctp_cnx_list_elm_s *sctp_get_cnx(int32_t assoc_id, int sd)
return NULL;
}
//------------------------------------------------------------------------------
void
sctp_handle_new_association_req(
const instance_t instance,
......@@ -388,6 +390,7 @@ sctp_handle_new_association_req(
sd, sctp_nb_cnx, assoc_id);
}
//------------------------------------------------------------------------------
void sctp_send_data(
instance_t instance,
task_id_t task_id,
......@@ -430,6 +433,7 @@ void sctp_send_data(
sctp_cnx->assoc_id);
}
//------------------------------------------------------------------------------
static int sctp_close_association(
const instance_t instance,
const task_id_t requestor,
......@@ -456,6 +460,7 @@ static int sctp_close_association(
return 0;
}
//------------------------------------------------------------------------------
static int sctp_create_new_listener(
const instance_t instance,
const task_id_t requestor,
......@@ -580,6 +585,7 @@ err:
return -1;
}
//------------------------------------------------------------------------------
static inline
void
sctp_eNB_accept_associations(
......@@ -646,6 +652,7 @@ sctp_eNB_accept_associations(
}
}
//------------------------------------------------------------------------------
static inline
void
sctp_eNB_read_from_socket(
......@@ -770,6 +777,7 @@ sctp_eNB_read_from_socket(
}
}
//------------------------------------------------------------------------------
void
sctp_eNB_flush_sockets(
struct epoll_event *events, int nb_events)
......@@ -799,6 +807,7 @@ sctp_eNB_flush_sockets(
}
//------------------------------------------------------------------------------
void *sctp_eNB_task(void *arg)
{
int nb_events;
......
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.188.2.2";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "tun2";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.188.2.2/24";
ENB_INTERFACE_NAME_FOR_S1U = "lo";
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.1/24";
ENB_PORT_FOR_S1U = 2153; # Spec 2152
};
log_config :
{
global_log_level ="info";
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";
gtpu_log_level ="info";
gtpu_log_verbosity ="medium";
udp_log_level ="info";
udp_log_verbosity ="medium";
};
}
);
This diff is collapsed.
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*
generate_scenario.h
-------------------
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*/
#ifndef GENERATE_SCENARIO_H_
#define GENERATE_SCENARIO_H_
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "commonDef.h"
#include "platform_types.h"
#include "platform_constants.h"
#include "PHY/impl_defs_lte.h"
#include "s1ap_messages_types.h"
#ifdef CMAKER
#include "SystemInformationBlockType2.h"
#else
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
#endif
#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);
/** @defgroup _enb_app ENB APP
* @ingroup _oai2
* @{
*/
// Hard to find a defined value for max enb...
#define EPC_TEST_SCENARIO_MAX_ENB 4
typedef struct mme_ip_address_s {
unsigned ipv4:1;
unsigned ipv6:1;
unsigned active:1;
char *ipv4_address;
char *ipv6_address;
} mme_ip_address_t;
typedef struct Enb_properties_s {
/* Unique eNB_id to identify the eNB within EPC.
* For macro eNB ids this field should be 20 bits long.
* For home eNB ids this field should be 28 bits long.
*/
uint32_t eNB_id;
/* The type of the cell */
enum cell_type_e cell_type;
/* Optional name for the cell
* NOTE: the name can be NULL (i.e no name) and will be cropped to 150
* characters.
*/
char *eNB_name;
/* Tracking area code */
uint16_t tac;
/* Mobile Country Code
* Mobile Network Code
*/
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
/* Nb of MME to connect to */
uint8_t nb_mme;
/* List of MME to connect to */
mme_ip_address_t mme_ip_address[S1AP_MAX_NB_MME_IP_ADDRESS];
int sctp_in_streams;
int sctp_out_streams;
char *enb_interface_name_for_S1U;
in_addr_t enb_ipv4_address_for_S1U;
tcp_udp_port_t enb_port_for_S1U;
char *enb_interface_name_for_S1_MME;
in_addr_t enb_ipv4_address_for_S1_MME;
} Enb_properties_t;
typedef struct Enb_properties_array_s {
int number;
Enb_properties_t *properties[EPC_TEST_SCENARIO_MAX_ENB];
} Enb_properties_array_t;
void enb_config_init(const char const * lib_config_file_name_pP);
#endif /* ENB_CONFIG_H_ */
/** @} */
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import subprocess
import re
import socket
import datetime
from datetime import date
import os, errno
import argparse
import tempfile
from lxml import etree
from xml.dom.minidom import parse, parseString
#####################
# program arguments
#####################
parser = argparse.ArgumentParser()
parser.add_argument("--pcap_file", "-p", type=str,help="input pcap file to be translated")
args = parser.parse_args()
#####################
# get xml document from pcap
#####################
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)
#####################
# filtering unwanted packets
#####################
#cases = orig_etree.findall(".//proto[@name='sctp']")
packets = orig_dom.getElementsByTagName("packet")
for packet in packets:
found_sctp = False
found_s1ap = False
protos = packet.getElementsByTagName("proto")
for proto in protos:
attrs = proto.attributes
urlnode = attrs['name']
if urlnode.nodeValue == 'sctp':
found_sctp = True
elif urlnode.nodeValue == 's1ap':
found_s1ap = True
elif urlnode.nodeValue == 'geninfo':
packet.removeChild(proto)
elif urlnode.nodeValue == 'eth':
packet.removeChild(proto)
if found_sctp == False:
# hopefully it seems to work (remove iterated packet)
packet.parentNode.removeChild(packet)
#####################
# dom to xml string
#####################
filtered_pdml_string = orig_dom.toxml()
cleaned_pdml_string = ""
#####################
# remove blank lines in xml string
#####################
lines = filtered_pdml_string.splitlines()
for line in lines:
if line[:-1]:
cleaned_pdml_string += line + '\r\n'
#print "'%s'" % cleaned_pdml_string
#####################
# 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()
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*
play_scenario_sctp.c
-------------------
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*/
#include <errno.h>
#include "intertask_interface.h"
#include "platform_types.h"
#include "assertions.h"
#include "play_scenario.h"
//------------------------------------------------------------------------------
asn_comp_rval_t * et_sctp_data_is_matching(sctp_datahdr_t * const sctp1, sctp_datahdr_t * const sctp2, const uint32_t constraints)
{
asn_comp_rval_t *rv = NULL;
// no comparison for ports
if (sctp1->ppid != sctp2->ppid) {
S1AP_WARN("No Matching SCTP PPID %u %u\n", sctp1->ppid, sctp2->ppid);
rv = calloc(1, sizeof(asn_comp_rval_t));
rv->err_code = ET_ERROR_MATCH_PACKET_SCTP_PPID;
return rv;
}
if (sctp1->assoc_id != sctp2->assoc_id) {
S1AP_WARN("No Matching SCTP assoc id %u %u\n", sctp1->assoc_id, sctp2->assoc_id);
rv = calloc(1, sizeof(asn_comp_rval_t));
rv->err_code = ET_ERROR_MATCH_PACKET_SCTP_ASSOC_ID;
return rv;
}
if (sctp1->stream != sctp2->stream) {
if (constraints & ET_BIT_MASK_MATCH_SCTP_STREAM) {
rv = calloc(1, sizeof(asn_comp_rval_t));
rv->err_code = ET_ERROR_MATCH_PACKET_SCTP_STREAM_ID;
return rv;
} else {
S1AP_WARN("No Matching SCTP stream %u %u\n", sctp1->stream, sctp2->stream);
}
}
// We do not have SSN from lower layers
// if (sctp1->ssn != sctp2->ssn) {
// if (constraints & ET_BIT_MASK_MATCH_SCTP_SSN) {
// rv = calloc(1, sizeof(asn_comp_rval_t));
// rv->err_code = ET_ERROR_MATCH_PACKET_SCTP_SSN;
// return rv;
// } else {
// S1AP_WARN("No Matching SCTP STREAM SN %u %u\n", sctp1->ssn, sctp2->ssn);
// }
// }
return et_s1ap_is_matching(&sctp1->payload, &sctp2->payload, constraints);
}
//------------------------------------------------------------------------------
asn_comp_rval_t * et_sctp_is_matching(et_sctp_hdr_t * const sctp1, et_sctp_hdr_t * const sctp2, const uint32_t constraints)
{
// no comparison for ports
asn_comp_rval_t *rv = NULL;
if (sctp1->chunk_type != sctp2->chunk_type){
S1AP_WARN("No Matching chunk_type %u %u\n", sctp1->chunk_type, sctp2->chunk_type);
rv = calloc(1, sizeof(asn_comp_rval_t));
rv->err_code = ET_ERROR_MATCH_PACKET_SCTP_CHUNK_TYPE;
return rv;
}
switch (sctp1->chunk_type) {
case SCTP_CID_DATA:
return et_sctp_data_is_matching(&sctp1->u.data_hdr, &sctp2->u.data_hdr, constraints);
break;
case SCTP_CID_INIT:
AssertFatal(0, "Not needed now");
break;
case SCTP_CID_INIT_ACK:
AssertFatal(0, "Not needed now");
break;
default:
AssertFatal(0, "Not needed now cid %d", sctp1->chunk_type);
}
return NULL;
}
......@@ -275,7 +275,6 @@ do { \
(bITsTRING)->size = 3; \
(bITsTRING)->bits_unused = 4; \
} while(0)
/*
/* TS 36.413 v10.9.0 section 9.2.1.38:
* E-UTRAN CGI/Cell Identity
* The leftmost bits of the Cell
......
......@@ -1080,6 +1080,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
device->trx_set_freq_func = trx_brf_set_freq;
device->trx_set_gains_func = trx_brf_set_gains;
device->openair0_cfg = openair0_cfg;
device->priv = (void *)brf;
calibrate_rf(device);
......
......@@ -103,14 +103,18 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
if (flag == BBU_LOCAL_RADIO_HEAD) {
lib_handle = dlopen(OAI_RF_LIBNAME, RTLD_LAZY);
if (!lib_handle) {
printf( "Unable to locate %s: HW device set to NONE_DEV.\n", OAI_RF_LIBNAME);
return 0;
fprintf(stderr,"Unable to locate %s: HW device set to NONE_DEV.\n", OAI_RF_LIBNAME);
fprintf(stderr,"%s\n",dlerror());
return -1;
}
dp = dlsym(lib_handle,"device_init");
if (dp != NULL ) {
dp(device,openair0_cfg);
if (dp(device,openair0_cfg)!=0) {
fprintf(stderr,"Error initializing device\n");
return -1;
}
} else {
fprintf(stderr, "%s %d:oai device intializing function not found %s\n", __FILE__, __LINE__, dlerror());
return -1;
......@@ -119,7 +123,8 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
lib_handle = dlopen(OAI_TP_LIBNAME, RTLD_LAZY);
if (!lib_handle) {
printf( "Unable to locate %s: transport protocol set to NONE_TP.\n", OAI_TP_LIBNAME);
return 0;
printf( "%s\n",dlerror());
return -1;
}
tp = dlsym(lib_handle,"transport_init");
......@@ -152,7 +157,7 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf
}
}
#endif
return 0;
return rc;
}
int openair0_transport_load(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t * eth_params) {
......@@ -164,7 +169,7 @@ int openair0_transport_load(openair0_device *device, openair0_config_t *openair0
return -1;
}
}
return 0;
return rc;
}
......
......@@ -2,7 +2,7 @@ set(si5351_src_files
Si5351C.cpp
)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 "
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 -fPIC"
)
......
......@@ -9,7 +9,7 @@ if(${CMAKE_MAJOR_VERSION} GREATER 2)
endif()
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
if(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -fPIC")
endif()
# set up include-directories
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment