Commit Graph

46 Commits (1fb7c0dddc97b20c0ac03d6810f4e76bce523a57)

Author SHA1 Message Date
Anoop Saldanha b787da5643 Remove all cuda related code in the engine except for the cuda api wrappers 12 years ago
Eric Leblond 2f0927fe9b pcap: add snaplen YAML variable
This patch introduces 'snaplen' a new YAML variable in the pcap section.
It can be set per-interface to force pcap capture snaplen. If not set
it defaults to interface MTU if MTU can be known via a ioctl call and to
full capture if not.
13 years ago
Eric Leblond e8aa66a44c pcap: add 'promisc' YAML configuration variable
This patch adds a promisc variable to pcap configuration. It is
used to decided if interface is switched to promiscuous mode.
13 years ago
Eric Leblond f59c63c457 pcap: add support for 'default' interface 13 years ago
Eric Leblond 961eda2108 pcap: ref config according to threads count 13 years ago
Eric Leblond e176be6fcc Use unlikely for error treatment.
When handling error case on SCMallog, SCCalloc or SCStrdup
we are in an unlikely case. This patch adds the unlikely()
expression to indicate this to gcc.

This patch has been obtained via coccinelle. The transformation
is the following:

@istested@
identifier x;
statement S1;
identifier func =~ "(SCMalloc|SCStrdup|SCCalloc)";
@@

x = func(...)
... when != x
- if (x == NULL) S1
+ if (unlikely(x == NULL)) S1
13 years ago
Victor Julien 2179ac2595 Minor fixes for coverity issues. 13 years ago
Eric Leblond 0227a87fcb cleaning: fix warning when building with clang.
clang was issuing some warnings related to unused return in function.
This patch adds some needed error treatment and ignore the rest of the
warnings by adding a cast to void.
13 years ago
Victor Julien c0ac64e58c pcap: make sure thread count is 1 if config is missing for a device. 13 years ago
Victor Julien bd3a655aeb Add pcap workers mode.
Some cards like Napatech or Myricom support libpcap wrappers that allow for
multiple streams, queues, ringbuffers. The workers mode can be of use in
those cases.
13 years ago
Victor Julien 8d1fe9f2fa Make 'autofp' the default runmode. Increase default max-pending-packets to 1024. Move some advanced and uncommonly changed settings down in the stock suricata.yaml. Closes #433. 14 years ago
Victor Julien 11bdf4838f Various improvements to error handling found by Coverity. 14 years ago
Nikolay Denev 139768dd58 Do not use underscored config vars internally. 14 years ago
Victor Julien d24b3a0e50 Clean up csum detection output, misc fixes. 14 years ago
Eric Leblond db5ca0f3a4 pcap: add auto mode support 14 years ago
Eric Leblond 1d1271fd38 pcap: add support for checksum verif mode
This patch adds support for checksum verification mode.
Auto mode is not yet supported.
14 years ago
Eric Leblond db19680794 pcap: fix auto runmode
This patch fixes initialization of a pointer. The lack of it was
causing an invalid interface value to be given to suricata (in
the case no interface was given on the command line).

Reported-by: Delta Yeh <delta.yeh@gmail.com>
14 years ago
Eric Leblond 6c55af847b 'auto' running mode does not support 'threads' var.
This patch modifies the RunModeSetLiveCaptureAuto() prototype to
be able to detect that a 'threads' variable (telling how much
threads must listen to one socket in IDS mode) has been used
in the configuration file. It then print a warning message
if this is the case.
14 years ago
Victor Julien 0fadd93011 Fix an invalid free in bpf code. 14 years ago
Victor Julien 2d16abcf8b Minor code cleanups fixing all GCC 4.6 compiler warnings for default, debug and unittests mode. 14 years ago
Eric Leblond 2387c6b0e8 pcap: Fix setting of buffer size from command line. 14 years ago
Eric Leblond 391d813c82 Remove unified1 output module. 14 years ago
Eric Leblond 625a1e070f runmode: suppress printf
This patch replaces printf by called to SCLogErroc.
14 years ago
Eric Leblond 45d5c3ca59 runmode: introduce configuration dereferencing.
A devide configuration can be used by multiple threads. It is thus
necessary to wait that all threads stop using the configuration before
freeing it. This patch introduces an atomic counter and a free function
which has to be called by each thread when it will not use anymore
the structure. If the configuration is not used anymore, it is freed
by the free function.
14 years ago
Eric Leblond d3d99ffa13 Fix coding style and use SC* function.
This patch fixes the coding style and uses Suricata function instead
of plain lic version.
14 years ago
Eric Leblond 77869a2df8 single runmode: add support for multiple capture threads 14 years ago
Eric Leblond 63d614162c pcap: should not call free 14 years ago
Eric Leblond 491686c33e pcap: factorise single mode. 14 years ago
Eric Leblond b2598f97e7 pcap: restore backward compatibility 14 years ago
Eric Leblond 21663acd3b pcap: use good var name for live-interface 14 years ago
Eric Leblond d3d8beb337 pcap: factorize runmode
This patch factorizes auto and autofp runmodes for pcap.
14 years ago
Eric Leblond 2631e5f14f pcap: get rid of old API. 14 years ago
Eric Leblond 6f975d3248 pcap: add "autofp" runmode
This patch adds "autofp" runmode. This runmode supports multiple
devices and uses the new CPU affinity system.
14 years ago
Eric Leblond effa295489 pcap: add "single" runmode
This patch adds support for the "single" mode to the pcap live
mode.
14 years ago
Eric Leblond 871b21892a factorize pcap live device function
They are not specific to pcap and could thus be used in other module.
14 years ago
Anoop Saldanha 4f7df1029d Unify the use of slots to a single struct for threading API. Remove separate slot append functions for 1slot and varslot 14 years ago
Victor Julien 43b2e63c1e Fix minor compiler comments in CUDA code. 14 years ago
Gerardo Iglesias Galvan 363285d485 No need to check array pointer 14 years ago
Gerardo Iglesias Galvan a2b7b77434 Make sure we always check the result of TmThreadCreatePacketHandler 14 years ago
Victor Julien cd75201dc7 Fix pfring commandline handling. 15 years ago
Anoop Saldanha e4d890e186 modify runmode api to accept conf runmode paramter as a char string, instead of an interger id 15 years ago
Anoop Saldanha 229f7281ea list runmodes. Allow specification of runmode id from cof file. Also allow for command line override 15 years ago
Anoop Saldanha 05686e70a5 fix coding indentation + neaten runmode code 15 years ago
Anoop Saldanha d7c707e656 modify runmodes to take all arguments from the conf API 15 years ago
Anoop Saldanha e7ac1d7c4c move pcap file runmode into its own file runmode-pcap-file.[ch] 15 years ago
Anoop Saldanha f6af567ce0 move pcap live runmode into its own file runmode-pcap.[ch] 15 years ago