Trait pnet::packet::FromPacket
[−]
pub trait FromPacket: Packet {
type T;
fn from_packet(&self) -> Self::T;
}Used to convert on-the-wire packets to their #[packet] equivalent
Associated Types
type T
The type of the packet to convert from
Required Methods
fn from_packet(&self) -> Self::T
Converts a wire-format packet to #[packet] struct format
Implementors
impl<'p> FromPacket for EthernetPacket<'p>impl<'p> FromPacket for MutableEthernetPacket<'p>impl<'p> FromPacket for Ipv4Packet<'p>impl<'p> FromPacket for MutableIpv4Packet<'p>impl<'p> FromPacket for Ipv4OptionPacket<'p>impl<'p> FromPacket for MutableIpv4OptionPacket<'p>impl<'p> FromPacket for Ipv6Packet<'p>impl<'p> FromPacket for MutableIpv6Packet<'p>impl<'p> FromPacket for UdpPacket<'p>impl<'p> FromPacket for MutableUdpPacket<'p>