mirror of
https://github.com/mfontanini/libtins
synced 2026-01-26 12:01:34 +01:00
Removed the useless PDU::flag member. Added a PDU concatenation operator.
This commit is contained in:
@@ -32,13 +32,15 @@
|
||||
#include "eapol.h"
|
||||
|
||||
|
||||
Tins::SNAP::SNAP(PDU *child) : PDU(0xff, child) {
|
||||
Tins::SNAP::SNAP(PDU *child) : PDU(child)
|
||||
{
|
||||
std::memset(&_snap, 0, sizeof(_snap));
|
||||
_snap.dsap = _snap.ssap = 0xaa;
|
||||
_snap.control = 3;
|
||||
}
|
||||
|
||||
Tins::SNAP::SNAP(const uint8_t *buffer, uint32_t total_sz) : PDU(0xff) {
|
||||
Tins::SNAP::SNAP(const uint8_t *buffer, uint32_t total_sz)
|
||||
{
|
||||
if(total_sz < sizeof(_snap))
|
||||
throw std::runtime_error("Not enough size for a SNAP header in the buffer.");
|
||||
std::memcpy(&_snap, buffer, sizeof(_snap));
|
||||
|
||||
Reference in New Issue
Block a user