Improved nDPI JSON serialization. (#1689)
* 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>
This commit is contained 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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */)
|
||||
|
||||
Reference in New Issue
Block a user