1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-30 05:24:26 +01:00

Removed IP, UDP and IP checksum setters. Added some checksum tests.

This commit is contained in:
Matias Fontanini
2013-04-22 20:06:35 -03:00
parent 66ff604580
commit 9be4f0ca37
8 changed files with 69 additions and 48 deletions

View File

@@ -89,6 +89,12 @@ namespace Tins {
* \return The length of the datagram.
*/
uint16_t length() const { return Endian::be_to_host(_udp.len); }
/**
* \brief Getter for the checksum of the datagram.
* \return The datagram's checksum.
*/
uint16_t checksum() const { return Endian::be_to_host(_udp.check); }
/**
* \brief Set the destination port.