- newer libpcap versions have pcap-bpf.h include, not net/bpf.h

This commit is contained in:
keil 2004-02-12 10:50:20 +00:00
parent 003ea565c3
commit c3d721bd72
4 changed files with 32 additions and 7 deletions

View File

@ -1,12 +1,14 @@
#
# ipppd makefile for Linux
# $Id: Makefile.in,v 1.17 2003/06/30 22:30:57 keil Exp $
# $Id: Makefile.in,v 1.18 2004/02/12 10:50:20 keil Exp $
#
HAVE_LIBDES := @HAVE_LIBDES@
HAVE_LIBCRYPT := @HAVE_LIBCRYPT@
HAVE_SHADOW_H := @HAVE_SHADOW_H@
HAVE_LZSCOMP_H:= @HAVE_LZSCOMP_H@
HAVE_PCAP_BPF_H := @HAVE_PCAP_BPF_H@
HAVE_NET_BPF_H:= @HAVE_NET_BPF_H@
IPPP_FILTER := @CONFIG_IPPP_FILTER@
SBINDIR := @CONFIG_SBINDIR@
MANDIR := @CONFIG_MANDIR@
@ -118,6 +120,14 @@ ifeq ($(HAVE_LZSCOMP_H),1)
CFLAGS += -DHAVE_LZSCOMP_H
endif
ifeq ($(HAVE_PCAP_BPF_H),1)
CFLAGS += -DHAVE_PCAP_BPF_H
endif
ifeq ($(HAVE_NET_BPF_H),1)
CFLAGS += -DHAVE_NET_BPF_H
endif
%.8: %.man
cp $< $@

View File

@ -29,6 +29,9 @@ AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h limits.h paths.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h)
AC_CHECK_HEADER(shadow.h, HAVE_SHADOW_H=1; AC_DEFINE(HAVE_SHADOW_H))
AC_CHECK_HEADER(linux/isdn_lzscomp.h, HAVE_LZSCOMP_H=1; AC_DEFINE(HAVE_LZSCOMP_H))
AC_CHECK_HEADER(pcap-bpf.h, [HAVE_PCAP_BPF_H=1; AC_DEFINE(HAVE_PCAP_BPF_H)],
[AC_CHECK_HEADER(net/bpf.h, [HAVE_NET_BPF_H=1; AC_DEFINE(HAVE_NET_BPF_H)],
[AC_MSG_ERROR(Could not find pcap header file)])])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@ -112,6 +115,8 @@ AC_SUBST(HAVE_LIBCRYPT)
AC_SUBST(HAVE_LIBBSD)
AC_SUBST(HAVE_SHADOW_H)
AC_SUBST(HAVE_LZSCOMP_H)
AC_SUBST(HAVE_PCAP_BPF_H)
AC_SUBST(HAVE_NET_BPF_H)
AC_SUBST(CONFIG_RUNDIR)
AC_SUBST(CONFIG_SBINDIR)
AC_SUBST(CONFIG_MANDIR)

View File

@ -18,7 +18,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: ipppd.h,v 1.23 2003/06/30 22:30:57 keil Exp $
* $Id: ipppd.h,v 1.24 2004/02/12 10:50:21 keil Exp $
*/
/*
@ -216,7 +216,17 @@ extern int cryptpap; /* Others' PAP passwords are encrypted */
extern int hostroute; /* Add a route to the host at the other end? */
#endif
#ifdef IPPP_FILTER
#include <net/bpf.h>
# ifdef HAVE_NET_BPF_H
# include <net/bpf.h>
# else
# ifdef HAVE_PCAP_BPF_H
# include <pcap-bpf.h>
# else
# error no BPF include defined
# endif
# endif
extern struct bpf_program pass_filter; /* Filter for pkts to pass */
extern struct bpf_program active_filter; /* Filter for link-active pkts */
#endif /* IPPP_FILTER */

View File

@ -22,7 +22,7 @@
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
char sys_rcsid[] = "$Id: sys-linux.c,v 1.26 2003/06/30 22:30:57 keil Exp $";
char sys_rcsid[] = "$Id: sys-linux.c,v 1.27 2004/02/12 10:50:21 keil Exp $";
#define _LINUX_STRING_H_
@ -71,13 +71,13 @@ char sys_rcsid[] = "$Id: sys-linux.c,v 1.26 2003/06/30 22:30:57 keil Exp $";
# include <netipx/ipx.h>
#endif
#include "fsm.h"
#include "ipppd.h"
#ifdef IPPP_FILTER
#include <net/bpf.h>
#include <linux/filter.h>
#endif /* IPPP_FILTER */
#include "fsm.h"
#include "ipppd.h"
#include "ipcp.h"
#include "ipxcp.h"
#include "ccp.h"