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)[source]

Follow TCP streams.

  • fin (Optional[str]) – file name to be read; if file not exist, raise FileNotFound

  • extension (bool) – if check and append extensions to output file

  • verbose (bool) – if print verbose output information

  • engine (Optional[Engines]) – extraction engine to be used

  • fout (Optional[str]) – path name for flow tracer if necessary

  • format (Optional[Formats]) – output file format of flow tracer

  • byteorder (ByteOrder) – output file byte order

  • nanosecond (bool) – output nanosecond-resolution file flag


List of extracted TCP streams.

Return type

tuple[Stream, …]

Data Structures

class pcapkit.interface.misc.Stream(filename, packets, conversations)[source]

Bases: Info

Data model for TCP streams.

  • *args (VT) – Arbitrary positional arguments.

  • **kwargs (VT) – Arbitrary keyword arguments.

Return type


filename: Optional[str]

Output filename.

packets: tuple[Frame, ...]

Packet list.

conversations: tuple[bytes | tuple[bytes, ...], ...]

TCP conversation.