X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FDefaultBundle%2FIpV4Packet.hh;h=94a68239f9dfeaf84c885e5db63e95d0798847e1;hb=96d591f9024bc536e0a643b40c2bf243241d342d;hp=a38b59d421c653e6e961ebea562e5975040e4f43;hpb=47368f306a577d1e46df69a7f729bd3893cbe5e7;p=senf.git diff --git a/Packets/DefaultBundle/IpV4Packet.hh b/Packets/DefaultBundle/IpV4Packet.hh index a38b59d..94a6823 100644 --- a/Packets/DefaultBundle/IpV4Packet.hh +++ b/Packets/DefaultBundle/IpV4Packet.hh @@ -24,16 +24,40 @@ #define HH_IpV4Packet_ 1 // Custom includes -#include "Packets/PacketType.hh" -#include "Packets/ParseInt.hh" -#include "Packets/PacketRegistry.hh" -#include "Packets/PacketParser.hh" +#include "Packets/Packets.hh" //#include "IpV4Packet.mpp" ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { + /** \brief Parse an IpV4 packet + + Parser implementing the IpV4 header. The fields implemented are: + + + + + + + + + + + + + + + + + +
Field nameParser type
version\ref Parse_Version
ihl\ref Parse_IHL
tos\ref Parse_8bit
length\ref Parse_16bit
identifier\ref Parse_16bit
reserved\ref Parse_R
df\ref Parse_DF
mf\ref Parse_MF
frag\ref Parse_Frag
ttl\ref Parse_8bit
protocol\ref Parse_8bit
crc\ref Parse_16bit
source\ref Parse_32bit
destination\ref Parse_32bit
+ + \see IpV4PacketType \n + RFC 791 + + \todo Implement options + */ struct Parse_IpV4 : public PacketParserBase { SENF_PACKET_PARSER_NO_INIT(Parse_IpV4); @@ -71,12 +95,30 @@ namespace senf { } }; + /** \brief IP protocol number registry + + This registeres packets with their IP protocol number. + + \see Protocol numbers + PacketRegistry + */ struct IpTypes { - // See http://www.iana.org/assignments/protocol-numbers - // Also used by IPv6 typedef boost::uint16_t key_t; }; + /** \brief IpV4 packet + + \par Packet type (typedef): + \ref IpV4Packet + + \par Fields: + \ref Parse_IpV4 + + \par Associated registries: + \ref IpTypes + + \ingroup protocolbundle_default + */ struct IpV4PacketType : public PacketTypeBase, public PacketTypeMixin @@ -96,12 +138,14 @@ namespace senf { static void dump(packet p, std::ostream & os); }; + /** \brief IpV4 packet typedef */ typedef IpV4PacketType::packet IpV4Packet; - } ///////////////////////////////hh.e//////////////////////////////////////// +#endif +#ifndef SENF_PACKETS_DECL_ONLY //#include IpV4Packet.cci" //#include "IpV4Packet.ct" //#include "IpV4Packet.cti"