namespace senf {
- /** \brief Parse an Ethernet MAC address
+ /** \brief Parse an Ethernet MAC address
The ethernet MAC is returned by value as a 6-byte sequence
struct MACAddressParser : public PacketParserBase
{
MACAddressParser(data_iterator i, state_type s) : PacketParserBase(i,s,fixed_bytes) {}
-
+
///////////////////////////////////////////////////////////////////////////
typedef MACAddress value_type;
MACAddressParser const & operator= (value_type const & other) { value(other); return *this; }
};
-
+
/** \brief Parse an Ethernet packet
Parser implementing an ethernet header.
/** \brief EtherType registry
This registry registers packet types with their EtherType number.
-
+
\see <a href="http://www.iana.org/assignments/ethernet-numbers">Ethernet numbers</a> \n
\ref PacketRegistry
*/
static factory_t nextPacketType(packet p);
/// Dump given EthernetPacket in readable form to given output stream
- static void dump(packet p, std::ostream & os);
+ static void dump(packet p, std::ostream & os);
static void finalize(packet p);
};
*/
typedef ConcretePacket<EthernetPacketType> EthernetPacket;
-
+
/** \brief Parse an ethernet VLAN tag
-
+
Parser interpreting the ethernet VLAN tag. Fields are
\see EthVLanPacketType
\par Fields:
\ref EthVLanPacketParser
\image html EthVLanPacket.png
-
+
\par Associated registries:
\ref EtherTypes
\ingroup protocolbundle_default
*/
struct EthVLanPacketType
- : public PacketTypeBase,
+ : public PacketTypeBase,
public PacketTypeMixin<EthVLanPacketType, EtherTypes>
{
#ifndef DOXYGEN
/** \todo Add LLC/SNAP support -> only use the registry
for type() values >=1536, otherwise expect an LLC header */
- static key_t nextPacketKey(packet p)
+ static key_t nextPacketKey(packet p)
{ return p->type(); }
/// Dump given EthVLanPacket in readable form to given output stream