Struct pnet::packet::ipv6::Ipv6Packet
[−]
pub struct Ipv6Packet<'p> {
// some fields omitted
}A structure enabling manipulation of on the wire packets
Methods
impl<'a> Ipv6Packet<'a>
fn new<'p>(packet: &'p [u8]) -> Option<Ipv6Packet<'p>>
Constructs a new Ipv6Packet. If the provided buffer is less than the minimum required packet size, this will return None.
fn to_immutable<'p>(&'p self) -> Ipv6Packet<'p>
Maps from a Ipv6Packet to a Ipv6Packet
fn minimum_packet_size() -> usize
The minimum size (in bytes) a packet of this type can be. It's based on the total size of the fixed-size fields.
fn packet_size(_packet: &Ipv6) -> usize
The size (in bytes) of a Ipv6 instance when converted into a byte-array
fn get_version(&self) -> u4
Get the version field
fn get_traffic_class(&self) -> u8
Get the traffic_class field
fn get_flow_label(&self) -> u20be
Get the flow_label field
fn get_payload_length(&self) -> u16be
Get the payload_length field
fn get_next_header(&self) -> IpNextHeaderProtocol
Get the value of the next_header field
fn get_hop_limit(&self) -> u8
Get the hop_limit field
fn get_source(&self) -> Ipv6Addr
Get the value of the source field
fn get_destination(&self) -> Ipv6Addr
Get the value of the destination field