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

Method _read_packet

scapy/utils.py:1754–1764  ·  view source on GitHub ↗

Read blocks until it reaches either EOF or a packet, and returns None or (packet, (linktype, sec, usec, wirelen)), where packet is a string.

(self, size=MTU)

Source from the content-addressed store, hash-verified

1752 self._read_options(options)
1753
1754 def _read_packet(self, size=MTU): # type: ignore
1755 # type: (int) -> Tuple[bytes, RawPcapNgReader.PacketMetadata]
1756 """Read blocks until it reaches either EOF or a packet, and
1757 returns None or (packet, (linktype, sec, usec, wirelen)),
1758 where packet is a string.
1759
1760 """
1761 while True:
1762 res = self._read_block(size=size)
1763 if res is not None:
1764 return res
1765
1766 def _read_options(self, options):
1767 # type: (bytes) -> Dict[int, Union[bytes, List[bytes]]]

Callers

nothing calls this directly

Calls 1

_read_blockMethod · 0.95

Tested by

no test coverage detected