Struct cross_socket::packet::ipv6::Ipv6Packet
source · pub struct Ipv6Packet {
pub version: u8,
pub traffic_class: u8,
pub flow_label: u32,
pub payload_length: u16,
pub next_protocol: IpNextLevelProtocol,
pub hop_limit: u8,
pub source: Ipv6Addr,
pub destination: Ipv6Addr,
pub payload: Vec<u8>,
}Expand description
Represents the IPv6 options.
Fields§
§version: u8IP Version
traffic_class: u8Traffic Class
flow_label: u32Flow Label
payload_length: u16Payload Length
next_protocol: IpNextLevelProtocolNext level protocol
hop_limit: u8Hop Limit
source: Ipv6AddrSource IPv6 Address
destination: Ipv6AddrDestination IPv6 Address
payload: Vec<u8>Payload. Next level protocol packet.
Implementations§
source§impl Ipv6Packet
impl Ipv6Packet
sourcepub fn from_bytes(packet: &[u8]) -> Ipv6Packet
pub fn from_bytes(packet: &[u8]) -> Ipv6Packet
Constructs a new Ipv6Packet from bytes
Trait Implementations§
source§impl Clone for Ipv6Packet
impl Clone for Ipv6Packet
source§fn clone(&self) -> Ipv6Packet
fn clone(&self) -> Ipv6Packet
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for Ipv6Packet
impl Debug for Ipv6Packet
source§impl PartialEq for Ipv6Packet
impl PartialEq for Ipv6Packet
source§fn eq(&self, other: &Ipv6Packet) -> bool
fn eq(&self, other: &Ipv6Packet) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for Ipv6Packet
Auto Trait Implementations§
impl RefUnwindSafe for Ipv6Packet
impl Send for Ipv6Packet
impl Sync for Ipv6Packet
impl Unpin for Ipv6Packet
impl UnwindSafe for Ipv6Packet
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