Trait pnet_packet::Packet

source ·
pub trait Packet {
    // Required methods
    fn packet(&self) -> &[u8] ;
    fn payload(&self) -> &[u8] ;
}
Expand description

Represents a generic network packet.

Required Methods§

source

fn packet(&self) -> &[u8]

Retrieve the underlying buffer for the packet.

source

fn payload(&self) -> &[u8]

Retrieve the payload for the packet.

Implementations on Foreign Types§

source§

impl<T> Packet for &T
where T: Packet,

source§

fn packet(&self) -> &[u8]

Retrieve the underlying buffer for the packet.

source§

fn payload(&self) -> &[u8]

Retrieve the payload for the packet.

source§

impl<T> Packet for Box<T>
where T: Packet,

Blanket impl for Boxed objects

source§

fn packet(&self) -> &[u8]

Retrieve the underlying buffer for the packet.

source§

fn payload(&self) -> &[u8]

Retrieve the payload for the packet.

Implementors§

source§

impl<'a> Packet for ArpPacket<'a>

source§

impl<'a> Packet for MutableArpPacket<'a>

source§

impl<'a> Packet for DhcpPacket<'a>

source§

impl<'a> Packet for MutableDhcpPacket<'a>

source§

impl<'a> Packet for DnsPacket<'a>

source§

impl<'a> Packet for DnsQueryPacket<'a>

source§

impl<'a> Packet for DnsResponsePacket<'a>

source§

impl<'a> Packet for MutableDnsPacket<'a>

source§

impl<'a> Packet for MutableDnsQueryPacket<'a>

source§

impl<'a> Packet for MutableDnsResponsePacket<'a>

source§

impl<'a> Packet for EthernetPacket<'a>

source§

impl<'a> Packet for MutableEthernetPacket<'a>

source§

impl<'a> Packet for FlowControlPacket<'a>

source§

impl<'a> Packet for MutableFlowControlPacket<'a>

source§

impl<'a> Packet for GrePacket<'a>

source§

impl<'a> Packet for MutableGrePacket<'a>

source§

impl<'a> Packet for MutableU16BEPacket<'a>

source§

impl<'a> Packet for MutableU32BEPacket<'a>

source§

impl<'a> Packet for U16BEPacket<'a>

source§

impl<'a> Packet for U32BEPacket<'a>

source§

impl<'a> Packet for DestinationUnreachablePacket<'a>

source§

impl<'a> Packet for MutableDestinationUnreachablePacket<'a>

source§

impl<'a> Packet for pnet_packet::icmp::echo_reply::EchoReplyPacket<'a>

source§

impl<'a> Packet for pnet_packet::icmp::echo_reply::MutableEchoReplyPacket<'a>

source§

impl<'a> Packet for pnet_packet::icmp::echo_request::EchoRequestPacket<'a>

source§

impl<'a> Packet for pnet_packet::icmp::echo_request::MutableEchoRequestPacket<'a>

source§

impl<'a> Packet for IcmpPacket<'a>

source§

impl<'a> Packet for MutableIcmpPacket<'a>

source§

impl<'a> Packet for MutableTimeExceededPacket<'a>

source§

impl<'a> Packet for TimeExceededPacket<'a>

source§

impl<'a> Packet for pnet_packet::icmpv6::echo_reply::EchoReplyPacket<'a>

source§

impl<'a> Packet for pnet_packet::icmpv6::echo_reply::MutableEchoReplyPacket<'a>

source§

impl<'a> Packet for pnet_packet::icmpv6::echo_request::EchoRequestPacket<'a>

source§

impl<'a> Packet for pnet_packet::icmpv6::echo_request::MutableEchoRequestPacket<'a>

source§

impl<'a> Packet for MutableNdpOptionPacket<'a>

source§

impl<'a> Packet for MutableNeighborAdvertPacket<'a>

source§

impl<'a> Packet for MutableNeighborSolicitPacket<'a>

source§

impl<'a> Packet for MutableRedirectPacket<'a>

source§

impl<'a> Packet for MutableRouterAdvertPacket<'a>

source§

impl<'a> Packet for MutableRouterSolicitPacket<'a>

source§

impl<'a> Packet for NdpOptionPacket<'a>

source§

impl<'a> Packet for NeighborAdvertPacket<'a>

source§

impl<'a> Packet for NeighborSolicitPacket<'a>

source§

impl<'a> Packet for RedirectPacket<'a>

source§

impl<'a> Packet for RouterAdvertPacket<'a>

source§

impl<'a> Packet for RouterSolicitPacket<'a>

source§

impl<'a> Packet for Icmpv6Packet<'a>

source§

impl<'a> Packet for MutableIcmpv6Packet<'a>

source§

impl<'a> Packet for Ipv4OptionPacket<'a>

source§

impl<'a> Packet for Ipv4Packet<'a>

source§

impl<'a> Packet for MutableIpv4OptionPacket<'a>

source§

impl<'a> Packet for MutableIpv4Packet<'a>

source§

impl<'a> Packet for ExtensionPacket<'a>

source§

impl<'a> Packet for FragmentPacket<'a>

source§

impl<'a> Packet for Ipv6Packet<'a>

source§

impl<'a> Packet for MutableExtensionPacket<'a>

source§

impl<'a> Packet for MutableFragmentPacket<'a>

source§

impl<'a> Packet for MutableIpv6Packet<'a>

source§

impl<'a> Packet for MutableRoutingPacket<'a>

source§

impl<'a> Packet for RoutingPacket<'a>

source§

impl<'a> Packet for MutableSLL2Packet<'a>

source§

impl<'a> Packet for SLL2Packet<'a>

source§

impl<'a> Packet for MutableSLLPacket<'a>

source§

impl<'a> Packet for SLLPacket<'a>

source§

impl<'a> Packet for MutableTcpOptionPacket<'a>

source§

impl<'a> Packet for MutableTcpPacket<'a>

source§

impl<'a> Packet for TcpOptionPacket<'a>

source§

impl<'a> Packet for TcpPacket<'a>

source§

impl<'a> Packet for MutableUdpPacket<'a>

source§

impl<'a> Packet for UdpPacket<'a>

source§

impl<'a> Packet for MutableUsbPcapPacket<'a>

source§

impl<'a> Packet for UsbPcapPacket<'a>

source§

impl<'a> Packet for MutableVlanPacket<'a>

source§

impl<'a> Packet for VlanPacket<'a>

source§

impl<'a> Packet for MutableVxlanPacket<'a>

source§

impl<'a> Packet for VxlanPacket<'a>