djbdnscurve6  38
djbdnscurve6
dnstxt.c
Go to the documentation of this file.
1 #include "buffer.h"
2 #include "exit.h"
3 #include "logmsg.h"
4 #include "dns.h"
5 
6 #define WHO "dnstxt"
7 
8 static char seed[128];
9 
10 static stralloc fqdn;
11 static stralloc out;
12 
13 int main(int argc,char **argv)
14 {
16 
17  if (*argv) ++argv;
18 
19  while (*argv) {
20  if (!stralloc_copys(&fqdn,*argv))
21  logmsg(WHO,111,FATAL,"out of memory");
22  if (dns_txt(&out,&fqdn) > 0) {
23  buffer_put(buffer_1,out.s,out.len);
24  buffer_puts(buffer_1,"\n");
25  }
26  ++argv;
27  }
28 
29  buffer_flush(buffer_1);
30  _exit(0);
31 }
void dns_random_init(const char *)
int dns_txt(stralloc *, const stralloc *)
Definition: dns_txt.c:54
uint32 seed[32]
Definition: dnscache-conf.c:36
int main(int argc, char **argv)
Definition: dnstxt.c:13
#define WHO
Definition: dnstxt.c:6