// Competence Center NETwork research (NET), St. Augustin, GERMANY
// Stefan Bund <g0dil@berlios.de>
// Philipp Batroff <philipp.batroff@fokus.fraunhofer.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
// the Free Software Foundation; either version 2 of the License, or
#define HH_SENF_Packets_DefaultBundle_IPv6Extensions_ 1
// Custom includes
-#include <senf/Packets/Packets.hh>
-#include <senf/Packets/AuxParser.hh>
-#include <senf/Packets/DefaultBundle/IPv6ExtOptionType.hh>
+#include "IPv6ExtOptions.hh"
#include "ListOptionTypeParser.hh"
#include "IPv6Packet.hh"
/** \brief Parse in IPv6 fragment extension header
Parser implementing the IPv6 fragment extension. The fields implemented are:
- \image html IPv6Extensions_Fragment.png
+ \image html IPv6FragmentPacket.png
\see IPv6ExtensionType_Fragment \n
<a href="http://tools.ietf.org/html/rfc2460">RFC 2460</a>
*/
- struct IPv6PacketParserExtension_Fragment : public PacketParserBase
+ struct IPv6FragmentPacketParser : public PacketParserBase
{
# include SENF_FIXED_PARSER()
SENF_PARSER_BITFIELD ( moreFragments , 1, bool );
SENF_PARSER_FIELD ( id , UInt32Parser );
- SENF_PARSER_FINALIZE(IPv6PacketParserExtension_Fragment);
+ SENF_PARSER_FINALIZE(IPv6FragmentPacketParser);
};
/** \brief IPv6 fragment extension
\par Packet type (typedef):
- \ref IPv6Extension_Fragment
+ \ref IPv6FragmentPacket
\par Fields:
- \ref IPv6PacketParserExtension_Fragment
+ \ref IPv6FragmentPacketParser
\par Associated registries:
\ref IpTypes
\ingroup protocolbundle_default
*/
- struct IPv6ExtensionType_Fragment
+ struct IPv6FragmentPacketType
: public PacketTypeBase,
- public PacketTypeMixin<IPv6ExtensionType_Fragment, IpTypes>
+ public PacketTypeMixin<IPv6FragmentPacketType, IpTypes>
{
#ifndef DOXYGEN
- typedef PacketTypeMixin<IPv6ExtensionType_Fragment, IpTypes> mixin;
+ typedef PacketTypeMixin<IPv6FragmentPacketType, IpTypes> mixin;
#endif
/** \brief IPv6 fragment extension packet typedef */
- typedef ConcretePacket<IPv6ExtensionType_Fragment> packet;
+ typedef ConcretePacket<IPv6FragmentPacketType> packet;
/** \brief typedef to the parser of IPv6 fragment extension packet */
- typedef IPv6PacketParserExtension_Fragment parser;
+ typedef IPv6FragmentPacketParser parser;
using mixin::nextPacketRange;
using mixin::nextPacketType;
static key_t nextPacketKey(packet p)
{ return p->nextHeader(); }
- /** \brief Dump given IPv6Extension_Fragment in readable form to given output stream */
+ /** \brief Dump given IPv6FragmentPacket in readable form to given output stream */
static void dump(packet p, std::ostream & os);
static void finalize(packet p) {
p->nextHeader() << key(p.next(nothrow)); }
};
- /** \brief IPv6 fragment extension packet typedef */
- typedef ConcretePacket<IPv6ExtensionType_Fragment> IPv6Extension_Fragment;
+ /** \brief IPv6 fragment extension packet typedef
+ \ingroup protocolbundle_default
+ */
+ typedef ConcretePacket<IPv6FragmentPacketType> IPv6FragmentPacket;
// =====================================================================================================
/** \brief Parse in IPv6 routing extension header
- Parser implementing the IPv6 routing Header extension. The fields implemented are:
- \image html IPv6Extensions_Routing.png
+ Parser implementing the IPv6 routing Header extension (type 0 only).
+ The fields implemented are:
+ \image html IPv6RoutingPacket.png
\see IPv6ExtensionType_Routing \n
- <a href="http://tools.ietf.org/html/rfc2460">RFC 2460</a>
+ <a href="http://tools.ietf.org/html/rfc2460">RFC 2460</a>
*/
-
-//Routing Header Extension (type 0 only)
- struct IPv6PacketParserExtension_Routing : public PacketParserBase
+ struct IPv6RoutingPacketParser : public PacketParserBase
{
-/*
-The Type 0 Routing header has the following format: (RFC 2460)
-
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Next Header | Hdr Ext Len | Routing Type=0| Segments Left |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Reserved |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- + +
- | |
- + Address[1] +
- | |
- + +
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- . . .
- . . .
- . . .
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- + +
- | |
- + Address[n] +
- | |
- + +
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-*/
+ /*
+ The Type 0 Routing header has the following format: (RFC 2460)
+
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Next Header | Hdr Ext Len | Routing Type=0| Segments Left |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Reserved |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | |
+ + +
+ | |
+ + Address[1] +
+ | |
+ + +
+ | |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ . . .
+ . . .
+ . . .
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | |
+ + +
+ | |
+ + Address[n] +
+ | |
+ + +
+ | |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
# include SENF_PARSER()
SENF_PARSER_FIELD ( nextHeader, UInt8Parser );
SENF_PARSER_FIELD ( reserved, UInt32Parser ); //set to zero by RFC
SENF_PARSER_VECTOR ( hopAddresses, segmentsLeft, INet6AddressParser );
- SENF_PARSER_FINALIZE ( IPv6PacketParserExtension_Routing );
+ SENF_PARSER_FINALIZE ( IPv6RoutingPacketParser );
//provisionary, since only type 0 is implemented
SENF_PARSER_INIT() {
/** \brief IPv6 routing extension
\par Packet type (typedef):
- \ref IPv6Extension_Routing
+ \ref IPv6RoutingPacket
\par Fields:
- \ref IPv6PacketParserExtension_Routing
+ \ref IPv6RoutingPacketParser
\par Associated registries:
- \ref IpTypes
+ \ref IpTypes
\par Finalize action:
- Set \a nextHeader from type of next packet if found in \ref IpTypes
+ Set \a nextHeader from type of next packet if found in \ref IpTypes
- \ingroup protocolbundle_default
- */
-
- struct IPv6ExtensionType_Routing
+ \ingroup protocolbundle_default
+ */
+ struct IPv6RoutingPacketType
: public PacketTypeBase,
- public PacketTypeMixin<IPv6ExtensionType_Routing, IpTypes>
+ public PacketTypeMixin<IPv6RoutingPacketType, IpTypes>
{
#ifndef DOXYGEN
- typedef PacketTypeMixin<IPv6ExtensionType_Routing, IpTypes> mixin;
+ typedef PacketTypeMixin<IPv6RoutingPacketType, IpTypes> mixin;
#endif
/** \brief IPv6 routing extension packet typedef */
- typedef ConcretePacket<IPv6ExtensionType_Routing> packet;
+ typedef ConcretePacket<IPv6RoutingPacketType> packet;
/** \brief typedef to the parser of IPv6 routing extension packet */
- typedef IPv6PacketParserExtension_Routing parser;
+ typedef IPv6RoutingPacketParser parser;
using mixin::nextPacketRange;
using mixin::nextPacketType;
static key_t nextPacketKey(packet p)
{ return p->nextHeader(); }
- /** \brief Dump given IPv6Extension_Routing in readable form to given output stream */
+ /** \brief Dump given IPv6RoutingPacket in readable form to given output stream */
static void dump(packet p, std::ostream & os);
static void finalize(packet p) {
p->nextHeader() << key(p.next(nothrow)); }
};
- /** \brief IPv6 routing extension packet typedef */
- typedef ConcretePacket<IPv6ExtensionType_Routing> IPv6Extension_Routing;
+ /** \brief IPv6 routing extension packet typedef
+ \ingroup protocolbundle_default
+ */
+ typedef ConcretePacket<IPv6RoutingPacketType> IPv6RoutingPacket;
// =====================================================================================================
/** \brief Parse in IPv6 Hop-By-Hop extension header
Parser implementing the IPv6 routing Header extension. The fields implemented are:
- \image html IPv6Extensions_HopByHop.png
+ \image html IPv6HopByHopOptionsPacket.png
- \see IPv6ExtensionType_HopByHop \n
- <a href="http://tools.ietf.org/html/rfc2460">RFC 2460</a>
+ \see IPv6ExtensionType_HopByHop \n
+ <a href="http://tools.ietf.org/html/rfc2460">RFC 2460</a>
*/
-
-// Hop-By-Hop Extension Header
-
- struct IPv6PacketParserExtension_HopByHop : public PacketParserBase {
+ struct IPv6HopByHopOptionsPacketParser : public PacketParserBase
+ {
# include SENF_PARSER()
+
SENF_PARSER_FIELD ( nextHeader, UInt8Parser );
SENF_PARSER_FIELD ( headerLength, UInt8Parser );
typedef detail::FixedAuxParserPolicy<UInt8Parser, 1u> ListOptionTypeAuxPolicy;
- typedef detail::ListOptionTypeParser_Policy<GenericOptTypeTLVPacketParser, ListOptionTypeAuxPolicy> ListOptionTypePolicy;
+ typedef detail::ListOptionTypeParser_Policy<
+ IPv6GenericOptionParser, ListOptionTypeAuxPolicy> ListOptionTypePolicy;
typedef ListParser<ListOptionTypePolicy> ListOptionTypeParser;
SENF_PARSER_FIELD ( options, ListOptionTypeParser);
- SENF_PARSER_FINALIZE ( IPv6PacketParserExtension_HopByHop );
+ SENF_PARSER_FINALIZE ( IPv6HopByHopOptionsPacketParser );
};
/** \brief IPv6 Hop-By-Hop extension
\par Packet type (typedef):
- \ref IPv6Extension_HopByHop
+ \ref IPv6HopByHopOptionsPacket
\par Fields:
- \ref IPv6PacketParserExtension_HopByHop
+ \ref IPv6HopByHopOptionsPacketParser
\par Associated registries:
- \ref IpTypes
+ \ref IpTypes
\par Finalize action:
- Set \a nextHeader from type of next packet if found in \ref IpTypes
+ Set \a nextHeader from type of next packet if found in \ref IpTypes
- \ingroup protocolbundle_default
+ \ingroup protocolbundle_default
*/
-
- struct IPv6ExtensionType_HopByHop
+ struct IPv6HopByHopOptionsPacketType
: public PacketTypeBase,
- public PacketTypeMixin<IPv6ExtensionType_HopByHop, IpTypes>
+ public PacketTypeMixin<IPv6HopByHopOptionsPacketType, IpTypes>
{
#ifndef DOXYGEN
- typedef PacketTypeMixin<IPv6ExtensionType_HopByHop, IpTypes> mixin;
+ typedef PacketTypeMixin<IPv6HopByHopOptionsPacketType, IpTypes> mixin;
#endif
/** \brief IPv6 Hop-By-Hop extension packet typedef */
- typedef ConcretePacket<IPv6ExtensionType_HopByHop> packet;
+ typedef ConcretePacket<IPv6HopByHopOptionsPacketType> packet;
/** \brief typedef to the parser of IPv6 Hop-By-Hop extension packet */
- typedef IPv6PacketParserExtension_HopByHop parser;
+ typedef IPv6HopByHopOptionsPacketParser parser;
using mixin::nextPacketRange;
using mixin::nextPacketType;
static key_t nextPacketKey(packet p)
{ return p->nextHeader(); }
- /** \brief Dump given IPv6Extension_HopByHop in readable form to given output stream */
+
+ /** \brief Dump given IPv6HopByHopOptionsPacket in readable form to given output stream */
static void dump(packet p, std::ostream & os);
static void finalize(packet p) {
p->nextHeader() << key(p.next(nothrow)); }
};
- /** \brief IPv6 routing Hop-By-Hop packet typedef */
- typedef ConcretePacket<IPv6ExtensionType_HopByHop> IPv6Extension_HopByHop;
+ /** \brief IPv6 routing Hop-By-Hop packet typedef
+ \ingroup protocolbundle_default
+ */
+ typedef ConcretePacket<IPv6HopByHopOptionsPacketType> IPv6HopByHopOptionsPacket;
// =====================================================================================================
/** \brief Parse in IPv6 Destination Options extension header
- Parser implementing the IPv6 Destination Options Header extension. The fields implemented are:
- \image html IPv6Extensions_Destination.png
-
- \see IPv6ExtensionType_Destination \n
- <a href="http://tools.ietf.org/html/rfc2460">RFC 2460</a>
- */
-
- // Destination Options skeleton without TLV-Options
-
- struct IPv6PacketParserExtension_Destination : public PacketParserBase {
+ Parser implementing the IPv6 Destination Options Header extension.
+ The fields implemented are:
+ \image html IPv6DestinationOptionsPacket.png
+ \see IPv6ExtensionType_Destination \n
+ <a href="http://tools.ietf.org/html/rfc2460">RFC 2460</a>
+ */
+ struct IPv6DestinationOptionsPacketParser : public PacketParserBase
+ {
# include SENF_PARSER()
SENF_PARSER_FIELD ( nextHeader, UInt8Parser );
SENF_PARSER_FIELD ( headerLength, UInt8Parser );
- SENF_PARSER_FINALIZE ( IPv6PacketParserExtension_Destination );
+ SENF_PARSER_FINALIZE ( IPv6DestinationOptionsPacketParser );
};
/** \brief IPv6 Destination Options extension
\par Packet type (typedef):
- \ref IPv6Extension_Destination
+ \ref IPv6DestinationOptionsPacket
\par Fields:
- \ref IPv6PacketParserExtension_Destination
+ \ref IPv6DestinationOptionsPacketParser
\par Associated registries:
- \ref IpTypes
+ \ref IpTypes
\par Finalize action:
- Set \a nextHeader from type of next packet if found in \ref IpTypes
+ Set \a nextHeader from type of next packet if found in \ref IpTypes
- \ingroup protocolbundle_default
- */
-
- struct IPv6ExtensionType_Destination
+ \ingroup protocolbundle_default
+ */
+ struct IPv6DestinationOptionsPacketType
: public PacketTypeBase,
- public PacketTypeMixin<IPv6ExtensionType_Destination, IpTypes>
+ public PacketTypeMixin<IPv6DestinationOptionsPacketType, IpTypes>
{
#ifndef DOXYGEN
- typedef PacketTypeMixin<IPv6ExtensionType_Destination, IpTypes> mixin;
+ typedef PacketTypeMixin<IPv6DestinationOptionsPacketType, IpTypes> mixin;
#endif
/** \brief IPv6 Destination Options extension packet typedef */
- typedef ConcretePacket<IPv6ExtensionType_Destination> packet;
+ typedef ConcretePacket<IPv6DestinationOptionsPacketType> packet;
/** \brief typedef to the parser of IPv6 Destination Options extension packet */
- typedef IPv6PacketParserExtension_Destination parser;
+ typedef IPv6DestinationOptionsPacketParser parser;
using mixin::nextPacketRange;
using mixin::nextPacketType;
static key_t nextPacketKey(packet p)
{ return p->nextHeader(); }
- /** \brief Dump given IPv6Extension_Destination in readable form to given output stream */
+ /** \brief Dump given IPv6DestinationOptionsPacket in readable form to given output stream */
static void dump(packet p, std::ostream & os);
static void finalize(packet p) {
p->nextHeader() << key(p.next(nothrow)); }
};
- /** \brief IPv6 routing Destination Options packet typedef */
- typedef ConcretePacket<IPv6ExtensionType_Destination> IPv6Extension_Destination;
-
+ /** \brief IPv6 routing Destination Options packet typedef
+ \ingroup protocolbundle_default
+ */
+ typedef ConcretePacket<IPv6DestinationOptionsPacketType> IPv6DestinationOptionsPacket;
-} //namespace senf
+}
+
///////////////////////////////hh.e////////////////////////////////////////
//#include "IPv6Extensions.cci"
//#include "IPv6Extensions.ct"