Lines Matching refs:slen
270 size_t slen = (size_t)sldns_wire2str_pkt_buf(data, len, NULL, 0); in sldns_wire2str_pkt() local
271 char* result = (char*)malloc(slen+1); in sldns_wire2str_pkt()
273 sldns_wire2str_pkt_buf(data, len, result, slen+1); in sldns_wire2str_pkt()
279 size_t slen = (size_t)sldns_wire2str_rr_buf(rr, len, NULL, 0); in sldns_wire2str_rr() local
280 char* result = (char*)malloc(slen+1); in sldns_wire2str_rr()
282 sldns_wire2str_rr_buf(rr, len, result, slen+1); in sldns_wire2str_rr()
302 size_t slen=(size_t)sldns_wire2str_dname_buf(dname, dname_len, NULL, 0); in sldns_wire2str_dname() local
303 char* result = (char*)malloc(slen+1); in sldns_wire2str_dname()
305 sldns_wire2str_dname_buf(dname, dname_len, result, slen+1); in sldns_wire2str_dname()
316 int sldns_wire2str_pkt_buf(uint8_t* d, size_t dlen, char* s, size_t slen) in sldns_wire2str_pkt_buf() argument
319 return sldns_wire2str_pkt_scan(&d, &dlen, &s, &slen); in sldns_wire2str_pkt_buf()
322 int sldns_wire2str_rr_buf(uint8_t* d, size_t dlen, char* s, size_t slen) in sldns_wire2str_rr_buf() argument
325 return sldns_wire2str_rr_scan(&d, &dlen, &s, &slen, NULL, 0, NULL); in sldns_wire2str_rr_buf()
328 int sldns_wire2str_rrquestion_buf(uint8_t* d, size_t dlen, char* s, size_t slen) in sldns_wire2str_rrquestion_buf() argument
331 return sldns_wire2str_rrquestion_scan(&d, &dlen, &s, &slen, NULL, 0, NULL); in sldns_wire2str_rrquestion_buf()
342 int sldns_wire2str_rr_unknown_buf(uint8_t* d, size_t dlen, char* s, size_t slen) in sldns_wire2str_rr_unknown_buf() argument
345 return sldns_wire2str_rr_unknown_scan(&d, &dlen, &s, &slen, NULL, 0, NULL); in sldns_wire2str_rr_unknown_buf()
349 char* s, size_t slen) in sldns_wire2str_rr_comment_buf() argument
352 return sldns_wire2str_rr_comment_print(&s, &slen, rr, rrlen, dname_len, in sldns_wire2str_rr_comment_buf()
356 int sldns_wire2str_type_buf(uint16_t rrtype, char* s, size_t slen) in sldns_wire2str_type_buf() argument
359 return sldns_wire2str_type_print(&s, &slen, rrtype); in sldns_wire2str_type_buf()
362 int sldns_wire2str_class_buf(uint16_t rrclass, char* s, size_t slen) in sldns_wire2str_class_buf() argument
365 return sldns_wire2str_class_print(&s, &slen, rrclass); in sldns_wire2str_class_buf()
368 int sldns_wire2str_rcode_buf(int rcode, char* s, size_t slen) in sldns_wire2str_rcode_buf() argument
371 return sldns_wire2str_rcode_print(&s, &slen, rcode); in sldns_wire2str_rcode_buf()
374 int sldns_wire2str_opcode_buf(int opcode, char* s, size_t slen) in sldns_wire2str_opcode_buf() argument
377 return sldns_wire2str_opcode_print(&s, &slen, opcode); in sldns_wire2str_opcode_buf()
380 int sldns_wire2str_dname_buf(uint8_t* d, size_t dlen, char* s, size_t slen) in sldns_wire2str_dname_buf() argument
383 return sldns_wire2str_dname_scan(&d, &dlen, &s, &slen, NULL, 0, NULL); in sldns_wire2str_dname_buf()
386 int sldns_str_vprint(char** str, size_t* slen, const char* format, va_list args) in sldns_str_vprint() argument
388 int w = vsnprintf(*str, *slen, format, args); in sldns_str_vprint()
392 } else if((size_t)w >= *slen) { in sldns_str_vprint()
394 *slen = 0; in sldns_str_vprint()
397 *slen -= w; in sldns_str_vprint()
402 int sldns_str_print(char** str, size_t* slen, const char* format, ...) in sldns_str_print() argument
407 w = sldns_str_vprint(str, slen, format, args); in sldns_str_print()
413 static int print_hex_buf(char** s, size_t* slen, uint8_t* buf, size_t len) in print_hex_buf() argument
418 (void)sldns_str_print(s, slen, "%c%c", hex[(buf[i]&0xf0)>>4], in print_hex_buf()
426 char** s, size_t* slen) in print_remainder_hex() argument
429 w += sldns_str_print(s, slen, "%s", pref); in print_remainder_hex()
430 w += print_hex_buf(s, slen, *d, *dlen); in print_remainder_hex()
436 int sldns_wire2str_pkt_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen) in sldns_wire2str_pkt_scan() argument
450 w += sldns_wire2str_header_scan(d, dlen, s, slen); in sldns_wire2str_pkt_scan()
451 w += sldns_str_print(s, slen, "\n"); in sldns_wire2str_pkt_scan()
452 w += sldns_str_print(s, slen, ";; QUESTION SECTION:\n"); in sldns_wire2str_pkt_scan()
454 w += sldns_wire2str_rrquestion_scan(d, dlen, s, slen, in sldns_wire2str_pkt_scan()
458 w += sldns_str_print(s, slen, "\n"); in sldns_wire2str_pkt_scan()
459 w += sldns_str_print(s, slen, ";; ANSWER SECTION:\n"); in sldns_wire2str_pkt_scan()
461 w += sldns_wire2str_rr_scan(d, dlen, s, slen, pkt, pktlen, &comprloop); in sldns_wire2str_pkt_scan()
464 w += sldns_str_print(s, slen, "\n"); in sldns_wire2str_pkt_scan()
465 w += sldns_str_print(s, slen, ";; AUTHORITY SECTION:\n"); in sldns_wire2str_pkt_scan()
467 w += sldns_wire2str_rr_scan(d, dlen, s, slen, pkt, pktlen, &comprloop); in sldns_wire2str_pkt_scan()
470 w += sldns_str_print(s, slen, "\n"); in sldns_wire2str_pkt_scan()
471 w += sldns_str_print(s, slen, ";; ADDITIONAL SECTION:\n"); in sldns_wire2str_pkt_scan()
473 w += sldns_wire2str_rr_scan(d, dlen, s, slen, pkt, pktlen, &comprloop); in sldns_wire2str_pkt_scan()
477 w += sldns_str_print(s, slen, ";; MSG SIZE rcvd: %d\n", (int)pktlen); in sldns_wire2str_pkt_scan()
480 d, dlen, s, slen); in sldns_wire2str_pkt_scan()
481 w += sldns_str_print(s, slen, "\n"); in sldns_wire2str_pkt_scan()
521 int sldns_wire2str_rr_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen, in sldns_wire2str_rr_scan() argument
532 return sldns_wire2str_edns_scan(d, dlen, s, slen, pkt, pktlen); in sldns_wire2str_rr_scan()
537 w += sldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen, comprloop); in sldns_wire2str_rr_scan()
538 w += sldns_str_print(s, slen, "\t"); in sldns_wire2str_rr_scan()
546 w += sldns_wire2str_class_print(s, slen, c); in sldns_wire2str_rr_scan()
547 w += sldns_str_print(s, slen, "\t"); in sldns_wire2str_rr_scan()
548 w += sldns_wire2str_type_print(s, slen, t); in sldns_wire2str_rr_scan()
549 w += sldns_str_print(s, slen, " ; Error no ttl,rdata\n"); in sldns_wire2str_rr_scan()
554 return w + sldns_str_print(s, slen, ";Error missing RR\n"); in sldns_wire2str_rr_scan()
555 w += print_remainder_hex(";Error partial RR 0x", d, dlen, s, slen); in sldns_wire2str_rr_scan()
556 return w + sldns_str_print(s, slen, "\n"); in sldns_wire2str_rr_scan()
559 w += sldns_rr_tcttl_scan(d, dlen, s, slen); in sldns_wire2str_rr_scan()
560 w += sldns_str_print(s, slen, "\t"); in sldns_wire2str_rr_scan()
565 return w + sldns_str_print(s, slen, ";Error missing rdatalen\n"); in sldns_wire2str_rr_scan()
567 d, dlen, s, slen); in sldns_wire2str_rr_scan()
568 return w + sldns_str_print(s, slen, "\n"); in sldns_wire2str_rr_scan()
575 w += sldns_str_print(s, slen, "\\# %u ", (unsigned)rdlen); in sldns_wire2str_rr_scan()
577 return w + sldns_str_print(s, slen, ";Error missing rdata\n"); in sldns_wire2str_rr_scan()
578 w += print_remainder_hex(";Error partial rdata 0x", d, dlen, s, slen); in sldns_wire2str_rr_scan()
579 return w + sldns_str_print(s, slen, "\n"); in sldns_wire2str_rr_scan()
581 w += sldns_wire2str_rdata_scan(d, &rdlen, s, slen, rrtype, pkt, pktlen, in sldns_wire2str_rr_scan()
586 w += sldns_wire2str_rr_comment_print(s, slen, rr, rrlen, dname_off, in sldns_wire2str_rr_scan()
588 w += sldns_str_print(s, slen, "\n"); in sldns_wire2str_rr_scan()
593 size_t* slen, uint8_t* pkt, size_t pktlen, int* comprloop) in sldns_wire2str_rrquestion_scan() argument
597 w += sldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen, comprloop); in sldns_wire2str_rrquestion_scan()
598 w += sldns_str_print(s, slen, "\t"); in sldns_wire2str_rrquestion_scan()
601 return w + sldns_str_print(s, slen, "Error malformed\n"); in sldns_wire2str_rrquestion_scan()
602 w += print_remainder_hex("Error malformed 0x", d, dlen, s, slen); in sldns_wire2str_rrquestion_scan()
603 return w + sldns_str_print(s, slen, "\n"); in sldns_wire2str_rrquestion_scan()
609 w += sldns_wire2str_class_print(s, slen, c); in sldns_wire2str_rrquestion_scan()
610 w += sldns_str_print(s, slen, "\t"); in sldns_wire2str_rrquestion_scan()
611 w += sldns_wire2str_type_print(s, slen, t); in sldns_wire2str_rrquestion_scan()
612 w += sldns_str_print(s, slen, "\n"); in sldns_wire2str_rrquestion_scan()
617 size_t* slen, uint8_t* pkt, size_t pktlen, int* comprloop) in sldns_wire2str_rr_unknown_scan() argument
621 w += sldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen, comprloop); in sldns_wire2str_rr_unknown_scan()
622 w += sldns_str_print(s, slen, "\t"); in sldns_wire2str_rr_unknown_scan()
623 w += sldns_rr_tcttl_scan(d, dlen, s, slen); in sldns_wire2str_rr_unknown_scan()
624 w += sldns_str_print(s, slen, "\t"); in sldns_wire2str_rr_unknown_scan()
627 return w + sldns_str_print(s, slen, ";Error missing rdatalen\n"); in sldns_wire2str_rr_unknown_scan()
629 d, dlen, s, slen); in sldns_wire2str_rr_unknown_scan()
630 return w + sldns_str_print(s, slen, "\n"); in sldns_wire2str_rr_unknown_scan()
637 w += sldns_str_print(s, slen, "\\# %u ", (unsigned)rdlen); in sldns_wire2str_rr_unknown_scan()
639 return w + sldns_str_print(s, slen, ";Error missing rdata\n"); in sldns_wire2str_rr_unknown_scan()
640 w += print_remainder_hex(";Error partial rdata 0x", d, dlen, s, slen); in sldns_wire2str_rr_unknown_scan()
641 return w + sldns_str_print(s, slen, "\n"); in sldns_wire2str_rr_unknown_scan()
643 w += sldns_wire2str_rdata_unknown_scan(d, &rdlen, s, slen); in sldns_wire2str_rr_unknown_scan()
645 w += sldns_str_print(s, slen, "\n"); in sldns_wire2str_rr_unknown_scan()
650 static int rr_comment_dnskey(char** s, size_t* slen, uint8_t* rr, in rr_comment_dnskey() argument
662 w += sldns_str_print(s, slen, " ;{"); in rr_comment_dnskey()
665 w += sldns_str_print(s, slen, "id = %u", in rr_comment_dnskey()
671 w += sldns_str_print(s, slen, " (ksk)"); in rr_comment_dnskey()
672 else w += sldns_str_print(s, slen, " (zsk)"); in rr_comment_dnskey()
677 w += sldns_str_print(s, slen, ", "); in rr_comment_dnskey()
678 w += sldns_str_print(s, slen, "size = %db", in rr_comment_dnskey()
683 w += sldns_str_print(s, slen, "}"); in rr_comment_dnskey()
688 static int rr_comment_rrsig(char** s, size_t* slen, uint8_t* rr, in rr_comment_rrsig() argument
698 return sldns_str_print(s, slen, " ;{id = %d}", in rr_comment_rrsig()
703 static int rr_comment_nsec3(char** s, size_t* slen, uint8_t* rr, in rr_comment_nsec3() argument
715 w += sldns_str_print(s, slen, " ;{flags: optout}"); in rr_comment_nsec3()
719 int sldns_wire2str_rr_comment_print(char** s, size_t* slen, uint8_t* rr, in sldns_wire2str_rr_comment_print() argument
723 return rr_comment_dnskey(s, slen, rr, rrlen, dname_off); in sldns_wire2str_rr_comment_print()
725 return rr_comment_rrsig(s, slen, rr, rrlen, dname_off); in sldns_wire2str_rr_comment_print()
727 return rr_comment_nsec3(s, slen, rr, rrlen, dname_off); in sldns_wire2str_rr_comment_print()
733 size_t* slen) in sldns_wire2str_header_scan() argument
737 w += sldns_str_print(s, slen, ";; ->>HEADER<<- "); in sldns_wire2str_header_scan()
739 return w+sldns_str_print(s, slen, "Error empty packet"); in sldns_wire2str_header_scan()
741 return w+print_remainder_hex("Error header too short 0x", d, dlen, s, slen); in sldns_wire2str_header_scan()
744 w += sldns_str_print(s, slen, "opcode: "); in sldns_wire2str_header_scan()
745 w += sldns_wire2str_opcode_print(s, slen, opcode); in sldns_wire2str_header_scan()
746 w += sldns_str_print(s, slen, ", "); in sldns_wire2str_header_scan()
747 w += sldns_str_print(s, slen, "rcode: "); in sldns_wire2str_header_scan()
748 w += sldns_wire2str_rcode_print(s, slen, rcode); in sldns_wire2str_header_scan()
749 w += sldns_str_print(s, slen, ", "); in sldns_wire2str_header_scan()
750 w += sldns_str_print(s, slen, "id: %d\n", (int)LDNS_ID_WIRE(*d)); in sldns_wire2str_header_scan()
751 w += sldns_str_print(s, slen, ";; flags:"); in sldns_wire2str_header_scan()
752 if(LDNS_QR_WIRE(*d)) w += sldns_str_print(s, slen, " qr"); in sldns_wire2str_header_scan()
753 if(LDNS_AA_WIRE(*d)) w += sldns_str_print(s, slen, " aa"); in sldns_wire2str_header_scan()
754 if(LDNS_TC_WIRE(*d)) w += sldns_str_print(s, slen, " tc"); in sldns_wire2str_header_scan()
755 if(LDNS_RD_WIRE(*d)) w += sldns_str_print(s, slen, " rd"); in sldns_wire2str_header_scan()
756 if(LDNS_CD_WIRE(*d)) w += sldns_str_print(s, slen, " cd"); in sldns_wire2str_header_scan()
757 if(LDNS_RA_WIRE(*d)) w += sldns_str_print(s, slen, " ra"); in sldns_wire2str_header_scan()
758 if(LDNS_AD_WIRE(*d)) w += sldns_str_print(s, slen, " ad"); in sldns_wire2str_header_scan()
759 if(LDNS_Z_WIRE(*d)) w += sldns_str_print(s, slen, " z"); in sldns_wire2str_header_scan()
760 w += sldns_str_print(s, slen, " ; "); in sldns_wire2str_header_scan()
762 return w+print_remainder_hex("Error header too short 0x", d, dlen, s, slen); in sldns_wire2str_header_scan()
763 w += sldns_str_print(s, slen, "QUERY: %d, ", (int)LDNS_QDCOUNT(*d)); in sldns_wire2str_header_scan()
764 w += sldns_str_print(s, slen, "ANSWER: %d, ", (int)LDNS_ANCOUNT(*d)); in sldns_wire2str_header_scan()
765 w += sldns_str_print(s, slen, "AUTHORITY: %d, ", (int)LDNS_NSCOUNT(*d)); in sldns_wire2str_header_scan()
766 w += sldns_str_print(s, slen, "ADDITIONAL: %d ", (int)LDNS_ARCOUNT(*d)); in sldns_wire2str_header_scan()
773 size_t* slen, uint16_t rrtype, uint8_t* pkt, size_t pktlen, in sldns_wire2str_rdata_scan() argument
779 size_t origdlen = *dlen, origslen = *slen; in sldns_wire2str_rdata_scan()
786 return sldns_wire2str_rdata_unknown_scan(d, dlen, s, slen); in sldns_wire2str_rdata_scan()
798 w += sldns_str_print(s, slen, " "); in sldns_wire2str_rdata_scan()
799 n = sldns_wire2str_rdf_scan(d, dlen, s, slen, rdftype, in sldns_wire2str_rdata_scan()
805 *dlen = origdlen; *slen = origslen; in sldns_wire2str_rdata_scan()
807 s, slen); in sldns_wire2str_rdata_scan()
818 size_t* slen) in sldns_wire2str_rdata_unknown_scan() argument
823 w += sldns_str_print(s, slen, "\\# %u", (unsigned)*dlen); in sldns_wire2str_rdata_unknown_scan()
827 w += sldns_str_print(s, slen, " "); in sldns_wire2str_rdata_unknown_scan()
828 w += print_hex_buf(s, slen, *d, *dlen); in sldns_wire2str_rdata_unknown_scan()
835 static int dname_char_print(char** s, size_t* slen, uint8_t c) in dname_char_print() argument
838 return sldns_str_print(s, slen, "\\%c", c); in dname_char_print()
840 return sldns_str_print(s, slen, "\\%03u", (unsigned)c); in dname_char_print()
842 if(*slen) { in dname_char_print()
845 (*slen)--; in dname_char_print()
850 int sldns_wire2str_dname_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen, in sldns_wire2str_dname_scan() argument
866 if(*dlen == 0) return sldns_str_print(s, slen, "ErrorMissingDname"); in sldns_wire2str_dname_scan()
870 return sldns_str_print(s, slen, "."); in sldns_wire2str_dname_scan()
882 return w + sldns_str_print(s, slen, in sldns_wire2str_dname_scan()
885 return w + sldns_str_print(s, slen, in sldns_wire2str_dname_scan()
891 return w + sldns_str_print(s, slen, in sldns_wire2str_dname_scan()
896 return w + sldns_str_print(s, slen, in sldns_wire2str_dname_scan()
904 w += sldns_str_print(s, slen, in sldns_wire2str_dname_scan()
921 w += sldns_str_print(s, slen, in sldns_wire2str_dname_scan()
926 w += dname_char_print(s, slen, *pos++); in sldns_wire2str_dname_scan()
933 w += sldns_str_print(s, slen, "."); in sldns_wire2str_dname_scan()
938 if(w == 0) w += sldns_str_print(s, slen, "."); in sldns_wire2str_dname_scan()
942 int sldns_wire2str_opcode_print(char** s, size_t* slen, int opcode) in sldns_wire2str_opcode_print() argument
946 return sldns_str_print(s, slen, "%s", lt->name); in sldns_wire2str_opcode_print()
948 return sldns_str_print(s, slen, "OPCODE%u", (unsigned)opcode); in sldns_wire2str_opcode_print()
951 int sldns_wire2str_rcode_print(char** s, size_t* slen, int rcode) in sldns_wire2str_rcode_print() argument
955 return sldns_str_print(s, slen, "%s", lt->name); in sldns_wire2str_rcode_print()
957 return sldns_str_print(s, slen, "RCODE%u", (unsigned)rcode); in sldns_wire2str_rcode_print()
960 int sldns_wire2str_class_print(char** s, size_t* slen, uint16_t rrclass) in sldns_wire2str_class_print() argument
965 return sldns_str_print(s, slen, "%s", lt->name); in sldns_wire2str_class_print()
967 return sldns_str_print(s, slen, "CLASS%u", (unsigned)rrclass); in sldns_wire2str_class_print()
970 int sldns_wire2str_type_print(char** s, size_t* slen, uint16_t rrtype) in sldns_wire2str_type_print() argument
974 return sldns_str_print(s, slen, "%s", descriptor->_name); in sldns_wire2str_type_print()
976 return sldns_str_print(s, slen, "TYPE%u", (unsigned)rrtype); in sldns_wire2str_type_print()
979 int sldns_wire2str_edns_option_code_print(char** s, size_t* slen, in sldns_wire2str_edns_option_code_print() argument
985 return sldns_str_print(s, slen, "%s", lt->name); in sldns_wire2str_edns_option_code_print()
987 return sldns_str_print(s, slen, "OPT%u", (unsigned)opcode); in sldns_wire2str_edns_option_code_print()
990 int sldns_wire2str_class_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen) in sldns_wire2str_class_scan() argument
994 if(*dlen < 2) return print_remainder_hex("Error malformed 0x", d, dlen, s, slen); in sldns_wire2str_class_scan()
998 return sldns_wire2str_class_print(s, slen, c); in sldns_wire2str_class_scan()
1001 int sldns_wire2str_type_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen) in sldns_wire2str_type_scan() argument
1005 if(*dlen < 2) return print_remainder_hex("Error malformed 0x", d, dlen, s, slen); in sldns_wire2str_type_scan()
1009 return sldns_wire2str_type_print(s, slen, t); in sldns_wire2str_type_scan()
1012 int sldns_wire2str_ttl_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen) in sldns_wire2str_ttl_scan() argument
1016 if(*dlen < 4) return print_remainder_hex("Error malformed 0x", d, dlen, s, slen); in sldns_wire2str_ttl_scan()
1020 return sldns_str_print(s, slen, "%u", (unsigned)ttl); in sldns_wire2str_ttl_scan()
1024 sldns_print_svcparamkey(char** s, size_t* slen, uint16_t svcparamkey) in sldns_print_svcparamkey() argument
1027 return sldns_str_print(s, slen, "%s", svcparamkey_strs[svcparamkey]); in sldns_print_svcparamkey()
1030 return sldns_str_print(s, slen, "key%d", (int)svcparamkey); in sldns_print_svcparamkey()
1035 size_t* slen, uint16_t data_len, uint8_t* data) in sldns_wire2str_svcparam_port2str() argument
1041 w = sldns_str_print(s, slen, "=%d", (int)sldns_read_uint16(data)); in sldns_wire2str_svcparam_port2str()
1047 size_t* slen, uint16_t data_len, uint8_t* data) in sldns_wire2str_svcparam_ipv4hint2str() argument
1059 w += sldns_str_print(s, slen, "=%s", ip_str); in sldns_wire2str_svcparam_ipv4hint2str()
1066 w += sldns_str_print(s, slen, ",%s", ip_str); in sldns_wire2str_svcparam_ipv4hint2str()
1076 size_t* slen, uint16_t data_len, uint8_t* data) in sldns_wire2str_svcparam_ipv6hint2str() argument
1088 w += sldns_str_print(s, slen, "=%s", ip_str); in sldns_wire2str_svcparam_ipv6hint2str()
1095 w += sldns_str_print(s, slen, ",%s", ip_str); in sldns_wire2str_svcparam_ipv6hint2str()
1105 size_t* slen, uint16_t data_len, uint8_t* data) in sldns_wire2str_svcparam_mandatory2str() argument
1113 w += sldns_str_print(s, slen, "="); in sldns_wire2str_svcparam_mandatory2str()
1114 w += sldns_print_svcparamkey(s, slen, sldns_read_uint16(data)); in sldns_wire2str_svcparam_mandatory2str()
1118 w += sldns_str_print(s, slen, ","); in sldns_wire2str_svcparam_mandatory2str()
1119 w += sldns_print_svcparamkey(s, slen, sldns_read_uint16(data)); in sldns_wire2str_svcparam_mandatory2str()
1127 size_t* slen, uint16_t data_len, uint8_t* data) in sldns_wire2str_svcparam_alpn2str() argument
1134 w += sldns_str_print(s, slen, "=\""); in sldns_wire2str_svcparam_alpn2str()
1144 w += sldns_str_print(s, slen, "\\\\\\%c", dp[i]); in sldns_wire2str_svcparam_alpn2str()
1147 w += sldns_str_print(s, slen, "\\\\%c", dp[i]); in sldns_wire2str_svcparam_alpn2str()
1150 w += sldns_str_print(s, slen, "\\%03u", (unsigned) dp[i]); in sldns_wire2str_svcparam_alpn2str()
1153 w += sldns_str_print(s, slen, "%c", dp[i]); in sldns_wire2str_svcparam_alpn2str()
1157 w += sldns_str_print(s, slen, "%s", ","); in sldns_wire2str_svcparam_alpn2str()
1159 w += sldns_str_print(s, slen, "\""); in sldns_wire2str_svcparam_alpn2str()
1165 size_t* slen, uint16_t data_len, uint8_t* data) in sldns_wire2str_svcparam_ech2str() argument
1172 w += sldns_str_print(s, slen, "=\""); in sldns_wire2str_svcparam_ech2str()
1174 if ((size = sldns_b64_ntop(data, data_len, *s, *slen)) < 0) in sldns_wire2str_svcparam_ech2str()
1178 (*slen) -= size; in sldns_wire2str_svcparam_ech2str()
1180 w += sldns_str_print(s, slen, "\""); in sldns_wire2str_svcparam_ech2str()
1185 int sldns_wire2str_svcparam_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen) in sldns_wire2str_svcparam_scan() argument
1205 written_chars += sldns_print_svcparamkey(s, slen, svcparamkey); in sldns_wire2str_svcparam_scan()
1224 r = sldns_wire2str_svcparam_port2str(s, slen, data_len, *d); in sldns_wire2str_svcparam_scan()
1227 r = sldns_wire2str_svcparam_ipv4hint2str(s, slen, data_len, *d); in sldns_wire2str_svcparam_scan()
1230 r = sldns_wire2str_svcparam_ipv6hint2str(s, slen, data_len, *d); in sldns_wire2str_svcparam_scan()
1233 r = sldns_wire2str_svcparam_mandatory2str(s, slen, data_len, *d); in sldns_wire2str_svcparam_scan()
1238 r = sldns_wire2str_svcparam_alpn2str(s, slen, data_len, *d); in sldns_wire2str_svcparam_scan()
1241 r = sldns_wire2str_svcparam_ech2str(s, slen, data_len, *d); in sldns_wire2str_svcparam_scan()
1247 r = sldns_str_print(s, slen, "=\""); in sldns_wire2str_svcparam_scan()
1253 r += sldns_str_print(s, slen, "\\%c", ch); in sldns_wire2str_svcparam_scan()
1256 r += sldns_str_print(s, slen, "\\%03u", (unsigned) ch); in sldns_wire2str_svcparam_scan()
1259 r += sldns_str_print(s, slen, "%c", ch); in sldns_wire2str_svcparam_scan()
1262 r += sldns_str_print(s, slen, "\""); in sldns_wire2str_svcparam_scan()
1274 int sldns_wire2str_rdf_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen, in sldns_wire2str_rdf_scan() argument
1282 return sldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen, comprloop); in sldns_wire2str_rdf_scan()
1284 return sldns_wire2str_int8_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1286 return sldns_wire2str_int16_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1288 return sldns_wire2str_int32_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1290 return sldns_wire2str_period_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1292 return sldns_wire2str_tsigtime_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1294 return sldns_wire2str_a_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1296 return sldns_wire2str_aaaa_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1298 return sldns_wire2str_str_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1300 return sldns_wire2str_apl_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1302 return sldns_wire2str_b32_ext_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1304 return sldns_wire2str_b64_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1306 return sldns_wire2str_hex_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1308 return sldns_wire2str_nsec_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1310 return sldns_wire2str_nsec3_salt_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1312 return sldns_wire2str_type_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1314 return sldns_wire2str_class_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1316 return sldns_wire2str_cert_alg_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1318 return sldns_wire2str_alg_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1320 return sldns_wire2str_unknown_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1322 return sldns_wire2str_time_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1324 return sldns_wire2str_loc_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1327 return sldns_wire2str_wks_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1329 return sldns_wire2str_nsap_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1331 return sldns_wire2str_atma_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1333 return sldns_wire2str_ipseckey_scan(d, dlen, s, slen, pkt, in sldns_wire2str_rdf_scan()
1336 return sldns_wire2str_hip_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1338 return sldns_wire2str_int16_data_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1340 return sldns_wire2str_b32_ext_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1342 return sldns_wire2str_ilnp64_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1344 return sldns_wire2str_eui48_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1346 return sldns_wire2str_eui64_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1348 return sldns_wire2str_tag_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1350 return sldns_wire2str_long_str_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1352 return sldns_wire2str_svcparam_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()
1354 return sldns_wire2str_tsigerror_scan(d, dlen, s, slen); in sldns_wire2str_rdf_scan()