scapy.plist

PacketList: holds several packets and allows to do operations on them.

class scapy.plist.PacketList(res=None, name='PacketList', stats=None)[source]

Bases: scapy.plist._PacketList[scapy.packet.Packet], scapy.base_classes.BasePacketList[scapy.packet.Packet], scapy.base_classes._CanvasDumpExtended

sr(multi=False, lookahead=None)[source]

Matches packets in the list

Parameters
  • multi – True if a packet can have multiple answers

  • lookahead – Maximum number of packets between packet and answer. If 0 or None, full remaining list is scanned for answers

Returns

( (matched couples), (unmatched packets) )

class scapy.plist.SndRcvList(res=None, name='Results', stats=None)[source]

Bases: scapy.plist._PacketList[Tuple[scapy.packet.Packet, scapy.packet.Packet]], scapy.base_classes.BasePacketList[Tuple[scapy.packet.Packet, scapy.packet.Packet]], scapy.base_classes._CanvasDumpExtended