-
Notifications
You must be signed in to change notification settings - Fork 82
CompareBlock
Tom Barbette edited this page Jul 28, 2023
·
1 revision
CompareBlock — Click element; drops packets out of rate range
CompareBlock(FWD_WEIGHT, REV_WEIGHT, THRESH)
Ports: 1 input, 2 outputs
Processing: agnostic
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.
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.
- fwd_weight (read/write) — value of FWD_WEIGHT
- rev_weight (read/write) — value of REV_WEIGHT
- thresh (read/write) — value of THRESH
Generated by click-elem2man from ../elements/standard/compblock.hh:6
on 2023/07/28.