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 coordinates of where it was captured, and include it in the PCAP file.
New PPI types should:
Make their packet a subclass of
PPI_ElementCall
bind_layers(PPI_Hdr, ExamplePPI, pfh_type=0xffff)
See layers/contrib/ppi_cace.py for an example.
-
class
scapy.layers.ppi.PPI(*args, **kargs)¶ Bases:
scapy.packet.Packet-
add_payload(payload)¶
-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VERSION | FLAGS | LEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DLT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | HEADERS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. PPIPPI fields¶ version
0flags
0len
Nonedlt
Noneheaders
[]
-
guess_payload_class(payload)¶
-
-
class
scapy.layers.ppi.PPI_Element(*args, **kargs)¶ Bases:
scapy.packet.PacketSuperclass for all PPI types.
-
aliastypes¶
-
extract_padding(s)¶
-
static
length_from(pkt)¶
-
-
class
scapy.layers.ppi.PPI_Hdr(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PFH TYPE | PFH LENGTH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. PPI_HdrPPI_Hdr fields¶ pfh_type
0pfh_length
None
-
mysummary()¶
-
payload_guess¶ Possible sublayers:
PPI_Dot11Common,PPI_Geotag_Antenna,PPI_Geotag_GPS,PPI_Geotag_Sensor,PPI_Geotag_Vector,BTLE_PPI
-