DnsResponse
Description
Parsed DNS message. id echoes the client-supplied transaction id from the matching query so the resolver can pair responses.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Dns.c:151:
};
DnsResponse resp = {0};
bool ok = DnsParseResponse(&resp, wire, sizeof(wire), a);- In
Dns.c:218:
};
DnsResponse resp = {0};
bool ok = DnsParseResponse(&resp, wire, sizeof(wire), a);
bool match = ok && resp.rcode == DNS_RCODE_NXDOMAIN && resp.answers.length == 0;- In
Dns.c:289:
};
DnsResponse resp = {0};
bool ok = DnsParseResponse(&resp, wire, sizeof(wire), a);
bool match = ok && resp.answers.length == 1;- In
Dns.c:536:
}
DnsResponse resp = {0};
bool ok = DnsParseResponse(&resp, resp_buf, (u64)got, sa);
if (!ok || resp.id != id || resp.rcode != DNS_RCODE_NOERROR) {- In
Dns.c:284:
}
bool DnsParseResponse(DnsResponse *out, const u8 *buf, u64 len, Allocator *alloc) {
if (!out || !buf || !alloc) {
return false;- In
Dns.c:355:
}
void DnsResponseDeinit(DnsResponse *self) {
if (!self) {
return;- In
Dns.h:97:
DnsRecords authority;
DnsRecords additional;
} DnsResponse;
///
- In
Dns.h:136:
/// `DnsResponseDeinit`.
///
bool DnsParseResponse(DnsResponse *out, const u8 *buf, u64 len, Allocator *alloc);
void DnsResponseDeinit(DnsResponse *self);- In
Dns.h:138:
bool DnsParseResponse(DnsResponse *out, const u8 *buf, u64 len, Allocator *alloc);
void DnsResponseDeinit(DnsResponse *self);
void DnsRecordDeinit(DnsRecord *self);
Last updated on