MCPcopy Index your code
hub / github.com/secdev/scapy / __next__

Method __next__

scapy/utils.py:1451–1459  ·  view source on GitHub ↗

implement the iterator protocol on a set of packets in a pcap file

(self)

Source from the content-addressed store, hash-verified

1449 return self
1450
1451 def __next__(self):
1452 # type: () -> Tuple[bytes, RawPcapReader.PacketMetadata]
1453 """
1454 implement the iterator protocol on a set of packets in a pcap file
1455 """
1456 try:
1457 return self._read_packet()
1458 except EOFError:
1459 raise StopIteration
1460
1461 def _read_packet(self, size=MTU):
1462 # type: (int) -> Tuple[bytes, RawPcapReader.PacketMetadata]

Callers

nothing calls this directly

Calls 1

_read_packetMethod · 0.95

Tested by

no test coverage detected