Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
CC= gcc
AR=/usr/bin/ar
RANLIB=/usr/bin/ranlib
CCOPT= -O2 -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@
CCOPT= -O2 -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@ @USE_PCAP_BPF@
DEBUG= -g
#uncomment the following if you need libpcap based build under linux
#(not raccomanded)
Expand Down
9 changes: 9 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ then
TCL_LIB="-ltcl${LIBPOSTFIX} -lm -lpthread"
fi

#
# PCAP_BPF detection
#
if [ -f "/usr/include/pcap/bpf.h" ]
then
USE_PCAP_BPF="-DUSE_PCAP_BPF"
fi

#
# configurable stuff
#
Expand Down Expand Up @@ -140,6 +148,7 @@ sed -e "s^@PCAP@^$PCAP^g" \
-e "s^@MANPATH@^$INSTALL_MANPATH^g" \
-e "s^@SOLARISLIB@^$SOLARISLIB^g" \
-e "s^@USE_TCL@^$USE_TCL^g" \
-e "s^@USE_PCAP_BPF@^$USE_PCAP_BPF^g" \
-e "s^@TCL_INC@^$TCL_INC^g" \
-e "s^@TCL_VER@^$TCL_VER^g" \
-e "s^@TCL_LIB@^$TCL_LIB^g" \
Expand Down
4 changes: 4 additions & 0 deletions libpcap_stuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
#include <string.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#ifdef USE_PCAP_BPF
#include <pcap/bpf.h>
#else
#include <net/bpf.h>
#endif
#include <pcap.h>

#include "globals.h"
Expand Down
6 changes: 6 additions & 0 deletions script.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
#include <sched.h>

#include <sys/ioctl.h>

#ifdef USE_PCAP_BPF
#include <pcap/bpf.h>
#else
#include <net/bpf.h>
#endif

#include <pcap.h>

#include "release.h"
Expand Down