Class AbstractDnsOptPseudoRrRecord

java.lang.Object
io.netty.handler.codec.dns.AbstractDnsRecord
io.netty.handler.codec.dns.AbstractDnsOptPseudoRrRecord
All Implemented Interfaces:
DnsOptPseudoRecord, DnsRecord
Direct Known Subclasses:
DefaultDnsOptCookieRecord, DefaultDnsOptEcsRecord

public abstract class AbstractDnsOptPseudoRrRecord extends AbstractDnsRecord implements DnsOptPseudoRecord
  • Constructor Details

    • AbstractDnsOptPseudoRrRecord

      protected AbstractDnsOptPseudoRrRecord(int maxPayloadSize, int extendedRcode, int version)
    • AbstractDnsOptPseudoRrRecord

      protected AbstractDnsOptPseudoRrRecord(int maxPayloadSize, int extendedRcode, int version, int flags)
      Creates a new instance.
      Parameters:
      maxPayloadSize - the maximum UDP payload size that can be reassembled and delivered by this endpoint's network stack, encoded into the CLASS field
      extendedRcode - the upper 8 bits of the extended 12-bit RCODE; the lower 4 bits are carried by the DNS message header
      version - the EDNS version
      flags - the 16-bit flags field, which holds DO and Z; only its low 16 bits are used
    • AbstractDnsOptPseudoRrRecord

      protected AbstractDnsOptPseudoRrRecord(int maxPayloadSize)
  • Method Details

    • packIntoLong

      private static long packIntoLong(int extendedRcode, int version, int flags)
    • extendedRcode

      public int extendedRcode()
      Description copied from interface: DnsOptPseudoRecord
      Returns the EXTENDED-RCODE which is encoded into DnsRecord.timeToLive().
      Specified by:
      extendedRcode in interface DnsOptPseudoRecord
    • version

      public int version()
      Description copied from interface: DnsOptPseudoRecord
      Returns the VERSION which is encoded into DnsRecord.timeToLive().
      Specified by:
      version in interface DnsOptPseudoRecord
    • flags

      public int flags()
      Description copied from interface: DnsOptPseudoRecord
      Returns the 16-bit flags field which is encoded into the lower 16 bits of DnsRecord.timeToLive(), as laid out by RFC 6891.

      DO, defined by RFC 3225, is the most significant bit of that field, so (flags() & 0x8000) != 0 tests for DNSSEC OK. Further bits are assigned by the IANA EDNS Header Flags registry; the remaining bits are Z, which senders set to zero and receivers ignore.

      Specified by:
      flags in interface DnsOptPseudoRecord
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class AbstractDnsRecord
    • toStringBuilder

      final java.lang.StringBuilder toStringBuilder()