aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-02-28 15:03:49 +0100
committerGitHub <noreply@github.com>2022-02-28 15:03:49 +0100
commite193f3713de57a738aae735101f20ff78bd23e8c (patch)
treebebccf0e6b91038a086de16ce672b721090ab27a
parentc390085f91d569d953ab5e199e95d580a5cf8f63 (diff)
Removed some unused fields (#1461)
-rw-r--r--python/ndpi.py18
-rw-r--r--python/ndpi_typestruct.py12
-rw-r--r--src/include/ndpi_define.h.in11
-rw-r--r--src/include/ndpi_typedefs.h11
-rw-r--r--src/lib/ndpi_main.c7
5 files changed, 0 insertions, 59 deletions
diff --git a/python/ndpi.py b/python/ndpi.py
index 039f222ae..1d5d9447a 100644
--- a/python/ndpi.py
+++ b/python/ndpi.py
@@ -849,12 +849,9 @@ typedef struct ndpi_proto {
struct ndpi_detection_module_struct {
NDPI_PROTOCOL_BITMASK detection_bitmask;
- NDPI_PROTOCOL_BITMASK generic_http_packet_bitmask;
uint32_t current_ts;
- uint32_t ticks_per_second;
-
uint16_t num_tls_blocks_to_follow;
char custom_category_labels[NUM_CUSTOM_CATEGORIES][CUSTOM_CATEGORY_LABEL_LEN];
@@ -881,8 +878,6 @@ struct ndpi_detection_module_struct {
/* misc parameters */
uint32_t tcp_max_retransmission_window_size;
- uint32_t directconnect_connection_ip_tick_timeout;
-
/* subprotocol registration handler */
struct ndpi_subprotocol_conf_struct subprotocol_conf[250];
@@ -903,20 +898,7 @@ struct ndpi_detection_module_struct {
/* IP-based protocol detection */
void *protocols_ptree;
- /* irc parameters */
- uint32_t irc_timeout;
- /* gnutella parameters */
- uint32_t gnutella_timeout;
- /* rstp */
- uint32_t jabber_stun_timeout;
- uint32_t jabber_file_transfer_timeout;
uint8_t ip_version_limit;
- /* NDPI_PROTOCOL_BITTORRENT */
- struct hash_ip4p_table *bt_ht;
- struct hash_ip4p_table *bt6_ht;
- /* BT_ANNOUNCE */
- struct bt_announce *bt_ann;
- int bt_ann_len;
/* NDPI_PROTOCOL_OOKLA */
struct ndpi_lru_cache *ookla_cache;
diff --git a/python/ndpi_typestruct.py b/python/ndpi_typestruct.py
index 2ba626bc8..7ff561d4e 100644
--- a/python/ndpi_typestruct.py
+++ b/python/ndpi_typestruct.py
@@ -227,9 +227,7 @@ class CustomCategories(Structure):
NDPIDetectionModuleStruct._fields_ = [
("detection_bitmask", NDPIProtocolBitMask),
- ("generic_http_packet_bitmask", NDPIProtocolBitMask),
("current_ts", c_uint32),
- ("ticks_per_second", c_uint32),
("custom_category_labels",
(c_char * ndpi.ndpi_wrap_num_custom_categories()) * ndpi.ndpi_wrap_custom_category_label_len()),
("callback_buffer", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
@@ -246,7 +244,6 @@ NDPIDetectionModuleStruct._fields_ = [
("udpRoot", POINTER(NDPIDefaultsPortsTreeNodeT)),
("ndpi_log_level", c_uint),
("tcp_max_retransmission_window_size", c_uint32),
- ("directconnect_connection_ip_tick_timeout", c_uint32),
("subprotocol_conf", NDPISubprotocolConfStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
("ndpi_num_supported_protocols", c_uint),
("ndpi_num_custom_protocols", c_uint),
@@ -255,16 +252,7 @@ NDPIDetectionModuleStruct._fields_ = [
("impossible_bigrams_automa", NDPIAutoma),
("custom_categories", CustomCategories),
("protocols_ptree", c_void_p),
- ("irc_timeout", c_uint32),
- ("gnutella_timeout", c_uint32),
- ("zattoo_connection_timeout", c_uint32),
- ("jabber_stun_timeout", c_uint32),
- ("jabber_file_transfer_timeout", c_uint32),
("ip_version_limit", c_uint8),
- ("bt_ht", POINTER(HashIp4pTable)),
- ("bt6_ht", POINTER(HashIp4pTable)),
- ("bt_ann", POINTER(BtAnnounce)),
- ("bt_ann_len", c_int),
("ookla_cache", POINTER(NDPILruCache)),
("tinc_cache", POINTER(Cache)),
("proto_defaults", NDPIProtoDefaultsT * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() +
diff --git a/src/include/ndpi_define.h.in b/src/include/ndpi_define.h.in
index 605c4b1e5..b16e0a63b 100644
--- a/src/include/ndpi_define.h.in
+++ b/src/include/ndpi_define.h.in
@@ -167,17 +167,6 @@
#define MAX_PACKET_COUNTER 65000
#define MAX_DEFAULT_PORTS 5
-#define NDPI_DIRECTCONNECT_CONNECTION_IP_TICK_TIMEOUT 600
-#define NDPI_IRC_CONNECTION_TIMEOUT 120
-#define NDPI_GNUTELLA_CONNECTION_TIMEOUT 60
-#define NDPI_BATTLEFIELD_CONNECTION_TIMEOUT 60
-#define NDPI_THUNDER_CONNECTION_TIMEOUT 30
-#define NDPI_TVANTS_CONNECTION_TIMEOUT 5
-#define NDPI_ZATTOO_CONNECTION_TIMEOUT 120
-#define NDPI_ZATTOO_FLASH_TIMEOUT 5
-#define NDPI_JABBER_STUN_TIMEOUT 30
-#define NDPI_JABBER_FT_TIMEOUT 5
-
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
#define NDPI_LOG(proto, m, log_level, args...) \
{ \
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index bbd26961c..f0030c0fd 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -981,10 +981,8 @@ typedef struct ndpi_list_struct {
struct ndpi_detection_module_struct {
NDPI_PROTOCOL_BITMASK detection_bitmask;
- NDPI_PROTOCOL_BITMASK generic_http_packet_bitmask;
u_int32_t current_ts;
- u_int32_t ticks_per_second;
u_int16_t num_tls_blocks_to_follow;
u_int8_t skip_tls_blocks_until_change_cipher:1, enable_ja3_plus:1, _notused:6;
u_int8_t tls_certificate_expire_in_x_days;
@@ -1025,8 +1023,6 @@ struct ndpi_detection_module_struct {
/* misc parameters */
u_int32_t tcp_max_retransmission_window_size;
- u_int32_t directconnect_connection_ip_tick_timeout;
-
/* subprotocol registration handler */
struct ndpi_subprotocol_conf_struct subprotocol_conf[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
@@ -1054,13 +1050,6 @@ struct ndpi_detection_module_struct {
/* IP-based protocol detection */
void *protocols_ptree;
- /* irc parameters */
- u_int32_t irc_timeout;
- /* gnutella parameters */
- u_int32_t gnutella_timeout;
- /* rstp */
- u_int32_t jabber_stun_timeout;
- u_int32_t jabber_file_transfer_timeout;
u_int8_t ip_version_limit;
/* NDPI_PROTOCOL_OOKLA */
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 335cccba2..cdf66688c 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -2452,15 +2452,8 @@ struct ndpi_detection_module_struct *ndpi_init_detection_module(ndpi_init_prefs
ndpi_str->user_data = NULL;
#endif
- ndpi_str->ticks_per_second = 1000; /* ndpi_str->ticks_per_second */
ndpi_str->tcp_max_retransmission_window_size = NDPI_DEFAULT_MAX_TCP_RETRANSMISSION_WINDOW_SIZE;
- ndpi_str->directconnect_connection_ip_tick_timeout =
- NDPI_DIRECTCONNECT_CONNECTION_IP_TICK_TIMEOUT * ndpi_str->ticks_per_second;
ndpi_str->tls_certificate_expire_in_x_days = 30; /* NDPI_TLS_CERTIFICATE_ABOUT_TO_EXPIRE flow risk */
- ndpi_str->irc_timeout = NDPI_IRC_CONNECTION_TIMEOUT * ndpi_str->ticks_per_second;
- ndpi_str->gnutella_timeout = NDPI_GNUTELLA_CONNECTION_TIMEOUT * ndpi_str->ticks_per_second;
- ndpi_str->jabber_stun_timeout = NDPI_JABBER_STUN_TIMEOUT * ndpi_str->ticks_per_second;
- ndpi_str->jabber_file_transfer_timeout = NDPI_JABBER_FT_TIMEOUT * ndpi_str->ticks_per_second;
ndpi_str->ndpi_num_supported_protocols = NDPI_MAX_SUPPORTED_PROTOCOLS;
ndpi_str->ndpi_num_custom_protocols = 0;