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/dns.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lib/protocols/dns.c') diff --git a/src/lib/protocols/dns.c b/src/lib/protocols/dns.c index b518ba0f2..9a220024e 100644 --- a/src/lib/protocols/dns.c +++ b/src/lib/protocols/dns.c @@ -26,6 +26,7 @@ #define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DNS #include "ndpi_api.h" +#include "ndpi_private.h" #define FLAGS_MASK 0x8000 @@ -37,8 +38,6 @@ #define PKT_LEN_ALERT 512 -/* ndpi_main.c */ -extern u_int8_t ndpi_iph_is_valid_and_not_fragmented(const struct ndpi_iphdr *iph, const u_int16_t ipsize); static void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow); @@ -869,7 +868,7 @@ static void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, st /* 0: fragmented; 1: not fragmented */ if((flags & 0x20) - || (ndpi_iph_is_valid_and_not_fragmented(packet->iph, packet->l3_packet_len) == 0)) { + || (iph_is_valid_and_not_fragmented(packet->iph, packet->l3_packet_len) == 0)) { ndpi_set_risk(ndpi_struct, flow, NDPI_DNS_FRAGMENTED, NULL); } } else if(packet->iphv6 != NULL) { -- cgit v1.2.3