[][src]Enum domain::base::iana::opt::OptionCode

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

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.

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

impl OptionCode[src]

pub fn from_int(value: u16) -> Self[src]

Returns a value from its raw integer value.

pub fn to_int(self) -> u16[src]

Returns the raw integer value for a value.

pub fn from_mnemonic(m: &[u8]) -> Option<Self>[src]

Returns a value from a well-defined mnemonic.

pub fn to_mnemonic(self) -> Option<&'static [u8]>[src]

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.

impl OptionCode[src]

pub fn from_bytes(bytes: &[u8]) -> Option<Self>[src]

Trait Implementations

impl Clone for OptionCode[src]

impl Compose for OptionCode[src]

impl Copy for OptionCode[src]

impl Debug for OptionCode[src]

impl Display for OptionCode[src]

impl Eq for OptionCode[src]

impl<'a> From<&'a OptionCode> for u16[src]

impl From<OptionCode> for u16[src]

impl From<u16> for OptionCode[src]

impl FromStr for OptionCode[src]

type Err = FromStrError

The associated error which can be returned from parsing.

impl Hash for OptionCode[src]

impl Ord for OptionCode[src]

impl<Ref: AsRef<[u8]>> Parse<Ref> for OptionCode[src]

impl PartialEq<OptionCode> for OptionCode[src]

impl PartialEq<OptionCode> for u16[src]

impl PartialEq<u16> for OptionCode[src]

impl PartialOrd<OptionCode> for OptionCode[src]

impl PartialOrd<OptionCode> for u16[src]

impl PartialOrd<u16> for OptionCode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,