aboutsummaryrefslogtreecommitdiffstats
path: root/glougloud/user.c
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2012-07-22 00:04:12 +0200
committerLaurent Ghigonis <laurent@p1sec.com>2012-07-22 00:04:12 +0200
commit021d31b61e0803758610e2bd83302d5955547ee0 (patch)
tree26318204fca91505e5354efdee614ede0537db71 /glougloud/user.c
parentlibglouglou in README (diff)
downloadglouglou-021d31b61e0803758610e2bd83302d5955547ee0.tar.xz
glouglou-021d31b61e0803758610e2bd83302d5955547ee0.zip
make it at least compile on linux.
tested on archlinux
Diffstat (limited to 'glougloud/user.c')
-rw-r--r--glougloud/user.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/glougloud/user.c b/glougloud/user.c
index a23a5e1..644e092 100644
--- a/glougloud/user.c
+++ b/glougloud/user.c
@@ -4,6 +4,9 @@
#include <sys/time.h>
#include <sys/queue.h>
+#if !defined(__OpenBSD__)
+#define __FAVOR_BSD
+#endif
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
@@ -20,12 +23,9 @@
#include <string.h>
#include <errno.h>
#include <pcap.h>
-#include <pcap-int.h>
-
-#include <libglouglou.h>
#include "glougloud.h"
-#include "imsgev.h"
+#include "external/imsgev.h"
/* XXX a user process should be able to have multiple clients, so that we
* can send the same data to multiple machines with almost no overhead */
@@ -611,7 +611,11 @@ phandler_loop(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
len -= NULL_HDRLEN;
ip_handle(ip, pend, len);
break;
+#if defined(__OpenBSD__)
case AF_LINK:
+#else
+ case AF_LOCAL:
+#endif
ep = (struct ether_header *)(p + NULL_HDRLEN);
ether_type = ntohs(ep->ether_type);
if (ether_type <= ETHERMTU)