Initial work towards custom BPF protocol definition

This commit is contained in:
Luca
2022-09-16 19:48:12 +02:00
parent a966d37a21
commit 0f07ad35be
4 changed files with 98 additions and 18 deletions
+15 -1
View File
@@ -72,6 +72,7 @@ LT_INIT
LT_LIB_M
PKG_PROG_PKG_CONFIG
PWD=`pwd`
AC_PROG_CC
SYSTEM=`uname -s`
@@ -172,6 +173,7 @@ if test "x$ac_cv_lib_rrd_rrd_fetch_r" = xyes; then :
EXTRA_TARGETS="$EXTRA_TARGETS rrdtool"
fi
ADDITIONAL_INCS=
ADDITIONAL_LIBS="$LIBM"
PCAP_HOME=$HOME/PF_RING/userland
@@ -196,8 +198,19 @@ fi
MACHINE=`uname -m`
CUSTOM_NDPI=
AC_MSG_CHECKING([PF_RING nBPF])
NBPF_HOME=${PWD}/../PF_RING/userland/nbpf
LIBNBPF=${NBPF_HOME}/libnbpf.a
if test -f ${LIBNBPF}; then :
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} ${LIBNBPF}"
ADDITIONAL_INCS="${ADDITIONAL_INCS} -I${NBPF_HOME}"
AC_DEFINE_UNQUOTED(HAVE_NBPF, "1", [PF_RING nBPF is present])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
CUSTOM_NDPI=
if test -d ../nDPI-custom; then :
CUSTOM_NDPI="-DCUSTOM_NDPI_PROTOCOLS"
AC_MSG_RESULT([Compiling with custom nDPI protocols])
@@ -357,6 +370,7 @@ AC_SUBST(NDPI_VERSION_SHORT)
AC_SUBST(PCAP_INC)
AC_SUBST(PCAP_LIB)
AC_SUBST(LIBRRD)
AC_SUBST(ADDITIONAL_INCS)
AC_SUBST(ADDITIONAL_LIBS)
AC_SUBST(DL_LIB)
AC_SUBST(DPDK_TARGET)