From b3f2b1bb7f90c18a7542ab06acdf26318cdfa6fe Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Mon, 11 Dec 2023 14:53:12 +0100 Subject: STUN: rework extra dissection (#2202) Keep looking for RTP packets but remove the monitoring concept. We will re-introduce a more general concept of "flow in monitoring state" later. The function was disabled by default. Some configuration knobs will be provided when/if #2190 is merged. --- src/lib/ndpi_main.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'src/lib/ndpi_main.c') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 02db29a68..6eafa598b 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -3387,9 +3387,6 @@ struct ndpi_detection_module_struct *ndpi_init_detection_module(ndpi_init_prefs ndpi_str->opportunistic_tls_ftp_enabled = 1; ndpi_str->opportunistic_tls_stun_enabled = 1; - ndpi_str->monitoring_stun_pkts_to_process = 4; - ndpi_str->monitoring_stun_flags = 0; - ndpi_str->aggressiveness_ookla = NDPI_AGGRESSIVENESS_OOKLA_TLS; if(prefs & ndpi_enable_tcp_ack_payload_heuristic) @@ -10430,42 +10427,6 @@ int ndpi_seen_flow_beginning(const struct ndpi_flow_struct *flow) /* ******************************************************************** */ -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) -{ - if(!ndpi_struct || num_pkts > 0xFFFF) - return -1; - - switch(proto) { - case NDPI_PROTOCOL_STUN: - ndpi_struct->monitoring_stun_pkts_to_process = num_pkts; - ndpi_struct->monitoring_stun_flags = flags; - return 0; - default: - return -1; - } -} - -/* ******************************************************************** */ - -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) -{ - if(!ndpi_struct || !num_pkts || !flags) - return -1; - - switch(proto) { - case NDPI_PROTOCOL_STUN: - *num_pkts = ndpi_struct->monitoring_stun_pkts_to_process; - *flags = ndpi_struct->monitoring_stun_flags; - return 0; - default: - return -1; - } -} - -/* ******************************************************************** */ - int ndpi_set_opportunistic_tls(struct ndpi_detection_module_struct *ndpi_struct, u_int16_t proto, int value) { -- cgit v1.2.3