Esempio n. 1
0
/** Qualify a domain name through DNS requests.

    Calls \c dns_resolvconfrewrite and \c dns_qualify_rules.

    \param out Output storage for the DNS record results.
    \param fqdn Output storage for the fully qualified domain name.
    \param in Domain name (full or partial) to qualify.
    \param fn Function to call (such as \c dns_ip4) to determine if a
    qualified domain name exists.
*/
int dns_qualify(struct dns_result* out, str* fqdn, const char* in,
		int (*fn)(struct dns_transmit*, struct dns_result*, const char*))
{
  static str rules;
  if (dns_resolvconfrewrite(&rules) == -1) return -1;
  return dns_qualify_rules(out,fqdn,in,&rules,fn);
}
Esempio n. 2
0
int dns_ip6_qualify(stralloc *out,stralloc *fqdn,const stralloc *in)
{
  static stralloc rules;
  if (dns_resolvconfrewrite(&rules) == -1) return -1;
  return dns_ip6_qualify_rules(out,fqdn,in,&rules);
}