// $Id$
//
// Copyright (C) 2007
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-// Thorsten Horstmann <thorsten.horstmann@fokus.fraunhofer.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
/** \file
\brief LLC/SNAP public header */
-#ifndef HH_LlcSnapPacket_
-#define HH_LlcSnapPacket_ 1
+#ifndef HH_SENF_Packets_DefaultBundle_LlcSnapPacket_
+#define HH_SENF_Packets_DefaultBundle_LlcSnapPacket_ 1
// Custom includes
#include <algorithm>
/** \brief Parse a LLC/SNAP header
+ \image html LlcSnapPacket.png
\todo document me
*/
- struct Parse_LlcSnapPacket : public PacketParserBase
+ struct LlcSnapPacketParser : public PacketParserBase
{
# include SENF_FIXED_PARSER()
- SENF_PARSER_FIELD( dsap, Parse_UInt8 );
- SENF_PARSER_FIELD( ssap, Parse_UInt8 );
- SENF_PARSER_FIELD( ctrl, Parse_UInt8 );
+ SENF_PARSER_FIELD( dsap, UInt8Parser );
+ SENF_PARSER_FIELD( ssap, UInt8Parser );
+ SENF_PARSER_FIELD( ctrl, UInt8Parser );
- SENF_PARSER_FIELD( protocolId, Parse_UInt24 );
- SENF_PARSER_FIELD( type_length, Parse_UInt16 );
+ SENF_PARSER_FIELD( protocolId, UInt24Parser );
+ SENF_PARSER_FIELD( type_length, UInt16Parser );
- SENF_PARSER_FINALIZE(Parse_LlcSnapPacket);
+ SENF_PARSER_FINALIZE(LlcSnapPacketParser);
SENF_PARSER_INIT() {
dsap() = 0xaa;
\ref LlcSnapPacketType
\par Fields:
- \ref Parse_LlcSnapPacket
+ \ref LlcSnapPacketParser
\par Associated registries:
\ref EtherTypes
{
#ifndef DOXYGEN
typedef PacketTypeMixin<LlcSnapPacketType, EtherTypes> mixin;
- typedef ConcretePacket<LlcSnapPacketType> packet;
- typedef Parse_LlcSnapPacket parser;
#endif
+ typedef ConcretePacket<LlcSnapPacketType> packet; ///< LLC/SNAP packet typedef
+ typedef LlcSnapPacketParser parser; ///< typedef to the parser of LLC/SNAP packet
+
using mixin::nextPacketRange;
using mixin::initSize;
using mixin::init;
static factory_t nextPacketType(packet p);
- static void dump(packet p, std::ostream & os);
+ /** \brief Dump given LlcSnapPacket in readable form to given output stream */
+ static void dump(packet p, std::ostream & os);
static void finalize(packet p);
};
+ /** \brief LLC/SNAP packet typedef */
typedef ConcretePacket<LlcSnapPacketType> LlcSnapPacket;
}
///////////////////////////////hh.e////////////////////////////////////////
-#endif
-#ifndef SENF_PACKETS_DECL_ONLY
//#include "LlcSnapPacket.cci"
//#include "LlcSnapPacket.ct"
//#include "LlcSnapPacket.cti"