djbdnscurve6 46
djbdnscurve6
Loading...
Searching...
No Matches
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
8static char seed[128];
9
10static stralloc fqdn;
11static stralloc out;
12
13int main(int argc,char **argv)
14{
15 dns_random_init(seed);
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}
#define WHO
Definition axfr-get.c:16
int main()
Definition axfrdns.c:323
void dns_random_init(const char data[128])
Definition dns_random.c:37
int dns_txt(stralloc *out, const stralloc *fqdn)
Definition dns_txt.c:53