aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/attic
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-01-11 15:23:39 +0100
committerGitHub <noreply@github.com>2022-01-11 15:23:39 +0100
commit3a087e951d96f509c75344ad6791591e10e4f1cd (patch)
treee1c83179768f1445610bf060917700f17fce908f /src/lib/protocols/attic
parenta2916d2e4c19aff56979b1dafa7edd0c7d3c17fe (diff)
Add a "confidence" field about the reliability of the classification. (#1395)
As a general rule, the higher the confidence value, the higher the "reliability/precision" of the classification. In other words, this new field provides an hint about "how" the flow classification has been obtained. For example, the application may want to ignore classification "by-port" (they are not real DPI classifications, after all) or give a second glance at flows classified via LRU caches (because of false positives). Setting only one value for the confidence field is a bit tricky: more work is probably needed in the next future to tweak/fix/improve the logic.
Diffstat (limited to 'src/lib/protocols/attic')
-rw-r--r--src/lib/protocols/attic/flash.c2
-rw-r--r--src/lib/protocols/attic/ftp.c2
-rw-r--r--src/lib/protocols/attic/manolito.c2
-rw-r--r--src/lib/protocols/attic/popo.c2
-rw-r--r--src/lib/protocols/attic/secondlife.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/protocols/attic/flash.c b/src/lib/protocols/attic/flash.c
index cf1c3f374..8ffdf2f06 100644
--- a/src/lib/protocols/attic/flash.c
+++ b/src/lib/protocols/attic/flash.c
@@ -28,7 +28,7 @@
static void ndpi_int_flash_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
- ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_FLASH);
+ ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_FLASH, NDPI_CONFIDENCE_DPI);
}
void ndpi_search_flash(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
diff --git a/src/lib/protocols/attic/ftp.c b/src/lib/protocols/attic/ftp.c
index 13b242b56..99330aa54 100644
--- a/src/lib/protocols/attic/ftp.c
+++ b/src/lib/protocols/attic/ftp.c
@@ -31,7 +31,7 @@
static void ndpi_int_ftp_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
- ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_FTP);
+ ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_FTP, NDPI_CONFIDENCE_DPI);
}
/**
diff --git a/src/lib/protocols/attic/manolito.c b/src/lib/protocols/attic/manolito.c
index 9c139edb4..07965b35d 100644
--- a/src/lib/protocols/attic/manolito.c
+++ b/src/lib/protocols/attic/manolito.c
@@ -35,7 +35,7 @@ static void ndpi_int_manolito_add_connection(struct
struct ndpi_id_struct *src = flow->src;
struct ndpi_id_struct *dst = flow->dst;
- ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MANOLITO);
+ ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MANOLITO, NDPI_CONFIDENCE_DPI);
if (src != NULL) {
diff --git a/src/lib/protocols/attic/popo.c b/src/lib/protocols/attic/popo.c
index b3c4f90a0..41cda83a6 100644
--- a/src/lib/protocols/attic/popo.c
+++ b/src/lib/protocols/attic/popo.c
@@ -29,7 +29,7 @@
static void ndpi_int_popo_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
- ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_POPO);
+ ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_POPO, NDPI_CONFIDENCE_DPI);
}
void ndpi_search_popo_tcp_udp(struct ndpi_detection_module_struct
diff --git a/src/lib/protocols/attic/secondlife.c b/src/lib/protocols/attic/secondlife.c
index a41e71765..b4787a910 100644
--- a/src/lib/protocols/attic/secondlife.c
+++ b/src/lib/protocols/attic/secondlife.c
@@ -30,7 +30,7 @@ static void ndpi_int_secondlife_add_connection(struct ndpi_detection_module_stru
struct ndpi_flow_struct *flow/* , */
/* ndpi_protocol_type_t protocol_type */)
{
- ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SECONDLIFE, protocol_type);
+ ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SECONDLIFE, protocol_type, NDPI_CONFIDENCE_DPI);
}
void ndpi_search_secondlife(struct ndpi_detection_module_struct