Struct capsules_extra::net::ipv6::IP6Header
source · #[repr(C, packed(1))]pub struct IP6Header {
pub version_class_flow: [u8; 4],
pub payload_len: u16,
pub next_header: u8,
pub hop_limit: u8,
pub src_addr: IPAddr,
pub dst_addr: IPAddr,
}
Expand description
This is the struct definition for an IPv6 header. It contains (in order) the same fields as a normal IPv6 header.
Fields§
§version_class_flow: [u8; 4]
§payload_len: u16
§next_header: u8
§hop_limit: u8
§src_addr: IPAddr
§dst_addr: IPAddr
Implementations§
source§impl IP6Header
impl IP6Header
sourcepub fn new() -> IP6Header
pub fn new() -> IP6Header
This function returns an IP6Header struct initialized to the default values.
pub fn get_src_addr(&self) -> IPAddr
pub fn get_dst_addr(&self) -> IPAddr
pub fn get_version(&self) -> u8
pub fn get_traffic_class(&self) -> u8
pub fn set_traffic_class(&mut self, new_tc: u8)
pub fn get_dscp(&self) -> u8
pub fn set_dscp(&mut self, new_dscp: u8)
pub fn get_ecn(&self) -> u8
pub fn set_ecn(&mut self, new_ecn: u8)
pub fn get_flow_label(&self) -> u32
pub fn set_flow_label(&mut self, new_fl_val: u32)
pub fn get_payload_len(&self) -> u16
pub fn get_total_len(&self) -> u16
pub fn set_payload_len(&mut self, new_len: u16)
pub fn get_next_header(&self) -> u8
pub fn set_next_header(&mut self, new_nh: u8)
pub fn get_hop_limit(&self) -> u8
pub fn set_hop_limit(&mut self, new_hl: u8)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IP6Header
impl RefUnwindSafe for IP6Header
impl Send for IP6Header
impl Sync for IP6Header
impl Unpin for IP6Header
impl UnwindSafe for IP6Header
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)