java.lang.Object
org.minidns.edns.Edns
EDNS - Extension Mechanism for DNS.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for creating EDNS instances.static enumThe EDNS option code.Field Summary
Modifier and TypeFieldDescriptionfinal booleanWhether DNSSEC OK flag is set.final int8-bit extended return code.static final intInform the dns server that the client supports DNSSEC.final int16-bit flags.The OPT record carrying the version.private StringThe cached rendered output.final intThe UDP payload size.final List<EdnsOption> The list of EDNS options.final int8-bit version field.Constructor Summary
ConstructorsConstructorDescriptionEdns(Edns.Builder builder) Creates an EDNS instance from a builder.Creates an EDNS instance from an OPT record.Method Summary
Modifier and TypeMethodDescriptionasRecord()Converts this EDNS instance to an OPT record.Returns the terminal output representation of this EDNS instance.static Edns.Builderbuilder()Creates a new builder for constructing EDNS instances.static EdnsfromRecord(Record<? extends Data> record) Creates an EDNS instance from a record if it's an OPT record.<O extends EdnsOption>
OgetEdnsOption(Edns.OptionCode optionCode) Finds an EDNS option by code in the variable part.toString()Renders the request as EDNS with its options on one line.
Field Details
FLAG_DNSSEC_OK
public static final int FLAG_DNSSEC_OKInform the dns server that the client supports DNSSEC.- See Also:
udpPayloadSize
public final int udpPayloadSizeThe UDP payload size.extendedRcode
public final int extendedRcode8-bit extended return code. RFC 6891 § 6.1.3 EXTENDED-RCODEversion
public final int version8-bit version field. RFC 6891 § 6.1.3 VERSIONflags
public final int flags16-bit flags. RFC 6891 § 6.1.4variablePart
The list of EDNS options.dnssecOk
public final boolean dnssecOkWhether DNSSEC OK flag is set.optRecord
terminalOutputCache
The cached rendered output.
Constructor Details
Edns
Edns
Creates an EDNS instance from a builder.- Parameters:
builder- the builder containing EDNS configuration
Method Details
getEdnsOption
Finds an EDNS option by code in the variable part.- Type Parameters:
O- the option type the caller expects, so the unchecked cast to it is checked at the call site- Parameters:
optionCode- the code of the option to look for in the variable part- Returns:
- the matching option, or null if the variable part carries no such code
asRecord
asTerminalOutput
Returns the terminal output representation of this EDNS instance.- Returns:
- the terminal output representation
toString
fromRecord
builder
Creates a new builder for constructing EDNS instances.- Returns:
- a new builder