[][src]Enum etherparse::ValueError

pub enum ValueError {
    Ipv4OptionsLengthBad(usize),
    Ipv4PayloadLengthTooLarge(usize),
    Ipv6PayloadLengthTooLarge(usize),
    UdpPayloadLengthTooLarge(usize),
    TcpLengthTooLarge(usize),
    U8TooLarge {
        value: u8,
        max: u8,
        field: ErrorField,
    },
    U16TooLarge {
        value: u16,
        max: u16,
        field: ErrorField,
    },
    U32TooLarge {
        value: u32,
        max: u32,
        field: ErrorField,
    },
}

Errors in the given data

Variants

Ipv4OptionsLengthBad(usize)

Error when the ipv4 options length is too big or not aligned (cannot be bigger then 40 bytes and must be a multiple of 4 bytes).

Ipv4PayloadLengthTooLarge(usize)

Error when a given payload & ipv4 header is bigger then what fits inside an ipv4 total_length field.

Ipv6PayloadLengthTooLarge(usize)

Error when a given payload & ipv6 header block is bigger then what fits inside an ipv6 payload_length field.

UdpPayloadLengthTooLarge(usize)

Error when a given payload is bigger then what fits inside an udp packet Note that a the maximum payload size, as far as udp is conceirned, is max_value(u16) - 8. The 8 is for the size of the udp header itself.

TcpLengthTooLarge(usize)

Error when a given payload + tcp header options is bigger then what fits inside an tcp packet Note that a the maximum size, as far as tcp is conceirned, is max_value(u16) - tcp_header.data_offset()*4. The data_offset is for the size of the udp header itself.

U8TooLarge

Error when a u8 field in a header has a larger value then supported.

Fields of U8TooLarge

value: u8max: u8field: ErrorField
U16TooLarge

Error when a u16 field in a header has a larger value then supported.

Fields of U16TooLarge

value: u16max: u16field: ErrorField
U32TooLarge

Error when a u32 field in a header has a larger value then supported.

Fields of U32TooLarge

value: u32max: u32field: ErrorField

Trait Implementations

impl Eq for ValueError[src]

impl Clone for ValueError[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<ValueError> for ValueError[src]

impl From<ValueError> for WriteError[src]

impl Debug for ValueError[src]

Auto Trait Implementations

impl Send for ValueError

impl Sync for ValueError

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]