diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2023-11-09 10:50:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-09 10:50:59 +0100 |
commit | b08c787fe267053afdea82701071f3878c09244b (patch) | |
tree | cbdc12984d11e1999ea90c07d1c838442199fa24 /src/lib/protocols/dns.c | |
parent | 0673da54b5db6be849e5ad3b22e80f3cadfccca9 (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/dns.c')
-rw-r--r-- | src/lib/protocols/dns.c | 5 |
1 files changed, 2 insertions, 3 deletions
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) { |