From ee5773d5747daa69908a1f3c7d5ef7528ea2ff4c Mon Sep 17 00:00:00 2001 From: Emanuel Haupt Date: Tue, 15 Aug 2017 13:18:28 +0000 Subject: Update to 1.1.5 --- net-mgmt/driftnet/files/patch-src_layer2.c | 32 ++++++++++++++++++------------ 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'net-mgmt/driftnet/files/patch-src_layer2.c') diff --git a/net-mgmt/driftnet/files/patch-src_layer2.c b/net-mgmt/driftnet/files/patch-src_layer2.c index a48b991e60a1..2ce27cc99d02 100644 --- a/net-mgmt/driftnet/files/patch-src_layer2.c +++ b/net-mgmt/driftnet/files/patch-src_layer2.c @@ -1,30 +1,36 @@ ---- src/layer2.c.orig 2013-05-12 15:16:43 UTC +--- src/layer2.c.orig 2014-09-14 19:16:31 UTC +++ src/layer2.c -@@ -3,7 +3,10 @@ +@@ -9,7 +9,14 @@ + #include - #include --#include -+//#include ++#ifdef __FreeBSD__ +#include +#include +#include ++#else + #include ++#endif ++ #include #include -@@ -12,6 +15,15 @@ - #include "log.h" +@@ -19,6 +26,18 @@ + #include "packetcapture.h" /* for datalink_info_t */ #include "layer2.h" ++#ifdef __FreeBSD__ +#define ETH_P_IP 0x0800 +#define ETH_P_IPV6 0x86DD +#define ETH_ALEN 6 ++#define ETH_P_ARP 0x0806 +struct ethhdr { -+ unsigned char h_dest[ETH_ALEN]; -+ unsigned char h_source[ETH_ALEN]; -+ u_int16_t h_proto; ++ unsigned char h_dest[ETH_ALEN]; ++ unsigned char h_source[ETH_ALEN]; ++ u_int16_t h_proto; +} __attribute__((packed)); ++#endif + - int handle_link_layer(datalink_info_t *info, const u_char *pkt, uint8_t *nextproto, - int *offsetnext) - { + /* ETH_P_PAE is named ETHERTYPE_PAE in freebsd, define it */ + #ifndef ETH_P_PAE + #define ETH_P_PAE 0x888E -- cgit v1.2.3