X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FDefaultBundle%2FUDPPacket.hh;h=8b1aa70f996a2a5e6ff357917838c2baa025f4a4;hb=c1a83da548df3b5cb63e201465f1b9cd79e320ed;hp=296597ca7a10956614272d5643b0c9ff39ad17b2;hpb=ab243554f940af9f873e1a920d0a6b7886c6f5cf;p=senf.git diff --git a/Packets/DefaultBundle/UDPPacket.hh b/Packets/DefaultBundle/UDPPacket.hh index 296597c..8b1aa70 100644 --- a/Packets/DefaultBundle/UDPPacket.hh +++ b/Packets/DefaultBundle/UDPPacket.hh @@ -1,9 +1,9 @@ // $Id$ // // Copyright (C) 2006 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Stefan Bund +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Stefan Bund // // 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 @@ -23,8 +23,8 @@ /** \file \brief UDPPacket public header */ -#ifndef HH_UDPPacket_ -#define HH_UDPPacket_ 1 +#ifndef HH_SENF_Packets_DefaultBundle_UDPPacket_ +#define HH_SENF_Packets_DefaultBundle_UDPPacket_ 1 // Custom includes #include "../../Packets/Packets.hh" @@ -38,19 +38,19 @@ namespace senf { Parser implementing the UDP header. The fields implemented are: - \see UDPPacketType + \see UDPPacketType \n RFC 768 */ - struct Parse_UDP : public PacketParserBase + struct UDPPacketParser : public PacketParserBase { # include SENF_FIXED_PARSER() - SENF_PARSER_FIELD( source, senf::Parse_UInt16 ); - SENF_PARSER_FIELD( destination, senf::Parse_UInt16 ); - SENF_PARSER_FIELD( length, senf::Parse_UInt16 ); - SENF_PARSER_FIELD( checksum, senf::Parse_UInt16 ); + SENF_PARSER_FIELD( source, senf::UInt16Parser ); + SENF_PARSER_FIELD( destination, senf::UInt16Parser ); + SENF_PARSER_FIELD( length, senf::UInt16Parser ); + SENF_PARSER_FIELD( checksum, senf::UInt16Parser ); - SENF_PARSER_FINALIZE(Parse_UDP); + SENF_PARSER_FINALIZE(UDPPacketParser); boost::uint16_t calcChecksum() const; @@ -65,7 +65,11 @@ namespace senf { \ref UDPPacket \par Fields: - \ref Parse_UDP + \ref UDPPacketParser + + \par Finalize action: + Set \a length from payload size\n + Calculate \a checksum \ingroup protocolbundle_default */ @@ -73,10 +77,11 @@ namespace senf { : public PacketTypeBase, public PacketTypeMixin { +#ifndef DOXYGEN typedef PacketTypeMixin mixin; typedef ConcretePacket packet; - typedef Parse_UDP parser; - + typedef UDPPacketParser parser; +#endif using mixin::nextPacketRange; using mixin::initSize; using mixin::init; @@ -87,7 +92,7 @@ namespace senf { }; /** \brief UDP packet typedef */ - typedef UDPPacketType::packet UDPPacket; + typedef ConcretePacket UDPPacket; }