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

  • 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


( (matched couples), (unmatched packets) )

class scapy.plist.QueryAnswer(query, answer)[source]

Bases: tuple

property answer

Alias for field number 1

property query

Alias for field number 0

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

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