scapy.layers.ppi

CACE Per-Packet Information (PPI) header.

A method for adding metadata to link-layer packets.

For example, one can tag an 802.11 packet with GPS co-ordinates of where it was captured, and include it in the PCAP file.

New PPI types should:

  • Make their packet a subclass of PPI_Element

  • Call bind_layers(PPI_Hdr, ExamplePPI, pfh_type=0xffff)

See layers/contrib/ppi_cace.py for an example.

class scapy.layers.ppi.PPI

Bases: scapy.packet.Packet

add_payload(payload)
aliastypes
fields_desc
PPI fields

version

ByteField

0

flags

ByteField

0

len

FieldLenField

None

dlt

LEIntField

None

headers

PacketListField

[]

guess_payload_class(payload)
class scapy.layers.ppi.PPI_Element

Bases: scapy.packet.Packet

Superclass for all PPI types.

aliastypes
extract_padding(s)
static length_from(pkt)
class scapy.layers.ppi.PPI_Hdr

Bases: scapy.packet.Packet

aliastypes
fields_desc
PPI_Hdr fields

pfh_type

LEShortEnumField

0

pfh_length

LenField

None

mysummary()
payload_guess

Possible sublayers: PPI_Dot11Common, PPI_Geotag_Antenna, PPI_Geotag_GPS, PPI_Geotag_Sensor, PPI_Geotag_Vector, BTLE_PPI