missing commit for last rev.
[senf.git] / Packets / DefaultBundle / LlcSnapPacket.cc
index 93c1481..ae14712 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 //
 // Copyright (C) 2007
-// Fraunhofer Institute for Open Communication Systems (FOKUS) 
-// Competence Center NETwork research (NET), St. Augustin, GERMANY 
-//     Stefan Bund <g0dil@berlios.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+//     Thorsten Horstmann <tho@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 prefix_ void senf::LlcSnapPacketType::dump(packet p, std::ostream & os)
 {
     boost::io::ios_all_saver ias(os);
-    os << "LLC/SNAP\n"
+    os << "LLC/SNAP:\n"
        << std::hex << std::setfill('0')
-       << "  LLC\n"
-       << "    DSAP: 0x" << unsigned(p->dsap()) << "\n"
-       << "    SSAP: 0x" << unsigned(p->ssap()) << "\n"
-       << "    controlId: 0x" << unsigned(p->ctrl()) << "\n"
-       << "  SNAP\n"       
-       << "    ProtocolId: 0x" << std::setw(6) << unsigned(p->protocolId()) << "\n"
-       << "    type_length: 0x" << std::setw(4) << unsigned(p->type_length()) << "\n";
+       <<     "  LLC\n"
+       <<     "    dsap                  : 0x" << unsigned(p->dsap()) << "\n"
+       <<     "    ssap                  : 0x" << unsigned(p->ssap()) << "\n"
+       <<     "    control id            : 0x" << unsigned(p->ctrl()) << "\n"
+       <<     "  SNAP\n"       
+       <<     "    protocol id           : 0x" << std::setw(6) << unsigned(p->protocolId()) << "\n"
+       <<     "    type/length           : 0x" << std::setw(4) << unsigned(p->type_length()) << "\n";
 }
 
 prefix_ senf::PacketInterpreterBase::factory_t senf::LlcSnapPacketType::nextPacketType(packet p)
@@ -66,9 +66,6 @@ prefix_ void senf::LlcSnapPacketType::finalize(packet p)
         p->type_length() << k;
     else if (p.next().is<EthernetPacket>())
         p->type_length() << p.next().data().size();
-    else
-        ///\fixme Is this correct ?? we at least need an 'if (! p.next().is<DataPacket>() )'
-        p->type_length() << 0;
 }