Top Description Fields Constructors Methods
io.netty5.handler.codec.dns

public final Class DefaultDnsOptEcsRecord

extends AbstractDnsOptPseudoRrRecord
implements DnsOptEcsRecord
Class Inheritance
All Implemented Interfaces
io.netty5.handler.codec.dns.DnsOptEcsRecord, io.netty5.handler.codec.dns.DnsOptPseudoRecord, io.netty5.handler.codec.dns.DnsRecord
Annotations
@UnstableApi
Imports
io.netty5.util.internal.UnstableApi, java.net.InetAddress, .ProtocolFamily, java.util.Arrays

Default DnsOptEcsRecord implementation.

Field Summary

Modifier and TypeField and Description
private final byte[]
private final int

Constructor Summary

AccessConstructor and Description
public
DefaultDnsOptEcsRecord(int
the suggested max payload size in bytes
maxPayloadSize
,
int
the extended rcode
extendedRcode
,
int
the version
version
,
int
the prefix length
srcPrefixLength
,
byte[]
the bytes of the InetAddress to use
address
)

Creates a new instance.

public
DefaultDnsOptEcsRecord(int
the suggested max payload size in bytes
maxPayloadSize
,
int
the prefix length
srcPrefixLength
,
byte[]
the bytes of the InetAddress to use
address
)

Creates a new instance.

public
DefaultDnsOptEcsRecord(int
the suggested max payload size in bytes
maxPayloadSize
,
ProtocolFamily
the ProtocolFamily to use. This should be the same as the one used to send the query.
protocolFamily
)

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
public byte[]
address()

Implements io.netty5.handler.codec.dns.DnsOptEcsRecord.address.

Returns the bytes of the InetAddress to use.
public DefaultDnsOptEcsRecord
public int
scopePrefixLength()

Implements io.netty5.handler.codec.dns.DnsOptEcsRecord.scopePrefixLength.

Returns the leftmost number of significant bits of ADDRESS that the response covers.
public int
sourcePrefixLength()

Implements io.netty5.handler.codec.dns.DnsOptEcsRecord.sourcePrefixLength.

Returns the leftmost number of significant bits of ADDRESS to be used for the lookup.
public String
toString()

Overrides io.netty5.handler.codec.dns.AbstractDnsOptPseudoRrRecord.toString.

Returns a string representation of the object.
private static byte[]
verifyAddress(byte[] bytes)

Inherited from io.netty5.handler.codec.dns.AbstractDnsOptPseudoRrRecord:
extendedRcodeflagstoStringBuilderversion

Field Detail

addressback to summary
private final byte[] address
srcPrefixLengthback to summary
private final int srcPrefixLength

Constructor Detail

DefaultDnsOptEcsRecordback to summary
public DefaultDnsOptEcsRecord(int maxPayloadSize, int extendedRcode, int version, int srcPrefixLength, byte[] address)

Creates a new instance.

Parameters
maxPayloadSize:int

the suggested max payload size in bytes

extendedRcode:int

the extended rcode

version:int

the version

srcPrefixLength:int

the prefix length

address:byte[]

the bytes of the InetAddress to use

DefaultDnsOptEcsRecordback to summary
public DefaultDnsOptEcsRecord(int maxPayloadSize, int srcPrefixLength, byte[] address)

Creates a new instance.

Parameters
maxPayloadSize:int

the suggested max payload size in bytes

srcPrefixLength:int

the prefix length

address:byte[]

the bytes of the InetAddress to use

DefaultDnsOptEcsRecordback to summary
public DefaultDnsOptEcsRecord(int maxPayloadSize, ProtocolFamily protocolFamily)

Creates a new instance.

Parameters
maxPayloadSize:int

the suggested max payload size in bytes

protocolFamily:ProtocolFamily

the ProtocolFamily to use. This should be the same as the one used to send the query.

Method Detail

addressback to summary
public byte[] address()

Implements io.netty5.handler.codec.dns.DnsOptEcsRecord.address.

Doc from io.netty5.handler.codec.dns.DnsOptEcsRecord.address.

Returns the bytes of the InetAddress to use.

Annotations
@Override
copyback to summary
public DefaultDnsOptEcsRecord copy()

Implements io.netty5.handler.codec.dns.DnsOptEcsRecord.copy, io.netty5.handler.codec.dns.DnsOptPseudoRecord.copy, io.netty5.handler.codec.dns.DnsRecord.copy.

Doc from io.netty5.handler.codec.dns.DnsRecord.copy.

Returns a copy of this record object. Immutable record objects may return themselves.

Annotations
@Override
scopePrefixLengthback to summary
public int scopePrefixLength()

Implements io.netty5.handler.codec.dns.DnsOptEcsRecord.scopePrefixLength.

Doc from io.netty5.handler.codec.dns.DnsOptEcsRecord.scopePrefixLength.

Returns the leftmost number of significant bits of ADDRESS that the response covers. In queries, it MUST be 0.

Annotations
@Override
sourcePrefixLengthback to summary
public int sourcePrefixLength()

Implements io.netty5.handler.codec.dns.DnsOptEcsRecord.sourcePrefixLength.

Doc from io.netty5.handler.codec.dns.DnsOptEcsRecord.sourcePrefixLength.

Returns the leftmost number of significant bits of ADDRESS to be used for the lookup.

Annotations
@Override
toStringback to summary
public String toString()

Overrides io.netty5.handler.codec.dns.AbstractDnsOptPseudoRrRecord.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
verifyAddressback to summary
private static byte[] verifyAddress(byte[] bytes)