pub struct StandardServerCookie(_);
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<StandardServerCookie> for StandardServerCookie
impl PartialEq<StandardServerCookie> for StandardServerCookie
source§fn eq(&self, other: &StandardServerCookie) -> bool
fn eq(&self, other: &StandardServerCookie) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<StandardServerCookie> for StandardServerCookie
impl PartialOrd<StandardServerCookie> for StandardServerCookie
source§fn partial_cmp(&self, other: &StandardServerCookie) -> Option<Ordering>
fn partial_cmp(&self, other: &StandardServerCookie) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more