Lines Matching refs:dn
101 char *dn, *eom; in ns_name_ntop() local
107 dn = dst; in ns_name_ntop()
116 if (dn != dst) { in ns_name_ntop()
117 if (dn >= eom) { in ns_name_ntop()
121 *dn++ = '.'; in ns_name_ntop()
127 if (dn + l >= eom) { in ns_name_ntop()
139 if ((m = decode_bitstring(&cp, dn, eom)) < 0) in ns_name_ntop()
144 dn += m; in ns_name_ntop()
150 if (dn + 1 >= eom) { in ns_name_ntop()
154 *dn++ = '\\'; in ns_name_ntop()
155 *dn++ = (char)c; in ns_name_ntop()
157 if (dn + 3 >= eom) { in ns_name_ntop()
161 *dn++ = '\\'; in ns_name_ntop()
162 *dn++ = digits[c / 100]; in ns_name_ntop()
163 *dn++ = digits[(c % 100) / 10]; in ns_name_ntop()
164 *dn++ = digits[c % 10]; in ns_name_ntop()
166 if (dn >= eom) { in ns_name_ntop()
170 *dn++ = (char)c; in ns_name_ntop()
174 if (dn == dst) { in ns_name_ntop()
175 if (dn >= eom) { in ns_name_ntop()
179 *dn++ = '.'; in ns_name_ntop()
181 if (dn >= eom) { in ns_name_ntop()
185 *dn++ = '\0'; in ns_name_ntop()
186 _DIAGASSERT(__type_fit(int, dn - dst)); in ns_name_ntop()
187 return (int)(dn - dst); in ns_name_ntop()
360 u_char *dn, *eom; in ns_name_ntol() local
366 dn = dst; in ns_name_ntol()
369 if (dn >= eom) { in ns_name_ntol()
379 *dn++ = n; in ns_name_ntol()
384 if (dn + l >= eom) { in ns_name_ntol()
391 *dn++ = tolower(c); in ns_name_ntol()
393 *dn++ = c; in ns_name_ntol()
396 *dn++ = '\0'; in ns_name_ntol()
397 _DIAGASSERT(__type_fit(int, dn - dst)); in ns_name_ntol()
398 return (int)(dn - dst); in ns_name_ntol()
937 const u_char *dn, *cp, *sp; in dn_find() local
951 dn = domain; in dn_find()
961 if (n != *dn++) in dn_find()
965 if (mklower(*dn++) != in dn_find()
969 if (*dn == '\0' && *cp == '\0') { in dn_find()
974 if (*dn) in dn_find()
995 decode_bitstring(const unsigned char **cpp, char *dn, const char *eom) in decode_bitstring() argument
998 char *beg = dn, tc; in decode_bitstring()
1005 if (dn + plen >= eom) in decode_bitstring()
1009 i = snprintf(dn, eom - dn, "\\[x"); in decode_bitstring()
1012 dn += i; in decode_bitstring()
1014 i = snprintf(dn, eom - dn, "%02x", *cp & 0xff); in decode_bitstring()
1017 dn += i; in decode_bitstring()
1021 i = snprintf(dn, eom - dn, "%02x", tc & (0xff << (8 - b))); in decode_bitstring()
1024 dn += i; in decode_bitstring()
1027 i = snprintf(dn, eom - dn, "%1x", in decode_bitstring()
1031 dn += i; in decode_bitstring()
1033 i = snprintf(dn, eom - dn, "/%d]", blen); in decode_bitstring()
1036 dn += i; in decode_bitstring()
1039 _DIAGASSERT(__type_fit(int, dn - beg)); in decode_bitstring()
1040 return (int)(dn - beg); in decode_bitstring()