Struct packet_formats::tcp::TcpSegmentBuilder
source · pub struct TcpSegmentBuilder<A: IpAddress> { /* private fields */ }
Expand description
A builder for TCP segments.
Implementations§
source§impl<A: IpAddress> TcpSegmentBuilder<A>
impl<A: IpAddress> TcpSegmentBuilder<A>
sourcepub fn new(
src_ip: A,
dst_ip: A,
src_port: NonZeroU16,
dst_port: NonZeroU16,
seq_num: u32,
ack_num: Option<u32>,
window_size: u16
) -> TcpSegmentBuilder<A>
pub fn new( src_ip: A, dst_ip: A, src_port: NonZeroU16, dst_port: NonZeroU16, seq_num: u32, ack_num: Option<u32>, window_size: u16 ) -> TcpSegmentBuilder<A>
Constructs a new TcpSegmentBuilder
.
If ack_num
is Some
, then the ACK flag will be set.
Trait Implementations§
source§impl<A: Clone + IpAddress> Clone for TcpSegmentBuilder<A>
impl<A: Clone + IpAddress> Clone for TcpSegmentBuilder<A>
source§fn clone(&self) -> TcpSegmentBuilder<A>
fn clone(&self) -> TcpSegmentBuilder<A>
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<A: IpAddress> PacketBuilder for TcpSegmentBuilder<A>
impl<A: IpAddress> PacketBuilder for TcpSegmentBuilder<A>
impl<A: Copy + IpAddress> Copy for TcpSegmentBuilder<A>
Auto Trait Implementations§
impl<A> Freeze for TcpSegmentBuilder<A>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static + Freeze,
impl<A> RefUnwindSafe for TcpSegmentBuilder<A>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static + RefUnwindSafe,
impl<A> Send for TcpSegmentBuilder<A>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static,
impl<A> Sync for TcpSegmentBuilder<A>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static,
impl<A> Unpin for TcpSegmentBuilder<A>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static + Unpin,
impl<A> UnwindSafe for TcpSegmentBuilder<A>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static + UnwindSafe,
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