Skip to content
Tom Barbette edited this page Jul 28, 2023 · 1 revision

CompareBlock Element Documentation

NAME

CompareBlock — Click element; drops packets out of rate range

SYNOPSIS

CompareBlock(FWD_WEIGHT, REV_WEIGHT, THRESH)

Ports: 1 input, 2 outputs
Processing: agnostic

DESCRIPTION

FWD_WEIGHT, REV_WEIGHT, and THRESH are integers

Splits packets based on the fwd_rate_anno and rev_rate_anno rate annotations set by IPRateMonitor. If either annotation is greater than THRESH, and FWD_WEIGHT*fwd_rate_anno > REV_WEIGHT*rev_rate_anno, the packet is pushed on output 1, otherwise on output 0.

EXAMPLES

 b :: CompareBlock(5, 2, 100);

if (5*fwd_rate > 2*rev_rate) AND (fwd_rate > 100 or rev_rate > 100), send packet out on output 1, otherwise on output 0.

ELEMENT HANDLERS

  • fwd_weight (read/write) — value of FWD_WEIGHT
  • rev_weight (read/write) — value of REV_WEIGHT
  • thresh (read/write) — value of THRESH

SEE ALSO

Block, IPRateMonitor

Generated by click-elem2man from ../elements/standard/compblock.hh:6 on 2023/07/28.

Clone this wiki locally