public class Edns extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Edns.Builder
Builder for creating EDNS instances.
|
static class |
Edns.OptionCode
The EDNS option code.
|
| Modifier and Type | Field and Description |
|---|---|
boolean |
dnssecOk
Whether DNSSEC OK flag is set.
|
int |
extendedRcode
8-bit extended return code.
|
static int |
FLAG_DNSSEC_OK
Inform the dns server that the client supports DNSSEC.
|
int |
flags
16-bit flags.
|
int |
udpPayloadSize
The UDP payload size.
|
List<EdnsOption> |
variablePart
The list of EDNS options.
|
int |
version
8-bit version field.
|
| Constructor and Description |
|---|
Edns(Edns.Builder builder)
Creates an EDNS instance from a builder.
|
Edns(Record<OPT> optRecord)
Creates an EDNS instance from an OPT record.
|
| Modifier and Type | Method and Description |
|---|---|
Record<OPT> |
asRecord()
Converts this EDNS instance to an OPT record.
|
String |
asTerminalOutput()
Returns the terminal output representation of this EDNS instance.
|
static Edns.Builder |
builder()
Creates a new builder for constructing EDNS instances.
|
static Edns |
fromRecord(Record<? extends Data> record)
Creates an EDNS instance from a record if it's an OPT record.
|
<O extends EdnsOption> |
getEdnsOption(Edns.OptionCode optionCode)
Gets the EDNS option with the specified option code.
|
String |
toString() |
public final boolean dnssecOk
public final int extendedRcode
public static final int FLAG_DNSSEC_OK
public final int flags
public final int udpPayloadSize
public final List<EdnsOption> variablePart
public final int version
public Edns(Edns.Builder builder)
builder - the builder containing EDNS configurationpublic Record<OPT> asRecord()
public String asTerminalOutput()
public static Edns.Builder builder()
public static Edns fromRecord(Record<? extends Data> record)
record - the record to convertpublic <O extends EdnsOption> O getEdnsOption(Edns.OptionCode optionCode)
O - the type of the EDNS optionoptionCode - the option code to search for