mirror of
https://github.com/mfontanini/libtins
synced 2026-01-30 21:44:26 +01:00
Allow disabling TCPIP classes
This commit is contained in:
@@ -118,6 +118,17 @@ IF(LIBTINS_ENABLE_DOT11)
|
|||||||
ENDIF(LIBTINS_ENABLE_WPA2)
|
ENDIF(LIBTINS_ENABLE_WPA2)
|
||||||
ENDIF(LIBTINS_ENABLE_DOT11)
|
ENDIF(LIBTINS_ENABLE_DOT11)
|
||||||
|
|
||||||
|
# Optionally enable TCPIP classes (on by default)
|
||||||
|
OPTION(LIBTINS_ENABLE_TCPIP "Enable TCPIP classes" ON)
|
||||||
|
IF(LIBTINS_ENABLE_TCPIP AND TINS_HAVE_CXX11)
|
||||||
|
SET(TINS_HAVE_TCPIP ON)
|
||||||
|
MESSAGE(STATUS "Enabling TCPIP classes")
|
||||||
|
ELSE()
|
||||||
|
SET(TINS_HAVE_TCPIP OFF)
|
||||||
|
MESSAGE(STATUS "Disabling TCPIP classes")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Optionally enable the ACK tracker (on by default)
|
||||||
OPTION(LIBTINS_ENABLE_ACK_TRACKER "Enable TCP ACK tracking support" ON)
|
OPTION(LIBTINS_ENABLE_ACK_TRACKER "Enable TCP ACK tracking support" ON)
|
||||||
IF(LIBTINS_ENABLE_ACK_TRACKER AND TINS_HAVE_CXX11)
|
IF(LIBTINS_ENABLE_ACK_TRACKER AND TINS_HAVE_CXX11)
|
||||||
FIND_PACKAGE(Boost)
|
FIND_PACKAGE(Boost)
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
/* Use pcap_sendpacket to send l2 packets */
|
/* Use pcap_sendpacket to send l2 packets */
|
||||||
#cmakedefine TINS_HAVE_PACKET_SENDER_PCAP_SENDPACKET
|
#cmakedefine TINS_HAVE_PACKET_SENDER_PCAP_SENDPACKET
|
||||||
|
|
||||||
|
/* Have TCPIP classes */
|
||||||
|
#cmakedefine TINS_HAVE_TCPIP
|
||||||
|
|
||||||
/* Have TCP ACK tracking */
|
/* Have TCP ACK tracking */
|
||||||
#cmakedefine TINS_HAVE_ACK_TRACKER
|
#cmakedefine TINS_HAVE_ACK_TRACKER
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,9 @@
|
|||||||
#ifndef TINS_TCP_IP_FLOW_H
|
#ifndef TINS_TCP_IP_FLOW_H
|
||||||
#define TINS_TCP_IP_FLOW_H
|
#define TINS_TCP_IP_FLOW_H
|
||||||
|
|
||||||
#include "../cxxstd.h"
|
#include "../config.h"
|
||||||
|
|
||||||
// This classes use C++11 features
|
#ifdef TINS_HAVE_TCPIP
|
||||||
#if TINS_IS_CXX11
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <array>
|
#include <array>
|
||||||
@@ -331,6 +330,6 @@ private:
|
|||||||
} // TCPIP
|
} // TCPIP
|
||||||
} // TINS
|
} // TINS
|
||||||
|
|
||||||
#endif // TINS_IS_CXX11
|
#endif // TINS_HAVE_TCPIP
|
||||||
#endif // TINS_TCP_IP_FLOW_H
|
#endif // TINS_TCP_IP_FLOW_H
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,9 @@
|
|||||||
#ifndef TINS_TCP_IP_STREAM_H
|
#ifndef TINS_TCP_IP_STREAM_H
|
||||||
#define TINS_TCP_IP_STREAM_H
|
#define TINS_TCP_IP_STREAM_H
|
||||||
|
|
||||||
#include "../cxxstd.h"
|
#include "../config.h"
|
||||||
|
|
||||||
// This classes use C++11 features
|
#ifdef TINS_HAVE_TCPIP
|
||||||
#if TINS_IS_CXX11
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <array>
|
#include <array>
|
||||||
@@ -393,6 +392,6 @@ private:
|
|||||||
} // TCPIP
|
} // TCPIP
|
||||||
} // Tins
|
} // Tins
|
||||||
|
|
||||||
#endif // TINS_IS_CXX11
|
#endif // TINS_HAVE_TCPIP
|
||||||
|
|
||||||
#endif // TINS_TCP_IP_STREAM_H
|
#endif // TINS_TCP_IP_STREAM_H
|
||||||
|
|||||||
@@ -30,10 +30,9 @@
|
|||||||
#ifndef TINS_TCP_IP_STREAM_FOLLOWER_H
|
#ifndef TINS_TCP_IP_STREAM_FOLLOWER_H
|
||||||
#define TINS_TCP_IP_STREAM_FOLLOWER_H
|
#define TINS_TCP_IP_STREAM_FOLLOWER_H
|
||||||
|
|
||||||
#include "../cxxstd.h"
|
#include "../config.h"
|
||||||
|
|
||||||
// This classes use C++11 features
|
#ifdef TINS_HAVE_TCPIP
|
||||||
#if TINS_IS_CXX11
|
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include "stream.h"
|
#include "stream.h"
|
||||||
@@ -210,6 +209,6 @@ private:
|
|||||||
} // TCPIP
|
} // TCPIP
|
||||||
} // Tins
|
} // Tins
|
||||||
|
|
||||||
#endif // TINS_IS_CXX11
|
#endif // TINS_HAVE_TCPIP
|
||||||
|
|
||||||
#endif // TINS_TCP_IP_STREAM_FOLLOWER_H
|
#endif // TINS_TCP_IP_STREAM_FOLLOWER_H
|
||||||
|
|||||||
@@ -30,10 +30,9 @@
|
|||||||
#ifndef TINS_TCP_IP_STREAM_ID_H
|
#ifndef TINS_TCP_IP_STREAM_ID_H
|
||||||
#define TINS_TCP_IP_STREAM_ID_H
|
#define TINS_TCP_IP_STREAM_ID_H
|
||||||
|
|
||||||
#include "../cxxstd.h"
|
#include "../config.h"
|
||||||
|
|
||||||
// This classes use C++11 features
|
#ifdef TINS_HAVE_TCPIP
|
||||||
#if TINS_IS_CXX11
|
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -100,6 +99,6 @@ struct StreamIdentifier {
|
|||||||
} // TCPIP
|
} // TCPIP
|
||||||
} // Tins
|
} // Tins
|
||||||
|
|
||||||
#endif // TINS_IS_CXX11
|
#endif // TINS_HAVE_TCPIP
|
||||||
#endif // TINS_TCP_IP_STREAM_ID_H
|
#endif // TINS_TCP_IP_STREAM_ID_H
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "tcp_ip/flow.h"
|
#include "tcp_ip/flow.h"
|
||||||
|
|
||||||
#if TINS_IS_CXX11
|
#ifdef TINS_HAVE_TCPIP
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "tcp_ip/stream.h"
|
#include "tcp_ip/stream.h"
|
||||||
|
|
||||||
#if TINS_IS_CXX11
|
#ifdef TINS_HAVE_TCPIP
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -307,4 +307,4 @@ void Stream::on_server_out_of_order(const Flow& flow,
|
|||||||
} // TCPIP
|
} // TCPIP
|
||||||
} // Tins
|
} // Tins
|
||||||
|
|
||||||
#endif // TINS_IS_CXX11
|
#endif // TINS_HAVE_TCPIP
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "tcp_ip/stream_follower.h"
|
#include "tcp_ip/stream_follower.h"
|
||||||
|
|
||||||
#if TINS_IS_CXX11
|
#ifdef TINS_HAVE_TCPIP
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -203,4 +203,4 @@ void StreamFollower::cleanup_streams(const timestamp_type& now) {
|
|||||||
} // TCPIP
|
} // TCPIP
|
||||||
} // Tins
|
} // Tins
|
||||||
|
|
||||||
#endif // TINS_IS_CXX11
|
#endif // TINS_HAVE_TCPIP
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "tcp_ip/stream_identifier.h"
|
#include "tcp_ip/stream_identifier.h"
|
||||||
|
|
||||||
#if TINS_IS_CXX11
|
#ifdef TINS_HAVE_TCPIP
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
@@ -128,4 +128,4 @@ StreamIdentifier::address_type StreamIdentifier::serialize(const IPv6Address& ad
|
|||||||
} // TCPIP
|
} // TCPIP
|
||||||
} // Tins
|
} // Tins
|
||||||
|
|
||||||
#endif // TINS_IS_CXX11
|
#endif // TINS_HAVE_TCPIP
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "cxxstd.h"
|
#include "config.h"
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#if TINS_IS_CXX11
|
#ifdef TINS_HAVE_TCPIP
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -714,4 +714,4 @@ TEST(Foo, Dummy) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // TINS_IS_CXX11
|
#endif // TINS_HAVE_TCPIP
|
||||||
|
|||||||
Reference in New Issue
Block a user