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]

[src]

Imbue a raw octet buffer with Ethernet frame structure.

[src]

Shorthand for a combination of new and check_len.

[src]

Ensure that no accessor method will panic if called. Returns Err(Error::Truncated) if the buffer is too short.

[src]

Consumes the frame, returning the underlying buffer.

[src]

Return the length of a frame header.

[src]

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

[src]

Return the destination address field.

[src]

Return the source address field.

[src]

Return the EtherType field, without checking for 802.1Q.

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

[src]

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

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

[src]

Set the destination address field.

[src]

Set the source address field.

[src]

Set the EtherType field.

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

[src]

Return a mutable pointer to the payload.

Trait Implementations

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

[src]

Formats the value using the given formatter.

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

[src]

Formats the value using the given formatter. Read more

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

[src]

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