#include <boost/cstdint.hpp>
//#include "IpChecksum.mpp"
-///////////////////////////////hh.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
namespace senf {
-
+
/** \brief Calculate TCP/IP 16bit checksum value
This class allows calculation of the 16bit checksum value as defined in the TCP/IP v4
class IpChecksum
{
public:
- ///////////////////////////////////////////////////////////////////////////
+ //-////////////////////////////////////////////////////////////////////////
// Types
- ///////////////////////////////////////////////////////////////////////////
+ //-////////////////////////////////////////////////////////////////////////
///\name Structors and default members
- ///@{
+ //\{
IpChecksum();
- ///@}
- ///////////////////////////////////////////////////////////////////////////
+ //\}
+ //-////////////////////////////////////////////////////////////////////////
void feed(boost::uint8_t byte); ///< Feed single byte
///< Feed range of bytes
boost::uint16_t sum() const; ///< Calculate checksum
-
+
protected:
private:
bool odd_;
};
-
+
}
-///////////////////////////////hh.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#include "IpChecksum.cci"
//#include "IpChecksum.ct"
#include "IpChecksum.cti"