diff options
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 | } | ||
