summaryrefslogtreecommitdiffstats
path: root/dnsptr.c
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2013-02-04 00:08:53 +0100
committermanuel <manuel@mausz.at>2013-02-04 00:08:53 +0100
commit69aec538b456402170dc723af417ba5c05389c32 (patch)
treee6f34c543f17c6392447ea337b2e2868212424d1 /dnsptr.c
downloadqmail-69aec538b456402170dc723af417ba5c05389c32.tar.gz
qmail-69aec538b456402170dc723af417ba5c05389c32.tar.bz2
qmail-69aec538b456402170dc723af417ba5c05389c32.zip
qmail 1.03 import
Diffstat (limited to 'dnsptr.c')
-rw-r--r--dnsptr.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/dnsptr.c b/dnsptr.c
new file mode 100644
index 0000000..6a92fe0
--- /dev/null
+++ b/dnsptr.c
@@ -0,0 +1,27 @@
1#include "substdio.h"
2#include "subfd.h"
3#include "stralloc.h"
4#include "str.h"
5#include "scan.h"
6#include "dns.h"
7#include "dnsdoe.h"
8#include "ip.h"
9#include "exit.h"
10
11stralloc sa = {0};
12struct ip_address ip;
13
14void main(argc,argv)
15int argc;
16char **argv;
17{
18 if (!argv[1]) _exit(100);
19
20 ip_scan(argv[1],&ip);
21
22 dns_init(0);
23 dnsdoe(dns_ptr(&sa,&ip));
24 substdio_putflush(subfdout,sa.s,sa.len);
25 substdio_putsflush(subfdout,"\n");
26 _exit(0);
27}