#include "source-af-packet.h"
#include "source-mpipe.h"
#include "source-netmap.h"
+#ifdef HAVE_PF_RING_FLOW_OFFLOAD
#include "source-pfring.h"
+#endif
#include "action-globals.h"
NetmapPacketVars netmap_v;
#endif
#ifdef HAVE_PFRING
+#ifdef HAVE_PF_RING_FLOW_OFFLOAD
PfringPacketVars pfring_v;
+#endif
#endif
/** libpcap vars: shared by Pcap Live mode and Pcap File mode */
#include "util-runmodes.h"
#include "util-device.h"
+#ifdef HAVE_PFRING
+#include <pfring.h>
+#endif
+
static const char *default_mode_autofp = NULL;
* \todo Allow ring options such as snaplen etc, to be user configurable.
*/
-#ifdef HAVE_PFRING
-#include <pfring.h>
-#endif /* HAVE_PFRING */
-
#include "suricata-common.h"
#include "suricata.h"
#include "conf.h"
#else /* implied we do have PF_RING support */
+#include <pfring.h>
+
/** protect pfring_set_bpf_filter, as it is not thread safe */
static SCMutex pfring_bpf_set_filter_lock = SCMUTEX_INITIALIZER;
} else if (strncmp(ptv->interface, "zc", 2) == 0) {
SCLogInfo("ZC interface detected, not adding thread to cluster");
} else {
- ptv->ctype = pfconf->ctype;
+ ptv->ctype = (cluster_type)pfconf->ctype;
rc = pfring_set_cluster(ptv->pd, ptv->cluster_id, ptv->ctype);
if (rc != 0) {
#define PFRING_IFACE_NAME_LENGTH 48
#include <config.h>
-#ifdef HAVE_PFRING
-#include <pfring.h>
-#endif
typedef struct PfringThreadVars_ PfringThreadVars;
/* cluster param */
int cluster_id;
-#ifdef HAVE_PFRING
- cluster_type ctype;
-#endif
+ unsigned int ctype;
+
char iface[PFRING_IFACE_NAME_LENGTH];
/* number of threads */
int threads;
LOGGER_SIZE,
} LoggerId;
+#include "util-optimize.h"
#include <htp/htp.h>
#include "threads.h"
#include "tm-threads-common.h"
#include "util-error.h"
#include "util-mem.h"
#include "detect-engine-alert.h"
-#include "util-optimize.h"
#include "util-path.h"
#include "util-conf.h"