aboutsummaryrefslogtreecommitdiff
path: root/src/include/ndpi_typedefs.h
diff options
context:
space:
mode:
authorNardi Ivan <nardi.ivan@gmail.com>2022-08-12 16:40:41 +0200
committerToni <matzeton@googlemail.com>2022-09-14 17:51:39 +0200
commit7571f48392ef3b79eb25b94f1da6932a137c4f02 (patch)
treecf983fb14349660a262b611035ddabb2ac7718ae /src/include/ndpi_typedefs.h
parentb4f52437169b8b3c92811566af3965719b4e0c2c (diff)
Dissectors shouldn't update `flow->guessed_host_protocol_id`
The field `flow->guessed_host_protocol_id` is set at the beginning of the flow analysis and it represents the "classification by ip" of the flow itself. This field should never be changed. Dissectors which want to provide an "hint" about the classification, should update `flow->guessed_protocol_id` instead. Such "hint" is useless if the dissector set the "extra-dissection" data-path. Rename such field to `guessed_protocol_id_by_ip` to better describe its role. Preliminary work necessary for #1687
Diffstat (limited to 'src/include/ndpi_typedefs.h')
-rw-r--r--src/include/ndpi_typedefs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index a71a01332..360173d25 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -1260,9 +1260,9 @@ struct ndpi_flow_struct {
u_int16_t detected_protocol_stack[NDPI_PROTOCOL_SIZE];
/* init parameter, internal used to set up timestamp,... */
- u_int16_t guessed_protocol_id, guessed_host_protocol_id, guessed_category, guessed_header_category;
- u_int8_t l4_proto, protocol_id_already_guessed:1, host_already_guessed:1, fail_with_unknown:1,
- init_finished:1, client_packet_direction:1, packet_direction:1, is_ipv6:1, _pad1: 1;
+ u_int16_t guessed_protocol_id, guessed_protocol_id_by_ip, guessed_category, guessed_header_category;
+ u_int8_t l4_proto, protocol_id_already_guessed:1, fail_with_unknown:1,
+ init_finished:1, client_packet_direction:1, packet_direction:1, is_ipv6:1, _pad1: 2;
u_int16_t num_dissector_calls;
ndpi_confidence_t confidence; /* ndpi_confidence_t */