nightmaremail

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

dnsptr.c (413B)


      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 
     10 stralloc sa = {0};
     11 struct ip_address ip;
     12 
     13 int main(int argc, char **argv)
     14 {
     15  if (argc == 1) return 100;
     16 
     17  ip_scan(argv[1],&ip);
     18 
     19  dns_init(0);
     20  dnsdoe(dns_ptr(&sa,&ip));
     21  substdio_putflush(subfdout,sa.s,sa.len);
     22  substdio_putsflush(subfdout,"\n");
     23  return 0;
     24 }