flow_models.first_mirror package

flow_models.first_mirror.simulate module

Simulates first N packets of new flow mirroring feature.

first_mirror(in_files, output, in_format='nfcapd', out_format='csv_series', skip_in=0, count_in=None, skip_out=0, count_out=None, filter_expr=None, mirror=0)

Generate mirrored packets and octets time series from flow records.

Parameters:
  • in_files (list[pathlib.Path]) – input files paths

  • output (os.PathLike) – directory path

  • in_format (str, default 'nfcapd') – input format

  • out_format (str, default 'csv_series') – output format

  • skip_in (int, default 0) – number of flows to skip at the beginning of input

  • count_in (int, default None, meaning all flows) – number of flows to read from input

  • skip_out (int, default 0) – number of flows to skip after filtering

  • count_out (int, default None, meaning all flows) – number of flows to output after filtering

  • filter_expr (CodeType, optional) – filter expression

  • mirror (int, default 0) – mirror first N packets to switch control plane