pub struct TsigRcode(/* private fields */);
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.
Implementations§
source§impl TsigRcode
impl TsigRcode
sourcepub const SERVFAIL: TsigRcode = _
pub const SERVFAIL: TsigRcode = _
Server failure.
The name server was unable to process this query due to a problem with the name server.
Defined in RFC 1035.
sourcepub const NXDOMAIN: TsigRcode = _
pub const NXDOMAIN: TsigRcode = _
Name error.
The domain name given in the query does not exist at the name server.
Defined in RFC 1035.
sourcepub const REFUSED: TsigRcode = _
pub const REFUSED: TsigRcode = _
Query refused.
The name server refused to perform the operation requested by the query for policy reasons.
Defined in RFC 1035.
sourcepub const YXRRSET: TsigRcode = _
pub const YXRRSET: TsigRcode = _
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.
sourcepub const NXRRSET: TsigRcode = _
pub const NXRRSET: TsigRcode = _
RR set that should exist does not.
Returned for an UPDATE query when an RRset requested to exist does not.
Defined in RFC 2136.
sourcepub const NOTZONE: TsigRcode = _
pub const NOTZONE: TsigRcode = _
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.
sourcepub const BADKEY: TsigRcode = _
pub const BADKEY: TsigRcode = _
Key not recognized.
The server did not recognize the key used for generating the signature.
Defined in RFC 2845.
sourcepub const BADTIME: TsigRcode = _
pub const BADTIME: TsigRcode = _
Signature out of time window.
The server time was outside the time interval specified by the request.
Defined in RFC 2845.
sourcepub const BADMODE: TsigRcode = _
pub const BADMODE: TsigRcode = _
Bad TKEY mode.
The mode field in a TKEY resource record contained a mode not supported by the server.
Defined in RFC 2930.
sourcepub const BADNAME: TsigRcode = _
pub const BADNAME: TsigRcode = _
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.
sourcepub const BADALG: TsigRcode = _
pub const BADALG: TsigRcode = _
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.
source§impl TsigRcode
impl TsigRcode
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.
pub fn parse<'a, Octs: AsRef<[u8]> + ?Sized>( parser: &mut Parser<'a, Octs>, ) -> Result<Self, ParseError>
pub const COMPOSE_LEN: u16 = 2u16
pub fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Trait Implementations§
source§impl Ord for TsigRcode
impl Ord for TsigRcode
source§impl PartialOrd for TsigRcode
impl PartialOrd for TsigRcode
impl Copy for TsigRcode
impl Eq for TsigRcode
impl StructuralPartialEq for TsigRcode
Auto Trait Implementations§
impl Freeze for TsigRcode
impl RefUnwindSafe for TsigRcode
impl Send for TsigRcode
impl Sync for TsigRcode
impl Unpin for TsigRcode
impl UnwindSafe for TsigRcode
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)