From: tho Date: Wed, 23 Sep 2009 16:09:25 +0000 (+0000) Subject: moved AllBundles build to toplevel SConscipt to allow PacketBundles in extensions too X-Git-Url: http://g0dil.de/git?p=senf.git;a=commitdiff_plain;h=8502d8b79fadfa53715dc9f62e1bee34435fadb9 moved AllBundles build to toplevel SConscipt to allow PacketBundles in extensions too git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1435 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/SConscript b/SConscript index fbe6953..db03adb 100644 --- a/SConscript +++ b/SConscript @@ -13,3 +13,10 @@ conf = env.CreateFile("${LOCALLIBDIR}/${LIBSENF}${LIBADDSUFFIX}.conf", env.Value(env.subst("$_CPPDEFFLAGS"))) env.Default(conf) env.Install('$CONFINSTALLDIR', conf) + +# AllBundles: +cobject = env.CombinedObject('${LOCALLIBDIR}/${NAME}${OBJADDSUFFIX}', env['PACKET_BUNDLES'], + NAME="AllBundles") +env.Default(cobject) +env.Install('${OBJINSTALLDIR}', cobject) + \ No newline at end of file diff --git a/doclib/Doxyfile.global b/doclib/Doxyfile.global index e9fc343..0379348 100644 --- a/doclib/Doxyfile.global +++ b/doclib/Doxyfile.global @@ -37,7 +37,7 @@ IMAGE_PATH = . SOURCE_BROWSER = YES ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 3 +COLS_IN_ALPHA_INDEX = 2 GENERATE_LATEX = NO GENERATE_XML = NO diff --git a/senf/Packets/80221Bundle/MIHPacket.hh b/senf/Packets/80221Bundle/MIHPacket.hh index e5083c5..75ef61b 100644 --- a/senf/Packets/80221Bundle/MIHPacket.hh +++ b/senf/Packets/80221Bundle/MIHPacket.hh @@ -60,12 +60,12 @@ namespace senf { public: enum Type { Empty, MACAddress, INet4Address, INet6Address, String, EUI64 }; - MIHFId(); - MIHFId(senf::MACAddress const & addr); - MIHFId(senf::INet4Address const & addr); - MIHFId(senf::INet6Address const & addr); - MIHFId(std::string const & addr); - MIHFId(senf::EUI64 const & addr); + MIHFId(); ///< Create empty instance. + MIHFId(senf::MACAddress const & addr); ///< Construct id with given MACAddress + MIHFId(senf::INet4Address const & addr); ///< Construct id with given INet4Address + MIHFId(senf::INet6Address const & addr); ///< Construct id with given INet6Address + MIHFId(std::string const & addr); ///< Construct id with given String + MIHFId(senf::EUI64 const & addr); ///< Construct id with given EUI64 Type type() const; bool operator==(MIHFId const & other) const; @@ -118,7 +118,8 @@ namespace senf { SENF_PARSER_INHERIT ( BaseTLVPacketParser ); SENF_PARSER_SKIP ( length(), 0 ); SENF_PARSER_FINALIZE ( MIHFId_TLVParser ); - + + public: std::string asString() const; void setString(std::string const &id); @@ -251,7 +252,6 @@ namespace senf { { # include SENF_PARSER() SENF_PARSER_LIST ( tlv_list, packetSize(), GenericTLVPacketParser ); - SENF_PARSER_FINALIZE ( MIHPayloadPacketParser ); }; diff --git a/senf/Packets/80221Bundle/MIHPacket.test.cc b/senf/Packets/80221Bundle/MIHPacket.test.cc index 48667c9..8fc9720 100644 --- a/senf/Packets/80221Bundle/MIHPacket.test.cc +++ b/senf/Packets/80221Bundle/MIHPacket.test.cc @@ -28,6 +28,7 @@ // Custom includes #include "MIHPacket.hh" +#include #include #include @@ -56,6 +57,16 @@ BOOST_AUTO_UNIT_TEST(MIHPacket_msgId) BOOST_CHECK_EQUAL( mihPacket->messageId(), 0x4c2a ); } +BOOST_AUTO_UNIT_TEST(MIHPacket_create_eth) +{ + EthernetPacket eth (EthernetPacket::create()); + MIHPacket mihPacket (MIHPacket::createAfter(eth)); + eth.finalizeAll(); + BOOST_CHECK_EQUAL( eth->type_length(), 0x86dd); + std::ostringstream oss (std::ostringstream::out); + SENF_CHECK_NO_THROW( eth.dump( oss)); +} + BOOST_AUTO_UNIT_TEST(MIHPacket_create_string) { MIHPacket mihPacket (MIHPacket::create()); diff --git a/senf/Packets/80221Bundle/TLVPacket.cci b/senf/Packets/80221Bundle/TLVPacket.cci index 1ca1885..ab11fb6 100644 --- a/senf/Packets/80221Bundle/TLVPacket.cci +++ b/senf/Packets/80221Bundle/TLVPacket.cci @@ -35,7 +35,6 @@ prefix_ senf::DynamicTLVLengthParser::size_type senf::DynamicTLVLengthParser::by return 1 + ( length_field()<=128 ? 0 : fixed_length_field()); } - ///////////////////////////////cci.e//////////////////////////////////////// #undef prefix_ diff --git a/senf/Packets/SConscript b/senf/Packets/SConscript index da9f023..478d416 100644 --- a/senf/Packets/SConscript +++ b/senf/Packets/SConscript @@ -57,8 +57,3 @@ SENFSCons.AutoRules(env, doc_extra_sources = [ env.PkgDraw("MPEGDVBBundle/TransportPacket.hh"), ]) -cobject = env.CombinedObject('${LOCALLIBDIR}/${NAME}${OBJADDSUFFIX}', env['PACKET_BUNDLES'], - NAME="AllBundles") -env.Default(cobject) -env.Install('${OBJINSTALLDIR}', cobject) -