Struct smoltcp::wire::Icmpv6Packet

source ·
pub struct Icmpv6Packet<T: AsRef<[u8]>> { /* private fields */ }
Expand description

A read/write wrapper around an Internet Control Message Protocol version 6 packet buffer.

Implementations§

Imbue a raw octet buffer with ICMPv6 packet structure.

Shorthand for a combination of new_unchecked and check_len.

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

Consume the packet, returning the underlying buffer.

Return the message type field.

Return the message code field.

Return the checksum field.

Return the identifier field (for echo request and reply packets).

Return the sequence number field (for echo request and reply packets).

Return the MTU field (for packet too big messages).

Return the pointer field (for parameter problem messages).

Return the header length. The result depends on the value of the message type field.

Validate the header checksum.

Fuzzing

This function always returns true when fuzzing.

Return a pointer to the type-specific data.

Set the message type field.

Set the message code field.

Clear any reserved fields in the message header.

Panics

This function panics if the message type has not been set. See set_msg_type.

Set the identifier field (for echo request and reply packets).

Panics

This function may panic if this packet is not an echo request or reply packet.

Set the sequence number field (for echo request and reply packets).

Panics

This function may panic if this packet is not an echo request or reply packet.

Set the MTU field (for packet too big messages).

Panics

This function may panic if this packet is not an packet too big packet.

Set the pointer field (for parameter problem messages).

Panics

This function may panic if this packet is not a parameter problem message.

Compute and fill in the header checksum.

Return a mutable pointer to the type-specific data.

Getters for the Router Advertisement message header. See RFC 4861 § 4.2.

Return the current hop limit field.

Return the Router Advertisement flags.

Return the router lifetime field.

Return the reachable time field.

Return the retransmit time field.

Common getters for the Neighbor Solicitation, Neighbor Advertisement, and Redirect message types.

Return the target address field.

Getters for the Neighbor Solicitation message header. See RFC 4861 § 4.3.

Return the Neighbor Solicitation flags.

Getters for the Redirect message header. See RFC 4861 § 4.5.

Return the destination address field.

Setters for the Router Advertisement message header. See RFC 4861 § 4.2.

Set the current hop limit field.

Set the Router Advertisement flags.

Set the router lifetime field.

Set the reachable time field.

Set the retransmit time field.

Common setters for the Neighbor Solicitation, Neighbor Advertisement, and Redirect message types.

Set the target address field.

Setters for the Neighbor Solicitation message header. See RFC 4861 § 4.3.

Set the Neighbor Solicitation flags.

Setters for the Redirect message header. See RFC 4861 § 4.5.

Set the destination address field.

Getters for the Multicast Listener Query message header. See RFC 3810 § 5.1.

Return the maximum response code field.

Return the address being queried.

Return the Suppress Router-Side Processing flag.

Return the Querier’s Robustness Variable.

Return the Querier’s Query Interval Code.

Return number of sources.

Getters for the Multicast Listener Report message header. See RFC 3810 § 5.2.

Return the number of Multicast Address Records.

Setters for the Multicast Listener Query message header. See RFC 3810 § 5.1.

Set the maximum response code field.

Set the address being queried.

Set the Suppress Router-Side Processing flag.

Clear the Suppress Router-Side Processing flag.

Set the Querier’s Robustness Variable.

Set the Querier’s Query Interval Code.

Set number of sources.

Setters for the Multicast Listener Report message header. See RFC 3810 § 5.2.

Set the number of Multicast Address Records.

Trait Implementations§

Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.