Skip to content
Eddie Kohler edited this page Oct 17, 2017 · 4 revisions

TimeSortedSched Element Documentation

NAME

TimeSortedSched — Click element; merge sorted packet streams by timestamp

SYNOPSIS

TimeSortedSched(keywords STOP, BUFFER)

Ports: one output, zero or more inputs
Processing: pull

DESCRIPTION

TimeSortedSched responds to pull requests by returning the chronologically next packet pulled from its inputs, determined by packet timestamps.

TimeSortedSched expects its input packet streams to arrive sorted by timestamp. If the well_ordered handler returns "false", then one or more packet streams did not arrive correctly sorted by timestamp, so TimeSortedSched emitted some packets out of order. (But see BUFFER, below.)

TimeSortedSched listens for notification from its inputs to avoid useless pulls, and provides notification for its output.

Keyword arguments are:

  • STOP — Boolean. If true, stop the driver when there are no packets available (and the upstream notifiers indicate that no packets will become available soon). Default is false.
  • BUFFER — Integer. Up to BUFFER packets per input are buffered within TimeSortedSched. Default BUFFER is 1. Higher BUFFER values let TimeSortedSched cope with minor reordering in its input streams.

NOTES

TimeSortedSched is a notifier signal, active iff any of the upstream notifiers are active.

EXAMPLES

This example merges multiple tcpdump(1) files into a single, time-sorted stream, and stops the driver when all the files are exhausted.

  tss :: TimeSortedSched(STOP true);
  FromDump(FILE1) -> [0] tss;
  FromDump(FILE2) -> [1] tss;
  FromDump(FILE3) -> [2] tss;
  // ...
  tss -> ...;

ELEMENT HANDLERS

  • well_ordered (read-only) — Returns a Boolean string. If "false", then TimeSortedSched's output was not properly sorted by increasing timestamp, because one or more of its input streams was not so sorted.

SEE ALSO

FromDump

Generated by click-elem2man from ../elements/analysis/timesortedsched.hh:8 on 2017/10/17.

Clone this wiki locally