pub struct TcpPacketBuilder { /* private fields */ }Implementations§
Source§impl TcpPacketBuilder
impl TcpPacketBuilder
pub fn new() -> Self
pub fn source_port(self, port: u16) -> Self
pub fn destination_port(self, port: u16) -> Self
pub fn sequence(self, seq: u32) -> Self
pub fn ack_number(self, ack: u32) -> Self
pub fn window(self, w: u16) -> Self
pub fn urgent_pointer(self, up: u16) -> Self
pub fn syn(self, on: bool) -> Self
pub fn ack(self, on: bool) -> Self
pub fn fin(self, on: bool) -> Self
pub fn rst(self, on: bool) -> Self
pub fn psh(self, on: bool) -> Self
pub fn urg(self, on: bool) -> Self
Sourcepub fn add_option(self, data: &[u8]) -> Self
pub fn add_option(self, data: &[u8]) -> Self
Add a TCP option as raw bytes (kind + length + data).
Sourcepub fn window_scale(self, shift: u8) -> Self
pub fn window_scale(self, shift: u8) -> Self
Convenience: add Window Scale option.
Sourcepub fn sack_permitted(self) -> Self
pub fn sack_permitted(self) -> Self
Convenience: add SACK Permitted option.
pub fn payload(self, data: &[u8]) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TcpPacketBuilder
impl RefUnwindSafe for TcpPacketBuilder
impl Send for TcpPacketBuilder
impl Sync for TcpPacketBuilder
impl Unpin for TcpPacketBuilder
impl UnsafeUnpin for TcpPacketBuilder
impl UnwindSafe for TcpPacketBuilder
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