Enum netsim::wire::IpPacket
[−]
[src]
pub enum IpPacket {
V4(Ipv4Packet),
V6(Ipv6Packet),
}An IP packet.
Variants
V4(Ipv4Packet)IPv4
V6(Ipv6Packet)IPv6
Methods
impl IpPacket[src]
pub fn from_bytes(buffer: Bytes) -> IpPacket[src]
Parse an IP packet from a byte buffer
pub fn as_bytes(&self) -> &Bytes[src]
Get a reference to the packet's underlying byte buffer
pub fn into_bytes(self) -> Bytes[src]
Consume the packet and return the underlying byte buffer
pub fn source_ip(&self) -> IpAddr[src]
Get the packet's source IP address
pub fn dest_ip(&self) -> IpAddr[src]
Get the packet's destination IP address
Trait Implementations
impl Clone for IpPacket[src]
fn clone(&self) -> IpPacket[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq for IpPacket[src]
fn eq(&self, __arg_0: &IpPacket) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &IpPacket) -> bool[src]
This method tests for !=.