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

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

int s6dns_message_get_domain (s6dns_domain_t *d, char const *packet, unsigned int packetlen, unsigned int *pos)
{
  return s6dns_message_get_domain_internal(d->s, 255, packet, packetlen, pos)
      && s6dns_domain_decode(d) ;
}