Victor Julien
6142e88ed5
nflog: compiler warning fix
9 years ago
Victor Julien
ab1200fbd7
compiler: more strict compiler warnings
...
Set flags by default:
-Wmissing-prototypes
-Wmissing-declarations
-Wstrict-prototypes
-Wwrite-strings
-Wcast-align
-Wbad-function-cast
-Wformat-security
-Wno-format-nonliteral
-Wmissing-format-attribute
-funsigned-char
Fix minor compiler warnings for these new flags on gcc and clang.
9 years ago
cardigliano
57e0bd39e9
pkt acq: introduce break loop API
...
This patch adds a new callback PktAcqBreakLoop() in TmModule to let
packet acquisition modules define "break-loop" functions to terminate
the capture loop. This is useful in case of blocking functions that
need special actions to take place in order to stop the execution.
Implement this for PF_RING
11 years ago
Victor Julien
14466a803d
decode: create util function for basic counter updates
11 years ago
Victor Julien
752f03e7a4
counters: remaining s/SCPerf/Stats/g
11 years ago
Victor Julien
30cce2bd29
counters: s/SCPerfCounterSetUI64/StatsSetUI64/g
11 years ago
Victor Julien
1c0b4ee0ae
counters: s/SCPerfCounterIncr/StatsIncr/g
11 years ago
Victor Julien
8992275b0c
counters: s/SCPerfCounterAddUI64/StatsAddUI64/g
11 years ago
Victor Julien
1ef786e7cb
counters: rename register API calls
...
Also remove 'type' parameter which was always the same.
11 years ago
Victor Julien
b293a4b7d0
counters: remove unused description
11 years ago
Victor Julien
e9b067c1eb
counters: make increment call take threadvars
...
This hides the implementation from the caller.
11 years ago
Victor Julien
9a8bff7d96
counters: threadvars s/sc_perf_pca/perf_private_ctx/g
11 years ago
Ken Steele
8f1d75039a
Enforce function coding standard
...
Functions should be defined as:
int foo(void)
{
}
Rather than:
int food(void) {
}
All functions where changed by a script to match this standard.
12 years ago
Victor Julien
98c88d5170
decode: pass ThreadVars to DecodeThreadVarsFree
...
Flow output thread data deinit function which will be called from
DecodeThreadVarsFree will need it.
12 years ago
Giuseppe Longo
8db3f214f0
nflog: fix memory leaks
...
This fixes the following memory leaks:
[src/source-nflog.c:222]: (error) Memory leak: ntv
[src/source-nflog.c:236]: (error) Memory leak: ntv
[src/source-nflog.c:253]: (error) Memory leak: ntv
[src/source-nflog.c:258]: (error) Memory leak: ntv
12 years ago
Victor Julien
0765bcc73e
nflog: set socket timeout
...
Set socket timeout so that we can exit if there is no traffic.
It would hang after the SIGINT signal, until packets arived.
12 years ago
Victor Julien
0bbec75764
nflog: fix typo rising->raising
12 years ago
Victor Julien
0857a60fce
nflog: improve error handling on NOBUFS
...
Don't fall through to handle_packet on any NOBUFS condition. Make
sure we catch all NOBUFS.
12 years ago
Giuseppe Longo
2ad8a8e111
Bootstraping NFLOG capture mode
12 years ago