#[non_exhaustive]#[repr(i32)]pub enum SockProtocol {
Show 22 variants
Tcp = 6,
Udp = 17,
Raw = 255,
NetlinkRoute = 0,
NetlinkUserSock = 2,
NetlinkSockDiag = 4,
NetlinkNFLOG = 5,
NetlinkSELinux = 7,
NetlinkISCSI = 8,
NetlinkAudit = 9,
NetlinkFIBLookup = 10,
NetlinkNetFilter = 12,
NetlinkSCSITransport = 18,
NetlinkRDMA = 20,
NetlinkIPv6Firewall = 13,
NetlinkDECNetRoutingMessage = 14,
NetlinkKObjectUEvent = 15,
NetlinkGeneric = 16,
NetlinkCrypto = 21,
EthAll = 768,
Icmp = 1,
IcmpV6 = 58,
}
Expand description
Constants used in socket
and socketpair
to specify the protocol to use.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Tcp = 6
TCP protocol (ip(7))
Udp = 17
UDP protocol (ip(7))
Raw = 255
Raw sockets (raw(7))
NetlinkRoute = 0
Receives routing and link updates and may be used to modify the routing tables (both IPv4 and IPv6), IP addresses, link (ref)
NetlinkUserSock = 2
Reserved for user-mode socket protocols (ref)
NetlinkSockDiag = 4
Query information about sockets of various protocol families from the kernel (ref)
NetlinkNFLOG = 5
Netfilter/iptables ULOG. (ref)
NetlinkSELinux = 7
SELinux event notifications. (ref)
NetlinkISCSI = 8
Open-iSCSI (ref)
NetlinkAudit = 9
Auditing (ref)
NetlinkFIBLookup = 10
Access to FIB lookup from user space (ref)
NetlinkNetFilter = 12
Netfilter subsystem (ref)
NetlinkSCSITransport = 18
SCSI Transports (ref)
NetlinkRDMA = 20
Infiniband RDMA (ref)
NetlinkIPv6Firewall = 13
Transport IPv6 packets from netfilter to user space. Used by ip6_queue kernel module. (ref)
NetlinkDECNetRoutingMessage = 14
DECnet routing messages (ref)
NetlinkKObjectUEvent = 15
Kernel messages to user space (ref)
NetlinkGeneric = 16
Generic netlink family for simplified netlink usage. (ref)
NetlinkCrypto = 21
Netlink interface to request information about ciphers registered with the kernel crypto API as well as allow configuration of the kernel crypto API. (ref)
EthAll = 768
Non-DIX type protocol number defined for the Ethernet IEEE 802.3 interface that allows packets of all protocols defined in the interface to be received. (ref)
Icmp = 1
ICMP protocol (icmp(7))
IcmpV6 = 58
ICMPv6 protocol (ICMP over IPv6)
Implementations§
Source§impl SockProtocol
impl SockProtocol
Sourcepub const CanRaw: SockProtocol = SockProtocol::Icmp
pub const CanRaw: SockProtocol = SockProtocol::Icmp
The Controller Area Network raw socket protocol (ref)
Sourcepub const CanBcm: SockProtocol = SockProtocol::NetlinkUserSock
pub const CanBcm: SockProtocol = SockProtocol::NetlinkUserSock
The Controller Area Network broadcast manager protocol (ref)
Trait Implementations§
Source§impl Clone for SockProtocol
impl Clone for SockProtocol
Source§fn clone(&self) -> SockProtocol
fn clone(&self) -> SockProtocol
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more