edgeport - v1.0.6
    Preparing search index...

    Function encodeOptRecord

    • Builds an EDNS0 OPT pseudo-record for the additional section (RFC 6891).

      The OPT record repurposes the header fields: CLASS carries the UDP payload size and TTL packs the extended RCODE, version, and the DO (DNSSEC OK) bit. The owner name is always the root.

      Parameters

      Returns ResourceRecord

      A ResourceRecord ready to append to a message's additional section.

      1.0.4

      import { encodeOptRecord } from 'edgeport/dns';

      const opt = encodeOptRecord({ dnssecOk: true }); // 4096-byte UDP size, DO bit set