Lines Matching refs:rdata
19 #include <dns/rdata.h>
40 soa_get(dns_rdata_t *rdata, int offset) {
41 INSIST(rdata->type == dns_rdatatype_soa);
52 INSIST(rdata->length >= 20);
54 return (decode_uint32(rdata->data + rdata->length - 20 + offset));
63 dns_rdata_t *rdata) {
86 return (dns_rdata_fromstruct(rdata, rdclass, dns_rdatatype_soa,
91 dns_soa_getserial(dns_rdata_t *rdata) {
92 return soa_get(rdata, 0);
95 dns_soa_getrefresh(dns_rdata_t *rdata) {
96 return soa_get(rdata, 4);
99 dns_soa_getretry(dns_rdata_t *rdata) {
100 return soa_get(rdata, 8);
103 dns_soa_getexpire(dns_rdata_t *rdata) {
104 return soa_get(rdata, 12);
107 dns_soa_getminimum(dns_rdata_t *rdata) {
108 return soa_get(rdata, 16);
112 soa_set(dns_rdata_t *rdata, isc_uint32_t val, int offset) {
113 INSIST(rdata->type == dns_rdatatype_soa);
114 INSIST(rdata->length >= 20);
116 encode_uint32(val, rdata->data + rdata->length - 20 + offset);
120 dns_soa_setserial(isc_uint32_t val, dns_rdata_t *rdata) {
121 soa_set(rdata, val, 0);
124 dns_soa_setrefresh(isc_uint32_t val, dns_rdata_t *rdata) {
125 soa_set(rdata, val, 4);
128 dns_soa_setretry(isc_uint32_t val, dns_rdata_t *rdata) {
129 soa_set(rdata, val, 8);
132 dns_soa_setexpire(isc_uint32_t val, dns_rdata_t *rdata) {
133 soa_set(rdata, val, 12);
136 dns_soa_setminimum(isc_uint32_t val, dns_rdata_t *rdata) {
137 soa_set(rdata, val, 16);