17 int rename(
const char *,
const char *);
19 #define WHO "tinydns-get "
23 logmsg(
WHO,100,USAGE,
"tinydns-get type name [ip]");
27 logmsg(
WHO,111,FATAL,
"unable to parse");
36 int main(
int argc,
char **argv)
42 if (!*++argv)
usage();
45 if (!*++argv)
usage();
49 if (!ip6_scan(*argv,
ip))
usage();
51 if (!stralloc_copys(&out,
""))
oops();
52 uint16_unpack_big(
type,&u16);
53 if (!stralloc_catulong0(&out,u16,0))
oops();
54 if (!stralloc_cats(&out,
" "))
oops();
56 if (!stralloc_cats(&out,
":\n"))
oops();
74 buffer_putflush(buffer_1,out.s,out.len);
int dns_domain_fromdot(char **, const char *, unsigned int)
int dns_domain_todot_cat(stralloc *, const char *)
unsigned int dns_domain_length(const char *)
int parsetype(char *s, char type[2])
unsigned int printpacket_cat(stralloc *out, char *buf, unsigned int len)
unsigned int response_len
int response_query(const char *q, const char qtype[2], const char qclass[2])
int main(int argc, char **argv)
int rename(const char *, const char *)
int respond(char *, char *, char *)