From 839a9de688f0a3c09ab8ef00337ca03c32c44796 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sun, 19 Sep 2021 23:15:27 +0200 Subject: add fqdn_check() --- src/dns.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/dns.h') diff --git a/src/dns.h b/src/dns.h index 7357bf0..7d51b0e 100644 --- a/src/dns.h +++ b/src/dns.h @@ -197,6 +197,12 @@ int dns_parse_packet ( char* _buffer, int _bufflen, dns_message_t* _msg ); * */ int fqdn_to_qname( char* _source, int _sourcelen, char* _sink, int _sinklen ); +/** + * Check FQDN validity + * Returns: 0 when valid, <0 for string errors, position > 0 of invalid character + */ +int fqdn_check ( char* _source, int _sourcelen ); + /** * Convert a QNAME back to a FQDN, reversing fqdn_to_qname( ) * returns: length of string in _sink, < 0 on failure -- cgit v1.2.3