Added (optional) notifier for LRU add

This commit is contained in:
Luca Deri
2020-08-31 08:47:16 +02:00
parent 029448759b
commit 460ff3c7ab
4 changed files with 28 additions and 3 deletions
+2
View File
@@ -108,6 +108,8 @@ void ndpi_search_hangout(struct ndpi_detection_module_struct *ndpi_struct,
#endif
ndpi_lru_add_to_cache(ndpi_struct->stun_cache, key, NDPI_PROTOCOL_HANGOUT_DUO);
if(ndpi_struct->ndpi_notify_lru_add_handler_ptr)
ndpi_struct->ndpi_notify_lru_add_handler_ptr(ndpi_hangout_cache, key, NDPI_PROTOCOL_HANGOUT_DUO);
}
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_HANGOUT_DUO,
+5
View File
@@ -88,7 +88,12 @@ void ndpi_int_stun_add_connection(struct ndpi_detection_module_struct *ndpi_stru
#endif
ndpi_lru_add_to_cache(ndpi_struct->stun_cache, key, app_proto);
if(ndpi_struct->ndpi_notify_lru_add_handler_ptr)
ndpi_struct->ndpi_notify_lru_add_handler_ptr(ndpi_stun_cache, key, app_proto);
ndpi_lru_add_to_cache(ndpi_struct->stun_cache, key_rev, app_proto);
if(ndpi_struct->ndpi_notify_lru_add_handler_ptr)
ndpi_struct->ndpi_notify_lru_add_handler_ptr(ndpi_stun_cache, key_rev, app_proto);
}
}
}