CLEANUP: connection: using internal struct to hold source and dest port.
Originally, tcphdr's source and dest from Linux were used to get the
source and port which led to a build issue on BSD oses.
To avoid side problems related to network then we just use an internal
struct as we need only those two fields.
diff --git a/include/types/connection.h b/include/types/connection.h
index 292ca2b..2d10704 100644
--- a/include/types/connection.h
+++ b/include/types/connection.h
@@ -34,7 +34,6 @@
#include <netinet/ip.h>
#include <netinet/ip6.h>
-#include <netinet/tcp.h>
/* referenced below */
struct connection;
@@ -232,6 +231,11 @@
int (*init)(struct connection *conn); /* data-layer initialization */
};
+struct my_tcphdr {
+ u_int16_t source;
+ u_int16_t dest;
+};
+
/* a connection source profile defines all the parameters needed to properly
* bind an outgoing connection for a server or proxy.
*/