#[repr(u8)]pub enum Protocol {
Unspecified = 0,
Stream = 1,
Dgram = 2,
}
Expand description
The transport protocol.
Variants§
Unspecified = 0
The connection is forwarded for an unknown, unspecified or unsupported protocol. The sender should use this protocol when sending LOCAL commands or when dealing with unsupported protocols. The receiver is free to accept the connection anyway and use the real endpoint addresses or to reject it.
Stream = 1
The forwarded connection uses a SOCK_STREAM
protocol (eg: TCP or
UNIX_STREAM
). When used with AF_INET/AF_INET6
(TCP), the addresses
are followed by the source and destination ports represented on 2
bytes each in network byte order.
Dgram = 2
The forwarded connection uses a SOCK_DGRAM
protocol (eg: UDP or
UNIX_DGRAM
). When used with AF_INET/AF_INET6
(UDP), the addresses
are followed by the source and destination ports represented on 2
bytes each in network byte order.