31 while (numanswers--) {
62 fqdn->
s[fqdn->
len] = 0;
63 for (i = 1; i < fqdn->
len; i++) {
64 if (fqdn->
s[i] >=
'_') { code = 127;
break; }
65 if (fqdn->
s[i] ==
'.') dot++;
68 if (code != 127 && dot == 3)
75 for (i = 0; i <= fqdn->
len; ++i) {
81 if ((ch ==
'[') || (ch ==
']'))
continue;
87 if ((ch >=
'0') && (ch <=
'9')) {
123 while (numanswers--) {
160 fqdn->
s[fqdn->
len] = 0;
167 for (i = 0; i <= fqdn->
len; ++i) {
173 if ((ch ==
'[') || (ch ==
']'))
continue;
179 if ((ch >=
'0') && (ch <=
'9')) {
const unsigned char V4mappedprefix[12]
int dns_ip4_packet(stralloc *out, const char *buf, unsigned int len)
int dns_ip6_packet(stralloc *out, const char *buf, unsigned int len)
int dns_ip4(stralloc *out, stralloc *fqdn)
int dns_ip6(stralloc *out, stralloc *fqdn)
additional types and pack routines
void uint16_unpack_big(char[16], uint16 *)
unsigned int ip4_scanbracket(const char *, char[4])
ip4_scanbracket parse IPv4 address string enclosed in brackets and convert to IP address array
unsigned int ip4_scan(const char *, char[4])
ip4_scan parse IPv4 address string and convert to IP address array
unsigned int ip6_scan(const char *, char[16])
ip6_scan parse compactified IPv6 address string and convert to IPv6 address array
unsigned int ip6_scanbracket(const char *, char[16])
ip6_scanbracket parse IPv6 string address enclosed in brackets
void byte_copy(void *, unsigned int, const void *)
#define byte_equal(s, n, t)
void dns_transmit_free(struct dns_transmit *)
void dns_sortip4(char *, unsigned int)
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 *)
void dns_sortip6(char *, unsigned int)
unsigned int dns_packet_skipname(const char *, unsigned int, unsigned int)
void dns_domain_free(char **)
struct dns_transmit dns_resolve_tx
int stralloc_catb(stralloc *, const char *, unsigned int)
int stralloc_append(stralloc *sa, const char *in)
int stralloc_copyb(stralloc *, const char *, unsigned int)
int stralloc_readyplus(stralloc *sa, size_t len)
int stralloc_copys(stralloc *, const char *)