pub enum EthernetFrameLengthCheck {
Check,
NoCheck,
}
Expand description
Whether or not an Ethernet frame’s length should be checked during parsing.
When the Check
variant is used, the Ethernet frame will be rejected if its
total length (including header, but excluding the Frame Check Sequence (FCS)
footer) is less than the required minimum of 60 bytes.
Variants§
Check
Check that the Ethernet frame’s total length (including header, but excluding the Frame Check Sequence (FCS) footer) satisfies the required minimum of 60 bytes.
NoCheck
Do not check the Ethernet frame’s total length. The frame will still be rejected if a complete, valid header is not present, but the body may be 0 bytes long.
Trait Implementations§
Source§impl<B: SplitByteSlice> ParsablePacket<B, EthernetFrameLengthCheck> for EthernetFrame<B>
impl<B: SplitByteSlice> ParsablePacket<B, EthernetFrameLengthCheck> for EthernetFrame<B>
Source§fn parse_metadata(&self) -> ParseMetadata
fn parse_metadata(&self) -> ParseMetadata
Gets metadata about this packet required by [
GrowBuffer::undo_parse
]. Read moreSource§fn parse<BV: BufferView<B>>(
buffer: BV,
length_check: EthernetFrameLengthCheck,
) -> ParseResult<Self>
fn parse<BV: BufferView<B>>( buffer: BV, length_check: EthernetFrameLengthCheck, ) -> ParseResult<Self>
Parses a packet from a buffer. Read more
Source§impl PartialEq for EthernetFrameLengthCheck
impl PartialEq for EthernetFrameLengthCheck
impl StructuralPartialEq for EthernetFrameLengthCheck
Auto Trait Implementations§
impl Freeze for EthernetFrameLengthCheck
impl RefUnwindSafe for EthernetFrameLengthCheck
impl Send for EthernetFrameLengthCheck
impl Sync for EthernetFrameLengthCheck
impl Unpin for EthernetFrameLengthCheck
impl UnwindSafe for EthernetFrameLengthCheck
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