pub struct StandardServerCookie(/* private fields */);
Expand description
An interoperable server cookie for DNS cookies.
In the original specification, the server cookie was of variable length and rules for its generation were left to the server implementers. This resulted in interoperability problems if servers from multiple vendors were placed behind the same public address. Thus, RFC 9018 defined a standard mechanism of the content and generation of the cookie. This type is such a standard server cookie.
This standard server cookie consists of a 1 octet version number (currently 1), 3 reserved octets that must be zero, a 4 octet timestamp as seconds since the Unix epoch, and 8 octets of hash value.
In version 1, the hash is calculated feeding the SipHash-2-4 that has been
initialized with a server secret the concatenation of client cookie,
version, reserved, timestamp, client IP address. Generatin and checking
the hash is available if the siphasher
feature is enabled.
Implementations§
Trait Implementations§
source§impl Clone for StandardServerCookie
impl Clone for StandardServerCookie
source§fn clone(&self) -> StandardServerCookie
fn clone(&self) -> StandardServerCookie
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StandardServerCookie
impl Debug for StandardServerCookie
source§impl Display for StandardServerCookie
impl Display for StandardServerCookie
source§impl From<StandardServerCookie> for ServerCookie
impl From<StandardServerCookie> for ServerCookie
source§fn from(src: StandardServerCookie) -> Self
fn from(src: StandardServerCookie) -> Self
source§impl Hash for StandardServerCookie
impl Hash for StandardServerCookie
source§impl Ord for StandardServerCookie
impl Ord for StandardServerCookie
source§fn cmp(&self, other: &StandardServerCookie) -> Ordering
fn cmp(&self, other: &StandardServerCookie) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for StandardServerCookie
impl PartialEq for StandardServerCookie
source§impl PartialOrd for StandardServerCookie
impl PartialOrd for StandardServerCookie
impl Copy for StandardServerCookie
impl Eq for StandardServerCookie
impl StructuralPartialEq for StandardServerCookie
Auto Trait Implementations§
impl Freeze for StandardServerCookie
impl RefUnwindSafe for StandardServerCookie
impl Send for StandardServerCookie
impl Sync for StandardServerCookie
impl Unpin for StandardServerCookie
impl UnwindSafe for StandardServerCookie
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
)