added check for net/bpf.h in configure.ac
This commit is contained in:
@ -217,6 +217,9 @@
|
||||
/* Define to 1 if you have the <netpacket/packet.h> header file. */
|
||||
#undef HAVE_NETPACKET_PACKET_H
|
||||
|
||||
/* Define to 1 if you have the <net/bpf.h> header file. */
|
||||
#undef HAVE_NET_BPF_H
|
||||
|
||||
/* Define to 1 if you have the <net/if_dl.h> header file. */
|
||||
#undef HAVE_NET_IF_DL_H
|
||||
|
||||
|
@ -55,7 +55,9 @@
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#include <net/bpf.h>
|
||||
#if defined(HAVE_NET_BPF_H)
|
||||
# include <net/bpf.h>
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
# include <limits.h>
|
||||
@ -179,8 +181,10 @@ static mio_syshnd_t open_async_bpf (mio_t* mio)
|
||||
fd = open("/dev/bpf", O_RDWR);
|
||||
if (fd == MIO_SYSHND_INVALID) goto oops;
|
||||
|
||||
#if 0
|
||||
if (ioctl(fd, BIOCIMMEDIATE, &tmp) == -1) goto oops;
|
||||
if (ioctl(fd, BIOCGBLEN, &bufsize) == -1) goto oops;
|
||||
#endif
|
||||
|
||||
return fd;
|
||||
oops:
|
||||
|
Reference in New Issue
Block a user