djbdnscurve6
46
djbdnscurve6
Loading...
Searching...
No Matches
djbdnscurve6-46
src
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
{
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
}
WHO
#define WHO
Definition
axfr-get.c:16
main
int main()
Definition
axfrdns.c:323
dns.h
dns_random_init
void dns_random_init(const char data[128])
Definition
dns_random.c:37
dns_txt
int dns_txt(stralloc *out, const stralloc *fqdn)
Definition
dns_txt.c:53
Generated on
for djbdnscurve6 by
1.14.0