1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +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

@@ -178,7 +178,7 @@ namespace Tins {
*
* \return The checksum field in an uint16_t.
*/
uint16_t check() const { return Endian::be_to_host(_tcp.check); }
uint16_t checksum() const { return Endian::be_to_host(_tcp.check); }
/**
* \brief Getter for the urgent pointer field.
@@ -246,13 +246,6 @@ namespace Tins {
*/
void window(uint16_t new_window);
/**
* \brief Setter for the checksum field.
*
* \param new_check The new checksum.
*/
void check(uint16_t new_check);
/**
* \brief Setter for the urgent pointer field.
*
@@ -466,6 +459,7 @@ namespace Tins {
void internal_add_option(const option &option);
void write_serialization(uint8_t *buffer, uint32_t total_sz, const PDU *parent);
void checksum(uint16_t new_check);
uint8_t *write_option(const option &opt, uint8_t *buffer);