#[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 = 12u16
pub const DEF_IPV6_ADDR_LEN: u16 = 36u16
pub const DEF_UNIX_ADDR_LEN: u16 = 216u16
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more