aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorlucaderi <deri@ntop.org>2020-06-25 10:25:24 +0200
committerlucaderi <deri@ntop.org>2020-06-25 10:25:24 +0200
commitecdf7df4542dcd7991d2473344313216ff264020 (patch)
tree0160d0c2795dc5e7d33bb4b5cdf10e61830699ac /example
parent3034e53d0061e1fa64f8081c4ca9ca26f2d34478 (diff)
Compilation fixes for non-Linux (or outdated Linux) platforms
Diffstat (limited to 'example')
-rw-r--r--example/ndpiSimpleIntegration.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/example/ndpiSimpleIntegration.c b/example/ndpiSimpleIntegration.c
index a7f3b6ef2..d5bd117d8 100644
--- a/example/ndpiSimpleIntegration.c
+++ b/example/ndpiSimpleIntegration.c
@@ -1,6 +1,5 @@
#include <arpa/inet.h>
#include <errno.h>
-#include <linux/if_ether.h>
#include <netinet/in.h>
#include <ndpi_api.h>
#include <ndpi_main.h>
@@ -20,6 +19,18 @@
#define MAX_IDLE_TIME 300000 /* msec */
#define INITIAL_THREAD_HASH 0x03dd018b
+#ifndef ETH_P_IP
+#define ETH_P_IP 0x0800
+#endif
+
+#ifndef ETH_P_IPV6
+#define ETH_P_IPV6 0x86DD
+#endif
+
+#ifndef ETH_P_ARP
+#define ETH_P_ARP 0x0806
+#endif
+
enum nDPI_l3_type {
L3_IP, L3_IP6
};