Auxiliary Interface¶
pcapkit.interface.misc contains auxiliary user interfaces, mostly added
on users’ requests.
- pcapkit.interface.misc.follow_tcp_stream(fin, *, verbose=False, engine='default', traceflow=None)[source]¶
Follow TCP streams.
- Parameters:
fin (
str) – file name to be read, as named; if the file does not exist, raiseFileNotFoundverbose (
bool|Callable[[Extractor,Frame|PCAPNG|scapy.packet.Packet|dpkt.dpkt.Packet|pyshark.packet.packet.Packet|pcap_packet|Tuple[float,bytes]],Any]) – if print verbose output informationengine (
Literal['default','pcapkit','dpkt','scapy','pyshark','pypcap','pcap_ct','pypcapfile']) – extraction engine to be usedtraceflow (
TraceFlowOptions|None) – flow tracing settings, whoseprotocolsname'tcp';Nonetakes their defaults. Withanalyze,Index.packetcan be read offExtractor.traceflow; the returnedconversationscome from the TCP reassembly this function always runs. Withbidirectional, the default, a stream holds both directions of a conversation.
- Return type:
- Returns:
Tuple of extracted TCP streams.
- Raises:
FormatError – If
traceflowdoes not name'tcp'.
Changed in version 1.5.0:
trace_bidirectionalandtrace_analyseare added. By default a stream holds both directions of a conversation; 1.4.x returned one stream per direction.Changed in version 1.7.0:
traceflowreplacesfout,format,byteorder,nanosecond,trace_bidirectionalandtrace_analyse, with no alias, and every parameter afterfinis keyword-only.finis required and opened as named, soextensionis removed (#2836).verboseandenginemirror those ofExtractor, soenginedefaults to'default', whereNonestood for it (#2837).