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:
DefaultDnsOptEcsRecord
public abstract class AbstractDnsOptPseudoRrRecord
extends AbstractDnsRecord
implements DnsOptPseudoRecord
An OPT RR record.
This is used for
Extension Mechanisms for DNS (EDNS(0)).
-
Field Summary
Fields inherited from interface DnsRecord
CLASS_ANY, CLASS_CHAOS, CLASS_CSNET, CLASS_HESIOD, CLASS_IN, CLASS_NONEModifier and TypeFieldDescriptionstatic final intDNS resource record class:ANYstatic final intDNS resource record class:CHAOSstatic final intDNS resource record class:CSNETstatic final intDNS resource record class:HESIODstatic final intDNS resource record class:INstatic final intDNS resource record class:NONE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractDnsOptPseudoRrRecord(int maxPayloadSize) protectedAbstractDnsOptPseudoRrRecord(int maxPayloadSize, int extendedRcode, int version) protectedAbstractDnsOptPseudoRrRecord(int maxPayloadSize, int extendedRcode, int version, int flags) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionintReturns theEXTENDED-RCODEwhich is encoded intoDnsRecord.timeToLive().intflags()Returns the 16-bitflagsfield which is encoded into the lower 16 bits ofDnsRecord.timeToLive(), as laid out by RFC 6891.toString()intversion()Returns theVERSIONwhich is encoded intoDnsRecord.timeToLive().Methods inherited from class AbstractDnsRecord
dnsClass, equals, hashCode, name, timeToLive, type
-
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 theCLASSfieldextendedRcode- the upper 8 bits of the extended 12-bit RCODE; the lower 4 bits are carried by the DNS message headerversion- the EDNS versionflags- the 16-bit flags field, which holdsDOandZ; only its low 16 bits are used
-
AbstractDnsOptPseudoRrRecord
protected AbstractDnsOptPseudoRrRecord(int maxPayloadSize)
-
-
Method Details
-
extendedRcode
public int extendedRcode()Description copied from interface:DnsOptPseudoRecordReturns theEXTENDED-RCODEwhich is encoded intoDnsRecord.timeToLive().- Specified by:
extendedRcodein interfaceDnsOptPseudoRecord
-
version
public int version()Description copied from interface:DnsOptPseudoRecordReturns theVERSIONwhich is encoded intoDnsRecord.timeToLive().- Specified by:
versionin interfaceDnsOptPseudoRecord
-
flags
public int flags()Description copied from interface:DnsOptPseudoRecordReturns the 16-bitflagsfield which is encoded into the lower 16 bits ofDnsRecord.timeToLive(), as laid out by RFC 6891.DO, defined by RFC 3225, is the most significant bit of that field, so(flags() & 0x8000) != 0tests forDNSSEC OK. Further bits are assigned by the IANAEDNS Header Flagsregistry; the remaining bits areZ, which senders set to zero and receivers ignore.- Specified by:
flagsin interfaceDnsOptPseudoRecord
-
toString
- Overrides:
toStringin classAbstractDnsRecord
-