summaryrefslogtreecommitdiff
path: root/src/libs6dns/s6dns_message_parse_skipqd.c
blob: 65f97af2d68a9bb48300d221fd905ad7bf15bfad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ISC license. */

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

unsigned int s6dns_message_parse_skipqd (s6dns_message_counts_t *counts, char const *packet, unsigned int packetlen, unsigned int *pos)
{
  for (;;)
  {
    unsigned int r = s6dns_message_counts_next(counts) ;
    if (r != 1) return r ;
    if (!s6dns_message_get_domain_nodecode(0, 255, packet, packetlen, pos)) return 0 ;
    *pos += 4 ;
  }
}