From 7ae3d85c7249b9e8846bc87fdf44e8621a370565 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Thu, 17 Aug 2017 14:02:34 +0200 Subject: 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. --- include/ouroboros/config.h.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') 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 -- cgit v1.2.3