pub enum ReadError {
    IoError(Error),
    VlanDoubleTaggingUnexpectedOuterTpid(u16),
    IpUnsupportedVersion(u8),
    Ipv4UnexpectedVersion(u8),
    Ipv4HeaderLengthBad(u8),
    Ipv6UnexpectedVersion(u8),
    Ipv6TooManyHeaderExtensions,
    TcpDataOffsetTooSmall(u8),
}
Expand description

Errors that can occur when reading.

Variants§

§

IoError(Error)

§

VlanDoubleTaggingUnexpectedOuterTpid(u16)

Error when a double vlan tag was expected but the tpid of the outer vlan does not contain the expected id of 0x8100.

§

IpUnsupportedVersion(u8)

Error when the ip header version is not supported (only 4 & 6 are supported). The value is the version that was received.

§

Ipv4UnexpectedVersion(u8)

Error when the ip header version field is not equal 4. The value is the version that was received.

§

Ipv4HeaderLengthBad(u8)

Error when the ipv4 header length is smaller then the header itself (5).

§

Ipv6UnexpectedVersion(u8)

Error when then ip header version field is not equal 6. The value is the version that was received.

§

Ipv6TooManyHeaderExtensions

Error when more then 7 header extensions are present (according to RFC82000 this should never happen).

§

TcpDataOffsetTooSmall(u8)

Error given if the data_offset field in a TCP header is smaller then the minimum size of the tcp header itself.

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.