31 while (numanswers--) {
37 if (pos + datalen > len)
return DNS_ERR;
38 txtlen = (
unsigned char) buf[pos];
39 for (i = 1; i < datalen; ++i) {
42 txtlen += (
unsigned char) ch + 1;
44 if (ch < 32) ch =
'?';
45 if (ch > 126) ch =
'?';
int dns_txt(stralloc *out, const stralloc *fqdn)
int dns_txt_packet(stralloc *out, const char *buf, unsigned int len)
additional types and pack routines
void uint16_unpack_big(char[16], uint16 *)
#define byte_equal(s, n, t)
void dns_transmit_free(struct dns_transmit *)
unsigned int dns_packet_copy(const char *, unsigned int, unsigned int, char *, unsigned int)
int dns_domain_fromdot(char **, const char *, unsigned int)
int dns_resolve(const char *, const char *)
unsigned int dns_packet_skipname(const char *, unsigned int, unsigned int)
void dns_domain_free(char **)
struct dns_transmit dns_resolve_tx
int stralloc_append(stralloc *sa, const char *in)
int stralloc_copys(stralloc *, const char *)