mirror of
https://github.com/mfontanini/libtins
synced 2026-01-26 20:01:35 +01:00
Added malformed_packet exception. Every class except Dot11* use it.
This commit is contained in:
@@ -43,12 +43,12 @@
|
||||
#include "dot11.h"
|
||||
#include "utils.h"
|
||||
#include "packet_sender.h"
|
||||
#include "exceptions.h"
|
||||
|
||||
namespace Tins {
|
||||
void check_size(uint32_t total_sz, size_t field_size) {
|
||||
static const std::string msg("Not enough size for an RadioTap header in the buffer.");
|
||||
if(total_sz < field_size)
|
||||
throw std::runtime_error(msg);
|
||||
throw malformed_packet();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
Reference in New Issue
Block a user