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: u8
IP Version
traffic_class: u8
Traffic Class
flow_label: u32
Flow Label
payload_length: u16
Payload Length
next_protocol: IpNextLevelProtocol
Next level protocol
hop_limit: u8
Hop Limit
source: Ipv6Addr
Source IPv6 Address
destination: Ipv6Addr
Destination 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 duplicate 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
impl StructuralPartialEq for Ipv6Packet
Auto Trait Implementations§
impl Freeze for Ipv6Packet
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