1. watchA

Contents

    1. watchA
  1. history

#include <unistd.h>
#include "buffer.h"
#include "stralloc.h"
#include "dnsresolv.h"
#include "dns.h"
#include "exit.h"
#include "logmsg.h"

#define WHO "dnstext"

stralloc sa = {0};
stralloc out = {0};

int main(int argc,char **argv)
{
  int r;

  if (!argv[1]) 
    logmsg(WHO,100,USAGE,"dnstxt fqdn");

  if (!stralloc_copys(&sa,argv[1]))
    logmsg(WHO,111,FATAL,"out of memory");

  DNS_INIT
  if ((r = dns_txt(&out,&sa)) < 0) _exit(1);
  if (r > 0) {
    buffer_put(buffer_1,out.s,out.len);
    buffer_putsflush(buffer_1,"\n");
  }
 
  _exit(0);
}

2. history


CategoryDns CategoryWatch CategoryTemplate

MoinQ: s/qmail/SPF/spfquery/dns_txt/s/qmail (last edited 2021-05-09 03:43:32 by ToshinoriMaeno)