Struct t2plugin::nethdr::Ip6Header

source ·
#[repr(C, packed)]
pub struct Ip6Header { pub hop_limit: u8, /* private fields */ }
Expand description

Fields§

§hop_limit: u8

Hop limit, equivalent of IPv4 TTL.

Implementations§

source§

impl Ip6Header

source

pub fn version(&self) -> u8

IP version. Must always be 6.

source

pub fn traffic_class(&self) -> u8

IPv6 traffic class: service class + ECN bits

source

pub fn flow_label(&self) -> u32

IPv6 flow label

source

pub fn payload_len(&self) -> u16

Length of the payload in bytes, starting at the end of this IPv6 header (including extension headers).

source

pub fn next_hdr(&self) -> L4Type

Type of the header following the IPv6 header as defined in L4Type.

source

pub fn src_ip(&self) -> Ipv6Addr

IPv6 source address

source

pub fn dst_ip(&self) -> Ipv6Addr

IPv6 destination address

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.