Decodes an OPT pseudo-record's full EDNS0 semantics from its header fields and rdata.
The UDP payload size comes from the record's CLASS, the DO bit / version / extended RCODE from its TTL, and the options from its rdata.
An OPT resource record (type === RecordType.OPT).
type === RecordType.OPT
The decoded EDNS0 fields.
If the record is not an OPT record.
1.0.4
import { decodeOpt, RecordType } from 'edgeport/dns';const opt = response.additional.find((rr) => rr.type === RecordType.OPT);if (opt) console.log(decodeOpt(opt).dnssecOk); Copy
import { decodeOpt, RecordType } from 'edgeport/dns';const opt = response.additional.find((rr) => rr.type === RecordType.OPT);if (opt) console.log(decodeOpt(opt).dnssecOk);
Decodes an OPT pseudo-record's full EDNS0 semantics from its header fields and rdata.
The UDP payload size comes from the record's CLASS, the DO bit / version / extended RCODE from its TTL, and the options from its rdata.