moved AllBundles build to toplevel SConscipt to allow PacketBundles in extensions too
tho [Wed, 23 Sep 2009 16:09:25 +0000 (16:09 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1435 270642c3-0616-0410-b53a-bc976706d245

SConscript
doclib/Doxyfile.global
senf/Packets/80221Bundle/MIHPacket.hh
senf/Packets/80221Bundle/MIHPacket.test.cc
senf/Packets/80221Bundle/TLVPacket.cci
senf/Packets/SConscript

index fbe6953..db03adb 100644 (file)
@@ -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
index e9fc343..0379348 100644 (file)
@@ -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
index e5083c5..75ef61b 100644 (file)
@@ -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 );
     };
 
index 48667c9..8fc9720 100644 (file)
@@ -28,6 +28,7 @@
 
 // Custom includes
 #include "MIHPacket.hh"
+#include <senf/Packets/DefaultBundle/EthernetPacket.hh>
 
 #include <senf/Utils/auto_unit_test.hh>
 #include <boost/test/test_tools.hpp>
@@ -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());
index 1ca1885..ab11fb6 100644 (file)
@@ -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_
 
index da9f023..478d416 100644 (file)
@@ -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)
-