From b08c787fe267053afdea82701071f3878c09244b Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:50:59 +0100 Subject: Have a clear distinction between public and private/internal API (#2137) 1) Public API/headers in `src/include/` [as it has always been] 2) Private API/headers in `src/lib/` Try to keep the "ndpi_" prefix only for the public functions --- src/lib/protocols/bittorrent.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lib/protocols/bittorrent.c') diff --git a/src/lib/protocols/bittorrent.c b/src/lib/protocols/bittorrent.c index 9e195691b..b3838a8dd 100644 --- a/src/lib/protocols/bittorrent.c +++ b/src/lib/protocols/bittorrent.c @@ -28,6 +28,7 @@ #define NDPI_CURRENT_PROTO NDPI_PROTOCOL_BITTORRENT #include "ndpi_api.h" +#include "ndpi_private.h" #define BITTORRENT_PROTO_STRING "BitTorrent protocol" @@ -40,8 +41,6 @@ struct ndpi_utp_hdr { u_int16_t sequence_nr, ack_nr; }; -extern int ndpi_search_into_bittorrent_cache(struct ndpi_detection_module_struct *ndpi_struct, - struct ndpi_flow_struct *flow); /* Forward declaration */ static void ndpi_search_bittorrent(struct ndpi_detection_module_struct *ndpi_struct, @@ -467,7 +466,7 @@ static u_int8_t is_port(u_int16_t a, u_int16_t b, u_int16_t what) { static void ndpi_skip_bittorrent(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, struct ndpi_packet_struct *packet) { - if(ndpi_search_into_bittorrent_cache(ndpi_struct, flow)) + if(search_into_bittorrent_cache(ndpi_struct, flow)) ndpi_add_connection_as_bittorrent(ndpi_struct, flow, -1, 0, NDPI_CONFIDENCE_DPI_CACHE); else NDPI_EXCLUDE_PROTO(ndpi_struct, flow); -- cgit v1.2.3