You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eddie Kohler edited this page Oct 17, 2017
·
4 revisions
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.