1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-28 04:34:27 +01:00

Added the --disable-dot11 configure switch.

This commit is contained in:
Matias Fontanini
2013-11-09 14:41:08 -03:00
parent 93ab8d3b91
commit 9962381fc7
56 changed files with 465 additions and 1807 deletions

View File

@@ -41,6 +41,7 @@
#include "sll.h"
#include "ppi.h"
#include "internals.h"
#include "exceptions.h"
namespace Tins {
PPI::PPI(const uint8_t *buffer, uint32_t total_sz) {
@@ -61,7 +62,11 @@ PPI::PPI(const uint8_t *buffer, uint32_t total_sz) {
if(total_sz > 0) {
switch(dlt()) {
case DLT_IEEE802_11:
inner_pdu(Dot11::from_bytes(buffer, total_sz));
#ifdef HAVE_DOT11
inner_pdu(Dot11::from_bytes(buffer, total_sz));
#else
throw protocol_disabled();
#endif
break;
case DLT_EN10MB:
if(Internals::is_dot3(buffer, total_sz))
@@ -70,7 +75,11 @@ PPI::PPI(const uint8_t *buffer, uint32_t total_sz) {
inner_pdu(new EthernetII(buffer, total_sz));
break;
case DLT_IEEE802_11_RADIO:
inner_pdu(new RadioTap(buffer, total_sz));
#ifdef HAVE_DOT11
inner_pdu(new RadioTap(buffer, total_sz));
#else
throw protocol_disabled();
#endif
break;
case DLT_NULL:
inner_pdu(new Loopback(buffer, total_sz));