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