Merge branch 'dev' of https://github.com/ntop/nDPI into dev

This commit is contained in:
Luca Deri
2020-01-05 18:25:44 +01:00
54 changed files with 1490 additions and 1828 deletions
+15
View File
@@ -506,6 +506,21 @@ extern "C" {
u_int8_t ndpi_is_subprotocol_informative(struct ndpi_detection_module_struct *ndpi_mod,
u_int16_t protoId);
/**
* Set hostname-based protocol
*
* @par ndpi_mod = the detection module
* @par flow = the flow to which this communication belongs to
* @par master_protocol = the master protocol for this flow
* @par name = the host name
* @par name_len = length of the host name
*
*/
int ndpi_match_hostname_protocol(struct ndpi_detection_module_struct *ndpi_mod,
struct ndpi_flow_struct *flow,
u_int16_t master_protocol,
char *name, u_int name_len);
/**
* Get protocol category as string
*
+15 -15
View File
@@ -637,17 +637,19 @@ struct ndpi_flow_tcp_struct {
/* NDPI_PROTOCOL_TELNET */
u_int32_t telnet_stage:2; // 0 - 2
void* tls_srv_cert_fingerprint_ctx;
struct {
struct {
u_int8_t *buffer;
u_int buffer_len, buffer_used;
} message;
void* srv_cert_fingerprint_ctx; /* SHA-1 */
/* NDPI_PROTOCOL_TLS */
u_int8_t tls_seen_client_cert:1,
tls_seen_server_cert:1,
tls_seen_certificate:1,
tls_srv_cert_fingerprint_found:1,
tls_srv_cert_fingerprint_processed:1,
tls_stage:2, _pad:1; // 0 - 5
int16_t tls_record_offset, tls_fingerprint_len; /* Need to be signed */
u_int8_t tls_sha1_certificate_fingerprint[20];
/* NDPI_PROTOCOL_TLS */
u_int8_t hello_processed:1, certificate_processed:1, subprotocol_detected:1,
fingerprint_set:1, _pad:4;
u_int8_t sha1_certificate_fingerprint[20];
} tls;
/* NDPI_PROTOCOL_POSTGRES */
u_int32_t postgres_stage:3;
@@ -941,7 +943,6 @@ typedef enum {
typedef enum {
ndpi_pref_direction_detect_disable = 0,
ndpi_pref_disable_metadata_export,
} ndpi_detection_preference;
/* ntop extensions */
@@ -1119,8 +1120,7 @@ struct ndpi_detection_module_struct {
ndpi_proto_defaults_t proto_defaults[NDPI_MAX_SUPPORTED_PROTOCOLS+NDPI_MAX_NUM_CUSTOM_PROTOCOLS];
u_int8_t direction_detect_disable:1, /* disable internal detection of packet direction */
disable_metadata_export:1 /* No metadata is exported */
;
_pad:7;
void *hyperscan; /* Intel Hyperscan */
};
@@ -1219,8 +1219,8 @@ struct ndpi_flow_struct {
struct {
struct {
u_int16_t ssl_version;
char client_certificate[64], server_certificate[64], server_organization[64];
u_int16_t ssl_version, server_names_len;
char client_requested_server_name[64], *server_names, server_organization[64];
u_int32_t notBefore, notAfter;
char ja3_client[33], ja3_server[33];
u_int16_t server_cipher;