pub struct Ipv6PacketBuilder { /* private fields */ }
Expand description
A builder for IPv6 packets.
Implementations§
Source§impl Ipv6PacketBuilder
impl Ipv6PacketBuilder
Sourcepub fn new<S: Into<Ipv6Addr>, D: Into<Ipv6Addr>>(
src_ip: S,
dst_ip: D,
hop_limit: u8,
proto: Ipv6Proto,
) -> Ipv6PacketBuilder
pub fn new<S: Into<Ipv6Addr>, D: Into<Ipv6Addr>>( src_ip: S, dst_ip: D, hop_limit: u8, proto: Ipv6Proto, ) -> Ipv6PacketBuilder
Constructs a new Ipv6PacketBuilder
.
The proto
field encodes the protocol number identifying the upper
layer payload, not the Next Header value of the first extension header
(if one exists).
Sourcepub fn dscp_and_ecn(&mut self, dscp_and_ecn: DscpAndEcn)
pub fn dscp_and_ecn(&mut self, dscp_and_ecn: DscpAndEcn)
Set the Differentiated Services Code Point (DSCP) and the Explicit Congestion Notification (ECN).
Trait Implementations§
Source§impl Clone for Ipv6PacketBuilder
impl Clone for Ipv6PacketBuilder
Source§fn clone(&self) -> Ipv6PacketBuilder
fn clone(&self) -> Ipv6PacketBuilder
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 Ipv6PacketBuilder
impl Debug for Ipv6PacketBuilder
Source§impl IpPacketBuilder<Ipv6> for Ipv6PacketBuilder
impl IpPacketBuilder<Ipv6> for Ipv6PacketBuilder
Source§fn new(src_ip: Ipv6Addr, dst_ip: Ipv6Addr, ttl: u8, proto: Ipv6Proto) -> Self
fn new(src_ip: Ipv6Addr, dst_ip: Ipv6Addr, ttl: u8, proto: Ipv6Proto) -> Self
Returns a new packet builder for an associated IP version with the given
given source and destination IP addresses, TTL (IPv4)/Hop Limit (IPv4)
and Protocol Number.
Source§fn set_src_ip(&mut self, addr: Ipv6Addr)
fn set_src_ip(&mut self, addr: Ipv6Addr)
Sets the source IP address for the builder.
Source§fn set_dst_ip(&mut self, addr: Ipv6Addr)
fn set_dst_ip(&mut self, addr: Ipv6Addr)
Sets the destination IP address for the builder.
Source§fn set_dscp_and_ecn(&mut self, dscp_and_ecn: DscpAndEcn)
fn set_dscp_and_ecn(&mut self, dscp_and_ecn: DscpAndEcn)
Set DSCP & ECN fields.
Source§impl PacketBuilder for Ipv6PacketBuilder
impl PacketBuilder for Ipv6PacketBuilder
Source§impl PartialEq for Ipv6PacketBuilder
impl PartialEq for Ipv6PacketBuilder
impl Eq for Ipv6PacketBuilder
impl StructuralPartialEq for Ipv6PacketBuilder
Auto Trait Implementations§
impl Freeze for Ipv6PacketBuilder
impl RefUnwindSafe for Ipv6PacketBuilder
impl Send for Ipv6PacketBuilder
impl Sync for Ipv6PacketBuilder
impl Unpin for Ipv6PacketBuilder
impl UnwindSafe for Ipv6PacketBuilder
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§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
)