diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2022-09-13 20:33:15 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2022-09-13 22:05:08 +0200 |
commit | d4633c11927683865d8b7bec5e0e4162bae82a60 (patch) | |
tree | 12e0d78562254e297b7ef9c0f9d4cc3c8fa53874 /examples/c-captured/c-captured.c | |
parent | aca1615dc13bac949d507c493e9cef80fd2402ef (diff) |
New flow event: 'analysis'.
* The goal was to provide a separate event for extracted feature that are not required
and only useful for a few (e.g. someone who wants do ML).
* Increased network buffer size to 32kB (8192 * 4).
* Switched timestamp precision from ms to us for *ALL* timestamps.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-captured/c-captured.c')
-rw-r--r-- | examples/c-captured/c-captured.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/c-captured/c-captured.c b/examples/c-captured/c-captured.c index 443762ced..d7e7600c3 100644 --- a/examples/c-captured/c-captured.c +++ b/examples/c-captured/c-captured.c @@ -372,8 +372,8 @@ static enum nDPIsrvd_callback_return captured_json_callback(struct nDPIsrvd_sock return CALLBACK_ERROR; } - nDPIsrvd_ull thread_ts_msec = 0ull; - perror_ull(TOKEN_VALUE_TO_ULL(TOKEN_GET_SZ(sock, "thread_ts_msec"), &thread_ts_msec), "thread_ts_msec"); + nDPIsrvd_ull thread_ts_usec = 0ull; + perror_ull(TOKEN_VALUE_TO_ULL(TOKEN_GET_SZ(sock, "thread_ts_usec"), &thread_ts_usec), "thread_ts_usec"); nDPIsrvd_ull pkt_len = 0ull; perror_ull(TOKEN_VALUE_TO_ULL(TOKEN_GET_SZ(sock, "pkt_len"), &pkt_len), "pkt_len"); @@ -384,8 +384,8 @@ static enum nDPIsrvd_callback_return captured_json_callback(struct nDPIsrvd_sock nDPIsrvd_ull pkt_l4_offset = 0ull; perror_ull(TOKEN_VALUE_TO_ULL(TOKEN_GET_SZ(sock, "pkt_l4_offset"), &pkt_l4_offset), "pkt_l4_offset"); - struct packet_data pd = {.packet_ts_sec = thread_ts_msec / 1000, - .packet_ts_usec = (thread_ts_msec % 1000) * 1000, + struct packet_data pd = {.packet_ts_sec = thread_ts_usec / (1000 * 1000), + .packet_ts_usec = (thread_ts_usec % (1000 * 1000)), .packet_len = pkt_len, .base64_packet_size = pkt->value_length, .base64_packet_const = pkt->value}; |