Lines Matching refs:buf
59 char **buf, size_t *buflen);
62 char **buf, size_t *buflen);
63 static void addlen(size_t len, char **buf, size_t *buflen);
65 char **buf, size_t *buflen);
67 char **buf, size_t *buflen);
90 char *buf, size_t buflen) in ns_sprintrr() argument
97 name_ctx, origin, buf, buflen); in ns_sprintrr()
112 char *buf, size_t buflen) in ns_sprintrrf() argument
114 const char *obuf = buf; in ns_sprintrrf()
126 T(addstr("\t\t\t", (size_t)3, &buf, &buflen)); in ns_sprintrrf()
132 T(addstr("@\t\t\t", (size_t)4, &buf, &buflen)); in ns_sprintrrf()
134 T(addstr(name, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
140 T(addstr(".", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
143 T(spaced = addtab((size_t)len, 24, spaced, &buf, &buflen)); in ns_sprintrrf()
150 T(x = ns_format_ttl(ttl, buf, buflen)); in ns_sprintrrf()
151 addlen((size_t)x, &buf, &buflen); 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()
163 (void) inet_ntop(AF_INET, rdata, buf, (socklen_t)buflen); in ns_sprintrrf()
164 addlen(strlen(buf), &buf, &buflen); in ns_sprintrrf()
174 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
180 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
184 T(addstr(" ", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
191 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
201 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
202 T(addstr(" ", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
205 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
206 T(addstr(" (\n", (size_t)3, &buf, &buflen)); in ns_sprintrrf()
214 T(addstr("\t\t\t\t\t", (size_t)5, &buf, &buflen)); 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()
218 T(addstr("; serial\n", (size_t)9, &buf, &buflen)); in ns_sprintrrf()
223 T(addstr("\t\t\t\t\t", (size_t)5, &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()
227 T(addstr("; refresh\n", (size_t)10, &buf, &buflen)); in ns_sprintrrf()
232 T(addstr("\t\t\t\t\t", (size_t)5, &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()
236 T(addstr("; retry\n", (size_t)8, &buf, &buflen)); in ns_sprintrrf()
241 T(addstr("\t\t\t\t\t", (size_t)5, &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()
245 T(addstr("; expiry\n", (size_t)9, &buf, &buflen)); in ns_sprintrrf()
250 T(addstr("\t\t\t\t\t", (size_t)5, &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()
253 T(addstr(" )", (size_t)2, &buf, &buflen)); in ns_sprintrrf()
254 T(spaced = addtab((size_t)len, (size_t)16, spaced, &buf, &buflen)); in ns_sprintrrf()
255 T(addstr("; minimum\n", (size_t)10, &buf, &buflen)); in ns_sprintrrf()
273 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
276 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
291 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
294 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
295 T(addstr(" ", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
298 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
304 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
313 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
318 T(addstr(" ", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
326 T(addstr(t, strlen(t), &buf, &buflen)); in ns_sprintrrf()
333 (void) inet_ntop(AF_INET6, rdata, buf, (socklen_t)buflen); in ns_sprintrrf()
334 addlen(strlen(buf), &buf, &buflen); in ns_sprintrrf()
342 T(addstr(t, strlen(t), &buf, &buflen)); 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()
364 T(addstr(" ", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
367 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
371 T(addstr(" ", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
374 T(len = charstr(rdata, edata, &buf, &buflen)); in ns_sprintrrf()
380 T(addstr(" ", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
383 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
399 T(addstr(t, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
402 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
409 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
410 T(addstr(" ", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
413 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
424 (void) inet_ntop(AF_INET, rdata, buf, (socklen_t)buflen); in ns_sprintrrf()
425 addlen(strlen(buf), &buf, &buflen); in ns_sprintrrf()
430 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
442 &buf, &buflen)); in ns_sprintrrf()
447 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
453 T(addstr(")", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
479 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
487 T(addstr(" (", (size_t)2, &buf, &buflen)); in ns_sprintrrf()
493 T(addstr(leader, strlen(leader), &buf, &buflen)); in ns_sprintrrf()
495 &buf, &buflen)); in ns_sprintrrf()
498 T(addstr(" )", (size_t)2, &buf, &buflen)); in ns_sprintrrf()
500 T(addstr(tmp, (size_t)n, &buf, &buflen)); in ns_sprintrrf()
523 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
530 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
535 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
540 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
543 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
549 T(addstr(" (", (size_t)2, &buf, &buflen)); in ns_sprintrrf()
557 T(addstr(leader, strlen(leader), &buf, &buflen)); in ns_sprintrrf()
559 &buf, &buflen)); in ns_sprintrrf()
562 T(addstr(" )", (size_t)2, &buf, &buflen)); in ns_sprintrrf()
570 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
577 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
594 T(addstr(tmp1, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
598 T(addstr(str, strlen(str), &buf, &buflen)); in ns_sprintrrf()
607 T(addstr(" (", (size_t)2, &buf, &buflen)); in ns_sprintrrf()
616 &buf, &buflen)); in ns_sprintrrf()
618 &buf, &buflen)); in ns_sprintrrf()
621 T(addstr(" )", (size_t)2, &buf, &buflen)); in ns_sprintrrf()
632 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
633 T(addstr(" ", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
638 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
643 T(addstr(tmp, (size_t)len, &buf, &buflen)); 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()
662 T(addstr(" ", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
667 snprintf(buf, buflen, "%d", ns_get16(rdata)); in ns_sprintrrf()
669 addlen(strlen(buf), &buf, &buflen); in ns_sprintrrf()
680 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
691 (void) inet_ntop(AF_INET6, &a, buf, (socklen_t)buflen); in ns_sprintrrf()
692 addlen(strlen(buf), &buf, &buflen); in ns_sprintrrf()
700 T(addstr(" ", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
701 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
708 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
722 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
727 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
731 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
736 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
747 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
751 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
757 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
761 T(addstr("-", 1, &buf, &buflen)); in ns_sprintrrf()
765 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
771 T(addstr(" ", 1, &buf, &buflen)); in ns_sprintrrf()
828 T(addstr(tmp, 8, &buf, &buflen)); in ns_sprintrrf()
849 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
860 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
873 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
890 T(addstr(str, strlen(str), &buf, &buflen)); in ns_sprintrrf()
899 T(addstr(" (", 2, &buf, &buflen)); in ns_sprintrrf()
908 &buf, &buflen)); in ns_sprintrrf()
910 (size_t)MIN(len - n, 48), &buf, &buflen)); in ns_sprintrrf()
913 T(addstr(" )", 2, &buf, &buflen)); in ns_sprintrrf()
947 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
951 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
955 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
960 T(addstr(".", 1, &buf, &buflen)); in ns_sprintrrf()
963 (void) inet_ntop(AF_INET, rdata, buf, (socklen_t)buflen); in ns_sprintrrf()
964 addlen(strlen(buf), &buf, &buflen); in ns_sprintrrf()
968 (void) inet_ntop(AF_INET6, rdata, buf, (socklen_t)buflen); in ns_sprintrrf()
969 addlen(strlen(buf), &buf, &buflen); in ns_sprintrrf()
973 T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); in ns_sprintrrf()
983 T(addstr(str, strlen(str), &buf, &buflen)); in ns_sprintrrf()
992 T(addstr(" (", 2, &buf, &buflen)); in ns_sprintrrf()
1001 &buf, &buflen)); in ns_sprintrrf()
1003 (size_t)MIN(len - n, 48), &buf, &buflen)); in ns_sprintrrf()
1006 T(addstr(" )", 2, &buf, &buflen)); in ns_sprintrrf()
1025 T(addstr(str, strlen(str), &buf, &buflen)); in ns_sprintrrf()
1028 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
1032 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
1035 T(addstr(leader, strlen(leader), &buf, &buflen)); in ns_sprintrrf()
1041 T(addstr(base64_key, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
1045 T(addstr(leader, strlen(leader), &buf, &buflen)); in ns_sprintrrf()
1047 &buf, &buflen)); in ns_sprintrrf()
1049 T(addstr(" )", 2, &buf, &buflen)); in ns_sprintrrf()
1058 _DIAGASSERT(__type_fit(int, buf - obuf)); in ns_sprintrrf()
1059 return (int)(buf - obuf); in ns_sprintrrf()
1068 T(addstr(tmp, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
1076 T(addstr(tmp, (size_t)(p - tmp), &buf, &buflen)); in ns_sprintrrf()
1078 T(addstr(")", (size_t)1, &buf, &buflen)); in ns_sprintrrf()
1079 T(addtab((size_t)(p - tmp + 1), (size_t)48, spaced, &buf, &buflen)); in ns_sprintrrf()
1087 T(addstr(tmp, (size_t)(p - tmp), &buf, &buflen)); in ns_sprintrrf()
1090 _DIAGASSERT(__type_fit(int, buf - obuf)); in ns_sprintrrf()
1091 return (int)(buf - obuf); in ns_sprintrrf()
1142 charstr(const u_char *rdata, const u_char *edata, char **buf, size_t *buflen) { in charstr() argument
1145 char *save_buf = *buf; in charstr()
1147 if (addstr("\"", (size_t)1, buf, buflen) < 0) in charstr()
1156 if (addstr("\\", (size_t)1, buf, buflen) < 0) in charstr()
1159 buf, buflen) < 0) in charstr()
1165 if (addstr("\"", (size_t)1, buf, buflen) < 0) in charstr()
1171 *buf = save_buf; in charstr()
1179 char **buf, size_t *buflen) in addname() argument
1182 char *save_buf = *buf; in addname()
1185 n = dn_expand(msg, msg + msglen, *pp, *buf, (int)*buflen); in addname()
1188 newlen = prune_origin(*buf, origin); in addname()
1189 if (**buf == '\0') { in addname()
1195 (*buf)[newlen++] = '@'; in addname()
1196 (*buf)[newlen] = '\0'; in addname()
1200 (*buf)[newlen] == '\0')) && (*buf)[newlen - 1] != '.') { in addname()
1205 (*buf)[newlen++] = '.'; in addname()
1206 (*buf)[newlen] = '\0'; in addname()
1210 addlen(newlen, buf, buflen); in addname()
1211 **buf = '\0'; in addname()
1216 *buf = save_buf; in addname()
1222 addlen(size_t len, char **buf, size_t *buflen) { in addlen() argument
1224 *buf += len; in addlen()
1229 addstr(const char *src, size_t len, char **buf, size_t *buflen) { in addstr() argument
1234 memcpy(*buf, src, len); in addstr()
1235 addlen(len, buf, buflen); in addstr()
1236 **buf = '\0'; in addstr()
1241 addtab(size_t len, size_t target, int spaced, char **buf, size_t *buflen) { in addtab() argument
1243 char *save_buf = *buf; in addtab()
1247 T(addstr(" ", (size_t)2, buf, buflen)); in addtab()
1251 if (addstr("\t", (size_t)1, buf, buflen) < 0) { in addtab()
1253 *buf = save_buf; in addtab()