diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-12-04 13:12:42 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-12-04 13:12:42 +0000 |
commit | 9e249590e5d750c70ec61d1100c70d325374dbd8 (patch) | |
tree | 4de3fcf435f9f4f38d1e281c4fbe1ac40c74ab8e /src/include/gnunet_dnsparser_lib.h | |
parent | c03182d1e7b55b18d9a66cf890effb11c5dc7a45 (diff) | |
download | gnunet-9e249590e5d750c70ec61d1100c70d325374dbd8.tar.gz gnunet-9e249590e5d750c70ec61d1100c70d325374dbd8.zip |
-ensure labels are less than 64 chars, add test for full DNS names
Diffstat (limited to 'src/include/gnunet_dnsparser_lib.h')
-rw-r--r-- | src/include/gnunet_dnsparser_lib.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/gnunet_dnsparser_lib.h b/src/include/gnunet_dnsparser_lib.h index 526c40ab2..daeb4208b 100644 --- a/src/include/gnunet_dnsparser_lib.h +++ b/src/include/gnunet_dnsparser_lib.h | |||
@@ -538,6 +538,19 @@ GNUNET_DNSPARSER_check_label (const char *label); | |||
538 | 538 | ||
539 | 539 | ||
540 | /** | 540 | /** |
541 | * Check if a hostname in UTF-8 format can be coded into valid IDNA. | ||
542 | * This can fail if a label becomes longer than 63 characters or if | ||
543 | * the entire name exceeds 253 characters. | ||
544 | * | ||
545 | * @param name name to check (UTF-8 string) | ||
546 | * @return GNUNET_OK if the label can be converted to IDNA, | ||
547 | * GNUNET_SYSERR if the label is not valid for DNS names | ||
548 | */ | ||
549 | int | ||
550 | GNUNET_DNSPARSER_check_name (const char *name); | ||
551 | |||
552 | |||
553 | /** | ||
541 | * Parse a UDP payload of a DNS packet in to a nice struct for further | 554 | * Parse a UDP payload of a DNS packet in to a nice struct for further |
542 | * processing and manipulation. | 555 | * processing and manipulation. |
543 | * | 556 | * |