Skip to main content

Ipv6MobileRoutingHeader

Struct Ipv6MobileRoutingHeader 

Source
pub struct Ipv6MobileRoutingHeader { /* private fields */ }
Expand description

IPv6 Mobile Routing Header (Routing Header type 2).

Implementations§

Source§

impl Ipv6MobileRoutingHeader

Source

pub fn new() -> Self

Create a mobile routing header.

Source

pub fn next_header(self, next_header: u8) -> Self

Set the next header after this routing header.

Source

pub fn nh(self, next_header: u8) -> Self

Compatibility alias for next header.

Source

pub fn header_ext_len(self, header_ext_len: u8) -> Self

Set the encoded header extension length.

Source

pub fn routing_type(self, routing_type: u8) -> Self

Set the routing type field.

Source

pub fn segments_left(self, segments_left: u8) -> Self

Set the segments-left field.

Source

pub fn segleft(self, segments_left: u8) -> Self

libcrafter-style alias for segments left.

Source

pub fn reserved(self, reserved: u32) -> Self

Set the reserved field.

Source

pub fn home_address(self, home_address: Ipv6Addr) -> Self

Set the home address.

Source

pub fn home(self, home_address: Ipv6Addr) -> Self

libcrafter-style alias for home address.

Source

pub fn home_address_str(self, home_address: &str) -> Result<Self>

Set the home address from text.

Source

pub fn home_str(self, home_address: &str) -> Result<Self>

libcrafter-style alias for textual home address.

Source

pub fn next_header_value(&self) -> u8

Next-header value.

Source

pub fn header_ext_len_value(&self) -> Option<u8>

Header extension length when explicit or decoded.

Source

pub fn effective_header_ext_len_value(&self) -> u8

Header extension length that will be emitted if the header compiles.

Source

pub fn header_ext_len_status(&self) -> Ipv6MobileRoutingHeaderStatus

RFC 6275 status of the header extension length field.

Source

pub fn routing_type_value(&self) -> u8

Routing type.

Source

pub fn routing_type_label(&self) -> &'static str

Routing type label from the IANA IPv6 Routing Types registry.

Source

pub fn routing_type_status(&self) -> Ipv6RoutingTypeStatus

Routing type status from the IANA IPv6 Routing Types registry.

Source

pub fn segments_left_value(&self) -> u8

Segments-left value.

Source

pub fn segments_left_is_defaulted(&self) -> bool

Whether Segments Left is still using the RFC 6275 builder default.

Source

pub fn segments_left_status(&self) -> Ipv6MobileRoutingHeaderStatus

RFC 6275 status of the Segments Left field.

Source

pub fn reserved_value(&self) -> u32

Reserved field.

Source

pub fn reserved_is_zero(&self) -> bool

Whether the reserved field is zero as initialized by RFC 6275 senders.

Source

pub fn reserved_status(&self) -> Ipv6MobileRoutingHeaderStatus

RFC 6275 status of the reserved field.

Source

pub fn home_address_value(&self) -> Ipv6Addr

Home address value.

Source

pub fn home_address_bytes(&self) -> [u8; 16]

Home address field bytes in network order.

Source

pub fn validity_status(&self) -> Ipv6MobileRoutingHeaderStatus

RFC 6275 packet-field status for this Type 2 Routing Header.

Trait Implementations§

Source§

impl Clone for Ipv6MobileRoutingHeader

Source§

fn clone(&self) -> Ipv6MobileRoutingHeader

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Ipv6MobileRoutingHeader

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Ipv6MobileRoutingHeader

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<R> Div<R> for Ipv6MobileRoutingHeader
where R: IntoPacket,

Source§

type Output = Packet

The resulting type after applying the / operator.
Source§

fn div(self, rhs: R) -> Self::Output

Performs the / operation. Read more
Source§

impl Eq for Ipv6MobileRoutingHeader

Source§

impl Layer for Ipv6MobileRoutingHeader

Source§

fn name(&self) -> &'static str

Stable layer name used by summaries and generated tools.
Source§

fn summary(&self) -> String

A one-line layer summary.
Source§

fn inspection_fields(&self) -> Vec<(&'static str, String)>

Stable field/value pairs used by packet inspection output.
Source§

fn encoded_len(&self) -> usize

Encoded length for this layer before dependent auto-fill.
Source§

fn compile(&self, ctx: &LayerContext<'_>, out: &mut Vec<u8>) -> Result<()>

Encode this layer into out.
Source§

fn clone_layer(&self) -> Box<dyn Layer>

Clone this layer behind a trait object.
Source§

fn as_any(&self) -> &dyn Any

Return this layer as Any for typed packet access.
Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Return this layer mutably as Any for typed packet access.
Source§

fn into_any(self: Box<Self>) -> Box<dyn Any>

Convert an owned trait object into Any for downcasting.
Source§

fn encoded_len_with_context(&self, _ctx: &LayerContext<'_>) -> usize

Encoded length for this layer once neighboring-layer context is known. Read more
Source§

fn consumes_following(&self) -> bool

Whether this layer’s compile() emits all following layers itself. Read more
Source§

fn transport_checksum_context( &self, _transport_protocol: u8, ) -> Option<TransportChecksumContext>

Return pseudo-header data for a following transport layer, when present.
Source§

impl PartialEq for Ipv6MobileRoutingHeader

Source§

fn eq(&self, other: &Ipv6MobileRoutingHeader) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Ipv6MobileRoutingHeader

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoPacket for T
where T: Layer,

Source§

fn into_packet(self) -> Packet

Convert this value into a packet.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.