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

Ported PPPoE and started porting Dot11.

This commit is contained in:
Matias Fontanini
2013-12-18 13:02:41 -03:00
parent ca6b603478
commit 33091ccbae
8 changed files with 287 additions and 235 deletions

View File

@@ -30,6 +30,7 @@
#include <stdexcept>
#include "rsn_information.h"
#include "exceptions.h"
#include "dot11/dot11_base.h"
namespace Tins {
template<typename T>
@@ -143,4 +144,10 @@ RSNInformation RSNInformation::wpa2_psk() {
info.add_akm_cypher(RSNInformation::PSK);
return info;
}
RSNInformation RSNInformation::from_option(const PDUOption<uint8_t, Dot11> &opt) {
if(opt.data_size() < sizeof(uint16_t) * 2 + sizeof(uint32_t))
throw malformed_option();
return RSNInformation(opt.data_ptr(), opt.data_size());
}
}