summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2017-08-17 14:02:34 +0200
committerdimitri staessens <[email protected]>2017-08-17 16:10:03 +0200
commit7ae3d85c7249b9e8846bc87fdf44e8621a370565 (patch)
tree89a861ef5dd33a2055650347beddfb4ca39a9a35 /include
parentaa3416215e980a2ec87ac259be0ea39f1caf96df (diff)
downloadouroboros-7ae3d85c7249b9e8846bc87fdf44e8621a370565.tar.gz
ouroboros-7ae3d85c7249b9e8846bc87fdf44e8621a370565.zip
ipcpd: Support Berkeley Packet Filter in LLC shim
This adds support reading Ethernet frames using the Berkeley Packet Filter (BPF). Ouroboros now fully runs on OS X Sierra.
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/config.h.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/ouroboros/config.h.in b/include/ouroboros/config.h.in
index b9702171..d5871624 100644
--- a/include/ouroboros/config.h.in
+++ b/include/ouroboros/config.h.in
@@ -31,6 +31,10 @@
#ifdef __FreeBSD__
#define __BSD_VISIBLE 1
#endif
+#ifdef __APPLE__
+#define _BSD_SOURCE
+#define _DARWIN_C_SOURCE
+#endif
#define IPCP_SHIM_UDP_EXEC "@IPCP_SHIM_UDP_TARGET@"
#define IPCP_SHIM_ETH_LLC_EXEC "@IPCP_SHIM_ETH_LLC_TARGET@"
#define IPCP_NORMAL_EXEC "@IPCP_NORMAL_TARGET@"
@@ -40,6 +44,7 @@
#cmakedefine HAVE_LIBGCRYPT
#cmakedefine HAVE_OPENSSL
#cmakedefine HAVE_NETMAP
+#cmakedefine HAVE_BPF
#define AP_MAX_FLOWS 2048
#define AP_RES_FDS 64
#define AP_MAX_FQUEUES 64
@@ -60,9 +65,13 @@
/* IPCP dynamic threadpooling */
#define IPCP_MIN_THREADS 4
#define IPCP_ADD_THREADS 16
-#define IPCP_SCHED_THREADS 8
+#define IPCP_SCHED_THREADS 2
#define IPCPD_MAX_CONNS IRMD_MAX_FLOWS
+#ifdef __APPLE__
+#define PTHREAD_COND_CLOCK CLOCK_REALTIME
+#else
#define PTHREAD_COND_CLOCK CLOCK_MONOTONIC
+#endif
#define PFT_SIZE 1 << 12
/* Timeout values */
#define IRMD_ACCEPT_TIMEOUT 100