fixed boost/intrusive/iset includes
[senf.git] / Packets / DefaultBundle / IPv4Packet.cc
index 69ed501..131649c 100644 (file)
@@ -1,8 +1,8 @@
 // $Id$
 //
 // Copyright (C) 2006
-// Fraunhofer Institute for Open Communication Systems (FOKUS) 
-// Competence Center NETwork research (NET), St. Augustin, GERMANY 
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
 //     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
@@ -55,9 +55,6 @@ prefix_ boost::uint16_t senf::IPv4PacketParser::calcChecksum()
     validate(bytes(*this));
     IpChecksum summer;
     summer.feed( i(),                   i()+checksum_offset );
-    // Not needed since the number of 0-bytes is even
-    // summer.feed( 0u );
-    // summer.feed( 0u );
     summer.feed( i()+checksum_offset+2, i()+bytes(*this)    );
     return summer.sum();
 }
@@ -68,21 +65,21 @@ prefix_ boost::uint16_t senf::IPv4PacketParser::calcChecksum()
 prefix_ void senf::IPv4PacketType::dump(packet p, std::ostream & os)
 {
     boost::io::ios_all_saver ias(os);
-    os << "Internet protocol Version 4:\n"
-       << "  version       : " << p->version() << "\n"
-       << "  IHL           : " << p->ihl() << "\n"
-       << "  TOS           : " << unsigned(p->tos()) << "\n"
-       << "  length        : " << p->length() << "\n"
-       << "  identifier    : " << p->identifier() << "\n"
-       << "  DF            : " << p->df() << "\n"
-       << "  MF            : " << p->mf() << "\n"
-       << "  fragment      : " << p->frag() << "\n"
-       << "  TTL           : " << unsigned(p->ttl()) << "\n"
-       << "  protocol      : " << unsigned(p->protocol()) << "\n"
-       << "  checksum      : 0x" 
+    os <<     "Internet protocol Version 4:\n"
+       <<     "  version                 : " << p->version() << "\n"
+       <<     "  ip header length        : " << p->ihl() << "\n"
+       <<     "  tos                     : " << unsigned(p->tos()) << "\n"
+       <<     "  length                  : " << p->length() << "\n"
+       <<     "  identifier              : " << p->identifier() << "\n"
+       <<     "  dont fragment           : " << p->df() << "\n"
+       <<     "  more fragments          : " << p->mf() << "\n"
+       <<     "  fragment                : " << p->frag() << "\n"
+       <<     "  ttl                     : " << unsigned(p->ttl()) << "\n"
+       <<     "  protocol                : " << unsigned(p->protocol()) << "\n"
+       <<     "  checksum                : 0x" 
          << std::hex << std::setw(4) << std::setfill('0') << p->checksum() << std::dec << "\n"
-       << "  source        : " << p->source() << "\n"
-       << "  destination   : " << p->destination() << "\n";
+       <<     "  source                  : " << p->source() << "\n"
+       <<     "  destination             : " << p->destination() << "\n";
 }
 
 prefix_ void senf::IPv4PacketType::finalize(packet p)