summaryrefslogtreecommitdiff
path: root/src/libs6dns/s6dns_domain_fromstring_qualify_encode.c
blob: dbdea02ccd82f5bd6e91846874d05798617a4c1e (plain)
1
2
3
4
5
6
7
8
9
10
/* ISC license. */

#include <s6-dns/s6dns-domain.h>

unsigned int s6dns_domain_fromstring_qualify_encode (s6dns_domain_t *list, char const *name, unsigned int len, char const *rules, unsigned int rulesnum)
{
  s6dns_domain_t d ;
  if (!s6dns_domain_fromstring(&d, name, len)) return 0 ;
  return s6dns_domain_encodelist(list, s6dns_domain_qualify(list, &d, rules, rulesnum)) ;
}