pub enum Rcode {
NoError,
FormErr,
ServFail,
NXDomain,
NotImp,
Refused,
YXDomain,
YXRRSet,
NXRRSet,
NotAuth,
NotZone,
Int(u8),
}
Expand description
DNS Response Codes.
The response code of a response indicates what happend on the server when trying to answer the query. The code is a 4 bit value and part of the header of a DNS message.
This response was defined as part of RFC 1035. Later, RFC 2671 defined an extended response code of 12 bits using the lower four bits from the header and eight additional bits stored in the OPT pseudo-record. The type OptRcode represents this extended response code. A third response code, now 16 bit wide, was defined for the transaction authentication mechansim (TSIG) in [RFC 2845] and is represented by TsigRcode.
All three codes share the same name space. Their values are defined in one registry, IANA DNS RCODEs. This type is complete as of 2019-01-28.
Variants§
NoError
FormErr
ServFail
Server failure.
The name server was unable to process this query due to a problem with the name server.
Defined in RFC 1035.
NXDomain
Name error.
The domain name given in the query does not exist at the name server.
Defined in RFC 1035.
NotImp
Refused
Query refused.
The name server refused to perform the operation requested by the query for policy reasons.
Defined in RFC 1035.
YXDomain
Name exists when it should not.
Returned for an UPDATE query when a domain requested to not exist does in fact exist.
Returned when resolving a DNAME redirection when the resulting name exceeds the length of 255 octets.
Defined in RFC 2136 for the UPDATE query and RFC 6672 for DNAME redirection.
YXRRSet
RR set exists when it should not.
Returned for an UPDATE query when an RRset requested to not exist does in fact exist.
Defined in RFC 2136.
NXRRSet
RR set that should exist does not.
Returned for an UPDATE query when an RRset requested to exist does not.
Defined in RFC 2136.
NotAuth
Server not authoritative for zone or client not authorized.
Returned for an UPDATE query when the server is not an authoritative name server for the requested domain.
Returned for queries using TSIG when authorisation failed.
NotZone
Name not contained in zone.
A name used in the prerequisite or update section is not within the zone given in the zone section.
Defined in RFC 2136.
Int(u8)
A raw, integer rcode value.
When converting to an u8
, only the lower four bits are used.
Implementations§
Trait Implementations§
source§impl Ord for Rcode
impl Ord for Rcode
source§impl PartialOrd<Rcode> for u8
impl PartialOrd<Rcode> for u8
source§impl PartialOrd<u8> for Rcode
impl PartialOrd<u8> for Rcode
source§impl PartialOrd for Rcode
impl PartialOrd for Rcode
impl Copy for Rcode
impl Eq for Rcode
Auto Trait Implementations§
impl Freeze for Rcode
impl RefUnwindSafe for Rcode
impl Send for Rcode
impl Sync for Rcode
impl Unpin for Rcode
impl UnwindSafe for Rcode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)