#[repr(u8)]pub enum LayerKind {
Show 36 variants
Ethernet = 0,
Dot3 = 1,
Arp = 2,
Ipv4 = 3,
Ipv6 = 4,
Icmp = 5,
Icmpv6 = 6,
Tcp = 7,
Udp = 8,
Dns = 9,
Dot1Q = 10,
Dot1AD = 11,
Dot1AH = 12,
LLC = 13,
SNAP = 14,
Ssh = 15,
Tls = 16,
Dot15d4 = 17,
Dot15d4Fcs = 18,
Dot11 = 19,
Http = 20,
Quic = 21,
Generic = 22,
Http2 = 23,
L2tp = 24,
Mqtt = 25,
MqttSn = 26,
Modbus = 27,
ZWave = 28,
Ftp = 29,
Tftp = 30,
Smtp = 31,
Pop3 = 32,
Imap = 33,
Dhcp = 34,
Raw = 255,
}Expand description
Identifies the type of network protocol layer.
Variants§
Ethernet = 0
Dot3 = 1
Arp = 2
Ipv4 = 3
Ipv6 = 4
Icmp = 5
Icmpv6 = 6
Tcp = 7
Udp = 8
Dns = 9
Dot1Q = 10
Dot1AD = 11
Dot1AH = 12
LLC = 13
SNAP = 14
Ssh = 15
Tls = 16
Dot15d4 = 17
Dot15d4Fcs = 18
Dot11 = 19
Http = 20
Quic = 21
Generic = 22
Http2 = 23
L2tp = 24
Mqtt = 25
MqttSn = 26
Modbus = 27
ZWave = 28
Ftp = 29
Tftp = 30
Smtp = 31
Pop3 = 32
Imap = 33
Dhcp = 34
Raw = 255
Implementations§
Source§impl LayerKind
impl LayerKind
pub const fn name(&self) -> &'static str
pub const fn min_header_size(&self) -> usize
Sourcepub const fn is_link_layer(&self) -> bool
pub const fn is_link_layer(&self) -> bool
Check if this is a link layer protocol
Sourcepub const fn is_network_layer(&self) -> bool
pub const fn is_network_layer(&self) -> bool
Check if this is a network layer protocol
Sourcepub const fn is_transport_layer(&self) -> bool
pub const fn is_transport_layer(&self) -> bool
Check if this is a transport layer protocol
Trait Implementations§
impl Copy for LayerKind
impl Eq for LayerKind
impl StructuralPartialEq for LayerKind
Auto Trait Implementations§
impl Freeze for LayerKind
impl RefUnwindSafe for LayerKind
impl Send for LayerKind
impl Sync for LayerKind
impl Unpin for LayerKind
impl UnsafeUnpin for LayerKind
impl UnwindSafe for LayerKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more