HAVE_DAQ_ADDRESS_SPACE_ID
)
+check_cxx_source_compiles(
+ "
+ #include <daq.h>
+
+ int main()
+ {
+ DAQ_PktHdr_t hdr;
+ hdr.flow_id = 0;
+ return 0;
+ }
+ "
+ HAVE_DAQ_FLOW_ID
+)
+
set (CMAKE_REQUIRED_FLAGS)
set (CMAKE_REQUIRED_INCLUDES)
set (CMAKE_REQUIRED_LIBRARIES)
/* DAQ version supports address space ID in header. */
#cmakedefine HAVE_DAQ_ADDRESS_SPACE_ID 1
+/* DAQ version supports flow ID in header. */
+#cmakedefine HAVE_DAQ_FLOW_ID 1
/* Available compiler options */
#cmakedefine HAVE_LINUXTHREADS 1
-
-
#endif
-
[DAQ version supports address space ID in header.])
fi
+AC_MSG_CHECKING([for daq flow ID])
+AC_RUN_IFELSE(
+[AC_LANG_PROGRAM(
+[[
+#include <daq.h>
+]],
+[[
+ DAQ_PktHdr_t hdr;
+ hdr.flow_id = 0;
+]])],
+[have_daq_flow_id="yes"],
+[have_daq_flow_id="no"])
+AC_MSG_RESULT($have_daq_flow_id)
+if test "x$have_daq_flow_id" = "xyes"; then
+ AC_DEFINE([HAVE_DAQ_FLOW_ID],[1],
+ [DAQ version supports flow ID in header.])
+fi
+
#--------------------------------------------------------------------------
# zlib
#--------------------------------------------------------------------------
--disable-corefiles Prevent Snort from generating core files
--enable-intel-soft-cpm Enable Intel Soft CPM support
--enable-unit-tests Build unit tests
+ --enable-piglet Build piglet test capability
--enable-large-pcap Enable support for pcaps larger than 2 GB
--disable-static-daq Link static DAQ modules.
--enable-shell enable command line shell support
--enable-unit-tests)
append_cache_entry BUILD_UNIT_TESTS BOOL true
;;
+ --disable-piglet)
+ append_cache_entry BUILD_PIGLET BOOL false
+ ;;
+ --enable-piglet)
+ append_cache_entry BUILD_PIGLET BOOL true
+ ;;
--disable-html-docs)
append_cache_entry MAKE_HTML_DOC BOOL false
;;
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//--------------------------------------------------------------------------
-// pp_codec_data_iface.cc author Joel Cornett <jocornet@cisco.com>
+// pp_daq_pkthdr_iface.cc author Joel Cornett <jocornet@cisco.com>
#include "pp_daq_pkthdr_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <luajit-2.0/lua.hpp>
#include "lua/lua_table.h"
table.get_field("egress_group", daq.egress_group);
table.get_field("flags", daq.flags);
table.get_field("opaque", daq.opaque);
+#ifdef HAVE_DAQ_ADDRESS_SPACE_ID
+#ifdef HAVE_DAQ_FLOW_ID
table.get_field("flow_id", daq.flow_id);
+#endif
table.get_field("address_space_id", daq.address_space_id);
+#endif
// FIXIT-L: Do we want to be able to set the priv_ptr field?
}
table.set_field("egress_group", self.egress_group);
table.set_field("flags", self.flags);
table.set_field("opaque", self.opaque);
+#ifdef HAVE_DAQ_ADDRESS_SPACE_ID
+#ifdef HAVE_DAQ_FLOW_ID
table.set_field("flow_id", self.flow_id);
+#endif
table.set_field("address_space_id", self.address_space_id);
+#endif
// FIXIT-L: Do we want to be able to read the priv_ptr field?
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//--------------------------------------------------------------------------
-// pp_codec_data_iface.cc author Joel Cornett <jocornet@cisco.com>
+// pp_daq_pkthdr_iface.h author Joel Cornett <jocornet@cisco.com>
#ifndef PP_DAQ_PKTHDR_IFACE_H
#define PP_DAQ_PKTHDR_IFACE_H