Added ability to define an unlimited number of custom rules IP:port for the same IP (it used tobe limited to 2)
This commit is contained in:
@@ -66,20 +66,26 @@
|
||||
|
||||
#define UV16_MAX_USER_VALUES 2
|
||||
|
||||
struct patricia_uv16 {
|
||||
u_int16_t user_value, additional_user_value;
|
||||
};
|
||||
|
||||
struct patricia_uv16_list {
|
||||
struct patricia_uv16 value;
|
||||
struct patricia_uv16_list *next;
|
||||
};
|
||||
|
||||
struct patricia_uv32 {
|
||||
u_int32_t user_value, additional_user_value;
|
||||
};
|
||||
|
||||
/* pointer to user data (ex. route flap info) */
|
||||
union ndpi_patricia_node_value_t {
|
||||
/* User-defined values */
|
||||
union {
|
||||
struct {
|
||||
u_int16_t user_value, additional_user_value;
|
||||
} uv16[UV16_MAX_USER_VALUES];
|
||||
|
||||
struct {
|
||||
u_int32_t user_value, additional_user_value;
|
||||
} uv32;
|
||||
|
||||
u_int64_t uv64;
|
||||
|
||||
struct patricia_uv16 uv16[UV16_MAX_USER_VALUES];
|
||||
struct patricia_uv32 uv32;
|
||||
u_int64_t uv64;
|
||||
void *user_data;
|
||||
} u;
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ndpi_typedefs.h
|
||||
*
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
* Copyright (C) 2011-23 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
@@ -1156,18 +1156,18 @@ struct ndpi_detection_module_struct {
|
||||
risky_domain_automa, tls_cert_subject_automa,
|
||||
host_risk_mask_automa, common_alpns_automa;
|
||||
/* IMPORTANT: please, whenever you add a new automa:
|
||||
* update ndpi_finalize_initialization()
|
||||
* update automa_type above
|
||||
*/
|
||||
* update ndpi_finalize_initialization()
|
||||
* update automa_type above
|
||||
*/
|
||||
|
||||
ndpi_str_hash *malicious_ja3_hashmap, *malicious_sha1_hashmap;
|
||||
|
||||
ndpi_list *trusted_issuer_dn;
|
||||
|
||||
void *ip_risk_mask_ptree;
|
||||
void *ip_risk_ptree;
|
||||
/* IP-based protocol detection */
|
||||
void *protocols_ptree;
|
||||
|
||||
/* Patricia trees */
|
||||
ndpi_patricia_tree_t *ip_risk_mask_ptree;
|
||||
ndpi_patricia_tree_t *ip_risk_ptree;
|
||||
ndpi_patricia_tree_t *protocols_ptree; /* IP-based protocol detection */
|
||||
|
||||
/* *** If you add a new Patricia tree, please update ptree_type above! *** */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user