Commit cb01b014 authored by Julien BERNARD's avatar Julien BERNARD

Many modifications to add Ethernet support on the platform:

 - Rename IP-QoS block in LanAdaptation block and add support for plugins
 - Move IP part into a plugin
 - Move mandatory plugins in core (fix bugs 1015153, 1040632, 1042641)
 - Add the Ethernet plugin
 - Move ROHC plugin from encapsulation to lan adaptation
 - Add a TAP interface and a bridge
 - Handle network in daemon process instead of an init script
 - Update tests (still need to add Ethernet ones)
 - Update manager:
   - handle new plugins
   - specify to daemon if it should setup routes for TUN or bridge
     interface on start
   - update topology with the ethernet part 
   - improve stack handling
Add a script to build packages automatically.
Rename ATM/AAL5 into AAL5/ATM while moving it in core (fix bug 1051711)
parent 55315298
......@@ -57,8 +57,9 @@ opensand-core/doc/doxygen
opensand-core/src/system/gw
opensand-core/src/system/sat
opensand-core/src/system/st
opensand-core/src/tun_interface/opensand_tun
opensand-core/src/common/tests/ip_addr
opensand-core/src/interfaces/opensand_interfaces
opensand-core/src/interfaces/tests/test_tap
opensand-core/src/lan_adaptation/tests/ip_addr
opensand-core/src/common/tests/test_plugins
opensand-core/debian/files
opensand-core/debian/libopensand-plugin
......@@ -69,31 +70,21 @@ opensand-core/debian/opensand-core-bin
opensand-core/debian/opensand-core-dbg
opensand-collector/debian/files
opensand-collector/debian/opensand-collector
opensand-plugins/encapsulation/atm/debian/files
opensand-plugins/encapsulation/atm/debian/libopensand-atm-aal5-encap-plugin
opensand-plugins/encapsulation/atm/debian/libopensand-atm-aal5-encap-plugin-dbg
opensand-plugins/encapsulation/atm/debian/libopensand-atm-aal5-encap-plugin-manager
opensand-plugins/encapsulation/atm/debian/tmp
opensand-plugins/encapsulation/gse/debian/files
opensand-plugins/encapsulation/gse/debian/libopensand-gse-encap-plugin
opensand-plugins/encapsulation/gse/debian/libopensand-gse-encap-plugin-dbg
opensand-plugins/encapsulation/gse/debian/libopensand-gse-encap-plugin-manager
opensand-plugins/encapsulation/gse/debian/tmp
opensand-plugins/encapsulation/mpeg/debian/files
opensand-plugins/encapsulation/mpeg/debian/libopensand-mpeg-encap-plugin
opensand-plugins/encapsulation/mpeg/debian/libopensand-mpeg-encap-plugin-dbg
opensand-plugins/encapsulation/mpeg/debian/libopensand-mpeg-encap-plugin-manager
opensand-plugins/encapsulation/mpeg/debian/tmp
opensand-plugins/encapsulation/rohc/debian/files
opensand-plugins/encapsulation/rohc/debian/libopensand-rohc-encap-plugin
opensand-plugins/encapsulation/rohc/debian/libopensand-rohc-encap-plugin-dbg
opensand-plugins/encapsulation/rohc/debian/libopensand-rohc-encap-plugin-manager
opensand-plugins/encapsulation/rohc/debian/tmp
opensand-plugins/encapsulation/ule/debian/files
opensand-plugins/encapsulation/ule/debian/libopensand-ule-encap-plugin
opensand-plugins/encapsulation/ule/debian/libopensand-ule-encap-plugin-dbg
opensand-plugins/encapsulation/ule/debian/libopensand-ule-encap-plugin-manager
opensand-plugins/encapsulation/ule/debian/tmp
opensand-plugins/lan_adaptation/rohc/debian/files
opensand-plugins/lan_adaptation/rohc/debian/libopensand-rohc-lan-adapt-plugin
opensand-plugins/lan_adaptation/rohc/debian/libopensand-rohc-lan-adapt-plugin-dbg
opensand-plugins/lan_adaptation/rohc/debian/libopensand-rohc-lan-adapt-plugin-manager
opensand-plugins/lan_adaptation/rohc/debian/tmp
opensand-plugins/lan_adaptation/ethernet/debian/files
opensand-plugins/lan_adaptation/ethernet/debian/libopensand-ethernet-lan-adapt-plugin
opensand-plugins/lan_adaptation/ethernet/debian/libopensand-ethernet-lan-adapt-plugin-dbg
opensand-plugins/lan_adaptation/ethernet/debian/libopensand-ethernet-lan-adapt-plugin-manager
opensand-plugins/lan_adaptation/ethernet/debian/tmp
opensand-tests/tests*/*/*/scenario/default*
opensand-tests/tests*/*/*/scenario/topology.conf
opensand-tests/tests*/*/*/scenario/tools
......@@ -114,6 +105,10 @@ opensand-tests/tests*/*/*/scenario/*/plugins/triangular.conf
opensand-tests/tests*/stats/daemon_collector_test/scenario/*
opensand-manager/opensand_manager_core/modules/*.py
!opensand-manager/opensand_manager_core/modules/__init__.py
!opensand-manager/opensand_manager_core/modules/ip.py
!opensand-manager/opensand_manager_core/modules/aal5_atm.py
!opensand-manager/opensand_manager_core/modules/mpeg.py
!opensand-manager/opensand_manager_core/modules/ule.py
opensand-plugins/physical_layer/attenuation_model/ideal/debian/files
opensand-plugins/physical_layer/attenuation_model/ideal/debian/libopensand-ideal-attenuation-plugin
opensand-plugins/physical_layer/attenuation_model/ideal/debian/libopensand-ideal-attenuation-plugin-dbg
......@@ -150,5 +145,10 @@ opensand-plugins/physical_layer/minimal_condition/modcod/debian/libopensand-modc
opensand-plugins/physical_layer/minimal_condition/modcod/debian/libopensand-modcod-minimal-plugin-manager/
opensand-plugins/physical_layer/minimal_condition/modcod/debian/tmp
opensand-output/src/test_output
opensand-output/debian/files
opensand-output/debian/libopensand-output/
opensand-output/debian/libopensand-output-dbg/
opensand-output/debian/libopensand-output-dev/
packages
opensand-rt/src/test/test_block
opensand-rt/src/test/test_multi_blocks
#!/bin/bash
sudo echo ""
mkdir -p packages/all
mkdir -p packages/manager
mkdir -p packages/daemon
function opensand()
{
for dir in opensand-conf opensand-output opensand-rt opensand-collector opensand-core opensand-daemon opensand-manager; do
echo "**************************************"
echo "Create package for $dir"
echo "**************************************"
cd $dir
if [ -f ./autogen.sh ]; then
./autogen.sh 1>/dev/null
fi
dpkg-buildpackage 1>/dev/null
dh_clean 1>/dev/null
if [ $dir == "opensand-daemon" ]; then
rm -rf build
fi
if [ $dir == "opensand-manager" ]; then
rm -rf build
fi
cd ..
if [ $dir == "opensand-conf" ]; then
sudo dpkg -i libopensand-conf*.deb
fi
if [ $dir == "opensand-rt" ]; then
sudo dpkg -i libopensand-rt*.deb
fi
if [ $dir == "opensand-output" ]; then
sudo dpkg -i libopensand-output*.deb
fi
echo
done
rm *.dsc *.tar.gz *.changes
sudo dpkg -i libopensand-plugin*.deb
}
function lan()
{
cd opensand-plugins/lan_adaptation
for dir in ethernet rohc ; do
echo "**************************************"
echo "Create package for $dir"
echo "**************************************"
cd $dir
if [ -f ./autogen.sh ]; then
./autogen.sh 1>/dev/null
fi
dpkg-buildpackage 1>/dev/null
dh_clean 1>/dev/null
cd ..
echo
done
rm *.dsc *.tar.gz *.changes
cd ../..
}
function encap()
{
cd opensand-plugins/encapsulation
for dir in gse; do
echo "**************************************"
echo "Create package for $dir"
echo "**************************************"
cd $dir
if [ -f ./autogen.sh ]; then
./autogen.sh 1>/dev/null
fi
dpkg-buildpackage 1>/dev/null
dh_clean 1>/dev/null
cd ..
echo
done
rm *.dsc *.tar.gz *.changes
cd ../..
}
function att()
{
cd opensand-plugins/physical_layer/attenuation_model
for dir in ideal on_off triangular; do
echo "**************************************"
echo "Create package for $dir"
echo "**************************************"
cd $dir
if [ -f ./autogen.sh ]; then
./autogen.sh 1>/dev/null
fi
dpkg-buildpackage 1>/dev/null
dh_clean 1>/dev/null
cd ..
echo
done
rm *.dsc *.tar.gz *.changes
cd ../../..
}
function nom()
{
cd opensand-plugins/physical_layer/nominal_condition/
for dir in default; do
echo "**************************************"
echo "Create package for $dir"
echo "**************************************"
cd $dir
if [ -f ./autogen.sh ]; then
./autogen.sh 1>/dev/null
fi
dpkg-buildpackage 1>/dev/null
dh_clean 1>/dev/null
cd ..
echo
done
rm *.dsc *.tar.gz *.changes
cd ../../..
}
function min()
{
cd opensand-plugins/physical_layer/minimal_condition/
for dir in modcod constant; do
echo "**************************************"
echo "Create package for $dir"
echo "**************************************"
cd $dir
if [ -f ./autogen.sh ]; then
./autogen.sh 1>/dev/null
fi
dpkg-buildpackage 1>/dev/null
dh_clean 1>/dev/null
cd ..
echo
done
rm *.dsc *.tar.gz *.changes
cd ../../..
}
function err()
{
cd opensand-plugins/physical_layer/error_insertion
for dir in gate; do
echo "**************************************"
echo "Create package for $dir"
echo "**************************************"
cd $dir
if [ -f ./autogen.sh ]; then
./autogen.sh 1>/dev/null
fi
dpkg-buildpackage 1>/dev/null
dh_clean 1>/dev/null
cd ..
echo
done
rm *.dsc *.tar.gz *.changes
cd ../../..
}
function phy()
{
att
nom
min
err
}
move()
{
echo "copy packages for daemon"
cp libopensand-conf_*.deb libopensand-plugin_*.deb libopensand-output_*.deb libopensand-rt_*.deb opensand-core-bin_*.deb opensand-daemon_*.deb opensand-plugins/*/libopensand-*plugin_*.deb opensand-plugins/physical_layer/*/libopensand-*plugin_*.deb packages/daemon
echo "copy packages for manager"
cp libopensand-conf_*.deb libopensand-plugin_*.deb libopensand-output_*.deb libopensand-rt_*.deb opensand-core-*_*.deb opensand-daemon_*.deb opensand-plugins/*/libopensand-*plugin_*.deb opensand-manager*.deb opensand-plugins/*/libopensand-*plugin-manager*.deb opensand-plugins/physical_layer/*/libopensand-*plugin_*.deb opensand-plugins/physical_layer/*/libopensand-*plugin-manager*.deb opensand-collector_*.deb packages/manager
echo "copy packages for all"
mv *.deb `find opensand-plugins -name \*.deb` packages/all
}
case $1 in
"all"|"")
opensand
encap
lan
phy
move
;;
"opensand")
opensand
;;
"lan")
lan
;;
"encap")
encap
;;
"phy_att")
att
;;
"phy_nom")
nom
;;
"phy_min")
min
;;
"phy_err")
err
;;
"phy")
phy
;;
"clean")
rm -rf packages/*/*.deb
;;
"move")
move
;;
*)
echo "wrong command (all, opensand, encap, lan, phy {att, nom, min, err}, clean, move)"
;;
esac
......@@ -407,6 +407,21 @@ inline bool ConfigurationFile::getAttributeValue<uint8_t>(ConfigurationList::ite
return true;
}
template <>
inline bool ConfigurationFile::getAttributeValue<stringstream>(ConfigurationList::iterator iter,
const char *attribute,
stringstream &value)
{
string tmp_val;
if(!this->getAttributeValue(iter, attribute, tmp_val))
return false;
value << tmp_val;
return true;
}
/* only write this specialization because it will be called by the other one
* and we should not surccharge a specialization */
template <>
......
......@@ -48,16 +48,14 @@
#define GLOBAL_SECTION "global"
#define IP_OPTION_LIST "ip_options"
#define OPTION_NAME "name"
#define LAN_ADAPTATION_SCHEME_LIST "lan_adaptation_schemes"
#define UP_RETURN_ENCAP_SCHEME_LIST "up_return_encap_schemes"
#define DOWN_FORWARD_ENCAP_SCHEME_LIST "down_forward_encap_schemes"
#define POSITION "pos"
#define PROTO "proto"
#define ENCAP_NAME "encap"
#define SATELLITE_TYPE "satellite_type"
#define TRANSPARENT_SATELLITE "transparent"
#define REGENERATIVE_SATELLITE "regenerative"
#define SAT_DELAY "delay"
......@@ -137,7 +135,6 @@
// bloc_dvb_rcs_ncc //
//////////////////////
#define DVB_GW_MAC_ID (0L)
#define DVB_MAC_SECTION "mac_layer"
#define DVB_FPF "frames_per_superframe"
......@@ -193,8 +190,6 @@
// QOS //
//////////
#define TUNTAP_BUFSIZE 1514 // ethernet header + mtu, crc not included
#define SECTION_QOS_AGENT "qos_agent"
#define ST_NAME "st_name"
#define QOS_SERVER_HOST "st_address"
......@@ -216,16 +211,17 @@
#define CATEGORY_SERVICE "class"