Lines Matching refs:label
417 char label[DNS_LABEL_MAX]; in dns_name_concat() local
419 r = dns_label_unescape(&p, label, sizeof label, flags); in dns_name_concat()
439 r = dns_label_escape(label, r, ret + n + !first, DNS_LABEL_ESCAPED_MAX); in dns_name_concat()
448 r = dns_label_escape(label, r, escaped, sizeof(escaped)); in dns_name_concat()
490 char label[DNS_LABEL_MAX+1]; in dns_name_hash_func() local
492 r = dns_label_unescape(&p, label, sizeof label, 0); in dns_name_hash_func()
498 ascii_strlower_n(label, r); in dns_name_hash_func()
499 siphash24_compress(label, r, state); in dns_name_hash_func()
755 char label[DNS_LABEL_MAX+1]; in dns_name_address() local
757 r = dns_label_unescape(&p, label, sizeof label, 0); in dns_name_address()
765 r = safe_atou8(label, &a[i]); in dns_name_address()
791 char label[DNS_LABEL_MAX+1]; in dns_name_address() local
794 r = dns_label_unescape(&p, label, sizeof label, 0); in dns_name_address()
799 x = unhexchar(label[0]); in dns_name_address()
803 r = dns_label_unescape(&p, label, sizeof label, 0); in dns_name_address()
808 y = unhexchar(label[0]); in dns_name_address()
901 static bool srv_type_label_is_valid(const char *label, size_t n) { in srv_type_label_is_valid() argument
904 assert(label); in srv_type_label_is_valid()
909 if (label[0] != '_') /* First label char needs to be underscore */ in srv_type_label_is_valid()
913 if (!(label[1] >= 'A' && label[1] <= 'Z') && in srv_type_label_is_valid()
914 !(label[1] >= 'a' && label[1] <= 'z')) in srv_type_label_is_valid()
919 if (!(label[k] >= 'A' && label[k] <= 'Z') && in srv_type_label_is_valid()
920 !(label[k] >= 'a' && label[k] <= 'z') && in srv_type_label_is_valid()
921 !(label[k] >= '0' && label[k] <= '9') && in srv_type_label_is_valid()
922 label[k] != '-') in srv_type_label_is_valid()
937 char label[DNS_LABEL_MAX]; in dns_srv_type_is_valid() local
941 r = dns_label_unescape(&name, label, sizeof label, 0); in dns_srv_type_is_valid()
950 if (!srv_type_label_is_valid(label, r)) in dns_srv_type_is_valid()
1017 static bool dns_service_name_label_is_valid(const char *label, size_t n) { in dns_service_name_label_is_valid() argument
1020 assert(label); in dns_service_name_label_is_valid()
1022 if (memchr(label, 0, n)) in dns_service_name_label_is_valid()
1025 s = strndupa_safe(label, n); in dns_service_name_label_is_valid()
1340 char label[DNS_LABEL_MAX]; in dns_name_apply_idna() local
1342 r = dns_label_unescape(&name, label, sizeof label, 0); in dns_name_apply_idna()
1348 q = dns_label_apply_idna(label, r, label, sizeof label); in dns_name_apply_idna()
1357 r = dns_label_escape(label, r, buf + n + !first, DNS_LABEL_ESCAPED_MAX); in dns_name_apply_idna()