Struct hickory_proto::rr::rdata::opt::ClientSubnet
source · pub struct ClientSubnet { /* private fields */ }
Expand description
RFC 7871, Client Subnet, Optional
+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+ 0: | FAMILY | +—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+ 2: | SOURCE PREFIX-LENGTH | SCOPE PREFIX-LENGTH | +—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+ 4: | ADDRESS… / +—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+
o FAMILY, 2 octets, indicates the family of the address contained in the option, using address family codes as assigned by IANA in Address Family Numbers [Address_Family_Numbers]. o SOURCE PREFIX-LENGTH, an unsigned octet representing the leftmost number of significant bits of ADDRESS to be used for the lookup. In responses, it mirrors the same value as in the queries. o SCOPE PREFIX-LENGTH, an unsigned octet representing the leftmost number of significant bits of ADDRESS that the response covers. In queries, it MUST be set to 0. o ADDRESS, variable number of octets, contains either an IPv4 or IPv6 address, depending on FAMILY, which MUST be truncated to the number of bits indicated by the SOURCE PREFIX-LENGTH field, padding with 0 bits to pad to the end of the last octet needed. o A server receiving an ECS option that uses either too few or too many ADDRESS octets, or that has non-zero ADDRESS bits set beyond SOURCE PREFIX-LENGTH, SHOULD return FORMERR to reject the packet, as a signal to the software developer making the request to fix their implementation.
Implementations§
Trait Implementations§
source§impl<'a> BinDecodable<'a> for ClientSubnet
impl<'a> BinDecodable<'a> for ClientSubnet
source§fn read(decoder: &mut BinDecoder<'a>) -> ProtoResult<Self>
fn read(decoder: &mut BinDecoder<'a>) -> ProtoResult<Self>
source§fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
source§impl BinEncodable for ClientSubnet
impl BinEncodable for ClientSubnet
source§fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
source§impl Clone for ClientSubnet
impl Clone for ClientSubnet
source§fn clone(&self) -> ClientSubnet
fn clone(&self) -> ClientSubnet
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ClientSubnet
impl Debug for ClientSubnet
source§impl From<IpNet> for ClientSubnet
impl From<IpNet> for ClientSubnet
source§impl FromStr for ClientSubnet
impl FromStr for ClientSubnet
source§impl Hash for ClientSubnet
impl Hash for ClientSubnet
source§impl PartialEq for ClientSubnet
impl PartialEq for ClientSubnet
source§fn eq(&self, other: &ClientSubnet) -> bool
fn eq(&self, other: &ClientSubnet) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ClientSubnet
impl PartialOrd for ClientSubnet
source§fn partial_cmp(&self, other: &ClientSubnet) -> Option<Ordering>
fn partial_cmp(&self, other: &ClientSubnet) -> 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