X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FDefaultBundle%2FUDPPacket.hh;h=e85c182dcf9f2f3be46aff0bd9f78bddb817547c;hb=1ac8479aaaa1491e2668c6f09d042ae9de1f2113;hp=8b1aa70f996a2a5e6ff357917838c2baa025f4a4;hpb=412024ed31a4ab4eaea7a4165a434f8efebee325;p=senf.git diff --git a/Packets/DefaultBundle/UDPPacket.hh b/Packets/DefaultBundle/UDPPacket.hh index 8b1aa70..e85c182 100644 --- a/Packets/DefaultBundle/UDPPacket.hh +++ b/Packets/DefaultBundle/UDPPacket.hh @@ -37,7 +37,8 @@ namespace senf { /** \brief Parse a UDP packet Parser implementing the UDP header. The fields implemented are: - + \image html UDPPacket.png + \see UDPPacketType \n RFC 768 */ @@ -52,11 +53,14 @@ namespace senf { SENF_PARSER_FINALIZE(UDPPacketParser); - boost::uint16_t calcChecksum() const; - + boost::uint16_t calcChecksum() const; ///< calculate (pseudo-)header checksum + /**< calculate and return the checksum of the + (pseudo-)header \see \ref senf::IpChecksum */ bool validateChecksum() const { return checksum() == 0u || checksum() == calcChecksum(); - } + } ///< validate header checksum + /**< return \c true if the \ref checksum() "checksum" + field is equal to the \ref calcChecksum() "calculated checksum" */ }; /** \brief UDP packet @@ -67,9 +71,21 @@ namespace senf { \par Fields: \ref UDPPacketParser +
0 | 8 | 16 | +24 | 31 | +
---|---|---|---|---|
\ref UDPPacketParser::source() "Source Port" | +\ref UDPPacketParser::destination() "Destination Port" | +|||
\ref UDPPacketParser::length() "Length" | +\ref UDPPacketParser::checksum() "Checksum" | +