pub struct IpPacket {
pub fixed: IpHeader,
pub exts: Vec<ExtHeader>,
pub payload: Payload,
/* private fields */
}
Fields§
§fixed: IpHeader
§exts: Vec<ExtHeader>
§payload: Payload
Implementations§
source§impl IpPacket
impl IpPacket
pub fn new(bytes: Box<[u8]>) -> Result<IpPacket>
pub fn src(&self) -> Option<SocketAddr>
pub fn dest(&self) -> Option<SocketAddr>
pub fn checksum_valid(&self) -> bool
pub fn calculate_checksum(&mut self)
pub fn into_inner(self) -> Box<[u8]>
pub fn into_data(self) -> Window<Box<[u8]>>
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 !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