23 logmsg(
WHO,100,USAGE,
"type name server");
27 logmsg(
WHO,111,FATAL,
"unable to parse");
38 char qflags[2] = { 0, 0 };
44 taia_uint(&deadline,120);
45 taia_add(&deadline,&deadline,&stamp);
47 iopause(
x,1,&deadline,&stamp);
67int main(
int argc,
char **argv)
74 if (!*++argv)
usage();
77 if (!*++argv)
usage();
80 if (!*++argv)
usage();
81 if (!stralloc_copys(&out,*argv))
oops();
87 if (!stralloc_copys(&out,
""))
oops();
88 uint16_unpack_big(
type,&u16);
89 if (!stralloc_catulong0(&out,u16,0))
oops();
90 if (!stralloc_cats(&out,
" "))
oops();
92 if (!stralloc_cats(&out,
":\n"))
oops();
95 if (!stralloc_cats(&out,errstr(errno)))
oops();
96 if (!stralloc_cats(&out,
"\n"))
oops();
102 buffer_putflush(buffer_1,out.s,out.len);
int cns_transmit_start(struct dns_transmit *d, const char servers[QUERY_MAXIPLEN], char qflags[2], const char *q, const char qtype[2], const char localip[16], const char keys[QUERY_MAXNS *KEY_LEN], const char pubkey[KEY_LEN], 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[2])
unsigned int printpacket_cat(stralloc *, char *, unsigned int)