STUN: keep monitoring/processing STUN flows (#2012)

Look for RTP packets in the STUN sessions.
TODO: tell RTP from RTCP
This commit is contained in:
Ivan Nardi
2023-06-21 09:16:20 +02:00
committed by GitHub
parent 04be308092
commit 3608ab01b6
17 changed files with 312 additions and 22 deletions
+6
View File
@@ -1050,6 +1050,12 @@ extern "C" {
u_int32_t ndpi_get_protocol_aggressiveness(struct ndpi_detection_module_struct *ndpi_struct,
u_int16_t proto);
int ndpi_set_monitoring_state(struct ndpi_detection_module_struct *ndpi_struct,
u_int16_t proto, u_int32_t num_pkts, u_int32_t flags);
int ndpi_get_monitoring_state(struct ndpi_detection_module_struct *ndpi_struct,
u_int16_t proto, u_int32_t *num_pkts, u_int32_t *flags);
/**
* Find a protocol id associated with a string automata
*
+9
View File
@@ -726,6 +726,12 @@ struct ndpi_lru_cache {
/* Ookla */
#define NDPI_AGGRESSIVENESS_OOKLA_TLS 0x01 /* Enable detection over TLS (using ookla cache) */
/* Monitoring flags */
/* Stun */
#define NDPI_MONITORING_STUN_SUBCLASSIFIED 0x01 /* Monitor STUN flows even if we have a valid sub-protocol */
/* ************************************************** */
struct ndpi_flow_tcp_struct {
@@ -1301,6 +1307,9 @@ struct ndpi_detection_module_struct {
int opportunistic_tls_pop_enabled;
int opportunistic_tls_ftp_enabled;
u_int32_t monitoring_stun_pkts_to_process;
u_int32_t monitoring_stun_flags;
u_int32_t aggressiveness_ookla;
int tcp_ack_paylod_heuristic;