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() {
cmake ..
echo_info "Compiling LTE softmodem (w/o S1 interface)"
compilations \
lte_noS1_build_oai lte-softmodem \
lte-softmodem $dbin/lte-softmodem-nos1
lte_noS1_build_oai lte-softmodem-nos1 \
lte-softmodem-nos1 $dbin/lte-softmodem-nos1
compilations \
lte_noS1_build_oai nasmesh \
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
......
......@@ -12,5 +12,5 @@ set(PDCP_USE_NETLINK_QUEUES False)
set(LINUX True)
set(SECU False)
set(NAS_UE False)
set(PACKAGE_NAME "\"lte-softmodem\"")
set(PACKAGE_NAME "\"lte-softmodem-nos1\"")
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
......@@ -20,30 +20,30 @@ set(OPENAIR_TARGETS $ENV{OPENAIR_DIR}/targets)
# Add .h files for dependancies
set(usim_SRC
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/tools/usim_data.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/usim_api.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/aka_functions.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/OctetString.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/TLVEncoder.c
${OPENAIR_DIR}/openair-cn/NAS/TOOLS/usim_data.c
${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/usim_api.c
${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/aka_functions.c
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.c
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.c
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/OctetString.c
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/TLVEncoder.c
)
set(usim_HDR
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/tools/network.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/usim_api.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/aka_functions.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/OctetString.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/TLVEncoder.h
${OPENAIR_DIR}/openair-cn/NAS/TOOLS/network.h
${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/usim_api.h
${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/aka_functions.h
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.h
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.h
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/OctetString.h
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/TLVEncoder.h
)
include_directories(
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/include
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/emm/
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/esm/
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/ies/
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util
${OPENAIR_DIR}/openair-cn/NAS/COMMON
${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM
${OPENAIR_DIR}/openair-cn/NAS/UE/EMM/
${OPENAIR_DIR}/openair-cn/NAS/UE/ESM/
${OPENAIR_DIR}/openair-cn/NAS/COMMON/IES/
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL
)
ADD_EXECUTABLE(usim ${usim_SRC} ${usim_HDR})
......@@ -51,15 +51,15 @@ ADD_EXECUTABLE(usim ${usim_SRC} ${usim_HDR})
set(nvram_SRC
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/tools/ue_data.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.c
${OPENAIR_DIR}/openair-cn/NAS/TOOLS/ue_data.c
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.c
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.c
)
set(nvram_HDR
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/emm/emmData.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/include/userDef.h
${OPENAIR_DIR}/openair-cn/NAS/UE/EMM/emmData.h
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.h
${OPENAIR_DIR}/openair-cn/NAS/COMMON/userDef.h
)
ADD_EXECUTABLE(nvram ${nvram_SRC} ${nvram_HDR})
......
......@@ -246,8 +246,8 @@ function main()
$SUDO rm -f /usr/etc/freeDiameter/mme* 2>&1
$SUDO rm -f /usr/etc/freeDiameter/epc* 2>&1
$SUDO rm -f $OPENAIR_DIR/targets/bin/xt_GTPU*.ko 2>&1
(cd $OPENAIRCN_DIR/GTPV1-U/GTPUAH && $SUDO make clean)
$SUDO rm -f $OPENAIRCN_DIR/GTPV1-U/GTPUAH/Bin/* 2>&1
(cd $OPENAIRCN_DIR/GTPV1-U/GTPUSP && $SUDO make clean)
$SUDO rm -f $OPENAIRCN_DIR/GTPV1-U/GTPUSP/Bin/* 2>&1
$SUDO rm -f /lib/xtables/libxt_GTPU*.so 2>&1
mkdir -m 777 -p -v build
fi
......@@ -274,16 +274,16 @@ function main()
mme_gw $dbin/mme_gw.$REL
# Only integrated mme+sgw+pgw is operational today
compilations \
epc_build_oai xt_GTPUAH_lib \
libxt_GTPUAH_lib.so $dbin
epc_build_oai xt_GTPUSP_lib \
libxt_GTPUSP_lib.so $dbin
compilations \
epc_build_oai xt_GTPUAH \
CMakeFiles/xt_GTPUAH/xt_GTPUAH.ko $dbin
epc_build_oai xt_GTPUSP \
CMakeFiles/xt_GTPUSP/xt_GTPUSP.ko $dbin
echo_info "Copying iptables libraries into system directory: /lib/xtables"
if [ -f $dbin/libxt_GTPUAH_lib.so ] ; then
$SUDO rm -f /lib/xtables/libxt_GTPUAH.so
$SUDO ln -s $dbin/libxt_GTPUAH_lib.so /lib/xtables/libxt_GTPUAH.so
if [ -f $dbin/libxt_GTPUSP_lib.so ] ; then
$SUDO rm -f /lib/xtables/libxt_GTPUSP.so
$SUDO ln -s $dbin/libxt_GTPUSP_lib.so /lib/xtables/libxt_GTPUSP.so
else
echo_fatal "not installed GTP-U iptables: binaries not found"
fi
......
......@@ -251,6 +251,8 @@ install_latest_freediameter_from_source() {
$SUDO make install
rm -rf /tmp/freeDiameter
}
check_install_usrp_uhd_driver(){
v=$(lsb_release -cs)
$SUDO apt-add-repository "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
......@@ -308,6 +310,7 @@ check_install_oai_software() {
flex \
gccxml \
gdb \
git \
graphviz \
gtkwave \
guile-2.0-dev \
......
......@@ -86,7 +86,11 @@ function main() {
else
echo_error "Bad mme fqdn found in cert file: $full_hostname fqdn is $fqdn"
fi
else
echo_error "File $freediameter_path/etc/freeDiameter/mme.cert.pem not found"
fi
else
echo_error "Directory $freediameter_path/etc/freeDiameter not found"
fi
echo_error "MME S6A: Did not find valid certificate in $freediameter_path/etc/freeDiameter"
echo_warning "MME S6A: generating new certificate in $freediameter_path/etc/freeDiameter..."
......
......@@ -62,7 +62,7 @@ MME :
# max values = 999.999:65535
# maximum of 32 values, comma separated
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()
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
if [ ! -e $OPENAIR_DIR/targets/bin/lte-softmodem ]; then
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/lte-softmodem executable"
if [ ! -e $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 ]; then
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 executable"
fi
if [ $run_gdb -eq 0 ]; then
exec $OPENAIR_DIR/targets/bin/lte-softmodem `echo $exe_arguments` 2>&1 > /tmp/lte_softmodem.stdout.txt
exec $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 `echo $exe_arguments` 2>&1 > /tmp/lte_softmodem.stdout.txt
else
touch ~/.gdb_lte_softmodem
chmod 777 ~/.gdb_lte_softmodem
echo "file $OPENAIR_DIR/targets/bin/lte-softmodem" > ~/.gdb_lte_softmodem
echo "file $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10" > ~/.gdb_lte_softmodem
echo "set args $exe_arguments" >> ~/.gdb_lte_softmodem
echo "run" >> ~/.gdb_lte_softmodem
cat ~/.gdb_lte_softmodem
......
......@@ -214,12 +214,12 @@ function main()
is_tun=`is_tun_interface $ENB_INTERFACE_NAME_FOR_S1_MME $ENB_INTERFACE_NAME_FOR_S1U`
# if [ $is_tun = "1" ]; then
# $SUDO openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1U;sync
# $SUDO openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
# $SUDO ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1U/$ENB_IPV4_NETMASK_FOR_S1U dev $ENB_INTERFACE_NAME_FOR_S1U;sync
# $SUDO ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1_MME/$ENB_IPV4_NETMASK_FOR_S1_MME dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
# $SUDO ifconfig $ENB_INTERFACE_NAME_FOR_S1U up;sync
# $SUDO ifconfig $ENB_INTERFACE_NAME_FOR_S1_MME up;sync
# openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1U;sync
# openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
# ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1U/$ENB_IPV4_NETMASK_FOR_S1U dev $ENB_INTERFACE_NAME_FOR_S1U;sync
# ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1_MME/$ENB_IPV4_NETMASK_FOR_S1_MME dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
# ifconfig $ENB_INTERFACE_NAME_FOR_S1U up;sync
# ifconfig $ENB_INTERFACE_NAME_FOR_S1_MME up;sync
# echo_success "Configured local eNB S1 tun interfaces"
# else
# echo_success "eNB S1 tun interfaces should be ethernet interfaces (no tunnels configured)"
......@@ -228,21 +228,21 @@ function main()
##################################################
# LAUNCH eNB + UE executable
##################################################
$SUDO pkill oaisim
$SUDO rmmod ue_ip > /dev/null 2>&1
pkill oaisim
rmmod ue_ip > /dev/null 2>&1
echo_success "Bringup UE interface..."
$SUDO insmod $OPENAIR_DIR/targets/bin/ue_ip.ko
insmod $OPENAIR_DIR/targets/bin/ue_ip.ko
$SUDO ip route flush cache
ip route flush cache
# Check table 200 lte in /etc/iproute2/rt_tables
fgrep lte /etc/iproute2/rt_tables > /dev/null
if [ $? -ne 0 ]; then
$SUDO echo "200 lte " >> /etc/iproute2/rt_tables
bash -c echo "200 lte " >> /etc/iproute2/rt_tables
fi
$SUDO ip rule add fwmark 1 table lte
$SUDO ip route add default dev oip1 table lte
ip rule add fwmark 1 table lte
ip route add default dev oip1 table lte
exe_arguments="$exe_arguments -s15 -AAWGN -y1 -b1 -u1 -Q0"
......@@ -250,19 +250,19 @@ function main()
if [ $run_mscgen -eq 1 ]; then
$SUDO rm -f /tmp/openair.msc.*
rm -f /tmp/openair.msc.*
fi
if [ $run_gdb -eq 0 ]; then
exec $SUDO $OPENAIR_DIR/targets/bin/oaisim $exe_arguments | tee /tmp/enb_ue_s1.log.txt
exec $OPENAIR_DIR/targets/bin/oaisim.Rel10 $exe_arguments | tee /tmp/enb_ue_s1.log.txt
else
touch ~/.gdb_enb_ue_s1
chmod 777 ~/.gdb_enb_ue_s1
echo "file $OPENAIR_DIR/targets/bin/oaisim" > ~/.gdb_enb_ue_s1
echo "file $OPENAIR_DIR/targets/bin/oaisim.Rel10" > ~/.gdb_enb_ue_s1
echo "set args $exe_arguments" >> ~/.gdb_enb_ue_s1
echo "run" >> ~/.gdb_enb_ue_s1
cat ~/.gdb_enb_ue_s1
$SUDO gdb -n -x ~/.gdb_enb_ue_s1
gdb -n -x ~/.gdb_enb_ue_s1
fi
if [ $run_mscgen -eq 1 ]; then
......@@ -281,4 +281,12 @@ function main()
}
sudo echo
is_sudo=$?
if [[ "$is_sudo" -ne 0 ]]; then
echo_error "This script must be run by root or a sudo'er"
echo
exit 1
fi
main "$@"
......@@ -133,8 +133,8 @@ function main()
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
if [ ! -e $OPENAIR_DIR/targets/bin/mme_gw ]; then
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/mme_gw executable, have a look at the output of build_epc executable"
if [ ! -e $OPENAIR_DIR/targets/bin/mme_gw.Rel10 ]; then
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/mme_gw.Rel10 executable, have a look at the output of build_epc executable"
fi
if [ $epc_local -eq 1 ]; then
......@@ -148,11 +148,11 @@ function main()
exe_arguments="-O $epc_config_file $exe_arguments"
if [ $run_gdb -eq 0 ]; then
$OPENAIR_DIR/targets/bin/mme_gw `echo $exe_arguments` 2>&1
$OPENAIR_DIR/targets/bin/mme_gw.Rel10 `echo $exe_arguments` 2>&1
else
touch ~/.gdb_mme_gw
chmod 777 ~/.gdb_mme_gw
echo "file $OPENAIR_DIR/targets/bin/mme_gw" > ~/.gdb_mme_gw
echo "file $OPENAIR_DIR/targets/bin/mme_gw.Rel10" > ~/.gdb_mme_gw
echo "set args $exe_arguments " >> ~/.gdb_mme_gw
echo "run" >> ~/.gdb_mme_gw
cat ~/.gdb_mme_gw
......@@ -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 "$@"
Installation Instructions
*************************
Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without modification,
......@@ -12,8 +12,8 @@ without warranty of any kind.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
Briefly, the shell command `./configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
......@@ -309,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
......@@ -367,4 +368,3 @@ operates.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
####################################################################################
# Makefile for iptables extension for the GTPUAH target and GTPUAH klm
# Makefile for iptables extension for the GTPUSP target and GTPUSP klm
#
# Copyright (c) 2010-2011 Polaris Networks
# Author: Pradip Biswas <pradip_biswas@polarisnetworks.net>
......@@ -14,20 +14,20 @@ export BIN_DIR ?= $(shell pwd)/Bin
KVERSION = $(shell uname -r)
KVERSION_LAST_DIGIT = $(shell echo ${KVERSION} | cut -d "." -f 3 | cut -d "-" -f 1)
obj-m = xt_GTPUAH.o
obj-m = xt_GTPUSP.o
EXTRA_CFLAGS += -DKVERSION=$(KVERSION_LAST_DIGIT)
all: xtlib
echo "Building for Kernel Version: $(KVERSION_LAST_DIGIT)"
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
chmod 777 xt_GTPUAH.ko
mv xt_GTPUAH.ko $(BIN_DIR)/
chmod 777 xt_GTPUSP.ko
mv xt_GTPUSP.ko $(BIN_DIR)/
clean: libclean
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
################################################################################
# The next section is used by libxt_GTPUAH
# The next section is used by libxt_GTPUSP
################################################################################
XT_IPTABLES_VERSION = $(shell /sbin/iptables -V | cut -d " " -f 2 | cut -b 2-)
......@@ -47,11 +47,11 @@ endif
LIB_CFLAGS := -fPIC -Wall -MMD -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
-D_REENTRANT -pipe -DXTABLES_LIBDIR=\"/usr/local/libexec/xtables\" -DXTABLES_INTERNAL \
-D_INIT=libxt_GTPUAH_init -DPIC -fPIC -O2 \
-D_INIT=libxt_GTPUSP_init -DPIC -fPIC -O2 \
-DIPTVERSION=$(IPTVERSION) \
-DIPTABLES_VERSION_STRING=$(IPTABLES_VERSION_STRING)
XT_TARGET := xt_GTPUAH
XT_TARGET := xt_GTPUSP
XT_LIBNAME := lib$(XT_TARGET).so
XT_BUILD_DIR = $(BIN_DIR)/$(XT_TARGET)
......@@ -70,7 +70,7 @@ INCLUDE_DIR = -I. \
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \
-I/usr/lib64/glib-2.0/include
XT_SOURCES = libxt_GTPUAH.c
XT_SOURCES = libxt_GTPUSP.c
XT_OBJECTS := $(addprefix $(XT_BUILD_DIR)/, $(notdir $(XT_SOURCES:.c=.o)))
......@@ -91,7 +91,7 @@ $(BIN_DIR)/$(XT_LIBNAME): $(XT_OBJECTS)
@$(LIB_LD) -shared $(XT_OBJECTS) -o $@
$(XT_BUILD_DIR)/%.o : %.c
@echo "Building GTPUAH ext for version $(IPTVERSION) $(IPTABLES_VERSION_STRING)"
@echo "Building GTPUSP ext for version $(IPTVERSION) $(IPTABLES_VERSION_STRING)"
@echo Compiling $<
@$(LIB_CC) $(LIB_CFLAGS) -MF $(DF).d $(INCLUDE_DIR) -o $@ -c $<
@cp $(DF).d $(DF).P; \
......
......@@ -3,5 +3,4 @@ Known issues in GTPU v1.0
-------------------------
1. Does not implement the "Transport" action.
2. Does not handle segmented GTPu packets.
......@@ -2,17 +2,17 @@
iptables -t mangle -F
# Remove GTPU KLM
rmmod xt_GTPUAH
rmmod xt_GTPUSP
# Insert the GTPUAH KLM
insmod ./Bin/xt_GTPUAH.ko
# Insert the GTPUSP KLM
insmod ./Bin/xt_GTPUSP.ko
# Copy the userland iptables extenstion library
if [ -d /lib/xtables ]; then
/bin/cp -f ./Bin/libxt_GTPUAH.so /lib/xtables/
/bin/cp -f ./Bin/libxt_GTPUSP.so /lib/xtables/
fi
if [ -d<