X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FEthernetPacket.hh;h=8603c856acfb9ddfcef7cbd46b4d348d0b08014a;hb=9a988902090d28007578e93bffd809f6bd913155;hp=56b1f49607bf8907d23a2506c8cb328b4c93e0f9;hpb=33157146abaca548e145c577a0840cd1bd427789;p=senf.git diff --git a/Packets/EthernetPacket.hh b/Packets/EthernetPacket.hh index 56b1f49..8603c85 100644 --- a/Packets/EthernetPacket.hh +++ b/Packets/EthernetPacket.hh @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2006 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) // Stefan Bund @@ -34,7 +34,7 @@ namespace senf { - + template struct Parse_Ethernet : public ParserBase { @@ -46,25 +46,25 @@ namespace senf { Parse_Ethernet(Iterator const & i) : ParserBase(i) {} static unsigned bytes() { return 14; } - + /////////////////////////////////////////////////////////////////////////// typedef Parse_Array < 6, Parse_UInt8<>, Iterator > Parse_MAC; typedef Parse_UInt16 < Iterator > Parse_Type; - + Parse_MAC destination() const { return Parse_MAC (this->i() ); } Parse_MAC source() const { return Parse_MAC (this->i() + Parse_MAC::size() ); } Parse_Type type() const { return Parse_Type (this->i() + 2*Parse_MAC::size() ); } }; struct EtherTypes { - // See http://www.iana.org/assignments/ethernet-numbers + // See http://www.iana.org/assignments/ethernet-numbers typedef boost::uint16_t key_t; }; class EthernetPacket - : public Packet, - public Parse_Ethernet, + : public Packet, + public Parse_Ethernet, public PacketRegistryMixin { using PacketRegistryMixin::registerInterpreter; @@ -98,9 +98,9 @@ namespace senf { Parse_EthVLan(Iterator const & i) : ParserBase(i) {} static unsigned bytes() { return 4; } - + /////////////////////////////////////////////////////////////////////////// - + typedef Parse_UIntField < 0, 3, Iterator > Parse_Priority; typedef Parse_Flag < 3, Iterator > Parse_CFI; typedef Parse_UIntField < 4, 16, Iterator > Parse_VLanId; @@ -149,5 +149,8 @@ namespace senf { // Local Variables: // mode: c++ +// fill-column: 100 // c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" // End: