pub struct TcpSlice<'a> { /* private fields */ }Available on crate feature
extractors only.Expand description
TCP header slice. Bytes are borrowed from the original frame.
Implementations§
Source§impl<'a> TcpSlice<'a>
impl<'a> TcpSlice<'a>
pub fn src_port(&self) -> u16
pub fn dst_port(&self) -> u16
pub fn seq(&self) -> u32
pub fn ack(&self) -> u32
Sourcepub fn data_offset(&self) -> u8
pub fn data_offset(&self) -> u8
Data Offset (header length in 32-bit words).
pub fn flags(&self) -> TcpFlagsView
pub fn window(&self) -> u16
pub fn checksum(&self) -> u16
pub fn urgent_pointer(&self) -> u16
pub fn header(&self) -> &'a [u8] ⓘ
Sourcepub fn options(&self) -> TcpOptionsIter<'a> ⓘ
pub fn options(&self) -> TcpOptionsIter<'a> ⓘ
Iterate parsed TCP options. Stops cleanly on a malformed length byte.
pub fn bytes(&self) -> &'a [u8] ⓘ
pub fn kind(&self) -> LayerKind
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TcpSlice<'a>
impl<'a> RefUnwindSafe for TcpSlice<'a>
impl<'a> Send for TcpSlice<'a>
impl<'a> Sync for TcpSlice<'a>
impl<'a> Unpin for TcpSlice<'a>
impl<'a> UnsafeUnpin for TcpSlice<'a>
impl<'a> UnwindSafe for TcpSlice<'a>
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