20 logmsg(
WHO,100,USAGE,
"type name server");
24 logmsg(
WHO,111,FATAL,
"unable to parse");
40 taia_uint(&deadline,120);
41 taia_add(&deadline,&deadline,&stamp);
43 iopause(
x,1,&deadline,&stamp);
63int main(
int argc,
char **argv)
70 if (!*++argv)
usage();
73 if (!*++argv)
usage();
76 if (!*++argv)
usage();
77 if (!stralloc_copys(&out,*argv))
oops();
83 if (!stralloc_copys(&out,
""))
oops();
84 uint16_unpack_big(
type,&u16);
85 if (!stralloc_catulong0(&out,u16,0))
oops();
86 if (!stralloc_cats(&out,
" "))
oops();
88 if (!stralloc_cats(&out,
":\n"))
oops();
91 if (!stralloc_cats(&out,errstr(errno)))
oops();
92 if (!stralloc_cats(&out,
"\n"))
oops();
98 buffer_putflush(buffer_1,out.s,out.len);
int cns_transmit_start(struct dns_transmit *d, const char servers[QUERY_MAXIPLEN], int flagrecursive, const char *q, const char qtype[2], const char localip[16], const char keys[1024], const char pubkey[32], const char *suffix)
int dns_domain_fromdot(char **out, const char *buf, unsigned int n)
int dns_domain_todot_cat(stralloc *out, const char *d)
int dns_ip_qualify(stralloc *ipout, stralloc *fqdn, const stralloc *in)
void dns_random_init(const char data[128])
void dns_transmit_io(struct dns_transmit *d, iopause_fd *x, struct taia *deadline)
int dns_transmit_get(struct dns_transmit *d, const iopause_fd *x, const struct taia *when)
int resolve(char *q, char qtype[2], char servers[QUERY_MAXIPLEN])
char servers[QUERY_MAXIPLEN]
int parsetype(char *, char *)
unsigned int printpacket_cat(stralloc *, char *, unsigned int)