mirror of
https://github.com/mfontanini/libtins
synced 2026-01-28 04:34:27 +01:00
Several classes now use PDUOption::length_field instead of data_size.
This commit is contained in:
@@ -41,7 +41,9 @@ Dot1Q::Dot1Q(small_uint<12> tag_id, bool append_pad)
|
||||
id(tag_id);
|
||||
}
|
||||
|
||||
Dot1Q::Dot1Q(const uint8_t *buffer, uint32_t total_sz) {
|
||||
Dot1Q::Dot1Q(const uint8_t *buffer, uint32_t total_sz)
|
||||
: _append_padding()
|
||||
{
|
||||
if(total_sz < sizeof(_header))
|
||||
throw std::runtime_error("Not enough size for a Dot1Q header");
|
||||
std::memcpy(&_header, buffer, sizeof(_header));
|
||||
|
||||
Reference in New Issue
Block a user