pub enum ExtendedErrorCode {
Show 26 variants
Other,
UnsupportedDnskeyAlgorithm,
UnsupportedDsDigestType,
StaleAnswer,
ForgedAnswer,
DnssecIndeterminate,
DnssecBogus,
SignatureExpired,
SignatureNotYetValid,
DnskeyMissing,
RrsigsMissing,
NoZoneKeyBitSet,
NsecMissing,
CachedError,
NotReady,
Blocked,
Censored,
Filtered,
Prohibited,
StaleNxdomainAnswer,
NotAuthoritative,
NotSupported,
NoReachableAuthority,
NetworkError,
InvalidData,
Int(u16),
}
Expand description
Extended DNS error codes.
A complementary data can be put in EDNS opt, providing additional information about the cause of DNS errors. Defined in RFC 8914. Current registered values can be found in IANA registry.
Variants
Other
The error in question falls into a category that does not match known extended error codes. Implementations SHOULD include an EXTRA-TEXT value to augment this error code with additional information.
UnsupportedDnskeyAlgorithm
The resolver attempted to perform DNSSEC validation, but a DNSKEY RRset contained only unsupported DNSSEC algorithms.
UnsupportedDsDigestType
The resolver attempted to perform DNSSEC validation, but a DS RRset contained only unsupported Digest Types.
StaleAnswer
The resolver was unable to resolve the answer within its time limits and decided to answer with previously cached data instead of answering with an error. This is typically caused by problems communicating with an authoritative server, possibly as result of a denial of service (DoS) attack against another network. (See also Code 19.)
ForgedAnswer
For policy reasons (legal obligation or malware filtering, for instance), an answer was forged. Note that this should be used when an answer is still provided, not when failure codes are returned instead. See Blocked (15), Censored (16), and Filtered (17) for use when returning other response codes.
DnssecIndeterminate
The resolver attempted to perform DNSSEC validation, but validation ended in the Indeterminate state RFC 4035.
DnssecBogus
The resolver attempted to perform DNSSEC validation, but validation ended in the Bogus state.
SignatureExpired
The resolver attempted to perform DNSSEC validation, but no signatures are presently valid and some (often all) are expired.
SignatureNotYetValid
The resolver attempted to perform DNSSEC validation, but no signatures are presently valid and at least some are not yet valid.
DnskeyMissing
A DS record existed at a parent, but no supported matching DNSKEY record could be found for the child.
RrsigsMissing
The resolver attempted to perform DNSSEC validation, but no RRSIGs could be found for at least one RRset where RRSIGs were expected.
NoZoneKeyBitSet
The resolver attempted to perform DNSSEC validation, but no Zone Key Bit was set in a DNSKEY.
NsecMissing
The resolver attempted to perform DNSSEC validation, but the requested data was missing and a covering NSEC or NSEC3 was not provided.
CachedError
The resolver is returning the SERVFAIL RCODE from its cache.
NotReady
The server is unable to answer the query, as it was not fully functional when the query was received.
Blocked
The server is unable to respond to the request because the domain is on a blocklist due to an internal security policy imposed by the operator of the server resolving or forwarding the query.
Censored
The server is unable to respond to the request because the domain is on a blocklist due to an external requirement imposed by an entity other than the operator of the server resolving or forwarding the query. Note that how the imposed policy is applied is irrelevant (in-band DNS filtering, court order, etc.).
Filtered
The server is unable to respond to the request because the domain is on a blocklist as requested by the client. Functionally, this amounts to “you requested that we filter domains like this one.”
Prohibited
An authoritative server or recursive resolver that receives a query from an “unauthorized” client can annotate its REFUSED message with this code. Examples of “unauthorized” clients are recursive queries from IP addresses outside the network, blocklisted IP addresses, local policy, etc.
StaleNxdomainAnswer
The resolver was unable to resolve an answer within its configured time limits and decided to answer with a previously cached NXDOMAIN answer instead of answering with an error. This may be caused, for example, by problems communicating with an authoritative server, possibly as result of a denial of service (DoS) attack against another network. (See also Code 3.)
NotAuthoritative
An authoritative server that receives a query with the Recursion Desired (RD) bit clear, or when it is not configured for recursion for a domain for which it is not authoritative, SHOULD include this EDE code in the REFUSED response. A resolver that receives a query with the RD bit clear SHOULD include this EDE code in the REFUSED response.
NotSupported
The requested operation or query is not supported.
NoReachableAuthority
The resolver could not reach any of the authoritative name servers (or they potentially refused to reply).
NetworkError
An unrecoverable error occurred while communicating with another server.
InvalidData
The authoritative server cannot answer with data for a zone it is otherwise configured to support. Examples of this include its most recent zone being too old or having expired.
Int(u16)
A raw value given through its integer.
Implementations
sourceimpl ExtendedErrorCode
impl ExtendedErrorCode
sourcepub fn from_mnemonic(m: &[u8]) -> Option<Self>
pub fn from_mnemonic(m: &[u8]) -> Option<Self>
Returns a value from a well-defined mnemonic.
sourcepub const fn to_mnemonic(self) -> Option<&'static [u8]>
pub const fn to_mnemonic(self) -> Option<&'static [u8]>
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
sourceimpl Clone for ExtendedErrorCode
impl Clone for ExtendedErrorCode
sourcefn clone(&self) -> ExtendedErrorCode
fn clone(&self) -> ExtendedErrorCode
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Compose for ExtendedErrorCode
impl Compose for ExtendedErrorCode
sourcefn compose<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the concrete representation of the value to the target. Read more
sourcefn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the canonical representation of the value to the target. Read more
sourceimpl Debug for ExtendedErrorCode
impl Debug for ExtendedErrorCode
sourceimpl Display for ExtendedErrorCode
impl Display for ExtendedErrorCode
sourceimpl<'a> From<&'a ExtendedErrorCode> for u16
impl<'a> From<&'a ExtendedErrorCode> for u16
sourcefn from(value: &'a ExtendedErrorCode) -> Self
fn from(value: &'a ExtendedErrorCode) -> Self
Converts to this type from the input type.
sourceimpl<Octets> From<ExtendedErrorCode> for ExtendedError<Octets>
impl<Octets> From<ExtendedErrorCode> for ExtendedError<Octets>
sourcefn from(code: ExtendedErrorCode) -> Self
fn from(code: ExtendedErrorCode) -> Self
Converts to this type from the input type.
sourceimpl From<ExtendedErrorCode> for u16
impl From<ExtendedErrorCode> for u16
sourcefn from(value: ExtendedErrorCode) -> Self
fn from(value: ExtendedErrorCode) -> Self
Converts to this type from the input type.
sourceimpl From<u16> for ExtendedErrorCode
impl From<u16> for ExtendedErrorCode
sourceimpl Hash for ExtendedErrorCode
impl Hash for ExtendedErrorCode
sourceimpl Ord for ExtendedErrorCode
impl Ord for ExtendedErrorCode
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<Ref: AsRef<[u8]>> Parse<Ref> for ExtendedErrorCode
impl<Ref: AsRef<[u8]>> Parse<Ref> for ExtendedErrorCode
sourceimpl PartialEq<ExtendedErrorCode> for ExtendedErrorCode
impl PartialEq<ExtendedErrorCode> for ExtendedErrorCode
sourceimpl PartialEq<ExtendedErrorCode> for u16
impl PartialEq<ExtendedErrorCode> for u16
sourcefn eq(&self, other: &ExtendedErrorCode) -> bool
fn eq(&self, other: &ExtendedErrorCode) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialEq<u16> for ExtendedErrorCode
impl PartialEq<u16> for ExtendedErrorCode
sourceimpl PartialOrd<ExtendedErrorCode> for ExtendedErrorCode
impl PartialOrd<ExtendedErrorCode> for ExtendedErrorCode
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<ExtendedErrorCode> for u16
impl PartialOrd<ExtendedErrorCode> for u16
sourcefn partial_cmp(&self, other: &ExtendedErrorCode) -> Option<Ordering>
fn partial_cmp(&self, other: &ExtendedErrorCode) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<u16> for ExtendedErrorCode
impl PartialOrd<u16> for ExtendedErrorCode
sourcefn partial_cmp(&self, other: &u16) -> Option<Ordering>
fn partial_cmp(&self, other: &u16) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for ExtendedErrorCode
impl Eq for ExtendedErrorCode
Auto Trait Implementations
impl RefUnwindSafe for ExtendedErrorCode
impl Send for ExtendedErrorCode
impl Sync for ExtendedErrorCode
impl Unpin for ExtendedErrorCode
impl UnwindSafe for ExtendedErrorCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
sourcefn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.