pub struct TcpPacket {
pub source: u16,
pub destination: u16,
pub sequence: u32,
pub acknowledgement: u32,
pub data_offset: u8,
pub reserved: u8,
pub flags: Vec<TcpFlag>,
pub window: u16,
pub checksum: u16,
pub urgent_ptr: u16,
pub options: Vec<TcpOption>,
pub payload: Vec<u8>,
}
Expand description
Represents a TCP packet.
Fields§
§source: u16
Source port
destination: u16
Destination port
sequence: u32
Sequence number
acknowledgement: u32
Acknowledgement number
data_offset: u8
Data offset
reserved: u8
Reserved
flags: Vec<TcpFlag>
TCP flags
window: u16
Window size
checksum: u16
Checksum
urgent_ptr: u16
Urgent pointer
options: Vec<TcpOption>
TCP options
payload: Vec<u8>
TCP Payload
Implementations§
Trait Implementations§
impl StructuralPartialEq for TcpPacket
Auto Trait Implementations§
impl Freeze for TcpPacket
impl RefUnwindSafe for TcpPacket
impl Send for TcpPacket
impl Sync for TcpPacket
impl Unpin for TcpPacket
impl UnwindSafe for TcpPacket
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