pub struct DnsFlags {
    pub flags: u16,
}
Expand description

Represents the flags of a DnsHeader.

Fields

flags: u16

Implementations

Creates a DnsFlags struct from booleans. The meaning of the flags is as follows:

  • aa: authoritative answer (valid in responses only)
  • tc: truncated (set on all truncated messages except last one)
  • rd: recursion desired (copied in answer if supported and accepted)
  • ra: valid in responses, indicating recursive query support in the name server
  • ad: if set in query: indicates interest in the ad bit of the upcoming response; if set in response: indicates that the resolver side considers all RRsets in the Answer section and relevant negative response RRs in the Authority section to be authentic.
  • cd: disable signature validation in a security-aware name server’s processing of a particular query

Creates a DnsFlags struct from bitflags as they would appear in the second 16-octet line of a DnsHeader.

Returns a u16 representing bitflags as they would appear in the second 16-octet line of a DnsHeader.

Whether the aa flag is set.

Whether the tc flag is set.

Whether the rd flag is set.

Whether the ra flag is set.

Whether the ad flag is set.

Whether the cd flag is set.

Trait Implementations

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.

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.