Commit b797dafd authored by Bing-Kai Hong's avatar Bing-Kai Hong

1.Update the F1 messages with F1AP spec R15.2.1 and build scripts for proper...

1.Update the F1 messages with F1AP spec R15.2.1 and build scripts for proper generation of F1 messages
2.Add SCTP procedure (without ITTI) with F1AP
3.Add F1AP test code
parent b58ef546
...@@ -170,7 +170,7 @@ set(CMAKE_C_FLAGS ...@@ -170,7 +170,7 @@ set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC ") "${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC ")
# add autotools definitions that were maybe used! # add autotools definitions that were maybe used!
set(CMAKE_C_FLAGS set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -DASN_DISABLE_OER_SUPPORT -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'" "${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'"
) )
set(CMAKE_CXX_FLAGS set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 " "${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 "
...@@ -478,15 +478,13 @@ include_directories ("${X2AP_DIR}") ...@@ -478,15 +478,13 @@ include_directories ("${X2AP_DIR}")
#F1AP # F1AP
# Same limitation as described in RRC/S1AP: unknown generated file list
# so we generate it at cmake time
############## ##############
add_list1_option(F1AP_RELEASE R15 "F1AP ASN.1 grammar version" R15) add_list1_option(F1AP_RELEASE R15 "F1AP ASN.1 grammar version" R15)
set(F1AP_DIR ${OPENAIR2_DIR}/F1AP) set(F1AP_DIR ${OPENAIR2_DIR}/F1AP)
if (${F1AP_RELEASE} STREQUAL "R15") if (${F1AP_RELEASE} STREQUAL "R15")
make_version(F1AP_VERSION 15 1 1) make_version(F1AP_VERSION 15 2 1)
set (ASN1RELDIR R15.1.1) set (ASN1RELDIR R15.2.1)
endif(${F1AP_RELEASE} STREQUAL "R15") endif(${F1AP_RELEASE} STREQUAL "R15")
add_definitions(-DF1AP_VERSION=${F1AP_VERSION}) add_definitions(-DF1AP_VERSION=${F1AP_VERSION})
set(F1AP_ASN_DIR ${F1AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR}) set(F1AP_ASN_DIR ${F1AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR})
...@@ -507,47 +505,53 @@ unset(ENV{ASN1C_PREFIX}) ...@@ -507,47 +505,53 @@ unset(ENV{ASN1C_PREFIX})
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${asn1c_call}: error") message(FATAL_ERROR "${asn1c_call}: error")
endif (NOT ${ret} STREQUAL 0) endif (NOT ${ret} STREQUAL 0)
#execute_process(COMMAND python ${F1AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f ${F1AP_ASN_DIR}/F1AP-PDU-Contents.asn -o ${F1AP_C_DIR}
# RESULT_VARIABLE ret)
#if (NOT ${ret} STREQUAL 0)
# message(FATAL_ERROR "asn1tostruct.py: error")
#endif (NOT ${ret} STREQUAL 0)
#execute_process(COMMAND ${fix_asn1c_call} ${F1AP_C_DIR} F1AP ${F1AP_VERSION}
# RESULT_VARIABLE ret)
#if (NOT ${ret} STREQUAL 0)
# message(FATAL_ERROR "${fix_asn1c_call}: error")
#endif (NOT ${ret} STREQUAL 0)
file(GLOB F1AP_source ${F1AP_C_DIR}/*.c) file(GLOB F1AP_source ${F1AP_C_DIR}/*.c)
#set(F1AP_OAI_generated #set(F1AP_OAI_generated
# ${X2AP_C_DIR}/x2ap_decoder.c # ${F1AP_C_DIR}/per_decoder.c
# ${X2AP_C_DIR}/x2ap_encoder.c # ${F1AP_C_DIR}/per_encoder.c
# ${X2AP_C_DIR}/x2ap_xer_print.c #${F1AP_C_DIR}/f1ap_xer_print.c
# ${X2AP_C_DIR}/x2ap_ies_defs.h # ${F1AP_C_DIR}/F1AP_ProtocolIE-Field.h
# ) # )
file(GLOB f1ap_h ${F1AP_C_DIR}/*.h) file(GLOB f1ap_h ${F1AP_C_DIR}/*.h)
set(f1ap_h ${f1ap_h} ) set(f1ap_h ${f1ap_h} )
##message("calling ${X2AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f ${X2AP_ASN_DIR}/X2AP-PDU-Contents.asn -o ${X2AP_C_DIR}")
#add_custom_command (
# OUTPUT ${F1AP_OAI_generated}
# COMMAND ${asn1c_call} ${F1AP_C_DIR} ${F1AP_ASN_FILES}
# COMMAND python ${F1AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f ${F1AP_ASN_DIR}/F1AP-PDU-Contents.asn -o ${F1AP_C_DIR}
# COMMAND ${fix_asn1c_call} ${F1AP_C_DIR} F1AP ${F1AP_VERSION}
# DEPENDS ${F1AP_ASN_FILES}
# )
add_library(F1AP_LIB add_library(F1AP_LIB
${F1AP_OAI_generated} #${F1AP_OAI_generated}
#${f1ap_h}
${F1AP_source} ${F1AP_source}
# ${F1AP_DIR}/f1ap_common.c
) )
include_directories ("${F1AP_C_DIR}") include_directories ("${F1AP_C_DIR}")
include_directories ("${F1AP_DIR}") include_directories ("${F1AP_DIR}")
add_library(F1AP
#${F1AP_DIR}/test.c
${F1AP_DIR}/DU_F1AP.c
${F1AP_DIR}/CU_F1AP.c
)
add_executable(test_f1ap_du
${F1AP_DIR}/test_f1ap_du.c
${F1AP_DIR}/DU_F1AP.c
${F1AP_DIR}/sctp_du.c
)
target_link_libraries(test_f1ap_du
-Wl,--start-group F1AP_LIB sctp pthread -Wl,--end-group
)
add_executable(test_f1ap_cu
${F1AP_DIR}/test_f1ap_cu.c
${F1AP_DIR}/CU_F1AP.c
${F1AP_DIR}/sctp_cu.c
)
target_link_libraries(test_f1ap_cu
-Wl,--start-group F1AP_LIB sctp pthread -Wl,--end-group
)
# Hardware dependant options # Hardware dependant options
################################### ###################################
...@@ -832,6 +836,7 @@ include_directories("${OPENAIR3_DIR}/SECU") ...@@ -832,6 +836,7 @@ include_directories("${OPENAIR3_DIR}/SECU")
include_directories("${OPENAIR3_DIR}/SCTP") include_directories("${OPENAIR3_DIR}/SCTP")
include_directories("${OPENAIR3_DIR}/S1AP") include_directories("${OPENAIR3_DIR}/S1AP")
include_directories("${OPENAIR2_DIR}/X2AP") include_directories("${OPENAIR2_DIR}/X2AP")
include_directories("${OPENAIR2_DIR}/F1AP")
include_directories("${OPENAIR3_DIR}/UDP") include_directories("${OPENAIR3_DIR}/UDP")
include_directories("${OPENAIR3_DIR}/GTPV1-U") include_directories("${OPENAIR3_DIR}/GTPV1-U")
include_directories("${OPENAIR_DIR}/targets/COMMON") include_directories("${OPENAIR_DIR}/targets/COMMON")
...@@ -2049,6 +2054,8 @@ add_definitions(-DASN1_MINIMUM_VERSION=924) ...@@ -2049,6 +2054,8 @@ add_definitions(-DASN1_MINIMUM_VERSION=924)
add_executable(lte-softmodem add_executable(lte-softmodem
${rrc_h} ${rrc_h}
${s1ap_h} ${s1ap_h}
${f1ap_h}
#${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-enb.c ${OPENAIR_TARGETS}/RT/USER/lte-enb.c
${OPENAIR_TARGETS}/RT/USER/lte-ru.c ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
...@@ -2073,7 +2080,7 @@ add_executable(lte-softmodem ...@@ -2073,7 +2080,7 @@ add_executable(lte-softmodem
target_link_libraries (lte-softmodem target_link_libraries (lte-softmodem
-Wl,--start-group -Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl) -Wl,--end-group z dl)
...@@ -2088,6 +2095,8 @@ target_link_libraries (lte-softmodem ${T_LIB}) ...@@ -2088,6 +2095,8 @@ target_link_libraries (lte-softmodem ${T_LIB})
add_executable(lte-softmodem-nos1 add_executable(lte-softmodem-nos1
${rrc_h} ${rrc_h}
${s1ap_h} ${s1ap_h}
${f1ap_h}
#${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-enb.c ${OPENAIR_TARGETS}/RT/USER/lte-enb.c
${OPENAIR_TARGETS}/RT/USER/lte-ru.c ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
...@@ -2126,6 +2135,8 @@ target_link_libraries (lte-softmodem-nos1 ${T_LIB}) ...@@ -2126,6 +2135,8 @@ target_link_libraries (lte-softmodem-nos1 ${T_LIB})
add_executable(lte-uesoftmodem add_executable(lte-uesoftmodem
${rrc_h} ${rrc_h}
${s1ap_h} ${s1ap_h}
${f1ap_h}
#${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-ue.c ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c ${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c
...@@ -2149,7 +2160,7 @@ add_executable(lte-uesoftmodem ...@@ -2149,7 +2160,7 @@ add_executable(lte-uesoftmodem
target_link_libraries (lte-uesoftmodem target_link_libraries (lte-uesoftmodem
-Wl,--start-group -Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl) -Wl,--end-group z dl)
...@@ -2164,6 +2175,8 @@ target_link_libraries (lte-uesoftmodem ${T_LIB}) ...@@ -2164,6 +2175,8 @@ target_link_libraries (lte-uesoftmodem ${T_LIB})
add_executable(lte-uesoftmodem-nos1 add_executable(lte-uesoftmodem-nos1
${rrc_h} ${rrc_h}
${s1ap_h} ${s1ap_h}
${f1ap_h}
# ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-ue.c ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c ${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c
...@@ -2266,7 +2279,7 @@ add_executable(test_epc_generate_scenario ...@@ -2266,7 +2279,7 @@ add_executable(test_epc_generate_scenario
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h ${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
) )
target_link_libraries (test_epc_generate_scenario 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 ${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} -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB F1AP_LIB F1AP 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 add_executable(test_epc_play_scenario
...@@ -2286,7 +2299,7 @@ add_executable(test_epc_play_scenario ...@@ -2286,7 +2299,7 @@ add_executable(test_epc_play_scenario
) )
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c) target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
target_link_libraries (test_epc_play_scenario 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_COMMON PHY PHY_UE 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} -Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY_COMMON PHY PHY_UE 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}
) )
...@@ -2322,7 +2335,7 @@ if (${T_TRACER}) ...@@ -2322,7 +2335,7 @@ if (${T_TRACER})
dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
pdcchsim pucchsim prachsim syncsim ulsim pdcchsim pucchsim prachsim syncsim ulsim
#all "add_library" definitions #all "add_library" definitions
ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB F1AP_LIB F1AP
oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif
oai_eth_transpro oai_eth_transpro
FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA
......
...@@ -2,23 +2,29 @@ ...@@ -2,23 +2,29 @@
function main() function main()
{ {
mkdir -p $1 PROTOCOL_DIR=$1
cd $1 mkdir -p ${PROTOCOL_DIR}
cd ${PROTOCOL_DIR}
# Because use $* also include directory, so we need shift
shift shift
#if this script is called with only 2 arguments (so 1 here after the shift), it's for RRC # There are three types parameter for asn1c
#(there may be a better way...) # One is for RRC
if [ $# -eq 1 ]; then # and one is for F1AP
# another is for other protocols
if echo ${PROTOCOL_DIR} | grep -q "RRC"; then
#asn1c does not work well with extension groups, we need the following fix: #asn1c does not work well with extension groups, we need the following fix:
# replace [[ by '<name> SEQUENCE {' # replace [[ by '<name> SEQUENCE {'
# and ]] by '} OPTIONAL' # and ]] by '} OPTIONAL'
#<name> is ext<N> with N starting from 1 and incremented at each new [[ ]] just #<name> is ext<N> with N starting from 1 and incremented at each new [[ ]] just
#following another [[ ]] #following another [[ ]]
# #
#this is what the following C program does #this is what the following C program does
echo generate asnfix.c echo generate asnfix.c
cat << EOF > asnfix.c cat << EOF > asnfix.c
/* transforms: /* transforms:
...@@ -85,29 +91,33 @@ int main(void) ...@@ -85,29 +91,33 @@ int main(void)
} }
EOF EOF
echo compile asnfix.c echo compile asnfix.c
gcc -Wall -o asnfix asnfix.c
echo run asnfix on $1
gcc -Wall -o asnfix asnfix.c ./asnfix < $1 > fixed_grammar.asn
echo run asnfix on $1 rm -f asnfix asnfix.c
./asnfix < $1 > fixed_grammar.asn echo done with asnfix
rm -f asnfix asnfix.c echo running asn1c
echo done with asnfix asn1c -gen-PER -fcompound-names -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
echo running asn1c rm -f fixed_grammar.asn
asn1c -gen-PER -fcompound-names -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample echo asn1c done
rm -f fixed_grammar.asn elif echo ${PROTOCOL_DIR} | grep -q "F1AP"; then
echo asn1c done asn1c -gen-PER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
else else
asn1c -gen-PER -fcompound-names -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample asn1c -gen-PER -fcompound-names -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
fi fi
......
...@@ -173,6 +173,7 @@ typedef enum { ...@@ -173,6 +173,7 @@ typedef enum {
GTPU, GTPU,
SPGW, SPGW,
S1AP, S1AP,
F1AP,
SCTP, SCTP,
HW, HW,
OSA, OSA,
......
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/* Messages for S1AP logging */
MESSAGE_DEF(S1AP_UPLINK_NAS_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_uplink_nas_log)
MESSAGE_DEF(S1AP_UE_CAPABILITY_IND_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_ue_capability_ind_log)
MESSAGE_DEF(S1AP_INITIAL_CONTEXT_SETUP_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_initial_context_setup_log)
MESSAGE_DEF(S1AP_NAS_NON_DELIVERY_IND_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_nas_non_delivery_ind_log)
MESSAGE_DEF(S1AP_DOWNLINK_NAS_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_downlink_nas_log)
MESSAGE_DEF(S1AP_S1_SETUP_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_s1_setup_log)
MESSAGE_DEF(S1AP_INITIAL_UE_MESSAGE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_initial_ue_message_log)
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_REQ_LOG, MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_ue_context_release_req_log)
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_COMMAND_LOG, MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_ue_context_release_command_log)
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_COMPLETE_LOG, MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_ue_context_release_complete_log)
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_ue_context_release_log)
MESSAGE_DEF(S1AP_E_RAB_SETUP_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_setup_request_log)
MESSAGE_DEF(S1AP_E_RAB_SETUP_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_setup_response_log)
MESSAGE_DEF(S1AP_E_RAB_MODIFY_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_modify_request_log)
MESSAGE_DEF(S1AP_E_RAB_MODIFY_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_modify_response_log)
MESSAGE_DEF(S1AP_PAGING_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_paging_log)
MESSAGE_DEF(S1AP_E_RAB_RELEASE_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_release_request_log)
MESSAGE_DEF(S1AP_E_RAB_RELEASE_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_release_response_log)
MESSAGE_DEF(S1AP_E_RAB_ERROR_INDICATION_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_error_indication_log)
/* eNB application layer -> S1AP messages */
MESSAGE_DEF(S1AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, s1ap_register_enb_req_t , s1ap_register_enb_req)
/* S1AP -> eNB application layer messages */
MESSAGE_DEF(S1AP_REGISTER_ENB_CNF , MESSAGE_PRIORITY_MED, s1ap_register_enb_cnf_t , s1ap_register_enb_cnf)
MESSAGE_DEF(S1AP_DEREGISTERED_ENB_IND , MESSAGE_PRIORITY_MED, s1ap_deregistered_enb_ind_t , s1ap_deregistered_enb_ind)
/* RRC -> S1AP messages */
MESSAGE_DEF(S1AP_NAS_FIRST_REQ , MESSAGE_PRIORITY_MED, s1ap_nas_first_req_t , s1ap_nas_first_req)
MESSAGE_DEF(S1AP_UPLINK_NAS , MESSAGE_PRIORITY_MED, s1ap_uplink_nas_t , s1ap_uplink_nas)
MESSAGE_DEF(S1AP_UE_CAPABILITIES_IND , MESSAGE_PRIORITY_MED, s1ap_ue_cap_info_ind_t , s1ap_ue_cap_info_ind)
MESSAGE_DEF(S1AP_INITIAL_CONTEXT_SETUP_RESP, MESSAGE_PRIORITY_MED, s1ap_initial_context_setup_resp_t, s1ap_initial_context_setup_resp)
MESSAGE_DEF(S1AP_INITIAL_CONTEXT_SETUP_FAIL, MESSAGE_PRIORITY_MED, s1ap_initial_context_setup_fail_t, s1ap_initial_context_setup_fail)
MESSAGE_DEF(S1AP_NAS_NON_DELIVERY_IND , MESSAGE_PRIORITY_MED, s1ap_nas_non_delivery_ind_t , s1ap_nas_non_delivery_ind)
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_RESP , MESSAGE_PRIORITY_MED, s1ap_ue_release_resp_t , s1ap_ue_release_resp)
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_COMPLETE, MESSAGE_PRIORITY_MED, s1ap_ue_release_complete_t , s1ap_ue_release_complete)
MESSAGE_DEF(S1AP_UE_CTXT_MODIFICATION_RESP , MESSAGE_PRIORITY_MED, s1ap_ue_ctxt_modification_resp_t , s1ap_ue_ctxt_modification_resp)
MESSAGE_DEF(S1AP_UE_CTXT_MODIFICATION_FAIL , MESSAGE_PRIORITY_MED, s1ap_ue_ctxt_modification_fail_t , s1ap_ue_ctxt_modification_fail)
MESSAGE_DEF(S1AP_E_RAB_SETUP_RESP , MESSAGE_PRIORITY_MED, s1ap_e_rab_setup_resp_t , s1ap_e_rab_setup_resp)
MESSAGE_DEF(S1AP_E_RAB_SETUP_REQUEST_FAIL , MESSAGE_PRIORITY_MED, s1ap_e_rab_setup_req_fail_t , s1ap_e_rab_setup_request_fail)
MESSAGE_DEF(S1AP_E_RAB_MODIFY_RESP , MESSAGE_PRIORITY_MED, s1ap_e_rab_modify_resp_t , s1ap_e_rab_modify_resp)
MESSAGE_DEF(S1AP_E_RAB_RELEASE_RESPONSE , MESSAGE_PRIORITY_MED, s1ap_e_rab_release_resp_t , s1ap_e_rab_release_resp)
/* S1AP -> RRC messages */
MESSAGE_DEF(S1AP_DOWNLINK_NAS , MESSAGE_PRIORITY_MED, s1ap_downlink_nas_t , s1ap_downlink_nas )
MESSAGE_DEF(S1AP_INITIAL_CONTEXT_SETUP_REQ , MESSAGE_PRIORITY_MED, s1ap_initial_context_setup_req_t , s1ap_initial_context_setup_req )
MESSAGE_DEF(S1AP_UE_CTXT_MODIFICATION_REQ , MESSAGE_PRIORITY_MED, s1ap_ue_ctxt_modification_req_t , s1ap_ue_ctxt_modification_req)
MESSAGE_DEF(S1AP_PAGING_IND , MESSAGE_PRIORITY_MED, s1ap_paging_ind_t , s1ap_paging_ind )
MESSAGE_DEF(S1AP_E_RAB_SETUP_REQ , MESSAGE_PRIORITY_MED, s1ap_e_rab_setup_req_t , s1ap_e_rab_setup_req )
MESSAGE_DEF(S1AP_E_RAB_MODIFY_REQ , MESSAGE_PRIORITY_MED, s1ap_e_rab_modify_req_t , s1ap_e_rab_modify_req )
MESSAGE_DEF(S1AP_E_RAB_RELEASE_COMMAND , MESSAGE_PRIORITY_MED, s1ap_e_rab_release_command_t , s1ap_e_rab_release_command)
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_COMMAND, MESSAGE_PRIORITY_MED, s1ap_ue_release_command_t , s1ap_ue_release_command)
/* S1AP <-> RRC messages (can be initiated either by MME or eNB) */
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_REQ , MESSAGE_PRIORITY_MED, s1ap_ue_release_req_t , s1ap_ue_release_req)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
-- **************************************************************
--
-- Common definitions
--
-- **************************************************************
F1AP-CommonDataTypes {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-CommonDataTypes (3) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
Criticality ::= ENUMERATED { reject, ignore, notify }
Presence ::= ENUMERATED { optional, conditional, mandatory }
PrivateIE-ID ::= CHOICE {
local INTEGER (0..65535),
global OBJECT IDENTIFIER
}
ProcedureCode ::= INTEGER (0..255)
ProtocolExtensionID ::= INTEGER (0..65535)
ProtocolIE-ID ::= INTEGER (0..65535)
TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome }
END
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.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file f1ap_decoder.h
* \brief f1ap pdu decode procedures
* \author EURECOM/NTUST
* \date 2018
* \version 0.1
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
* \note
* \warning
*/
#include <stdint.h>
#include "f1ap_ies_defs.h"
#ifndef F1AP_DECODER_H_
#define F1AP_DECODER_H_
int f1ap_decode_pdu(f1ap_message *message, const uint8_t * const buffer,
const uint32_t length) __attribute__ ((warn_unused_result));
#endif /* F1AP_DECODER_H_ */
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file f1ap_default_values.h
* \brief default values for f1ap procedures
* \author EURECOM/NTUST
* \date 2018
* \version 0.1
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
* \note
* \warning
*/
#ifndef F1AP_DEFAULT_VALUES_H_
#define F1AP_DEFAULT_VALUES_H_
#define ENB_TAC (1)
#define ENB_MCC (208)
#define ENB_MNC (92)
#define ENB_NAME "Eurecom ENB"
#define ENB_NAME_FORMAT (ENB_NAME" %u")
#define F1AP_PORT_NUMBER (3642)
#define F1AP_SCTP_PPID (62)
#endif /* F1AP_DEFAULT_VALUES_H_ */
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file f1ap_encoder.h
* \brief f1ap pdu encode procedures
* \author EURECOM/NTUST
* \date 2018
* \version 0.1
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
* \note
* \warning
*/
#ifndef F1AP_ENCODER_H_
#define F1AP_ENCODER_H_
int f1ap_encode_pdu(f1ap_message *message, uint8_t **buffer, uint32_t *len)
__attribute__ ((warn_unused_result));
#endif /* F1AP_ENCODER_H_ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* Test */
void CU_handle_F1_SETUP_REQUEST(void);
/**/
int main(void) {
/* Test */
F1AP_CU_task();
//CU_handle_F1_SETUP_REQUEST();
return 0;
}
int main(void) {
F1AP_DU_task();
return 0;
}
This diff is collapsed.
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