aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/bittorrent.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-11-09 10:50:59 +0100
committerGitHub <noreply@github.com>2023-11-09 10:50:59 +0100
commitb08c787fe267053afdea82701071f3878c09244b (patch)
treecbdc12984d11e1999ea90c07d1c838442199fa24 /src/lib/protocols/bittorrent.c
parent0673da54b5db6be849e5ad3b22e80f3cadfccca9 (diff)
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
Diffstat (limited to 'src/lib/protocols/bittorrent.c')
-rw-r--r--src/lib/protocols/bittorrent.c5
1 files changed, 2 insertions, 3 deletions
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);