PacketList: holds several packets and allows to do operations on them.
- class scapy.plist.PacketList(res: _PacketList[_Inner] | List[_Inner] | None = None, name: str = 'PacketList', stats: List[Type[Packet]] | None = None)
- sr(multi: bool = False, lookahead: int | None = None) Tuple[SndRcvList, PacketList]
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)