pub struct IpPacket {
pub raw: Vec<u8>,
pub version: IpVersion,
pub src: String,
pub dst: String,
pub protocol: u8,
pub len: usize,
}Expand description
A parsed IP packet read from the TUN interface.
Fields§
§raw: Vec<u8>Raw packet bytes (including IP header).
version: IpVersionIP version.
src: StringSource IP (as string for both v4 and v6).
dst: StringDestination IP (as string for both v4 and v6).
protocol: u8IP protocol number (6=TCP, 17=UDP, 1=ICMP, etc).
len: usizeTotal packet length in bytes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IpPacket
impl RefUnwindSafe for IpPacket
impl Send for IpPacket
impl Sync for IpPacket
impl Unpin for IpPacket
impl UnsafeUnpin for IpPacket
impl UnwindSafe for IpPacket
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