pub enum OptionCode {
Show 18 variants Llq, Ul, Nsid, Dau, Dhu, N3u, ClientSubnet, Expire, Cookie, TcpKeepalive, Padding, Chain, KeyTag, ExtendedError, ClientTag, ServerTag, DeviceId, Int(u16),
}
Expand description

DNS EDNS0 option codes.

The record data of OPT records is a sequence of options. The type of each of these options is given through a 16 bit value called option code.

The currently assigned option codes can be found in the IANA registry. The type is complete as of 2019-12-23.

Variants

Llq

Long-Lived Queries (LLQ, 1).

Long-Lived Queries is a protocol developed by Apple for change notifications. It is now being replaced by DNS Push Notifications. The LLQ options is used in LLQ messages.

This option code and the LLQ option are defined in a upcoming RFC, currently draft-sekar-dns-llq.

Ul

Update lease (UL, 2).

This option was proposed in a draft as a way to state lease times for registrations made via DNS UPDATE. Its draft, draft-sekar-dns-ul, has since expired. The code is considered ‘on hold.’

Nsid

Name server identifier (NSID, 3).

The NSID option allows a name server to include an indentifier in an answer for diagnostic purposes. The options in defined in RFC 5001.

Dau

DNSSEC algorithm understood (DAU, 5).

The DAU option allows a validating resolver to signal a queried server which DNSSEC signing algorithms it understands. The option is defined in [RFC 6975].

Dhu

DS hash understood (DHU, 6).

The DHU option allows a validating resolver to signal a queried server which DS hash algorithms it understands. The option is defined in [RFC 6975].

N3u

NSEC3 hash understood (N3U, 7).

The DHU option allows a validating resolver to signal a queried server which NSEC3 hash algorithms it understands. The option is defined in [RFC 6975].

ClientSubnet

EDNS client subnet (8),

The EDSN client subnet option allows a resolver to identify the IP address subnet it queries from so that a server can determine the best answer. This option is defined in RFC 7871.

Expire

Expire (9).

The expire option allows a secondary to maintain the correct expiry time for a zone when transferring from a server other than the primary. The option is defined in RFC 7314.

Cookie

DNS Cookie (10).

The cookie option allows clients and server to exchange session cookies as a mechanism for protecting agains denial-of-service and amplification attacks. The option is defined in RFC 7873.

TcpKeepalive

edns-tcp-keepalive (11).

This option allows DNS servers to signal to a client for how long they may hold open a TCP connection. The option is defined in RFC 7828.

Padding

Padding (12).

The padding option allows clients and servers to pad their messages with extra data to make it harder to guess content based on length. The option is defined in RFC 7830.

Chain

CHAIN query requests (13).

The CHAIN query requests option allows a security-aware resolver to all ask a server to include records necessary for DNSSEC validation of the answer. The option is defined in RFC 7901.

KeyTag

EDNS key tag (14).

The key tag option allows a client to signal to a server which DNSSEC key they would use to validate an asnwer. The option is defined in RFC 8145.

ExtendedError

Extended DNS Error (15).

This option allows the server to return additional information about the cause of DNS errors. It does not change the processing of RCODEs. The option is defined in RFC 8914.

ClientTag

EDNS client tag (16).

The client tag option allows a client to send arbitrary additional data to a server. The option is defined in the now expired draft-bellis-dnsop-edns-tags.

ServerTag

EDNS server tag (16).

The client tag option allows a server to send arbitrary additional data to a client. The option is defined in the now expired draft-bellis-dnsop-edns-tags.

DeviceId

DeviceID (26946).

Ths option is used by the Cisco Umbrella network device API.

Int(u16)

A raw value given through its integer.

Implementations

Returns a value from its raw integer value.

Returns the raw integer value for a value.

Returns a value from a well-defined mnemonic.

Returns the mnemonic for this value if there is one.

This will also return a mnemonic if a well-defined variant is hidden in a Int variant.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Appends the concrete representation of the value to the target. Read more

Appends the canonical representation of the value to the target. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

Extracts a value from the beginning of parser. Read more

Skips over a value of this type at the beginning of parser. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Available on crate feature master only.

Scans a value from a master file.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.