From: Ted Lemon Date: Wed, 3 Feb 1999 19:05:42 +0000 (+0000) Subject: Fix gratuitious Linux incompatibility (different name for bpf insn X-Git-Tag: V2-BETA-1-PATCH-9~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4048b50ac73731545fb74bc6f3e3ef18b0a247da;p=thirdparty%2Fdhcp.git Fix gratuitious Linux incompatibility (different name for bpf insn structure so that it doesn't refer to the hated Berkeley - GMAFB). Reindent ifdefs, which are now confusingly deeply nested. --- diff --git a/common/bpf.c b/common/bpf.c index 3e4b422fd..12c50bf01 100644 --- a/common/bpf.c +++ b/common/bpf.c @@ -42,22 +42,32 @@ #ifndef lint static char copyright[] = -"$Id: bpf.c,v 1.19.2.2 1998/12/22 22:39:19 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: bpf.c,v 1.19.2.3 1999/02/03 19:05:42 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" -#if defined (USE_BPF_SEND) || defined (USE_BPF_RECEIVE) -#include -#include +#if defined (USE_BPF_SEND) || defined (USE_BPF_RECEIVE) \ + || defined (USE_LPF_RECEIVE) +# if defined (USE_LPF_RECEIVE) +# include +# include +# include +# define bpf_insn sock_filter /* Linux: dare to be gratuitously different. */ +# else +# include +# include + +# include +# if defined (NEED_OSF_PFILT_HACKS) +# include +# endif +# endif -#include -#ifdef NEED_OSF_PFILT_HACKS -#include -#endif #include #include "includes/netinet/ip.h" #include "includes/netinet/udp.h" #include "includes/netinet/if_ether.h" +#endif /* Reinitializes the specified interface after an address change. This is not required for packet-filter APIs. */ @@ -80,6 +90,7 @@ void if_reinitialize_receive (info) Opens a packet filter for each interface and adds it to the select mask. */ +#if defined (USE_BPF_SEND) || defined (USE_BPF_RECEIVE) int if_register_bpf (info) struct interface_info *info; {