suricata
runmode-netmap.c
Go to the documentation of this file.
1 /* Copyright (C) 2014-2018 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19 * \ingroup netmap
20 *
21 * @{
22 */
23 
24 /**
25 * \file
26 *
27 * \author Aleksey Katargin <gureedo@gmail.com>
28 *
29 * Netmap runmode
30 *
31 */
32 
33 #include "suricata-common.h"
34 #include "config.h"
35 #include "tm-threads.h"
36 #include "conf.h"
37 #include "runmodes.h"
38 #include "runmode-netmap.h"
39 #include "output.h"
40 #include "log-httplog.h"
41 #include "detect-engine-mpm.h"
42 
43 #include "alert-fastlog.h"
44 #include "alert-prelude.h"
45 #include "alert-debuglog.h"
46 
47 #include "util-debug.h"
48 #include "util-time.h"
49 #include "util-cpu.h"
50 #include "util-affinity.h"
51 #include "util-device.h"
52 #include "util-runmodes.h"
53 #include "util-ioctl.h"
54 
55 #include "source-netmap.h"
56 
57 extern int max_pending_packets;
58 
59 const char *RunModeNetmapGetDefaultMode(void)
60 {
61  return "workers";
62 }
63 
65 {
67  "Single threaded netmap mode",
70  "Workers netmap mode, each thread does all"
71  " tasks from acquisition to logging",
74  "Multi threaded netmap mode. Packets from "
75  "each flow are assigned to a single detect "
76  "thread.",
78  return;
79 }
80 
81 #ifdef HAVE_NETMAP
82 
83 static void NetmapDerefConfig(void *conf)
84 {
85  NetmapIfaceConfig *pfp = (NetmapIfaceConfig *)conf;
86  /* config is used only once but cost of this low. */
87  if (SC_ATOMIC_SUB(pfp->ref, 1) == 0) {
88  SCFree(pfp);
89  }
90 }
91 
92 static int ParseNetmapSettings(NetmapIfaceSettings *ns, const char *iface,
93  ConfNode *if_root, ConfNode *if_default)
94 {
95  ns->threads = 0;
96  ns->promisc = true;
99  strlcpy(ns->iface, iface, sizeof(ns->iface));
100 
101  if (ns->iface[0]) {
102  size_t len = strlen(ns->iface);
103  if (ns->iface[len-1] == '+') {
105  "netmap interface %s uses obsolete '+' notation. "
106  "Using '^' instead.", ns->iface);
107  ns->iface[len-1] = '^';
108  ns->sw_ring = true;
109  } else if (ns->iface[len-1] == '^') {
110  ns->sw_ring = true;
111  }
112  }
113 
114  /* prefixed with netmap or vale means it's not a real interface
115  * and we don't check offloading. */
116  if (strncmp(ns->iface, "netmap:", 7) != 0 &&
117  strncmp(ns->iface, "vale", 4) != 0) {
118  ns->real = true;
119  }
120 
121  const char *bpf_filter = NULL;
122  if (ConfGet("bpf-filter", &bpf_filter) == 1) {
123  if (strlen(bpf_filter) > 0) {
124  ns->bpf_filter = bpf_filter;
125  SCLogInfo("Going to use command-line provided bpf filter '%s'",
126  ns->bpf_filter);
127  }
128  }
129 
130  if (if_root == NULL && if_default == NULL) {
131  SCLogInfo("Unable to find netmap config for "
132  "interface \"%s\" or \"default\", using default values",
133  iface);
134  goto finalize;
135 
136  /* If there is no setting for current interface use default one as main iface */
137  } else if (if_root == NULL) {
138  if_root = if_default;
139  if_default = NULL;
140  }
141 
142  const char *threadsstr = NULL;
143  if (ConfGetChildValueWithDefault(if_root, if_default, "threads", &threadsstr) != 1) {
144  ns->threads = 0;
145  ns->threads_auto = true;
146  } else {
147  if (strcmp(threadsstr, "auto") == 0) {
148  ns->threads = 0;
149  ns->threads_auto = true;
150  } else {
151  ns->threads = atoi(threadsstr);
152  }
153  }
154 
155  /* load netmap bpf filter */
156  /* command line value has precedence */
157  if (ns->bpf_filter == NULL) {
158  if (ConfGetChildValueWithDefault(if_root, if_default, "bpf-filter", &bpf_filter) == 1) {
159  if (strlen(bpf_filter) > 0) {
160  ns->bpf_filter = bpf_filter;
161  SCLogInfo("Going to use bpf filter %s", ns->bpf_filter);
162  }
163  }
164  }
165 
166  int boolval = 0;
167  (void)ConfGetChildValueBoolWithDefault(if_root, if_default, "disable-promisc", (int *)&boolval);
168  if (boolval) {
169  SCLogInfo("Disabling promiscuous mode on iface %s", ns->iface);
170  ns->promisc = false;
171  }
172 
173  const char *tmpctype;
174  if (ConfGetChildValueWithDefault(if_root, if_default,
175  "checksum-checks", &tmpctype) == 1)
176  {
177  if (strcmp(tmpctype, "auto") == 0) {
179  } else if (ConfValIsTrue(tmpctype)) {
181  } else if (ConfValIsFalse(tmpctype)) {
183  } else {
184  SCLogWarning(SC_ERR_INVALID_ARGUMENT, "Invalid value for "
185  "checksum-checks for %s", iface);
186  }
187  }
188 
189  const char *copymodestr;
190  if (ConfGetChildValueWithDefault(if_root, if_default,
191  "copy-mode", &copymodestr) == 1)
192  {
193  if (strcmp(copymodestr, "ips") == 0) {
195  } else if (strcmp(copymodestr, "tap") == 0) {
197  } else {
198  SCLogWarning(SC_ERR_INVALID_ARGUMENT, "Invalid copy-mode "
199  "(valid are tap, ips)");
200  }
201  }
202 
203 finalize:
204 
205  ns->ips = (ns->copy_mode != NETMAP_COPY_MODE_NONE);
206 
207  if (ns->sw_ring) {
208  /* just one thread per interface supported */
209  ns->threads = 1;
210  } else if (ns->threads_auto) {
211  /* As NetmapGetRSSCount used to be broken on Linux,
212  * fall back to GetIfaceRSSQueuesNum if needed. */
213  ns->threads = NetmapGetRSSCount(ns->iface);
214  if (ns->threads == 0) {
216  }
217  }
218  if (ns->threads <= 0) {
219  ns->threads = 1;
220  }
221 
222  return 0;
223 }
224 
225 /**
226 * \brief extract information from config file
227 *
228 * The returned structure will be freed by the thread init function.
229 * This is thus necessary to or copy the structure before giving it
230 * to thread or to reparse the file for each thread (and thus have
231 * new structure.
232 *
233 * \return a NetmapIfaceConfig corresponding to the interface name
234 */
235 static void *ParseNetmapConfig(const char *iface_name)
236 {
237  ConfNode *if_root = NULL;
238  ConfNode *if_default = NULL;
239  const char *out_iface = NULL;
240 
241  if (iface_name == NULL) {
242  return NULL;
243  }
244 
245  NetmapIfaceConfig *aconf = SCMalloc(sizeof(*aconf));
246  if (unlikely(aconf == NULL)) {
247  return NULL;
248  }
249  memset(aconf, 0, sizeof(*aconf));
250 
251  aconf->DerefFunc = NetmapDerefConfig;
252  strlcpy(aconf->iface_name, iface_name, sizeof(aconf->iface_name));
253  SC_ATOMIC_INIT(aconf->ref);
254  (void) SC_ATOMIC_ADD(aconf->ref, 1);
255 
256  /* Find initial node */
257  ConfNode *netmap_node = ConfGetNode("netmap");
258  if (netmap_node == NULL) {
259  SCLogInfo("Unable to find netmap config using default value");
260  } else {
261  if_root = ConfFindDeviceConfig(netmap_node, aconf->iface_name);
262  if_default = ConfFindDeviceConfig(netmap_node, "default");
263  }
264 
265  /* parse settings for capture iface */
266  ParseNetmapSettings(&aconf->in, aconf->iface_name, if_root, if_default);
267 
268  /* if we have a copy iface, parse that as well */
269  if (netmap_node != NULL &&
270  ConfGetChildValueWithDefault(if_root, if_default, "copy-iface", &out_iface) == 1)
271  {
272  if (strlen(out_iface) > 0) {
273  if_root = ConfFindDeviceConfig(netmap_node, out_iface);
274  ParseNetmapSettings(&aconf->out, out_iface, if_root, if_default);
275 
276  /* if one side of the IPS peering uses a sw_ring, we will default
277  * to using a single ring/thread on the other side as well. Only
278  * if thread variable is set to 'auto'. So the user can override
279  * this. */
280  if (aconf->out.sw_ring && aconf->in.threads_auto) {
281  aconf->out.threads = aconf->in.threads = 1;
282  } else if (aconf->in.sw_ring && aconf->out.threads_auto) {
283  aconf->out.threads = aconf->in.threads = 1;
284  }
285  }
286  }
287 
288  /* netmap needs all offloading to be disabled */
289  if (aconf->in.real) {
290  char base_name[sizeof(aconf->in.iface)];
291  strlcpy(base_name, aconf->in.iface, sizeof(base_name));
292  /* for a sw_ring enabled device name, strip the trailing char */
293  if (aconf->in.sw_ring) {
294  base_name[strlen(base_name) - 1] = '\0';
295  }
296 
297  if (LiveGetOffload() == 0) {
298  (void)GetIfaceOffloading(base_name, 1, 1);
299  } else {
300  DisableIfaceOffloading(LiveGetDevice(base_name), 1, 1);
301  }
302  }
303 
304  SC_ATOMIC_RESET(aconf->ref);
305  (void) SC_ATOMIC_ADD(aconf->ref, aconf->in.threads);
306  SCLogPerf("Using %d threads for interface %s", aconf->in.threads,
307  aconf->iface_name);
308 
309  return aconf;
310 }
311 
312 static int NetmapConfigGeThreadsCount(void *conf)
313 {
314  NetmapIfaceConfig *aconf = (NetmapIfaceConfig *)conf;
315  return aconf->in.threads;
316 }
317 
318 int NetmapRunModeIsIPS()
319 {
320  int nlive = LiveGetDeviceCount();
321  int ldev;
322  ConfNode *if_root;
323  ConfNode *if_default = NULL;
324  ConfNode *netmap_node;
325  int has_ips = 0;
326  int has_ids = 0;
327 
328  /* Find initial node */
329  netmap_node = ConfGetNode("netmap");
330  if (netmap_node == NULL) {
331  return 0;
332  }
333 
334  if_default = ConfNodeLookupKeyValue(netmap_node, "interface", "default");
335 
336  for (ldev = 0; ldev < nlive; ldev++) {
337  const char *live_dev = LiveGetDeviceName(ldev);
338  if (live_dev == NULL) {
339  SCLogError(SC_ERR_INVALID_VALUE, "Problem with config file");
340  return 0;
341  }
342  const char *copymodestr = NULL;
343  if_root = ConfNodeLookupKeyValue(netmap_node, "interface", live_dev);
344 
345  if (if_root == NULL) {
346  if (if_default == NULL) {
347  SCLogError(SC_ERR_INVALID_VALUE, "Problem with config file");
348  return 0;
349  }
350  if_root = if_default;
351  }
352 
353  if (ConfGetChildValueWithDefault(if_root, if_default, "copy-mode", &copymodestr) == 1) {
354  if (strcmp(copymodestr, "ips") == 0) {
355  has_ips = 1;
356  } else {
357  has_ids = 1;
358  }
359  } else {
360  has_ids = 1;
361  }
362  }
363 
364  if (has_ids && has_ips) {
365  SCLogInfo("Netmap mode using IPS and IDS mode");
366  for (ldev = 0; ldev < nlive; ldev++) {
367  const char *live_dev = LiveGetDeviceName(ldev);
368  if (live_dev == NULL) {
369  SCLogError(SC_ERR_INVALID_VALUE, "Problem with config file");
370  return 0;
371  }
372  if_root = ConfNodeLookupKeyValue(netmap_node, "interface", live_dev);
373  const char *copymodestr = NULL;
374 
375  if (if_root == NULL) {
376  if (if_default == NULL) {
377  SCLogError(SC_ERR_INVALID_VALUE, "Problem with config file");
378  return 0;
379  }
380  if_root = if_default;
381  }
382 
383  if (! ((ConfGetChildValueWithDefault(if_root, if_default, "copy-mode", &copymodestr) == 1) &&
384  (strcmp(copymodestr, "ips") == 0))) {
386  "Netmap IPS mode used and interface '%s' is in IDS or TAP mode. "
387  "Sniffing '%s' but expect bad result as stream-inline is activated.",
388  live_dev, live_dev);
389  }
390  }
391  }
392 
393  return has_ips;
394 }
395 
396 #endif // #ifdef HAVE_NETMAP
397 
399 {
400  SCEnter();
401 
402 #ifdef HAVE_NETMAP
403  int ret;
404  const char *live_dev = NULL;
405 
407 
408  TimeModeSetLive();
409 
410  (void)ConfGet("netmap.live-interface", &live_dev);
411 
412  SCLogDebug("live_dev %s", live_dev);
413 
415  ParseNetmapConfig,
416  NetmapConfigGeThreadsCount,
417  "ReceiveNetmap",
418  "DecodeNetmap", thread_name_autofp,
419  live_dev);
420  if (ret != 0) {
421  SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
422  exit(EXIT_FAILURE);
423  }
424 
425  SCLogDebug("RunModeIdsNetmapAutoFp initialised");
426 #endif /* HAVE_NETMAP */
427 
428  SCReturnInt(0);
429 }
430 
431 /**
432 * \brief Single thread version of the netmap processing.
433 */
435 {
436  SCEnter();
437 
438 #ifdef HAVE_NETMAP
439  int ret;
440  const char *live_dev = NULL;
441 
443  TimeModeSetLive();
444 
445  (void)ConfGet("netmap.live-interface", &live_dev);
446 
448  ParseNetmapConfig,
449  NetmapConfigGeThreadsCount,
450  "ReceiveNetmap",
451  "DecodeNetmap", thread_name_single,
452  live_dev);
453  if (ret != 0) {
454  SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
455  exit(EXIT_FAILURE);
456  }
457 
458  SCLogDebug("RunModeIdsNetmapSingle initialised");
459 
460 #endif /* HAVE_NETMAP */
461  SCReturnInt(0);
462 }
463 
464 /**
465 * \brief Workers version of the netmap processing.
466 *
467 * Start N threads with each thread doing all the work.
468 *
469 */
471 {
472  SCEnter();
473 
474 #ifdef HAVE_NETMAP
475  int ret;
476  const char *live_dev = NULL;
477 
479  TimeModeSetLive();
480 
481  (void)ConfGet("netmap.live-interface", &live_dev);
482 
484  ParseNetmapConfig,
485  NetmapConfigGeThreadsCount,
486  "ReceiveNetmap",
487  "DecodeNetmap", thread_name_workers,
488  live_dev);
489  if (ret != 0) {
490  SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
491  exit(EXIT_FAILURE);
492  }
493 
494  SCLogDebug("RunModeIdsNetmapWorkers initialised");
495 
496 #endif /* HAVE_NETMAP */
497  SCReturnInt(0);
498 }
499 
500 /**
501 * @}
502 */
thread_name_workers
const char * thread_name_workers
Definition: runmodes.c:63
RunModeIdsNetmapSingle
int RunModeIdsNetmapSingle(void)
Single thread version of the netmap processing.
Definition: runmode-netmap.c:434
tm-threads.h
len
uint8_t len
Definition: app-layer-dnp3.h:4
RunModeSetLiveCaptureWorkers
int RunModeSetLiveCaptureWorkers(ConfigIfaceParserFunc ConfigParser, ConfigIfaceThreadsCountFunc ModThreadsCount, const char *recv_mod_name, const char *decode_mod_name, const char *thread_name, const char *live_dev)
Definition: util-runmodes.c:341
SC_ERR_INVALID_VALUE
@ SC_ERR_INVALID_VALUE
Definition: util-error.h:160
alert-debuglog.h
GetIfaceRSSQueuesNum
int GetIfaceRSSQueuesNum(const char *pcap_dev)
Definition: util-ioctl.c:737
SC_ATOMIC_INIT
#define SC_ATOMIC_INIT(name)
Initialize the previously declared atomic variable and it's lock.
Definition: util-atomic.h:81
SCFree
#define SCFree(a)
Definition: util-mem.h:322
unlikely
#define unlikely(expr)
Definition: util-optimize.h:35
NetmapIfaceSettings_::checksum_mode
ChecksumValidationMode checksum_mode
Definition: source-netmap.h:53
ConfGetChildValueBoolWithDefault
int ConfGetChildValueBoolWithDefault(const ConfNode *base, const ConfNode *dflt, const char *name, int *val)
Definition: conf.c:543
SCLogDebug
#define SCLogDebug(...)
Definition: util-debug.h:335
LiveGetOffload
int LiveGetOffload(void)
Definition: util-device.c:79
ConfGetNode
ConfNode * ConfGetNode(const char *name)
Get a ConfNode by name.
Definition: conf.c:176
SC_ATOMIC_ADD
#define SC_ATOMIC_ADD(name, val)
add a value to our atomic variable
Definition: util-atomic.h:107
RunModeInitialize
void RunModeInitialize(void)
Definition: runmodes.c:907
util-runmodes.h
thread_name_autofp
const char * thread_name_autofp
Definition: runmodes.c:61
NetmapIfaceConfig_::out
NetmapIfaceSettings out
Definition: source-netmap.h:66
ConfNodeLookupKeyValue
ConfNode * ConfNodeLookupKeyValue(const ConfNode *base, const char *key, const char *value)
Lookup for a key value under a specific node.
Definition: conf.c:860
CHECKSUM_VALIDATION_DISABLE
@ CHECKSUM_VALIDATION_DISABLE
Definition: decode.h:41
NetmapIfaceSettings_::iface
char iface[NETMAP_IFACE_NAME_LENGTH]
Definition: source-netmap.h:42
SC_ERR_RUNMODE
@ SC_ERR_RUNMODE
Definition: util-error.h:219
thread_name_single
const char * thread_name_single
Definition: runmodes.c:62
NetmapIfaceSettings_::ips
bool ips
Definition: source-netmap.h:48
RUNMODE_NETMAP
@ RUNMODE_NETMAP
Definition: runmodes.h:38
ConfValIsTrue
int ConfValIsTrue(const char *val)
Check if a value is true.
Definition: conf.c:566
RunModeIdsNetmapWorkers
int RunModeIdsNetmapWorkers(void)
Workers version of the netmap processing.
Definition: runmode-netmap.c:470
strlcpy
size_t strlcpy(char *dst, const char *src, size_t siz)
Definition: util-strlcpyu.c:43
RunModeSetLiveCaptureAutoFp
int RunModeSetLiveCaptureAutoFp(ConfigIfaceParserFunc ConfigParser, ConfigIfaceThreadsCountFunc ModThreadsCount, const char *recv_mod_name, const char *decode_mod_name, const char *thread_name, const char *live_dev)
Definition: util-runmodes.c:89
NetmapGetRSSCount
int NetmapGetRSSCount(const char *ifname)
CHECKSUM_VALIDATION_ENABLE
@ CHECKSUM_VALIDATION_ENABLE
Definition: decode.h:42
ConfGet
int ConfGet(const char *name, const char **vptr)
Retrieve the value of a configuration node.
Definition: conf.c:331
CHECKSUM_VALIDATION_AUTO
@ CHECKSUM_VALIDATION_AUTO
Definition: decode.h:43
NetmapIfaceSettings_::threads
int threads
Definition: source-netmap.h:51
util-device.h
util-debug.h
NetmapIfaceConfig_::DerefFunc
void(* DerefFunc)(void *)
Definition: source-netmap.h:69
NetmapIfaceSettings_::real
bool real
Definition: source-netmap.h:47
util-cpu.h
NetmapIfaceSettings_::sw_ring
bool sw_ring
Definition: source-netmap.h:45
LiveGetDevice
LiveDevice * LiveGetDevice(const char *name)
Get a pointer to the device at idx.
Definition: util-device.c:279
ConfFindDeviceConfig
ConfNode * ConfFindDeviceConfig(ConfNode *node, const char *iface)
Find the configuration node for a specific device.
Definition: util-conf.c:129
SCEnter
#define SCEnter(...)
Definition: util-debug.h:337
detect-engine-mpm.h
NETMAP_COPY_MODE_IPS
@ NETMAP_COPY_MODE_IPS
Definition: source-netmap.h:34
util-affinity.h
ConfGetChildValueWithDefault
int ConfGetChildValueWithDefault(const ConfNode *base, const ConfNode *dflt, const char *name, const char **vptr)
Definition: conf.c:416
util-time.h
SC_ERR_INVALID_ARGUMENT
@ SC_ERR_INVALID_ARGUMENT
Definition: util-error.h:43
NetmapIfaceSettings_
Definition: source-netmap.h:39
SCMalloc
#define SCMalloc(a)
Definition: util-mem.h:222
runmode-netmap.h
SC_ATOMIC_SUB
#define SC_ATOMIC_SUB(name, val)
sub a value from our atomic variable
Definition: util-atomic.h:124
conf.h
source-netmap.h
NetmapIfaceSettings_::promisc
bool promisc
Definition: source-netmap.h:46
GetIfaceOffloading
int GetIfaceOffloading(const char *dev, int csum, int other)
output offloading status of the link
Definition: util-ioctl.c:694
DisableIfaceOffloading
int DisableIfaceOffloading(LiveDevice *dev, int csum, int other)
Definition: util-ioctl.c:707
NetmapIfaceSettings_::threads_auto
bool threads_auto
Definition: source-netmap.h:49
runmodes.h
SCLogInfo
#define SCLogInfo(...)
Macro used to log INFORMATIONAL messages.
Definition: util-debug.h:254
alert-prelude.h
TimeModeSetLive
void TimeModeSetLive(void)
Definition: util-time.c:97
alert-fastlog.h
max_pending_packets
int max_pending_packets
Definition: suricata.c:212
NetmapIfaceSettings_::bpf_filter
const char * bpf_filter
Definition: source-netmap.h:54
NetmapIfaceConfig_
Definition: source-netmap.h:57
suricata-common.h
RunModeRegisterNewRunMode
void RunModeRegisterNewRunMode(enum RunModes runmode, const char *name, const char *description, int(*RunModeFunc)(void))
Registers a new runmode.
Definition: runmodes.c:419
LiveGetDeviceName
const char * LiveGetDeviceName(int number)
Get a pointer to the device name at idx.
Definition: util-device.c:177
SCLogPerf
#define SCLogPerf(...)
Definition: util-debug.h:261
SCLogError
#define SCLogError(err_code,...)
Macro used to log ERROR messages.
Definition: util-debug.h:294
log-httplog.h
SC_ATOMIC_RESET
#define SC_ATOMIC_RESET(name)
Initialize the previously declared atomic variable and it's lock.
Definition: util-atomic.h:90
RunModeNetmapGetDefaultMode
const char * RunModeNetmapGetDefaultMode(void)
Definition: runmode-netmap.c:59
SCLogWarning
#define SCLogWarning(err_code,...)
Macro used to log WARNING messages.
Definition: util-debug.h:281
RunModeIdsNetmapRegister
void RunModeIdsNetmapRegister(void)
Definition: runmode-netmap.c:64
NetmapIfaceConfig_::iface_name
char iface_name[NETMAP_IFACE_NAME_LENGTH]
Definition: source-netmap.h:60
ConfNode_
Definition: conf.h:32
NetmapIfaceSettings_::copy_mode
int copy_mode
Definition: source-netmap.h:52
util-ioctl.h
ConfValIsFalse
int ConfValIsFalse(const char *val)
Check if a value is false.
Definition: conf.c:591
RunModeSetLiveCaptureSingle
int RunModeSetLiveCaptureSingle(ConfigIfaceParserFunc ConfigParser, ConfigIfaceThreadsCountFunc ModThreadsCount, const char *recv_mod_name, const char *decode_mod_name, const char *thread_name, const char *live_dev)
Definition: util-runmodes.c:375
SC_WARN_OPTION_OBSOLETE
@ SC_WARN_OPTION_OBSOLETE
Definition: util-error.h:265
NetmapIfaceConfig_::in
NetmapIfaceSettings in
Definition: source-netmap.h:63
RunModeIdsNetmapAutoFp
int RunModeIdsNetmapAutoFp(void)
Definition: runmode-netmap.c:398
LiveGetDeviceCount
int LiveGetDeviceCount(void)
Get the number of registered devices.
Definition: util-device.c:157
SCReturnInt
#define SCReturnInt(x)
Definition: util-debug.h:341
NETMAP_COPY_MODE_TAP
@ NETMAP_COPY_MODE_TAP
Definition: source-netmap.h:33
NetmapRunModeIsIPS
int NetmapRunModeIsIPS(void)
output.h
NETMAP_COPY_MODE_NONE
@ NETMAP_COPY_MODE_NONE
Definition: source-netmap.h:32