Skip to content

Commit

Permalink
Fix build issues when disabling Dot11
Browse files Browse the repository at this point in the history
  • Loading branch information
mfontanini committed Oct 18, 2017
1 parent c439ecc commit f4635a6
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 28 deletions.
4 changes: 3 additions & 1 deletion include/tins/utils/radiotap_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
*
*/

#ifndef TINS_RADIOTAP_PARSER_H
#include <tins/config.h>

#if !defined(TINS_RADIOTAP_PARSER_H) && defined(TINS_HAVE_DOT11)
#define TINS_RADIOTAP_PARSER_H

#include <stdint.h>
Expand Down
5 changes: 4 additions & 1 deletion include/tins/utils/radiotap_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
*
*/

#ifndef TINS_RADIOTAP_WRITER_H
#include <tins/config.h>

#if !defined(TINS_RADIOTAP_WRITER_H) && defined(TINS_HAVE_DOT11)

#define TINS_RADIOTAP_WRITER_H

#include <vector>
Expand Down
7 changes: 6 additions & 1 deletion src/utils/radiotap_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@
*
*/

#include <iostream>
#include <tins/utils/radiotap_parser.h>

#ifdef TINS_HAVE_DOT11

#include <iostream>
#include <tins/exceptions.h>

using std::vector;
Expand Down Expand Up @@ -331,3 +334,5 @@ void RadioTapParser::load_current_flags() {

} // Utils
} // Tins

#endif // TINS_HAVE_DOT11
7 changes: 6 additions & 1 deletion src/utils/radiotap_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@
*
*/

#include <cmath>
#include <tins/utils/radiotap_writer.h>

#ifdef TINS_HAVE_DOT11

#include <cmath>
#include <tins/utils/radiotap_parser.h>
#include <tins/exceptions.h>

Expand Down Expand Up @@ -167,3 +170,5 @@ void RadioTapWriter::update_paddings(const vector<uint8_t>& paddings, uint32_t o

} // Utils
} // Tins

#endif // TINS_HAVE_DOT11
54 changes: 30 additions & 24 deletions tests/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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()

0 comments on commit f4635a6

Please sign in to comment.