GenericTLVPacketParser: fix for 64bit
[senf.git] / Packets / 80221Bundle / MIHPacket.cc
index 1a398f1..97407c2 100644 (file)
@@ -27,7 +27,6 @@
 //#include "MIHPacket.ih"
 
 // Custom includes
-#include "MIHPacket.hh"
 #include "../../Packets/Packets.hh"
 #include <boost/io/ios_state.hpp>
 
@@ -38,7 +37,7 @@ prefix_ void senf::MIHPacketType::dump(packet p, std::ostream &os)
 {
     boost::io::ios_all_saver ias(os);
     os << "MIH Packet:\n"
-       << "  protocol header:\n" << "\n"
+       << "  protocol header:\n"
        << "    Version:         " << unsigned( p->version()) << "\n"
        << "    Ack-Request:     " << p->ackRequest() << "\n"
        << "    Ack-Response:    " << p->ackResponse() << "\n"
@@ -54,6 +53,13 @@ prefix_ void senf::MIHPacketType::dump(packet p, std::ostream &os)
 }
 
 
+prefix_ void senf::MIHPacketType::finalize(packet p)
+{
+    p->source_length() << senf::bytes( p->source_mihf_id());
+    p->destination_length() << senf::bytes( p->destination_mihf_id());
+    p->payloadLength_() << p.size() - 8;
+}
+
 
 #undef prefix_