aboutsummaryrefslogtreecommitdiff
path: root/src/dns.h
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-19 23:15:27 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-19 23:16:48 +0200
commit839a9de688f0a3c09ab8ef00337ca03c32c44796 (patch)
tree6d3734e5b2349c8503c27f6f1d5fe8d48b5160f4 /src/dns.h
parent2909e565636dd10eb322a3b2bd3296b8292240f9 (diff)
downloaddns-839a9de688f0a3c09ab8ef00337ca03c32c44796.tar.gz
add fqdn_check()
Diffstat (limited to 'src/dns.h')
-rw-r--r--src/dns.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dns.h b/src/dns.h
index 7357bf0..7d51b0e 100644
--- a/src/dns.h
+++ b/src/dns.h
@@ -198,6 +198,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
* _sink may still be altered in failed attempts, but not terminated.