1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-28 12:44:25 +01:00

Removed the useless PDU::flag member. Added a PDU concatenation operator.

This commit is contained in:
Matias Fontanini
2012-10-07 18:51:06 -03:00
parent da60d99f98
commit 153bcecc35
24 changed files with 169 additions and 89 deletions

View File

@@ -32,7 +32,7 @@ namespace Tins {
const uint16_t TCP::DEFAULT_WINDOW = 32678;
TCP::TCP(uint16_t dport, uint16_t sport)
: PDU(Constants::IP::PROTO_TCP), _options_size(0), _total_options_size(0)
: _options_size(0), _total_options_size(0)
{
std::memset(&_tcp, 0, sizeof(tcphdr));
this->dport(dport);
@@ -42,7 +42,6 @@ TCP::TCP(uint16_t dport, uint16_t sport)
}
TCP::TCP(const uint8_t *buffer, uint32_t total_sz)
: PDU(Constants::IP::PROTO_TCP)
{
if(total_sz < sizeof(tcphdr))
throw std::runtime_error("Not enough size for an TCP header in the buffer.");