Struct smoltcp::wire::ArpPacket [] [src]

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

A read/write wrapper around an Address Resolution Protocol packet buffer.

Methods

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

Wrap a buffer with an ARP packet. Returns an error if the buffer is too small to contain one.

Consumes the packet, returning the underlying buffer.

Return the hardware type field.

Return the protocol type field.

Return the hardware length field.

Return the protocol length field.

Return the operation field.

Return the source hardware address field.

Return the source protocol address field.

Return the target hardware address field.

Return the target protocol address field.

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

Set the hardware type field.

Set the protocol type field.

Set the hardware length field.

Set the protocol length field.

Set the operation field.

Set the source hardware address field.

Panics

The function panics if value is not self.hardware_len() long.

Set the source protocol address field.

Panics

The function panics if value is not self.protocol_len() long.

Set the target hardware address field.

Panics

The function panics if value is not self.hardware_len() long.

Set the target protocol address field.

Panics

The function panics if value is not self.protocol_len() long.

Trait Implementations

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

Formats the value using the given formatter.

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

Formats the value using the given formatter.

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

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