Struct smoltcp::wire::EthernetFrame [] [src]

pub struct EthernetFrame<T: AsRef<[u8]>> { /* fields omitted */ }

A read/write wrapper around an Ethernet II frame buffer.

Methods

impl<T: AsRef<[u8]>> Frame<T>
[src]

Wrap a buffer with an Ethernet frame. Returns an error if the buffer is too small or too large to contain one.

Consumes the frame, returning the underlying buffer.

Return the length of a buffer required to hold a packet with the payload of a given length.

Return the destination address field.

Return the source address field.

Return the EtherType field, without checking for 802.1Q.

impl<'a, T: AsRef<[u8]> + ?Sized> Frame<&'a T>
[src]

Return a pointer to the payload, without checking for 802.1Q.

impl<T: AsRef<[u8]> + AsMut<[u8]>> Frame<T>
[src]

Set the destination address field.

Set the source address field.

Set the EtherType field.

impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Frame<&'a mut T>
[src]

Return a mutable pointer to the payload.

Trait Implementations

impl<T: Debug + AsRef<[u8]>> Debug for Frame<T>
[src]

Formats the value using the given formatter.

impl<T: AsRef<[u8]>> Display for Frame<T>
[src]

Formats the value using the given formatter.

impl<T: AsRef<[u8]>> PrettyPrint for Frame<T>
[src]

Write a concise, formatted representation of a packet contained in the provided buffer, and any nested packets it may contain. Read more