diff options
| author | manuel <manuel@mausz.at> | 2013-02-04 00:08:53 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2013-02-04 00:08:53 +0100 |
| commit | 69aec538b456402170dc723af417ba5c05389c32 (patch) | |
| tree | e6f34c543f17c6392447ea337b2e2868212424d1 /dnsptr.c | |
| download | qmail-69aec538b456402170dc723af417ba5c05389c32.tar.gz qmail-69aec538b456402170dc723af417ba5c05389c32.tar.bz2 qmail-69aec538b456402170dc723af417ba5c05389c32.zip | |
qmail 1.03 import
Diffstat (limited to 'dnsptr.c')
| -rw-r--r-- | dnsptr.c | 27 |
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 | |||
| 11 | stralloc sa = {0}; | ||
| 12 | struct ip_address ip; | ||
| 13 | |||
| 14 | void main(argc,argv) | ||
| 15 | int argc; | ||
| 16 | char **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 | } | ||
