Lines Matching refs:len
63 static void addlen(size_t len, char **buf, size_t *buflen);
64 static int addstr(const char *src, size_t len,
66 static int addtab(size_t len, size_t target, int spaced,
120 int len, x; in ns_sprintrrf() local
128 len = (int)prune_origin(name, origin); in ns_sprintrrf()
131 } else if (len == 0) { in ns_sprintrrf()
134 T(addstr(name, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
138 name[len] == '\0')) && name[len - 1] != '.') { in ns_sprintrrf()
141 len++; in ns_sprintrrf()
143 T(spaced = addtab((size_t)len, 24, spaced, &buf, &buflen)); in ns_sprintrrf()
152 len = snprintf(tmp, sizeof(tmp), " %s %s", p_class(class), p_type(type)); in ns_sprintrrf()
153 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
154 T(spaced = addtab((size_t)(x + len), (size_t)16, spaced, &buf, &buflen)); in ns_sprintrrf()
180 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
181 if (len == 0) in ns_sprintrrf()
183 rdata += len; in ns_sprintrrf()
191 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
192 if (len == 0) in ns_sprintrrf()
194 rdata += len; in ns_sprintrrf()
215 len = snprintf(tmp, sizeof(tmp), "%lu", t); in ns_sprintrrf()
216 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
217 T(spaced = addtab((size_t)len, (size_t)16, spaced, &buf, &buflen)); in ns_sprintrrf()
224 T(len = ns_format_ttl(t, buf, buflen)); in ns_sprintrrf()
225 addlen((size_t)len, &buf, &buflen); in ns_sprintrrf()
226 T(spaced = addtab((size_t)len, (size_t)16, spaced, &buf, &buflen)); in ns_sprintrrf()
233 T(len = ns_format_ttl(t, buf, buflen)); in ns_sprintrrf()
234 addlen((size_t)len, &buf, &buflen); in ns_sprintrrf()
235 T(spaced = addtab((size_t)len, (size_t)16, spaced, &buf, &buflen)); in ns_sprintrrf()
242 T(len = ns_format_ttl(t, buf, buflen)); in ns_sprintrrf()
243 addlen((size_t)len, &buf, &buflen); in ns_sprintrrf()
244 T(spaced = addtab((size_t)len, (size_t)16, spaced, &buf, &buflen)); in ns_sprintrrf()
251 T(len = ns_format_ttl(t, buf, buflen)); in ns_sprintrrf()
252 addlen((size_t)len, &buf, &buflen); in ns_sprintrrf()
254 T(spaced = addtab((size_t)len, (size_t)16, spaced, &buf, &buflen)); in ns_sprintrrf()
272 len = snprintf(tmp, sizeof(tmp), "%u ", t); in ns_sprintrrf()
273 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
290 len = snprintf(tmp, sizeof(tmp), "%u ", t); in ns_sprintrrf()
291 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
304 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
305 if (len == 0) in ns_sprintrrf()
307 rdata += len; in ns_sprintrrf()
313 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
314 if (len == 0) in ns_sprintrrf()
316 rdata += len; in ns_sprintrrf()
356 len = snprintf(t, sizeof(t), "%u %u ", order, preference); in ns_sprintrrf()
357 T(addstr(t, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
360 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
361 if (len == 0) in ns_sprintrrf()
363 rdata += len; in ns_sprintrrf()
367 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
368 if (len == 0) in ns_sprintrrf()
370 rdata += len; in ns_sprintrrf()
374 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
375 if (len < 0) in ns_sprintrrf()
377 if (len == 0) in ns_sprintrrf()
379 rdata += len; in ns_sprintrrf()
398 len = snprintf(t, sizeof(t), "%u %u %u ", priority, weight, port); in ns_sprintrrf()
399 T(addstr(t, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
429 len = snprintf(tmp, sizeof(tmp), " %u ( ", *rdata); in ns_sprintrrf()
430 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
446 len = snprintf(tmp, sizeof(tmp), "%d ", n); in ns_sprintrrf()
447 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
477 len = snprintf(tmp, sizeof(tmp), "0x%04x %u %u", in ns_sprintrrf()
479 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
482 len = b64_ntop(rdata, (size_t)(edata - rdata), in ns_sprintrrf()
484 if (len < 0) in ns_sprintrrf()
486 if (len > 15) { in ns_sprintrrf()
492 for (n = 0; n < len; n += 48) { in ns_sprintrrf()
494 T(addstr(base64_key + n, (size_t)MIN(len - n, 48), in ns_sprintrrf()
497 if (len > 15) in ns_sprintrrf()
521 len = snprintf(tmp, sizeof(tmp), "%s %d %d %lu ", in ns_sprintrrf()
523 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
529 len = snprintf(tmp, sizeof(tmp), "%s ", p_secstodate(t)); in ns_sprintrrf()
530 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
534 len = snprintf(tmp, sizeof(tmp), "%s ", p_secstodate(t)); in ns_sprintrrf()
535 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
539 len = snprintf(tmp, sizeof(tmp), "%u ", footprint); in ns_sprintrrf()
540 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
546 len = b64_ntop(rdata, (size_t)(edata - rdata), in ns_sprintrrf()
548 if (len > 15) { in ns_sprintrrf()
554 if (len < 0) in ns_sprintrrf()
556 for (n = 0; n < len; n += 48) { in ns_sprintrrf()
558 T(addstr(base64_key + n, (size_t)MIN(len - n, 48), in ns_sprintrrf()
561 if (len > 15) in ns_sprintrrf()
576 len = snprintf(tmp, sizeof(tmp), " %s", p_type((int)c)); in ns_sprintrrf()
577 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
593 len = snprintf(tmp1, sizeof(tmp1), "%d %d %d ", c_type, key_tag, alg); in ns_sprintrrf()
594 T(addstr(tmp1, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
601 len = b64_ntop(rdata, (size_t)(edata-rdata), in ns_sprintrrf()
604 if (len < 0) in ns_sprintrrf()
606 else if (len > 15) { in ns_sprintrrf()
614 for (n = 0; n < len; n += 48) { in ns_sprintrrf()
617 T(addstr(base64_cert + n, (size_t)MIN(len - n, 48), in ns_sprintrrf()
620 if (len > 15) in ns_sprintrrf()
637 len = snprintf(tmp, sizeof(tmp), "%s ", p_secstodate(t)); in ns_sprintrrf()
638 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
642 len = snprintf(tmp, sizeof(tmp), "%s ", p_secstodate(t)); in ns_sprintrrf()
643 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
650 len = snprintf(tmp, sizeof(tmp), "%u %u %u ", mode, err, keysize); in ns_sprintrrf()
651 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
661 T(len = addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
679 len = snprintf(tmp, sizeof(tmp), "%d ", *rdata); in ns_sprintrrf()
680 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
707 len = snprintf(tmp, sizeof(tmp), "%u bytes", class); in ns_sprintrrf()
708 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
721 len = snprintf(tmp, sizeof(tmp), "%u ", t); in ns_sprintrrf()
722 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
726 len = snprintf(tmp, sizeof(tmp), "%u ", *rdata); in ns_sprintrrf()
727 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
730 len = snprintf(tmp, sizeof(tmp), "%u ", *rdata); in ns_sprintrrf()
731 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
735 len = snprintf(tmp, sizeof(tmp), "%02X", *rdata); in ns_sprintrrf()
736 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
746 len = snprintf(tmp, sizeof(tmp), "%u ", *rdata); in ns_sprintrrf()
747 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
750 len = snprintf(tmp, sizeof(tmp), "%u ", *rdata); in ns_sprintrrf()
751 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
756 len = snprintf(tmp, sizeof(tmp), "%u ", t); in ns_sprintrrf()
757 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
764 len = snprintf(tmp, sizeof(tmp), "%02X", *rdata); in ns_sprintrrf()
765 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
848 len = snprintf(tmp, sizeof(tmp), " %s", p_type((ns_type)c)); in ns_sprintrrf()
849 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
872 len = snprintf(tmp, sizeof(tmp), " %s", p_type((ns_type)c)); in ns_sprintrrf()
873 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
892 len = b64_ntop(rdata, (size_t)(edata-rdata), in ns_sprintrrf()
895 if (len < 0) in ns_sprintrrf()
898 else if (len > 15) { in ns_sprintrrf()
906 for (n = 0; n < len; n += 48) { in ns_sprintrrf()
910 (size_t)MIN(len - n, 48), &buf, &buflen)); in ns_sprintrrf()
912 if (len > 15) in ns_sprintrrf()
946 len = snprintf(tmp, sizeof(tmp), "%u ", *rdata); in ns_sprintrrf()
947 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
950 len = snprintf(tmp, sizeof(tmp), "%u ", *rdata); in ns_sprintrrf()
951 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
954 len = snprintf(tmp, sizeof(tmp), "%u ", *rdata); in ns_sprintrrf()
955 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
985 len = b64_ntop(rdata, (size_t)(edata-rdata), in ns_sprintrrf()
988 if (len < 0) in ns_sprintrrf()
991 else if (len > 15) { in ns_sprintrrf()
999 for (n = 0; n < len; n += 48) { in ns_sprintrrf()
1003 (size_t)MIN(len - n, 48), &buf, &buflen)); in ns_sprintrrf()
1005 if (len > 15) in ns_sprintrrf()
1027 len = snprintf(tmp, sizeof(tmp), "( %u ", algorithm); in ns_sprintrrf()
1028 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
1031 len = snprintf(tmp, sizeof(tmp), "%02X", *rdata); in ns_sprintrrf()
1032 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
1037 len = b64_ntop(rdata, key_len, base64_key, siz); in ns_sprintrrf()
1038 if (len < 0) in ns_sprintrrf()
1041 T(addstr(base64_key, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
1066 len = snprintf(tmp, sizeof(tmp), "\\# %u%s\t; %s", (unsigned)(edata - rdata), in ns_sprintrrf()
1068 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
1222 addlen(size_t len, char **buf, size_t *buflen) { in addlen() argument
1223 assert(len <= *buflen); in addlen()
1224 *buf += len; in addlen()
1225 *buflen -= len; in addlen()
1229 addstr(const char *src, size_t len, char **buf, size_t *buflen) { in addstr() argument
1230 if (len >= *buflen) { in addstr()
1234 memcpy(*buf, src, len); in addstr()
1235 addlen(len, buf, buflen); in addstr()
1241 addtab(size_t len, size_t target, int spaced, char **buf, size_t *buflen) { in addtab() argument
1246 if (spaced || len >= target - 1) { in addtab()
1250 for (t = (target - len - 1) / 8; t >= 0; t--) in addtab()