- java.lang.Object
-
- io.netty5.handler.codec.dns.AbstractDnsRecord
-
- io.netty5.handler.codec.dns.AbstractDnsOptPseudoRrRecord
-
- io.netty5.handler.codec.dns.DefaultDnsOptEcsRecord
-
- All Implemented Interfaces:
DnsOptEcsRecord,DnsOptPseudoRecord,DnsRecord
@UnstableApi public final class DefaultDnsOptEcsRecord extends AbstractDnsOptPseudoRrRecord implements DnsOptEcsRecord
DefaultDnsOptEcsRecordimplementation.
-
-
Field Summary
-
Fields inherited from interface io.netty5.handler.codec.dns.DnsRecord
CLASS_ANY, CLASS_CHAOS, CLASS_CSNET, CLASS_HESIOD, CLASS_IN, CLASS_NONE
-
-
Constructor Summary
Constructors Constructor Description DefaultDnsOptEcsRecord(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, ProtocolFamily protocolFamily)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]address()Returns the bytes of theInetAddressto use.DefaultDnsOptEcsRecordcopy()Returns a copy of this record object.intscopePrefixLength()Returns the leftmost number of significant bits of ADDRESS that the response covers.intsourcePrefixLength()Returns the leftmost number of significant bits of ADDRESS to be used for the lookup.StringtoString()-
Methods inherited from class io.netty5.handler.codec.dns.AbstractDnsOptPseudoRrRecord
extendedRcode, flags, version
-
Methods inherited from class io.netty5.handler.codec.dns.AbstractDnsRecord
dnsClass, equals, hashCode, name, timeToLive, type
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty5.handler.codec.dns.DnsOptPseudoRecord
extendedRcode, flags, version
-
Methods inherited from interface io.netty5.handler.codec.dns.DnsRecord
dnsClass, name, timeToLive, type
-
-
-
-
Constructor Detail
-
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
public DefaultDnsOptEcsRecord(int maxPayloadSize, ProtocolFamily protocolFamily)Creates a new instance.- Parameters:
maxPayloadSize- the suggested max payload size in bytesprotocolFamily- theProtocolFamilyto use. This should be the same as the one used to send the query.
-
-
Method Detail
-
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
-
copy
public DefaultDnsOptEcsRecord copy()
Description copied from interface:DnsRecordReturns a copy of this record object. Immutable record objects may return themselves.- Specified by:
copyin interfaceDnsOptEcsRecord- Specified by:
copyin interfaceDnsOptPseudoRecord- Specified by:
copyin interfaceDnsRecord
-
toString
public String toString()
- Overrides:
toStringin classAbstractDnsOptPseudoRrRecord
-
-