From 615478be3e8d4d4e22f624fc33b60d1a79e9271b Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Wed, 21 Jul 2021 03:13:54 +0200 Subject: Implemented function to retrieve flow information. #1253 * fixed [h]euristic typo Signed-off-by: Toni Uhlig --- src/include/ndpi_api.h.in | 6 +++--- src/include/ndpi_typedefs.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/include') diff --git a/src/include/ndpi_api.h.in b/src/include/ndpi_api.h.in index df545a165..8cbbfc9e6 100644 --- a/src/include/ndpi_api.h.in +++ b/src/include/ndpi_api.h.in @@ -941,9 +941,6 @@ extern "C" { void set_ndpi_flow_free(void (*__ndpi_flow_free)(void *ptr)); void set_ndpi_debug_function(struct ndpi_detection_module_struct *ndpi_str, ndpi_debug_function_ptr ndpi_debug_printf); - //void * ndpi_malloc(size_t size); - //void * ndpi_calloc(unsigned long count, size_t size); - //void ndpi_free(void *ptr); u_int16_t ndpi_get_api_version(void); const char *ndpi_get_gcrypt_version(void); @@ -964,6 +961,9 @@ extern "C" { char *buffer, u_int buffer_size, u_int8_t min_string_match_len, /* Will return 0 if no string > min_string_match_len have been found */ char *outbuf, u_int outbuf_len); + /* Return a flow info string (summarized). Does only work for DNS/HTTP/TLS/QUIC. */ + const char* ndpi_get_flow_info(struct ndpi_flow_struct const * const flow, + ndpi_protocol const * const l7_protocol); char* ndpi_ssl_version2str(struct ndpi_flow_struct *flow, u_int16_t version, u_int8_t *unknown_tls_version); int ndpi_netbios_name_interpret(u_char *in, u_int in_len, u_char *out, u_int out_len); diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index aeac33b30..f2a40db0a 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -1242,9 +1242,9 @@ typedef enum { #define MAX_NUM_TLS_SIGNATURE_ALGORITHMS 16 -struct tls_euristics { +struct tls_heuristics { /* - TLS euristics for detecting browsers usage + TLS heuristics for detecting browsers usage NOTE: expect false positives */ u_int8_t is_safari_tls:1, is_firefox_tls:1, is_chrome_tls:1, notused:5; @@ -1361,7 +1361,7 @@ struct ndpi_flow_struct { u_int16_t client_signature_algorithms[MAX_NUM_TLS_SIGNATURE_ALGORITHMS]; #endif - struct tls_euristics browser_euristics; + struct tls_heuristics browser_heuristics; struct { u_int16_t cipher_suite; -- cgit v1.2.3