-// $Id: DSMCCSection.cc 350 2007-07-25 08:26:41Z g0dil $
+// $Id$
//
// Copyright (C) 2007
// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
// Custom includes
#include <iomanip>
+#include "Utils/hexdump.hh"
+#include "Packets/PacketData.hh"
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
return 2 + 2 + 4 + 6; // + 6 Byte NPA destination address
}
+prefix_ boost::uint32_t senf::Parse_SNDUPacket::calcCrc()
+ const
+{
+ ule_crc32 result;
+ senf::PacketData::iterator i (data().begin());
+ senf::PacketData::iterator const i_end(boost::prior(data().end(),4));
+ for (; i!=i_end; ++i)
+ result.process_byte(*i);
+ return result.checksum();
+}
+
prefix_ void senf::SNDUPacketType::dump(packet p, std::ostream & os)
{
- os << "SNDUPacket:\n";
+ os << "SNDUPacket:\n"
+ << " d_bit: " << p->d_bit() << "\n"
+ << " length: " << unsigned(p->length()) << "\n"
+ << " crc: " << unsigned(p->crc()) << "\n";
}
prefix_ senf::PacketParserBase::size_type senf::SNDUPacketType::initSize()