Enum TsigRcode

Source
pub enum TsigRcode {
Show 20 variants NoError, FormErr, ServFail, NXDomain, NotImp, Refused, YXDomain, YXRRSet, NXRRSet, NotAuth, NotZone, BadSig, BadKey, BadTime, BadMode, BadName, BadAlg, BadTrunc, BadCookie, Int(u16),
}
Expand description

Response codes for transaction authentication (TSIG).

TSIG and TKEY resource records contain a 16 bit wide error field whose values are an extension of the standard DNS Rcode. While it was intended to also share the same space with the extended response codes used by EDNS (see OptRcode), both used the value 16. To allow distinguish between the two uses of this value, we have two separate types.

The values for all three response code types are defined in the IANA DNS RCODEs registry. This type is complete as of 2019-01-28.

Variants§

§

NoError

No error condition.

(Otherwise known as success.)

Defined in RFC 1035.

§

FormErr

Format error.

The name server was unable to interpret the query.

Defined in RFC 1035.

§

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

Not implemented.

The name server does not support the requested kind of query.

Defined in RFC 1035.

§

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.

Defined in RFC 2136 for UPDATE and RFC 2845 for TSIG.

§

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.

§

BadSig

TSIG signature failure.

The TSIG signature fails to verify.

Defined in RFC 2845.

§

BadKey

Key not recognized.

The server did not recognize the key used for generating the signature.

Defined in RFC 2845.

§

BadTime

Signature out of time window.

The server time was outside the time interval specified by the request.

Defined in RFC 2845.

§

BadMode

Bad TKEY mode.

The mode field in a TKEY resource record contained a mode not supported by the server.

Defined in RFC 2930.

§

BadName

Duplicate key name.

In TKEY records, when establishing a new key, the name used already exists at the server or when deleting a key, a key of this name does not exist.

Defined in RFC 2930.

§

BadAlg

Algorithm not supported.

The value is defined in RFC 2930 but never actually explained. Presumably, it will be returned when the algorithm field of a TKEY record contains a value not supported by the server.

§

BadTrunc

Bad truncation.

A TSIG record was received with a MAC too short for the local policy in force.

Defined in RFC 4635.

§

BadCookie

Bad or missing server cookie.

The request contained a COOKIE option either without a server cookie or with a server cookie that did not validate.

Defined in RFC 7873.

§

Int(u16)

A raw, integer rcode value.

When converting to a 12 bit code, the upper four bits are simply ignored.

Implementations§

Source§

impl TsigRcode

Source

pub fn from_int(value: u16) -> TsigRcode

Creates an rcode from an integer.

Source

pub fn to_int(self) -> u16

Returns the integer value for this rcode.

Trait Implementations§

Source§

impl Clone for TsigRcode

Source§

fn clone(&self) -> TsigRcode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TsigRcode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for TsigRcode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<OptRcode> for TsigRcode

Source§

fn from(value: OptRcode) -> TsigRcode

Converts to this type from the input type.
Source§

impl From<Rcode> for TsigRcode

Source§

fn from(value: Rcode) -> TsigRcode

Converts to this type from the input type.
Source§

impl From<TsigRcode> for u16

Source§

fn from(value: TsigRcode) -> u16

Converts to this type from the input type.
Source§

impl From<u16> for TsigRcode

Source§

fn from(value: u16) -> TsigRcode

Converts to this type from the input type.
Source§

impl Copy for TsigRcode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.