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]

[src]

Imbue a raw octet buffer with ARP packet 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.

The result of this check is invalidated by calling set_hardware_len or set_protocol_len.

[src]

Consume the packet, returning the underlying buffer.

[src]

Return the hardware type field.

[src]

Return the protocol type field.

[src]

Return the hardware length field.

[src]

Return the protocol length field.

[src]

Return the operation field.

[src]

Return the source hardware address field.

[src]

Return the source protocol address field.

[src]

Return the target hardware address field.

[src]

Return the target protocol address field.

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

[src]

Set the hardware type field.

[src]

Set the protocol type field.

[src]

Set the hardware length field.

[src]

Set the protocol length field.

[src]

Set the operation field.

[src]

Set the source hardware address field.

Panics

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

[src]

Set the source protocol address field.

Panics

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

[src]

Set the target hardware address field.

Panics

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

[src]

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]

[src]

Formats the value using the given formatter.

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

[src]

Formats the value using the given formatter. Read more

impl<T: AsRef<[u8]>> PrettyPrint for Packet<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