Commit 2c2a2c6a authored by gauthier's avatar gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7653 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent eebc9396
This diff is collapsed.
This diff is collapsed.
...@@ -276,8 +276,8 @@ function main() { ...@@ -276,8 +276,8 @@ function main() {
cmake .. cmake ..
echo_info "Compiling LTE softmodem (w/o S1 interface)" echo_info "Compiling LTE softmodem (w/o S1 interface)"
compilations \ compilations \
lte_noS1_build_oai lte-softmodem \ lte_noS1_build_oai lte-softmodem-nos1 \
lte-softmodem $dbin/lte-softmodem-nos1 lte-softmodem-nos1 $dbin/lte-softmodem-nos1
compilations \ compilations \
lte_noS1_build_oai nasmesh \ lte_noS1_build_oai nasmesh \
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
......
...@@ -12,5 +12,5 @@ set(PDCP_USE_NETLINK_QUEUES False) ...@@ -12,5 +12,5 @@ set(PDCP_USE_NETLINK_QUEUES False)
set(LINUX True) set(LINUX True)
set(SECU False) set(SECU False)
set(NAS_UE False) set(NAS_UE False)
set(PACKAGE_NAME "\"lte-softmodem\"") set(PACKAGE_NAME "\"lte-softmodem-nos1\"")
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
...@@ -20,30 +20,30 @@ set(OPENAIR_TARGETS $ENV{OPENAIR_DIR}/targets) ...@@ -20,30 +20,30 @@ set(OPENAIR_TARGETS $ENV{OPENAIR_DIR}/targets)
# Add .h files for dependancies # Add .h files for dependancies
set(usim_SRC set(usim_SRC
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/tools/usim_data.c ${OPENAIR_DIR}/openair-cn/NAS/TOOLS/usim_data.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/usim_api.c ${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/usim_api.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/aka_functions.c ${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/aka_functions.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.c ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.c ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/OctetString.c ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/OctetString.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/TLVEncoder.c ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/TLVEncoder.c
) )
set(usim_HDR set(usim_HDR
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/tools/network.h ${OPENAIR_DIR}/openair-cn/NAS/TOOLS/network.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/usim_api.h ${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/usim_api.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/aka_functions.h ${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/aka_functions.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.h ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.h ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/OctetString.h ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/OctetString.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/TLVEncoder.h ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/TLVEncoder.h
) )
include_directories( include_directories(
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/include ${OPENAIR_DIR}/openair-cn/NAS/COMMON
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim ${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/emm/ ${OPENAIR_DIR}/openair-cn/NAS/UE/EMM/
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/esm/ ${OPENAIR_DIR}/openair-cn/NAS/UE/ESM/
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/ies/ ${OPENAIR_DIR}/openair-cn/NAS/COMMON/IES/
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL
) )
ADD_EXECUTABLE(usim ${usim_SRC} ${usim_HDR}) ADD_EXECUTABLE(usim ${usim_SRC} ${usim_HDR})
...@@ -51,15 +51,15 @@ ADD_EXECUTABLE(usim ${usim_SRC} ${usim_HDR}) ...@@ -51,15 +51,15 @@ ADD_EXECUTABLE(usim ${usim_SRC} ${usim_HDR})
set(nvram_SRC set(nvram_SRC
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/tools/ue_data.c ${OPENAIR_DIR}/openair-cn/NAS/TOOLS/ue_data.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.c ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.c ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.c
) )
set(nvram_HDR set(nvram_HDR
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/emm/emmData.h ${OPENAIR_DIR}/openair-cn/NAS/UE/EMM/emmData.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.h ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/include/userDef.h ${OPENAIR_DIR}/openair-cn/NAS/COMMON/userDef.h
) )
ADD_EXECUTABLE(nvram ${nvram_SRC} ${nvram_HDR}) ADD_EXECUTABLE(nvram ${nvram_SRC} ${nvram_HDR})
......
...@@ -246,8 +246,8 @@ function main() ...@@ -246,8 +246,8 @@ function main()
$SUDO rm -f /usr/etc/freeDiameter/mme* 2>&1 $SUDO rm -f /usr/etc/freeDiameter/mme* 2>&1
$SUDO rm -f /usr/etc/freeDiameter/epc* 2>&1 $SUDO rm -f /usr/etc/freeDiameter/epc* 2>&1
$SUDO rm -f $OPENAIR_DIR/targets/bin/xt_GTPU*.ko 2>&1 $SUDO rm -f $OPENAIR_DIR/targets/bin/xt_GTPU*.ko 2>&1
(cd $OPENAIRCN_DIR/GTPV1-U/GTPUAH && $SUDO make clean) (cd $OPENAIRCN_DIR/GTPV1-U/GTPUSP && $SUDO make clean)
$SUDO rm -f $OPENAIRCN_DIR/GTPV1-U/GTPUAH/Bin/* 2>&1 $SUDO rm -f $OPENAIRCN_DIR/GTPV1-U/GTPUSP/Bin/* 2>&1
$SUDO rm -f /lib/xtables/libxt_GTPU*.so 2>&1 $SUDO rm -f /lib/xtables/libxt_GTPU*.so 2>&1
mkdir -m 777 -p -v build mkdir -m 777 -p -v build
fi fi
...@@ -274,16 +274,16 @@ function main() ...@@ -274,16 +274,16 @@ function main()
mme_gw $dbin/mme_gw.$REL mme_gw $dbin/mme_gw.$REL
# Only integrated mme+sgw+pgw is operational today # Only integrated mme+sgw+pgw is operational today
compilations \ compilations \
epc_build_oai xt_GTPUAH_lib \ epc_build_oai xt_GTPUSP_lib \
libxt_GTPUAH_lib.so $dbin libxt_GTPUSP_lib.so $dbin
compilations \ compilations \
epc_build_oai xt_GTPUAH \ epc_build_oai xt_GTPUSP \
CMakeFiles/xt_GTPUAH/xt_GTPUAH.ko $dbin CMakeFiles/xt_GTPUSP/xt_GTPUSP.ko $dbin
echo_info "Copying iptables libraries into system directory: /lib/xtables" echo_info "Copying iptables libraries into system directory: /lib/xtables"
if [ -f $dbin/libxt_GTPUAH_lib.so ] ; then if [ -f $dbin/libxt_GTPUSP_lib.so ] ; then
$SUDO rm -f /lib/xtables/libxt_GTPUAH.so $SUDO rm -f /lib/xtables/libxt_GTPUSP.so
$SUDO ln -s $dbin/libxt_GTPUAH_lib.so /lib/xtables/libxt_GTPUAH.so $SUDO ln -s $dbin/libxt_GTPUSP_lib.so /lib/xtables/libxt_GTPUSP.so
else else
echo_fatal "not installed GTP-U iptables: binaries not found" echo_fatal "not installed GTP-U iptables: binaries not found"
fi fi
......
...@@ -251,6 +251,8 @@ install_latest_freediameter_from_source() { ...@@ -251,6 +251,8 @@ install_latest_freediameter_from_source() {
$SUDO make install $SUDO make install
rm -rf /tmp/freeDiameter rm -rf /tmp/freeDiameter
} }
check_install_usrp_uhd_driver(){ check_install_usrp_uhd_driver(){
v=$(lsb_release -cs) v=$(lsb_release -cs)
$SUDO apt-add-repository "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" $SUDO apt-add-repository "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
...@@ -308,6 +310,7 @@ check_install_oai_software() { ...@@ -308,6 +310,7 @@ check_install_oai_software() {
flex \ flex \
gccxml \ gccxml \
gdb \ gdb \
git \
graphviz \ graphviz \
gtkwave \ gtkwave \
guile-2.0-dev \ guile-2.0-dev \
......
...@@ -86,7 +86,11 @@ function main() { ...@@ -86,7 +86,11 @@ function main() {
else else
echo_error "Bad mme fqdn found in cert file: $full_hostname fqdn is $fqdn" echo_error "Bad mme fqdn found in cert file: $full_hostname fqdn is $fqdn"
fi fi
else
echo_error "File $freediameter_path/etc/freeDiameter/mme.cert.pem not found"
fi fi
else
echo_error "Directory $freediameter_path/etc/freeDiameter not found"
fi fi
echo_error "MME S6A: Did not find valid certificate in $freediameter_path/etc/freeDiameter" 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..." echo_warning "MME S6A: generating new certificate in $freediameter_path/etc/freeDiameter..."
......
...@@ -62,7 +62,7 @@ MME : ...@@ -62,7 +62,7 @@ MME :
# max values = 999.999:65535 # max values = 999.999:65535
# maximum of 32 values, comma separated # maximum of 32 values, comma separated
TAI_LIST = ( TAI_LIST = (
{MCC="208" ; MNC="95"; TAC = "1"; } # YOUR PLMN CONFIG HERE {MCC="208" ; MNC="10"; TAC = "1"; } # YOUR PLMN CONFIG HERE
); );
}; };
......
...@@ -174,17 +174,17 @@ function main() ...@@ -174,17 +174,17 @@ function main()
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
if [ ! -e $OPENAIR_DIR/targets/bin/lte-softmodem ]; then if [ ! -e $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 ]; then
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/lte-softmodem executable" echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 executable"
fi fi
if [ $run_gdb -eq 0 ]; then if [ $run_gdb -eq 0 ]; then
exec $OPENAIR_DIR/targets/bin/lte-softmodem `echo $exe_arguments` 2>&1 > /tmp/lte_softmodem.stdout.txt exec $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 `echo $exe_arguments` 2>&1 > /tmp/lte_softmodem.stdout.txt
else else
touch ~/.gdb_lte_softmodem touch ~/.gdb_lte_softmodem
chmod 777 ~/.gdb_lte_softmodem chmod 777 ~/.gdb_lte_softmodem
echo "file $OPENAIR_DIR/targets/bin/lte-softmodem" > ~/.gdb_lte_softmodem echo "file $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10" > ~/.gdb_lte_softmodem
echo "set args $exe_arguments" >> ~/.gdb_lte_softmodem echo "set args $exe_arguments" >> ~/.gdb_lte_softmodem
echo "run" >> ~/.gdb_lte_softmodem echo "run" >> ~/.gdb_lte_softmodem
cat ~/.gdb_lte_softmodem cat ~/.gdb_lte_softmodem
......
...@@ -214,12 +214,12 @@ function main() ...@@ -214,12 +214,12 @@ function main()
is_tun=`is_tun_interface $ENB_INTERFACE_NAME_FOR_S1_MME $ENB_INTERFACE_NAME_FOR_S1U` is_tun=`is_tun_interface $ENB_INTERFACE_NAME_FOR_S1_MME $ENB_INTERFACE_NAME_FOR_S1U`
# if [ $is_tun = "1" ]; then # if [ $is_tun = "1" ]; then
# $SUDO openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1U;sync # openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1U;sync
# $SUDO openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync # openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
# $SUDO ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1U/$ENB_IPV4_NETMASK_FOR_S1U dev $ENB_INTERFACE_NAME_FOR_S1U;sync # ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1U/$ENB_IPV4_NETMASK_FOR_S1U dev $ENB_INTERFACE_NAME_FOR_S1U;sync
# $SUDO ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1_MME/$ENB_IPV4_NETMASK_FOR_S1_MME dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync # ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1_MME/$ENB_IPV4_NETMASK_FOR_S1_MME dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
# $SUDO ifconfig $ENB_INTERFACE_NAME_FOR_S1U up;sync # ifconfig $ENB_INTERFACE_NAME_FOR_S1U up;sync
# $SUDO ifconfig $ENB_INTERFACE_NAME_FOR_S1_MME up;sync # ifconfig $ENB_INTERFACE_NAME_FOR_S1_MME up;sync
# echo_success "Configured local eNB S1 tun interfaces" # echo_success "Configured local eNB S1 tun interfaces"
# else # else
# echo_success "eNB S1 tun interfaces should be ethernet interfaces (no tunnels configured)" # echo_success "eNB S1 tun interfaces should be ethernet interfaces (no tunnels configured)"
...@@ -228,21 +228,21 @@ function main() ...@@ -228,21 +228,21 @@ function main()
################################################## ##################################################
# LAUNCH eNB + UE executable # LAUNCH eNB + UE executable
################################################## ##################################################
$SUDO pkill oaisim pkill oaisim
$SUDO rmmod ue_ip > /dev/null 2>&1 rmmod ue_ip > /dev/null 2>&1
echo_success "Bringup UE interface..." echo_success "Bringup UE interface..."
$SUDO insmod $OPENAIR_DIR/targets/bin/ue_ip.ko insmod $OPENAIR_DIR/targets/bin/ue_ip.ko
$SUDO ip route flush cache ip route flush cache
# Check table 200 lte in /etc/iproute2/rt_tables # Check table 200 lte in /etc/iproute2/rt_tables
fgrep lte /etc/iproute2/rt_tables > /dev/null fgrep lte /etc/iproute2/rt_tables > /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
$SUDO echo "200 lte " >> /etc/iproute2/rt_tables bash -c echo "200 lte " >> /etc/iproute2/rt_tables
fi fi
$SUDO ip rule add fwmark 1 table lte ip rule add fwmark 1 table lte
$SUDO ip route add default dev oip1 table lte ip route add default dev oip1 table lte
exe_arguments="$exe_arguments -s15 -AAWGN -y1 -b1 -u1 -Q0" exe_arguments="$exe_arguments -s15 -AAWGN -y1 -b1 -u1 -Q0"
...@@ -250,19 +250,19 @@ function main() ...@@ -250,19 +250,19 @@ function main()
if [ $run_mscgen -eq 1 ]; then if [ $run_mscgen -eq 1 ]; then
$SUDO rm -f /tmp/openair.msc.* rm -f /tmp/openair.msc.*
fi fi
if [ $run_gdb -eq 0 ]; then if [ $run_gdb -eq 0 ]; then
exec $SUDO $OPENAIR_DIR/targets/bin/oaisim $exe_arguments | tee /tmp/enb_ue_s1.log.txt exec $OPENAIR_DIR/targets/bin/oaisim.Rel10 $exe_arguments | tee /tmp/enb_ue_s1.log.txt
else else
touch ~/.gdb_enb_ue_s1 touch ~/.gdb_enb_ue_s1
chmod 777 ~/.gdb_enb_ue_s1 chmod 777 ~/.gdb_enb_ue_s1
echo "file $OPENAIR_DIR/targets/bin/oaisim" > ~/.gdb_enb_ue_s1 echo "file $OPENAIR_DIR/targets/bin/oaisim.Rel10" > ~/.gdb_enb_ue_s1
echo "set args $exe_arguments" >> ~/.gdb_enb_ue_s1 echo "set args $exe_arguments" >> ~/.gdb_enb_ue_s1
echo "run" >> ~/.gdb_enb_ue_s1 echo "run" >> ~/.gdb_enb_ue_s1
cat ~/.gdb_enb_ue_s1 cat ~/.gdb_enb_ue_s1
$SUDO gdb -n -x ~/.gdb_enb_ue_s1 gdb -n -x ~/.gdb_enb_ue_s1
fi fi
if [ $run_mscgen -eq 1 ]; then if [ $run_mscgen -eq 1 ]; then
...@@ -281,4 +281,12 @@ function main() ...@@ -281,4 +281,12 @@ function main()
} }
sudo echo
is_sudo=$?
if [[ "$is_sudo" -ne 0 ]]; then
echo_error "This script must be run by root or a sudo'er"
echo
exit 1
fi
main "$@" main "$@"
...@@ -133,8 +133,8 @@ function main() ...@@ -133,8 +133,8 @@ function main()
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
if [ ! -e $OPENAIR_DIR/targets/bin/mme_gw ]; then if [ ! -e $OPENAIR_DIR/targets/bin/mme_gw.Rel10 ]; then
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/mme_gw executable, have a look at the output of build_epc executable" echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/mme_gw.Rel10 executable, have a look at the output of build_epc executable"
fi fi
if [ $epc_local -eq 1 ]; then if [ $epc_local -eq 1 ]; then
...@@ -148,11 +148,11 @@ function main() ...@@ -148,11 +148,11 @@ function main()
exe_arguments="-O $epc_config_file $exe_arguments" exe_arguments="-O $epc_config_file $exe_arguments"
if [ $run_gdb -eq 0 ]; then if [ $run_gdb -eq 0 ]; then
$OPENAIR_DIR/targets/bin/mme_gw `echo $exe_arguments` 2>&1 $OPENAIR_DIR/targets/bin/mme_gw.Rel10 `echo $exe_arguments` 2>&1
else else
touch ~/.gdb_mme_gw touch ~/.gdb_mme_gw
chmod 777 ~/.gdb_mme_gw chmod 777 ~/.gdb_mme_gw
echo "file $OPENAIR_DIR/targets/bin/mme_gw" > ~/.gdb_mme_gw echo "file $OPENAIR_DIR/targets/bin/mme_gw.Rel10" > ~/.gdb_mme_gw
echo "set args $exe_arguments " >> ~/.gdb_mme_gw echo "set args $exe_arguments " >> ~/.gdb_mme_gw
echo "run" >> ~/.gdb_mme_gw echo "run" >> ~/.gdb_mme_gw
cat ~/.gdb_mme_gw cat ~/.gdb_mme_gw
...@@ -175,5 +175,12 @@ function main() ...@@ -175,5 +175,12 @@ function main()
} }
sudo echo
is_sudo=$?
if [[ "$is_sudo" -ne 0 ]]; then
echo_error "This script must be run by root or a sudo'er"
echo
exit 1
fi
main "$@" main "$@"
Installation Instructions Installation Instructions
************************* *************************
Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
Inc. Inc.
Copying and distribution of this file, with or without modification, Copying and distribution of this file, with or without modification,
...@@ -12,8 +12,8 @@ without warranty of any kind. ...@@ -12,8 +12,8 @@ without warranty of any kind.
Basic Installation Basic Installation
================== ==================
Briefly, the shell commands `./configure; make; make install' should Briefly, the shell command `./configure && make && make install'
configure, build, and install this package. The following should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented `INSTALL' file but do not implement all of the features documented
...@@ -309,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is ...@@ -309,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround: an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation `configure' Invocation
====================== ======================
...@@ -367,4 +368,3 @@ operates. ...@@ -367,4 +368,3 @@ operates.
`configure' also accepts some other, not widely useful, options. Run `configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details. `configure --help' for more details.
#################################################################################### ####################################################################################
# Makefile for iptables extension for the GTPUAH target and GTPUAH klm # Makefile for iptables extension for the GTPUSP target and GTPUSP klm
# #
# Copyright (c) 2010-2011 Polaris Networks # Copyright (c) 2010-2011 Polaris Networks
# Author: Pradip Biswas <pradip_biswas@polarisnetworks.net> # Author: Pradip Biswas <pradip_biswas@polarisnetworks.net>
...@@ -14,20 +14,20 @@ export BIN_DIR ?= $(shell pwd)/Bin ...@@ -14,20 +14,20 @@ export BIN_DIR ?= $(shell pwd)/Bin
KVERSION = $(shell uname -r) KVERSION = $(shell uname -r)
KVERSION_LAST_DIGIT = $(shell echo ${KVERSION} | cut -d "." -f 3 | cut -d "-" -f 1) KVERSION_LAST_DIGIT = $(shell echo ${KVERSION} | cut -d "." -f 3 | cut -d "-" -f 1)
obj-m = xt_GTPUAH.o obj-m = xt_GTPUSP.o
EXTRA_CFLAGS += -DKVERSION=$(KVERSION_LAST_DIGIT) EXTRA_CFLAGS += -DKVERSION=$(KVERSION_LAST_DIGIT)
all: xtlib all: xtlib
echo "Building for Kernel Version: $(KVERSION_LAST_DIGIT)" echo "Building for Kernel Version: $(KVERSION_LAST_DIGIT)"
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
chmod 777 xt_GTPUAH.ko chmod 777 xt_GTPUSP.ko
mv xt_GTPUAH.ko $(BIN_DIR)/ mv xt_GTPUSP.ko $(BIN_DIR)/
clean: libclean clean: libclean
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
################################################################################ ################################################################################
# The next section is used by libxt_GTPUAH # The next section is used by libxt_GTPUSP
################################################################################ ################################################################################
XT_IPTABLES_VERSION = $(shell /sbin/iptables -V | cut -d " " -f 2 | cut -b 2-) XT_IPTABLES_VERSION = $(shell /sbin/iptables -V | cut -d " " -f 2 | cut -b 2-)
...@@ -47,11 +47,11 @@ endif ...@@ -47,11 +47,11 @@ endif
LIB_CFLAGS := -fPIC -Wall -MMD -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \ 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_REENTRANT -pipe -DXTABLES_LIBDIR=\"/usr/local/libexec/xtables\" -DXTABLES_INTERNAL \
-D_INIT=libxt_GTPUAH_init -DPIC -fPIC -O2 \ -D_INIT=libxt_GTPUSP_init -DPIC -fPIC -O2 \
-DIPTVERSION=$(IPTVERSION) \ -DIPTVERSION=$(IPTVERSION) \
-DIPTABLES_VERSION_STRING=$(IPTABLES_VERSION_STRING) -DIPTABLES_VERSION_STRING=$(IPTABLES_VERSION_STRING)
XT_TARGET := xt_GTPUAH XT_TARGET := xt_GTPUSP
XT_LIBNAME := lib$(XT_TARGET).so XT_LIBNAME := lib$(XT_TARGET).so
XT_BUILD_DIR = $(BIN_DIR)/$(XT_TARGET) XT_BUILD_DIR = $(BIN_DIR)/$(XT_TARGET)
...@@ -70,7 +70,7 @@ INCLUDE_DIR = -I. \ ...@@ -70,7 +70,7 @@ INCLUDE_DIR = -I. \
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \
-I/usr/lib64/glib-2.0/include -I/usr/lib64/glib-2.0/include
XT_SOURCES = libxt_GTPUAH.c XT_SOURCES = libxt_GTPUSP.c
XT_OBJECTS := $(addprefix $(XT_BUILD_DIR)/, $(notdir $(XT_SOURCES:.c=.o))) XT_OBJECTS := $(addprefix $(XT_BUILD_DIR)/, $(notdir $(XT_SOURCES:.c=.o)))
...@@ -91,7 +91,7 @@ $(BIN_DIR)/$(XT_LIBNAME): $(XT_OBJECTS) ...@@ -91,7 +91,7 @@ $(BIN_DIR)/$(XT_LIBNAME): $(XT_OBJECTS)
@$(LIB_LD) -shared $(XT_OBJECTS) -o $@ @$(LIB_LD) -shared $(XT_OBJECTS) -o $@
$(XT_BUILD_DIR)/%.o : %.c $(XT_BUILD_DIR)/%.o : %.c
@echo "Building GTPUAH ext for version $(IPTVERSION) $(IPTABLES_VERSION_STRING)" @echo "Building GTPUSP ext for version $(IPTVERSION) $(IPTABLES_VERSION_STRING)"
@echo Compiling $< @echo Compiling $<
@$(LIB_CC) $(LIB_CFLAGS) -MF $(DF).d $(INCLUDE_DIR) -o $@ -c $< @$(LIB_CC) $(LIB_CFLAGS) -MF $(DF).d $(INCLUDE_DIR) -o $@ -c $<
@cp $(DF).d $(DF).P; \ @cp $(DF).d $(DF).P; \
......
...@@ -3,5 +3,4 @@ Known issues in GTPU v1.0 ...@@ -3,5 +3,4 @@ Known issues in GTPU v1.0
------------------------- -------------------------
1. Does not implement the "Transport" action. 1. Does not implement the "Transport" action.
2. Does not handle segmented GTPu packets.
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
iptables -t mangle -F iptables -t mangle -F
# Remove GTPU KLM # Remove GTPU KLM
rmmod xt_GTPUAH rmmod xt_GTPUSP
# Insert the GTPUAH KLM # Insert the GTPUSP KLM
insmod ./Bin/xt_GTPUAH.ko insmod ./Bin/xt_GTPUSP.ko
# Copy the userland iptables extenstion library # Copy the userland iptables extenstion library
if [ -d /lib/xtables ]; then if [ -d /lib/xtables ]; then
/bin/cp -f ./Bin/libxt_GTPUAH.so /lib/xtables/ /bin/cp -f ./Bin/libxt_GTPUSP.so /lib/xtables/
fi fi
if [ -d /lib/iptables ]; then if [ -d /lib/iptables ]; then
/bin/cp -f ./Bin/libxt_GTPUAH.so /lib/iptables/libipt_GTPUAH.so /bin/cp -f ./Bin/libxt_GTPUSP.so /lib/iptables/libipt_GTPUSP.so
fi fi
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
* *
*/ */
enum xt_gtpuah_mode_ { enum xt_gtpusp_mode_ {
PARAM_GTPUAH_ACTION_ADD = 1 << 8, PARAM_GTPUSP_ACTION_ADD = 1 << 8,
}; };
struct xt_gtpuah_target_info { struct xt_gtpusp_target_info {
u_int32_t laddr __attribute__((aligned(8))); u_int32_t laddr __attribute__((aligned(8)));
u_int32_t raddr __attribute__((aligned(8))); u_int32_t raddr __attribute__((aligned(8)));
u_int32_t ltun __attribute__((aligned(8))); u_int32_t ltun __attribute__((aligned(8)));
......
This diff is collapsed.
...@@ -26,42 +26,25 @@ ...@@ -26,42 +26,25 @@
# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
# #
################################################################################ ################################################################################
noinst_LTLIBRARIES = libnas.la ifndef PROJDIR
PROJDIR = $(PWD)/../../..
INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) -I$(EMMMSGDIR) -I$(ESMMSGDIR)
endif
libnas_la_LDFLAGS = -all-static include $(PROJDIR)/Makerules
include $(PROJDIR)/Makefile.inc
AM_CFLAGS = \ all: $(OBJS)
@ADD_CFLAGS@ \
-DNAS_MME \ %.o: %.c Makefile
-DNAS_BUILT_IN_EPC \ @echo Compiling $<
-DENABLE_ITTI \ @$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
-I$(top_srcdir)/COMMON \
-I$(top_srcdir)/SECU \ clean:
-I$(top_srcdir)/INTERTASK_INTERFACE \ $(RM) $(OBJS) *.bak *~
-I$(top_srcdir)/NAS/EURECOM-NAS/src/api/user \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/api/mme \ depend:
-I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ makedepend -- ${CFLAGS} -- ${SRCS}
-I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/sap \ # DO NOT DELETE THIS LINE -- make depend depends on it.
-I$(top_srcdir)/NAS/EURECOM-NAS/src/emm \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/sap/msg \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/sap \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/esm \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/include \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/util \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/ \
-I$(top_srcdir)/UTILS
if DISABLE_USE_NAS
libnas_la_SOURCES = \
nas_main.c
else
include Makefile.inc
libnas_la_SOURCES = \
nas_main.c \
nas_itti_messaging.c \
nas_itti_messaging.h \
$(libnas_SRCS)
endif
\ No newline at end of file
This diff is collapsed.
../../../../../openair2/COMMON/as_message.h
\ No newline at end of file
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@eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*****************************************************************************
Source nas_message.h
Version 0.1
Date 2012/26/09
Product NAS stack
Subsystem Application Programming Interface
Author Frederic Maurel
Description Defines the layer 3 messages supported by the NAS sublayer
protocol and functions used to encode and decode
*****************************************************************************/
#ifndef __NAS_MESSAGE_H__
#define __NAS_MESSAGE_H__
#include "commonDef.h"
#include "emm_msg.h"
#if defined(NAS_BUILT_IN_EPC)
#include "emmData.h"
#endif
#include "esm_msg.h"
/****************************************************************************/
/********************* G L O B A L C O N S T A N T S *******************/
/****************************************************************************/
#define NAS_MESSAGE_SECURITY_HEADER_SIZE 6
/****************************************************************************/
/************************ G L O B A L T Y P E S ************************/
/****************************************************************************/
/* Structure of security protected header */
typedef struct {
#ifdef __LITTLE_ENDIAN_BITFIELD
eps_protocol_discriminator_t protocol_discriminator:4;
UInt8_t security_header_type:4;
#endif
#ifdef __BIG_ENDIAN_BITFIELD
UInt8_t security_header_type:4;
UInt8_t protocol_discriminator:4;
#endif
UInt32_t message_authentication_code;
UInt8_t sequence_number;
} nas_message_security_header_t;
/* Structure of plain NAS message */
typedef union {
EMM_msg emm; /* EPS Mobility Management messages */
ESM_msg esm; /* EPS Session Management messages */
} nas_message_plain_t;
/* Structure of security protected NAS message */
typedef struct {
nas_message_security_header_t header;
nas_message_plain_t plain;
} nas_message_security_protected_t;
/*
* Structure of a layer 3 NAS message
*/
typedef union {
nas_message_security_header_t header;
nas_message_security_protected_t security_protected;
nas_message_plain_t plain;
} nas_message_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 ******************/
/****************************************************************************/
int nas_message_encrypt(
const char *inbuf,
char *outbuf,
const nas_message_security_header_t *header,
int length,
void *security);
int nas_message_decrypt(const char *inbuf,
char *outbuf,
nas_message_security_header_t *header,
int length,
void *security);
int nas_message_decode(
const char * const buffer,
nas_message_t *msg,
int length,
void *security);
int nas_message_encode(
char *buffer,
const nas_message_t * const msg,
int length,
void *security);
#endif /* __NAS_MESSAGE_H__*/
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@eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*****************************************************************************
Source network_api.h
Version 0.1
Date 2012/03/01
Product NAS stack
Subsystem Application Programming Interface
Author Frederic Maurel
Description Implements the API used by the NAS layer to send/receive
message to/from the network layer
*****************************************************************************/
#ifndef __NETWORK_API_H__
#define __NETWORK_API_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 network_api_initialize(const char* host, const char* port);
int network_api_get_fd(void);
const void* network_api_get_data(void);
int network_api_read_data(int fd);
int network_api_send_data(int fd, int length);
void network_api_close(int fd);
int network_api_decode_data(int length);
int network_api_encode_data(void* data);
#endif /* __NETWORK_API_H__*/
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@eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "ProtocolDiscriminator.h"
#include "SecurityHeaderType.h"
#include "MessageType.h"
#include "EpsAttachResult.h"
#include "GprsTimer.h"
#include "TrackingAreaIdentityList.h"
#include "EsmMessageContainer.h"
#include "EpsMobileIdentity.h"
#include "LocationAreaIdentification.h"
#include "MobileIdentity.h"
#include "EmmCause.h"
#include "PlmnList.h"
#include "EmergencyNumberList.h"
#include "EpsNetworkFeatureSupport.h"
#include "AdditionalUpdateResult.h"
#ifndef ATTACH_ACCEPT_H_
#define ATTACH_ACCEPT_H_
/* Minimum length macro. Formed by minimum length of each mandatory field */
#define ATTACH_ACCEPT_MINIMUM_LENGTH ( \
EPS_ATTACH_RESULT_MINIMUM_LENGTH + \
GPRS_TIMER_MINIMUM_LENGTH + \
TRACKING_AREA_IDENTITY_LIST_MINIMUM_LENGTH + \
ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH )
/* Maximum length macro. Formed by maximum length of each field */
#define ATTACH_ACCEPT_MAXIMUM_LENGTH ( \
EPS_ATTACH_RESULT_MAXIMUM_LENGTH + \
GPRS_TIMER_MAXIMUM_LENGTH + \
TRACKING_AREA_IDENTITY_LIST_MAXIMUM_LENGTH + \
ESM_MESSAGE_CONTAINER_MAXIMUM_LENGTH + \
EPS_MOBILE_IDENTITY_MAXIMUM_LENGTH + \
LOCATION_AREA_IDENTIFICATION_MAXIMUM_LENGTH + \
MOBILE_IDENTITY_MAXIMUM_LENGTH + \
EMM_CAUSE_MAXIMUM_LENGTH + \
GPRS_TIMER_MAXIMUM_LENGTH + \
GPRS_TIMER_MAXIMUM_LENGTH + \
PLMN_LIST_MAXIMUM_LENGTH + \
EMERGENCY_NUMBER_LIST_MAXIMUM_LENGTH + \
EPS_NETWORK_FEATURE_SUPPORT_MAXIMUM_LENGTH + \
ADDITIONAL_UPDATE_RESULT_MAXIMUM_LENGTH )
/* If an optional value is present and should be encoded, the corresponding
* Bit mask should be set to 1.
*/
# define ATTACH_ACCEPT_GUTI_PRESENT (1<<0)
# define ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_PRESENT (1<<1)
# define ATTACH_ACCEPT_MS_IDENTITY_PRESENT (1<<2)
# define ATTACH_ACCEPT_EMM_CAUSE_PRESENT (1<<3)
# define ATTACH_ACCEPT_T3402_VALUE_PRESENT (1<<4)
# define ATTACH_ACCEPT_T3423_VALUE_PRESENT (1<<5)
# define ATTACH_ACCEPT_EQUIVALENT_PLMNS_PRESENT (1<<6)
# define ATTACH_ACCEPT_EMERGENCY_NUMBER_LIST_PRESENT (1<<7)
# define ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_PRESENT (1<<8)
# define ATTACH_ACCEPT_ADDITIONAL_UPDATE_RESULT_PRESENT (1<<9)
typedef enum attach_accept_iei_tag {
ATTACH_ACCEPT_GUTI_IEI = 0x50, /* 0x50 = 80 */
ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_IEI = 0x13, /* 0x13 = 19 */
ATTACH_ACCEPT_MS_IDENTITY_IEI = 0x23, /* 0x23 = 35 */
ATTACH_ACCEPT_EMM_CAUSE_IEI = 0x53, /* 0x53 = 83 */
ATTACH_ACCEPT_T3402_VALUE_IEI = 0x17, /* 0x17 = 23 */
ATTACH_ACCEPT_T3423_VALUE_IEI = 0x59, /* 0x59 = 89 */
ATTACH_ACCEPT_EQUIVALENT_PLMNS_IEI = 0x4A, /* 0x4A = 74 */
ATTACH_ACCEPT_EMERGENCY_NUMBER_LIST_IEI = 0x34, /* 0x34 = 52 */
ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_IEI = 0x64, /* 0x64 = 100 */
ATTACH_ACCEPT_ADDITIONAL_UPDATE_RESULT_IEI = 0xF0, /* 0xF0 = 240 */
} attach_accept_iei;
/*
* Message name: Attach accept
* Description: This message is sent by the network to the UE to indicate that the corresponding attach request has been accepted. See table 8.2.1.1.
* Significance: dual
* Direction: network to UE
*/
typedef struct attach_accept_msg_tag {
/* Mandatory fields */
ProtocolDiscriminator protocoldiscriminator:4;
SecurityHeaderType securityheadertype:4;
MessageType messagetype;
EpsAttachResult epsattachresult;
GprsTimer t3412value;
TrackingAreaIdentityList tailist;
EsmMessageContainer esmmessagecontainer;
/* Optional fields */
uint32_t presencemask;
EpsMobileIdentity guti;
LocationAreaIdentification locationareaidentification;
MobileIdentity msidentity;
EmmCause emmcause;
GprsTimer t3402value;
GprsTimer t3423value;
PlmnList equivalentplmns;
EmergencyNumberList emergencynumberlist;
EpsNetworkFeatureSupport epsnetworkfeaturesupport;
AdditionalUpdateResult additionalupdateresult;
} attach_accept_msg;
int decode_attach_accept(attach_accept_msg *attachaccept, uint8_t *buffer, uint32_t len);
int encode_attach_accept(attach_accept_msg *attachaccept, uint8_t *buffer, uint32_t len);
#endif /* ! defined(ATTACH_ACCEPT_H_) */
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#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;
}
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#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_) */
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@eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#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;
}
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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