packet_formats::ipv6

Trait Ipv6Header

Source
pub trait Ipv6Header {
    // Required method
    fn get_fixed_header(&self) -> &FixedHeader;

    // Provided methods
    fn hop_limit(&self) -> u8 { ... }
    fn next_header(&self) -> u8 { ... }
    fn src_ip(&self) -> Ipv6Addr { ... }
    fn dst_ip(&self) -> Ipv6Addr { ... }
    fn dscp_and_ecn(&self) -> DscpAndEcn { ... }
}
Expand description

Provides common access to IPv6 header fields.

Ipv6Header provides access to IPv6 header fields as a common implementation for both Ipv6Packet and Ipv6PacketRaw.

Required Methods§

Source

fn get_fixed_header(&self) -> &FixedHeader

Gets a reference to the IPv6 FixedHeader.

Provided Methods§

Source

fn hop_limit(&self) -> u8

The Hop Limit.

Source

fn next_header(&self) -> u8

The Next Header.

Source

fn src_ip(&self) -> Ipv6Addr

The source IP address.

Source

fn dst_ip(&self) -> Ipv6Addr

The destination IP address.

Source

fn dscp_and_ecn(&self) -> DscpAndEcn

The Differentiated Services Code Point (DSCP) and the Explicit Congestion Notification (ECN).

Implementors§

Source§

impl<B: SplitByteSlice> Ipv6Header for Ipv6Packet<B>

Source§

impl<B: SplitByteSlice> Ipv6Header for Ipv6PacketRaw<B>