diff options
author | lns <matzeton@googlemail.com> | 2022-07-30 09:01:42 +0200 |
---|---|---|
committer | lns <matzeton@googlemail.com> | 2022-08-02 11:25:39 +0200 |
commit | 9cc69f88a0528470ded8a80e1956504683ae8754 (patch) | |
tree | 69b39f77a034a7de17997cc316279de2f98b1412 /src/include | |
parent | ed4f106a0d6ba2d644e95354891b4b68f927c535 (diff) |
Improved nDPI JSON serialization.improved/ndpi-serialization
* fixed autoconf CFLAGS/LDFLAGS MSAN issue which could lead to build errors
* introduced portable version of gmtime_r aka ndpi_gmtime_r
* do as most as possible of the serialization work in ndpi_utils.c
* use flow2json in ndpiReader
Signed-off-by: lns <matzeton@googlemail.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ndpi_api.h.in | 2 | ||||
-rw-r--r-- | src/include/ndpi_typedefs.h | 2 | ||||
-rw-r--r-- | src/include/ndpi_utils.h | 2 | ||||
-rw-r--r-- | src/include/ndpi_win32.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/include/ndpi_api.h.in b/src/include/ndpi_api.h.in index ab853d402..9064ac627 100644 --- a/src/include/ndpi_api.h.in +++ b/src/include/ndpi_api.h.in @@ -1056,7 +1056,7 @@ extern "C" { u_int8_t ndpi_extra_dissection_possible(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow); u_int8_t ndpi_is_safe_ssl_cipher(u_int32_t cipher); - const char* ndpi_cipher2str(u_int32_t cipher); + const char* ndpi_cipher2str(u_int32_t cipher, char unknown_cipher[8]); const char* ndpi_tunnel2str(ndpi_packet_tunnel tt); u_int16_t ndpi_guess_host_protocol_id(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow); diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index 24302075e..ae7920ffb 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -654,7 +654,7 @@ struct ndpi_flow_tcp_struct { /* NDPI_PROTOCOL_MAIL_SMTP */ /* NDPI_PROTOCOL_MAIL_POP */ /* NDPI_PROTOCOL_MAIL_IMAP */ - /* NDPI_PROTOCOL_MAIL_FTP */ + /* NDPI_PROTOCOL_FTP_CONTROL */ /* TODO: something clever to save memory */ struct { u_int8_t auth_found:1, auth_failed:1, auth_tls:1, auth_done:1, _pad:4; diff --git a/src/include/ndpi_utils.h b/src/include/ndpi_utils.h index 6469d30d9..de68b0c11 100644 --- a/src/include/ndpi_utils.h +++ b/src/include/ndpi_utils.h @@ -57,6 +57,8 @@ extern u_int8_t ndpi_ends_with(char *str, char *ends); #ifndef NDPI_CFFI_PREPROCESSING int ndpi_vsnprintf(char * str, size_t size, char const * format, va_list va_args); int ndpi_snprintf(char * str, size_t size, char const * format, ...); +struct tm *ndpi_gmtime_r(const time_t *restrict timep, + struct tm *restrict result); #endif #endif diff --git a/src/include/ndpi_win32.h b/src/include/ndpi_win32.h index 16b4bd7c5..3183b5d81 100644 --- a/src/include/ndpi_win32.h +++ b/src/include/ndpi_win32.h @@ -66,8 +66,6 @@ typedef uint u_int32_t; typedef uint u_int; typedef unsigned __int64 u_int64_t; -#define gmtime_r(a, b) memcpy(b, gmtime(a), sizeof(struct tm)) - #define timegm _mkgmtime #define sleep(a /* sec */) Sleep(1000*a /* ms */) |