Enum smoltcp::wire::Icmpv6Repr[][src]

#[non_exhaustive]pub enum Icmpv6Repr<'a> {
    DstUnreachable {
        reason: DstUnreachable,
        header: Ipv6Repr,
        data: &'a [u8],
    },
    PktTooBig {
        mtu: u32,
        header: Ipv6Repr,
        data: &'a [u8],
    },
    TimeExceeded {
        reason: TimeExceeded,
        header: Ipv6Repr,
        data: &'a [u8],
    },
    ParamProblem {
        reason: ParamProblem,
        pointer: u32,
        header: Ipv6Repr,
        data: &'a [u8],
    },
    EchoRequest {
        ident: u16,
        seq_no: u16,
        data: &'a [u8],
    },
    EchoReply {
        ident: u16,
        seq_no: u16,
        data: &'a [u8],
    },
    Ndisc(NdiscRepr<'a>),
    Mld(MldRepr<'a>),
}

A high-level representation of an Internet Control Message Protocol version 6 packet header.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DstUnreachable

Fields of DstUnreachable

reason: DstUnreachableheader: Ipv6Reprdata: &'a [u8]
PktTooBig

Fields of PktTooBig

mtu: u32header: Ipv6Reprdata: &'a [u8]
TimeExceeded

Fields of TimeExceeded

reason: TimeExceededheader: Ipv6Reprdata: &'a [u8]
ParamProblem

Fields of ParamProblem

reason: ParamProblempointer: u32header: Ipv6Reprdata: &'a [u8]
EchoRequest

Fields of EchoRequest

ident: u16seq_no: u16data: &'a [u8]
EchoReply

Fields of EchoReply

ident: u16seq_no: u16data: &'a [u8]
Ndisc(NdiscRepr<'a>)
Mld(MldRepr<'a>)

Implementations

impl<'a> Repr<'a>[src]

pub fn parse<T: ?Sized>(
    src_addr: &IpAddress,
    dst_addr: &IpAddress,
    packet: &Packet<&'a T>,
    checksum_caps: &ChecksumCapabilities
) -> Result<Repr<'a>> where
    T: AsRef<[u8]>, 
[src]

Parse an Internet Control Message Protocol version 6 packet and return a high-level representation.

pub fn buffer_len(&self) -> usize[src]

Return the length of a packet that will be emitted from this high-level representation.

pub fn emit<T: ?Sized>(
    &self,
    src_addr: &IpAddress,
    dst_addr: &IpAddress,
    packet: &mut Packet<&mut T>,
    checksum_caps: &ChecksumCapabilities
) where
    T: AsRef<[u8]> + AsMut<[u8]>, 
[src]

Emit a high-level representation into an Internet Control Message Protocol version 6 packet.

Trait Implementations

impl<'a> Clone for Repr<'a>[src]

impl<'a> Copy for Repr<'a>[src]

impl<'a> Debug for Repr<'a>[src]

impl<'a> Eq for Repr<'a>[src]

impl<'a> From<Repr<'a>> for Repr<'a>[src]

impl<'a> PartialEq<Repr<'a>> for Repr<'a>[src]

impl<'a> StructuralEq for Repr<'a>[src]

impl<'a> StructuralPartialEq for Repr<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Repr<'a>

impl<'a> Send for Repr<'a>

impl<'a> Sync for Repr<'a>

impl<'a> Unpin for Repr<'a>

impl<'a> UnwindSafe for Repr<'a>

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.