diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2022-03-21 15:56:01 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2022-03-21 15:56:01 +0100 |
commit | c0b7bdacbc15c1cf5eaeb9faefc088aa698e94ba (patch) | |
tree | 90fcd8d0b791133082987af4aacbd24041e63bf3 /examples/c-collectd/c-collectd.c | |
parent | daaaa615197d8551457ecf926f6df30c6482a70a (diff) |
Reworked nDPIsrvd.h C-API.
* nDPIsrvd.h: Provide nDPId thread storage.
* nDPIsrvd.py: Fixed instance cleanup bug.
* nDPIsrvd.h: Support for instance/thread user data and cleanup callback.
* nDPIsrvd.h: Most recent flow time stored in thread ht instead of instance ht.
* nDPId: Moved flow logger out the memory profilier into SIGUSR1 signal handling.
* nDPId: Added signal fd to be usable within epoll's event handling (live-capture only!)
* nDPId: Added information about ZLib compressions to daemon status/shutdown events.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-collectd/c-collectd.c')
-rw-r--r-- | examples/c-collectd/c-collectd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/c-collectd/c-collectd.c b/examples/c-collectd/c-collectd.c index c16a0847d..aef84239a 100644 --- a/examples/c-collectd/c-collectd.c +++ b/examples/c-collectd/c-collectd.c @@ -440,10 +440,12 @@ static uint64_t get_total_flow_bytes(struct nDPIsrvd_socket * const sock) static enum nDPIsrvd_callback_return captured_json_callback(struct nDPIsrvd_socket * const sock, struct nDPIsrvd_instance * const instance, + struct nDPIsrvd_thread_data * const thread_data, struct nDPIsrvd_flow * const flow) { (void)sock; (void)instance; + (void)thread_data; (void)flow; struct nDPIsrvd_json_token const * const flow_event_name = TOKEN_GET_SZ(sock, "flow_event_name"); @@ -682,7 +684,7 @@ int main(int argc, char ** argv) openlog("nDPIsrvd-collectd", LOG_CONS, LOG_DAEMON); - struct nDPIsrvd_socket * sock = nDPIsrvd_socket_init(0, 0, captured_json_callback, NULL); + struct nDPIsrvd_socket * sock = nDPIsrvd_socket_init(0, 0, 0, 0, captured_json_callback, NULL, NULL); if (sock == NULL) { LOG(LOG_DAEMON | LOG_ERR, "%s", "nDPIsrvd socket memory allocation failed!"); |