implement the iterator protocol on a set of packets in a pcap file
(self)
| 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] |
nothing calls this directly
no test coverage detected