Class DefaultDnsOptEcsRecord
java.lang.Object
io.netty.handler.codec.dns.AbstractDnsRecord
io.netty.handler.codec.dns.AbstractDnsOptPseudoRrRecord
io.netty.handler.codec.dns.DefaultDnsOptEcsRecord
- All Implemented Interfaces:
DnsOptEcsRecord, DnsOptPseudoRecord, DnsRecord
public final class DefaultDnsOptEcsRecord
extends AbstractDnsOptPseudoRrRecord
implements DnsOptEcsRecord
Default
DnsOptEcsRecord implementation.-
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
ConstructorsConstructorDescriptionDefaultDnsOptEcsRecord(int maxPayloadSize, int srcPrefixLength, byte[] address) Creates a new instance.DefaultDnsOptEcsRecord(int maxPayloadSize, int extendedRcode, int version, int srcPrefixLength, byte[] address) Creates a new instance.DefaultDnsOptEcsRecord(int maxPayloadSize, InternetProtocolFamily protocolFamily) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]address()Returns the bytes of theInetAddressto use.intReturns the leftmost number of significant bits of ADDRESS that the response covers.intReturns the leftmost number of significant bits of ADDRESS to be used for the lookup.toString()Methods inherited from class AbstractDnsOptPseudoRrRecord
extendedRcode, flags, versionModifier 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.intversion()Returns theVERSIONwhich is encoded intoDnsRecord.timeToLive().Methods inherited from class AbstractDnsRecord
dnsClass, equals, hashCode, name, timeToLive, type
-
Constructor Details
-
DefaultDnsOptEcsRecord
public DefaultDnsOptEcsRecord(int maxPayloadSize, int extendedRcode, int version, int srcPrefixLength, byte[] address) Creates a new instance.- Parameters:
maxPayloadSize- the suggested max payload size in bytesextendedRcode- the extended rcodeversion- the versionsrcPrefixLength- the prefix lengthaddress- the bytes of theInetAddressto use
-
DefaultDnsOptEcsRecord
public DefaultDnsOptEcsRecord(int maxPayloadSize, int srcPrefixLength, byte[] address) Creates a new instance.- Parameters:
maxPayloadSize- the suggested max payload size in bytessrcPrefixLength- the prefix lengthaddress- the bytes of theInetAddressto use
-
DefaultDnsOptEcsRecord
Creates a new instance.- Parameters:
maxPayloadSize- the suggested max payload size in bytesprotocolFamily- theInternetProtocolFamilyto use. This should be the same as the one used to send the query.
-
-
Method Details
-
sourcePrefixLength
public int sourcePrefixLength()Description copied from interface:DnsOptEcsRecordReturns the leftmost number of significant bits of ADDRESS to be used for the lookup.- Specified by:
sourcePrefixLengthin interfaceDnsOptEcsRecord
-
scopePrefixLength
public int scopePrefixLength()Description copied from interface:DnsOptEcsRecordReturns the leftmost number of significant bits of ADDRESS that the response covers. In queries, it MUST be 0.- Specified by:
scopePrefixLengthin interfaceDnsOptEcsRecord
-
address
public byte[] address()Description copied from interface:DnsOptEcsRecordReturns the bytes of theInetAddressto use.- Specified by:
addressin interfaceDnsOptEcsRecord
-
toString
- Overrides:
toStringin classAbstractDnsOptPseudoRrRecord
-