PPI: Checkin of first compiling (yet not working) version
[senf.git] / Packets / DefaultBundle / IpV6Packet.cc
index 899e21a..dfb1aea 100644 (file)
 //#include "IpV6Packet.ih"
 
 // Custom includes
+#include <boost/io/ios_state.hpp>
 #include "EthernetPacket.hh"
-#include "Packets/DataPacket.hh"
-#include "Socket/INetAddressing.hh"
+#include "Socket/Protocols/INet/INetAddressing.hh"
 
 //#include "IpV6Packet.mpp"
 #define prefix_
 ///////////////////////////////cc.p////////////////////////////////////////
 
 namespace {
-    senf::PacketRegistry<senf::EtherTypes>::RegistrationProxy<senf::IpV6PacketType>
+    senf::PacketRegistry<senf::EtherTypes>::RegistrationProxy<senf::IpV6Packet>
         registerIpV6Packet (0x86dd);
 
-    senf::PacketRegistry<senf::IpTypes>::RegistrationProxy<senf::IpV6PacketType>
+    senf::PacketRegistry<senf::IpTypes>::RegistrationProxy<senf::IpV6Packet>
         registerIpV6Packet2 (41); // IP6-in-IP(6) encapsulation
 
-    senf::PacketRegistry<senf::IpTypes>::RegistrationProxy<senf::DataPacketType>
+    senf::PacketRegistry<senf::IpTypes>::RegistrationProxy<senf::DataPacket>
         registerNoNextHeader (59);
 }
 
 prefix_ void senf::IpV6PacketType::dump(packet p, std::ostream & os)
 {
+    boost::io::ios_all_saver ias(os);
     os << "Internet protocol Version 6:\n"
        << "  version       : " << unsigned(p->version()) << "\n"
        << "  traffic class : " << std::hex << unsigned(p->trafficClass()) << "\n"
@@ -53,8 +54,8 @@ prefix_ void senf::IpV6PacketType::dump(packet p, std::ostream & os)
        << "  length        : " << std::dec << unsigned(p->length()) << "\n"
        << "  next header   : " << unsigned(p->nextHeader()) << "\n"
        << "  hop limit     : " << unsigned(p->hopLimit()) << "\n"
-       << "  source        : " << INet6Address(p->source()) << "\n"
-       << "  destination   : " << INet6Address(p->destination()) << "\n";
+       << "  source        : " << p->source() << "\n"
+       << "  destination   : " << p->destination() << "\n";
 }
 
 ///////////////////////////////cc.e////////////////////////////////////////