djbdnscurve6 53
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
8unsigned int flagedns0 = 0;
9unsigned int msgsize = MSGSIZE;
10
11static char seed[128];
12static stralloc fqdn;
13static stralloc out;
14
15int main(int argc,char **argv)
16{
18
19 if (*argv) ++argv;
20
21 while (*argv) {
22 if (!stralloc_copys(&fqdn,*argv))
23 logmsg(WHO,111,FATAL,"out of memory");
24 if (dns_txt(&out,&fqdn) > 0) {
25 buffer_put(buffer_1,out.s,out.len);
26 buffer_puts(buffer_1,"\n");
27 }
28 ++argv;
29 }
30
31 buffer_flush(buffer_1);
32 _exit(0);
33}
int main()
Definition: axfrdns.c:326
#define MSGSIZE
Definition: dns.h:47
void dns_random_init(const char data[128])
Definition: dns_random.c:36
int dns_txt(stralloc *out, const stralloc *fqdn)
Definition: dns_txt.c:53
uint32 seed[32]
Definition: dnscache-conf.c:36
unsigned int flagedns0
Definition: dnstxt.c:8
unsigned int msgsize
Definition: dnstxt.c:9
#define WHO
Definition: dnstxt.c:6