diff options
Diffstat (limited to 'src/libs6dns/s6dns_message_parse_skipqd.c')
-rw-r--r-- | src/libs6dns/s6dns_message_parse_skipqd.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libs6dns/s6dns_message_parse_skipqd.c b/src/libs6dns/s6dns_message_parse_skipqd.c new file mode 100644 index 0000000..9b8c222 --- /dev/null +++ b/src/libs6dns/s6dns_message_parse_skipqd.c @@ -0,0 +1,15 @@ +/* ISC license. */ + +#include <s6-dns/s6dns-message.h> +#include "s6dns-message-internal.h" + +unsigned int s6dns_message_parse_skipqd (s6dns_message_counts_t *counts, char const *packet, unsigned int packetlen, unsigned int *pos) +{ + for (;;) + { + register unsigned int r = s6dns_message_counts_next(counts) ; + if (r != 1) return r ; + if (!s6dns_message_get_domain_internal(0, 255, packet, packetlen, pos)) return 0 ; + *pos += 4 ; + } +} |