summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-domain.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-31 23:43:10 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-01 00:58:12 +0200
commitbdf10b5b4d9e7abdc08bdca4b073d021b0043d1f (patch)
tree4ed35b1bc26e5457e471aa829b868878a81d6a49 /src/resolve/resolved-dns-domain.h
parentafbc4f267b45480e46fbcd59e90e399bc3dc7510 (diff)
resolved: handle IDNA domains
Make sure we format UTF-8 labels as IDNA when writing them to DNS packets, and as native UTF-8 when writing them to mDNS or LLMNR packets. When comparing or processing labels always consider native UTF-8 and IDNA formats equivalent.
Diffstat (limited to 'src/resolve/resolved-dns-domain.h')
-rw-r--r--src/resolve/resolved-dns-domain.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-domain.h b/src/resolve/resolved-dns-domain.h
index 16372fd940..e674c5d9c5 100644
--- a/src/resolve/resolved-dns-domain.h
+++ b/src/resolve/resolved-dns-domain.h
@@ -30,6 +30,9 @@
int dns_label_unescape(const char **name, char *dest, size_t sz);
int dns_label_escape(const char *p, size_t l, char **ret);
+int dns_label_apply_idna(const char *encoded, size_t encoded_size, char *decoded, size_t decoded_max);
+int dns_label_undo_idna(const char *encoded, size_t encoded_size, char *decoded, size_t decoded_max);
+
int dns_name_normalize(const char *s, char **_ret);
unsigned long dns_name_hash_func(const void *s, const uint8_t hash_key[HASH_KEY_SIZE]);