blob: 3b78b43518ec6c10000f9c0365bb498565da9fb1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* ISC license. */
#include <skalibs/genalloc.h>
#include <s6-dns/s6dns-constants.h>
#include <s6-dns/s6dns-message.h>
int s6dns_message_parse_answer_caa (s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos, unsigned int section, void *stuff)
{
if ((section == 2) && (rr->rtype == S6DNS_T_CAA))
{
genalloc *data = stuff ;
s6dns_message_rr_caa_t caa ;
if (!s6dns_message_get_caa(&caa, packet, packetlen, &pos, rr->rdlength)) return 0 ;
if (!genalloc_append(s6dns_message_rr_caa_t, data, &caa)) return -1 ;
}
return 1 ;
}
|