#[repr(u8)]pub enum ProxyV2AddrType {
AfUnspec = 0,
AfInet = 1,
AfInet6 = 2,
AfUnix = 3,
}Expand description
A quote from protocol descr:
other values are unspecified and must not be emitted in version 2 of this protocol and must be rejected as invalid by receivers.
Variants§
AfUnspec = 0
A quote from protocol descr:
the connection is forwarded for an unknown, unspecified or unsupported protocol. The sender should use this family when sending LOCAL commands or when dealing with unsupported protocol families. The receiver is free to accept the connection anyway and use the real endpoint addresses or to reject it. The receiver should ignore address information.
AfInet = 1
A quote from protocol descr:
the forwarded connection uses the AF_INET address family (IPv4). The addresses are exactly 4 bytes each in network byte order, followed by transport protocol information (typically ports).
AfInet6 = 2
A quote from protocol descr:
the forwarded connection uses the AF_INET6 address family (IPv6). The addresses are exactly 16 bytes each in network byte order, followed by transport protocol information (typically ports).
AfUnix = 3
A quote from protocol descr:
the forwarded connection uses the AF_UNIX address family (UNIX). The addresses are exactly 108 bytes each.
Implementations§
Source§impl ProxyV2AddrType
impl ProxyV2AddrType
pub const DEF_IPV4_ADDR_LEN: u16 = 12
pub const DEF_IPV6_ADDR_LEN: u16 = 36
pub const DEF_UNIX_ADDR_LEN: u16 = 216
pub fn get_size_by_addr_family(&self) -> Option<u16>
Trait Implementations§
Source§impl Clone for ProxyV2AddrType
impl Clone for ProxyV2AddrType
Source§fn clone(&self) -> ProxyV2AddrType
fn clone(&self) -> ProxyV2AddrType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ProxyV2AddrType
Source§impl Debug for ProxyV2AddrType
impl Debug for ProxyV2AddrType
impl Eq for ProxyV2AddrType
Source§impl From<ProxyV2AddrType> for u8
impl From<ProxyV2AddrType> for u8
Source§fn from(value: ProxyV2AddrType) -> Self
fn from(value: ProxyV2AddrType) -> Self
Source§impl PartialEq for ProxyV2AddrType
impl PartialEq for ProxyV2AddrType
Source§fn eq(&self, other: &ProxyV2AddrType) -> bool
fn eq(&self, other: &ProxyV2AddrType) -> bool
self and other values to be equal, and is used by ==.