From: tho Date: Thu, 20 Sep 2007 13:08:21 +0000 (+0000) Subject: houston, we have a problem... X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=a1de53d00eb1cbe7a1dbb8918192773bc0db46a0;p=senf.git houston, we have a problem... git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@452 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/MPEGDVBBundle/TLVPacket.cc b/Packets/MPEGDVBBundle/TLVPacket.cc index d93d5c2..74b0380 100644 --- a/Packets/MPEGDVBBundle/TLVPacket.cc +++ b/Packets/MPEGDVBBundle/TLVPacket.cc @@ -21,15 +21,13 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief DSMCCSection non-inline non-template implementation */ + \brief TLVPacket non-inline non-template implementation */ #include "TLVPacket.hh" //#include "TLVPacket.ih" // Custom includes #include -#include "../../Utils/hexdump.hh" -#include "../../Packets/DefaultBundle/EthernetPacket.hh" #define prefix_ @@ -39,14 +37,11 @@ prefix_ senf::PacketParserBase::size_type senf::Parse_TLVPacket::bytes() const { +//#include +// std::cout << "XX: " << unsigned( 4 + senf::bytes( length() ) ) << "\n"; return 4 + senf::bytes( length() ); } -//prefix_ void senf::TLVPacketType::init(packet p) -//{ -// p->init(); -//} - prefix_ void senf::TLVPacketType::dump(packet p, std::ostream & os) { os << "TLVPacket:\n" @@ -55,15 +50,11 @@ prefix_ void senf::TLVPacketType::dump(packet p, std::ostream & os) << " length: " << unsigned(p->length()) << "\n"; } -prefix_ senf::PacketParserBase::size_type senf::TLVPacketType::initSize() -{ - return 4 + 1; -} +//prefix_ senf::PacketParserBase::size_type senf::TLVPacketType::initSize() +//{ +// return 4 + 1; +//} -prefix_ senf::PacketParserBase::size_type senf::TLVPacketType::initHeadSize() -{ - return 4 + 1; -} ///////////////////////////////cc.e//////////////////////////////////////// #undef prefix_ diff --git a/Packets/MPEGDVBBundle/TLVPacket.hh b/Packets/MPEGDVBBundle/TLVPacket.hh index 08de4cd..449f148 100644 --- a/Packets/MPEGDVBBundle/TLVPacket.hh +++ b/Packets/MPEGDVBBundle/TLVPacket.hh @@ -149,12 +149,12 @@ namespace senf { using mixin::nextPacketRange; using mixin::init; - + using mixin::initSize; static void dump(packet p, std::ostream & os); - static PacketParserBase::size_type initSize(); - static PacketParserBase::size_type initHeadSize(); +// static PacketParserBase::size_type initSize(); +// static PacketParserBase::size_type initHeadSize(); }; typedef TLVPacketType::packet TLVPacket; diff --git a/Packets/MPEGDVBBundle/TLVPacket.test.cc b/Packets/MPEGDVBBundle/TLVPacket.test.cc index e0755bc..4619930 100644 --- a/Packets/MPEGDVBBundle/TLVPacket.test.cc +++ b/Packets/MPEGDVBBundle/TLVPacket.test.cc @@ -28,6 +28,7 @@ // Custom includes #include "TLVPacket.hh" #include +#include #include #include @@ -55,6 +56,8 @@ BOOST_AUTO_UNIT_TEST(tlvPacket_parse_packet_with_extended_length) BOOST_CHECK_EQUAL( p->length(), 0x0Au ); senf::PacketData & p_value (p.next().data()); + senf::hexdump( p_value.begin(), p_value.end(), std::cout ); + // BOOST_CHECK_EQUAL( p_value.size(), 0x0Au); }