X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FEthernetPacket.cc;h=f2321ccc5fb2be0a28aa0d5b46775be64d931db3;hb=9a988902090d28007578e93bffd809f6bd913155;hp=f0e468e0aa3f28ceb165d44edad0c35dbd9cdf05;hpb=c52cd7d87dbb525c1267aad27391b8b7365dbb57;p=senf.git diff --git a/Packets/EthernetPacket.cc b/Packets/EthernetPacket.cc index f0e468e..f2321cc 100644 --- a/Packets/EthernetPacket.cc +++ b/Packets/EthernetPacket.cc @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2006 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) // Stefan Bund @@ -33,25 +33,24 @@ ///////////////////////////////cc.p//////////////////////////////////////// namespace { - namespace pkf = satcom::pkf; - pkf::PacketRegistry::RegistrationProxy + senf::PacketRegistry::RegistrationProxy registerEthVLanPacket(0x8100); } -prefix_ void satcom::pkf::EthernetPacket::v_nextInterpreter() +prefix_ void senf::EthernetPacket::v_nextInterpreter() const { - // TODO: Add LLC/SNAP support -> only use the registry - // for type() values >=1536, otherwise expect an LLC header + /** \todo Add LLC/SNAP support -> only use the registry + for type() values >=1536, otherwise expect an LLC header */ registerInterpreter(type(),begin()+bytes(),end()); } namespace { - - void dumpmac(std::ostream & os, satcom::pkf::EthernetPacket::Parse_MAC mac) + + void dumpmac(std::ostream & os, senf::EthernetPacket::Parse_MAC mac) { for (unsigned i = 0; i < 6; ++i) { - if (i > 0) + if (i > 0) os << ':'; os << std::hex << std::setw(2) << std::setfill('0') << unsigned(mac[i]); @@ -60,14 +59,14 @@ namespace { } -prefix_ void satcom::pkf::EthernetPacket::v_dump(std::ostream & os) +prefix_ void senf::EthernetPacket::v_dump(std::ostream & os) const { if (type() <= 1500) os << "Ethernet 802.3"; else if (type() >= 0x600) os << "Ethernet II (DIX)"; - else + else os << "Ethernet 802.3 (bad ethertype >1500 and <1536)"; os << ": \n" << " destination : "; @@ -80,21 +79,20 @@ prefix_ void satcom::pkf::EthernetPacket::v_dump(std::ostream & os) << unsigned(type()) << "\n" << std::dec; } -prefix_ void satcom::pkf::EthernetPacket::v_finalize() +prefix_ void senf::EthernetPacket::v_finalize() {} -prefix_ void satcom::pkf::EthVLanPacket::v_nextInterpreter() +prefix_ void senf::EthVLanPacket::v_nextInterpreter() const { - // TODO: Add LLC/SNAP support -> only use the registry - // for type() values >=1536, otherwise expect an LLC header + /** \todo Add LLC/SNAP support (see above) */ registerInterpreter(type(),begin()+bytes(),end()); } -prefix_ void satcom::pkf::EthVLanPacket::v_finalize() +prefix_ void senf::EthVLanPacket::v_finalize() {} -prefix_ void satcom::pkf::EthVLanPacket::v_dump(std::ostream & os) +prefix_ void senf::EthVLanPacket::v_dump(std::ostream & os) const { os << "Ethernet 802.1q (VLAN):\n" @@ -110,5 +108,8 @@ prefix_ void satcom::pkf::EthVLanPacket::v_dump(std::ostream & os) // Local Variables: // mode: c++ -// c-file-style: "satcom" +// fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" // End: