diff --git a/include/tins/utils/radiotap_parser.h b/include/tins/utils/radiotap_parser.h index 1f87a176..16511731 100644 --- a/include/tins/utils/radiotap_parser.h +++ b/include/tins/utils/radiotap_parser.h @@ -27,7 +27,9 @@ * */ -#ifndef TINS_RADIOTAP_PARSER_H +#include + +#if !defined(TINS_RADIOTAP_PARSER_H) && defined(TINS_HAVE_DOT11) #define TINS_RADIOTAP_PARSER_H #include diff --git a/include/tins/utils/radiotap_writer.h b/include/tins/utils/radiotap_writer.h index 8b70e008..20eac41c 100644 --- a/include/tins/utils/radiotap_writer.h +++ b/include/tins/utils/radiotap_writer.h @@ -27,7 +27,10 @@ * */ -#ifndef TINS_RADIOTAP_WRITER_H +#include + +#if !defined(TINS_RADIOTAP_WRITER_H) && defined(TINS_HAVE_DOT11) + #define TINS_RADIOTAP_WRITER_H #include diff --git a/src/utils/radiotap_parser.cpp b/src/utils/radiotap_parser.cpp index 3c033e08..e3d4f3b7 100644 --- a/src/utils/radiotap_parser.cpp +++ b/src/utils/radiotap_parser.cpp @@ -27,8 +27,11 @@ * */ -#include #include + +#ifdef TINS_HAVE_DOT11 + +#include #include using std::vector; @@ -331,3 +334,5 @@ void RadioTapParser::load_current_flags() { } // Utils } // Tins + +#endif // TINS_HAVE_DOT11 diff --git a/src/utils/radiotap_writer.cpp b/src/utils/radiotap_writer.cpp index 1e3871a8..3a181879 100644 --- a/src/utils/radiotap_writer.cpp +++ b/src/utils/radiotap_writer.cpp @@ -27,8 +27,11 @@ * */ -#include #include + +#ifdef TINS_HAVE_DOT11 + +#include #include #include @@ -167,3 +170,5 @@ void RadioTapWriter::update_paddings(const vector& paddings, uint32_t o } // Utils } // Tins + +#endif // TINS_HAVE_DOT11 diff --git a/tests/src/CMakeLists.txt b/tests/src/CMakeLists.txt index 75db0f56..01b24722 100644 --- a/tests/src/CMakeLists.txt +++ b/tests/src/CMakeLists.txt @@ -40,24 +40,6 @@ CREATE_TEST(arp) CREATE_TEST(dhcp) CREATE_TEST(dhcpv6) CREATE_TEST(dns) -CREATE_TEST(dot11/ack) -CREATE_TEST(dot11/assoc_request) -CREATE_TEST(dot11/assoc_response) -CREATE_TEST(dot11/authentication) -CREATE_TEST(dot11/beacon) -CREATE_TEST(dot11/block_ack_request) -CREATE_TEST(dot11/cf_end) -CREATE_TEST(dot11/cf_end_ack) -CREATE_TEST(dot11/data) -CREATE_TEST(dot11/deauthentication) -CREATE_TEST(dot11/disassoc) -CREATE_TEST(dot11/dot11) -CREATE_TEST(dot11/probe_request) -CREATE_TEST(dot11/probe_response) -CREATE_TEST(dot11/ps_poll) -CREATE_TEST(dot11/reassoc_request) -CREATE_TEST(dot11/reassoc_response) -CREATE_TEST(dot11/rts) CREATE_TEST(dot1q) CREATE_TEST(ethernet) CREATE_TEST(hw_address) @@ -79,7 +61,6 @@ CREATE_TEST(pdu) CREATE_TEST(pdu_iterator) CREATE_TEST(pppoe) CREATE_TEST(raw_pdu) -CREATE_TEST(radiotap) CREATE_TEST(rc4_eapol) CREATE_TEST(rsn_eapol) CREATE_TEST(sll) @@ -89,14 +70,39 @@ CREATE_TEST(tcp) CREATE_TEST(tcp_ip) CREATE_TEST(udp) CREATE_TEST(utils) -CREATE_TEST(wep_decrypt) IF(LIBTINS_ENABLE_PCAP) CREATE_TEST(offline_packet_filter) - CREATE_TEST(ppi) CREATE_TEST(tcp_stream) + + IF(LIBTINS_ENABLE_DOT11) + CREATE_TEST(ppi) + ENDIF() +ENDIF() + +IF(LIBTINS_ENABLE_DOT11) + CREATE_TEST(dot11/ack) + CREATE_TEST(dot11/assoc_request) + CREATE_TEST(dot11/assoc_response) + CREATE_TEST(dot11/authentication) + CREATE_TEST(dot11/beacon) + CREATE_TEST(dot11/block_ack_request) + CREATE_TEST(dot11/cf_end) + CREATE_TEST(dot11/cf_end_ack) + CREATE_TEST(dot11/data) + CREATE_TEST(dot11/deauthentication) + CREATE_TEST(dot11/disassoc) + CREATE_TEST(dot11/dot11) + CREATE_TEST(dot11/probe_request) + CREATE_TEST(dot11/probe_response) + CREATE_TEST(dot11/ps_poll) + CREATE_TEST(dot11/reassoc_request) + CREATE_TEST(dot11/reassoc_response) + CREATE_TEST(dot11/rts) + CREATE_TEST(radiotap) + CREATE_TEST(wep_decrypt) + IF(LIBTINS_ENABLE_WPA2) + CREATE_TEST(wpa2_decrypt) + ENDIF() ENDIF() -IF(LIBTINS_ENABLE_WPA2) - CREATE_TEST(wpa2_decrypt) -ENDIF() \ No newline at end of file