Auxiliary Interface¶
pcapkit.interface.misc contains miscellaneous
user interface functions, classes, etc., which are
generally provided per user’s requests.
- pcapkit.interface.misc.follow_tcp_stream(fin=None, verbose=False, extension=True, engine=None, fout=None, format=None, byteorder='little', nanosecond=False, trace_bidirectional=True, trace_analyse=False)[source]¶
Follow TCP streams.
- Parameters:
fin (
str|None) – file name to be read; if file not exist, raiseFileNotFoundextension (
bool) – if check and append extensions to output fileverbose (
bool) – if print verbose output informationengine (
Literal['default','pcapkit','dpkt','scapy','pyshark','pypcap','pcap_ct','pypcapfile'] |None) – extraction engine to be usedformat (
Literal['pcap','cap','json','tree','text','txt','plist','xml'] |None) – output file format of flow tracerbyteorder (
Literal['little','big']) – output file byte ordernanosecond (
bool) – output nanosecond-resolution file flagtrace_bidirectional (
bool) – whether both halves of a conversation are followed as one stream, which is the default – a stream then holds the frames and the reassembled payload of both directions, which is what “following a TCP stream” means elsewhere.Falserestores one stream per direction.trace_analyse (
bool) – whether each traced flow reassembles its application layer, so thatIndex.packetcan be read offExtractor.trace. Off by default, and independent of theconversationsthis function returns – those come from the reassembly below, which runs either way.
- Return type:
- Returns:
List of extracted TCP streams.