// 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 <iomanip>
-#include "../../Utils/hexdump.hh"
-#include "../../Packets/DefaultBundle/EthernetPacket.hh"
#define prefix_
prefix_ senf::PacketParserBase::size_type senf::Parse_TLVPacket::bytes()
const
{
+//#include <iostream>
+// 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"
<< " 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_
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;
// Custom includes
#include "TLVPacket.hh"
#include <senf/Packets.hh>
+#include <senf/Utils/hexdump.hh>
#include <boost/test/auto_unit_test.hpp>
#include <boost/test/test_tools.hpp>
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);
}