32 EV <<
"!!! REDDropper has to be used in conjecture with REDMonitor!" << endl;
44 if (par(
"marking").boolValue() ==
true)
46 EV <<
"REDDropper: Marking the last message in " << queue->getFullName()
47 <<
" with an ECN bit." << endl;
53 EV <<
"REDDropper: executing tail drop in " << queue->getFullName() << endl;
72 const char* qname = queue->getFullName();
78 double maxP = par(
"dropProbability").doubleValue();
82 if (minThresh <= avr && avr < maxThresh)
85 const double pb = maxP * (avr - minThresh) / (maxThresh - minThresh);
89 pa = pb / (1 - (count * pb));
96 const double rand = dblrand();
100 EV <<
"REDDropper: rand < pa (" << rand <<
" < " << pa <<
")" << endl;
105 else if (avr >= maxThresh)
107 EV <<
"REDDropper: Average queue length in " << qname <<
" exceeds the maximum threshold." << endl;
111 else if (length >= maxThresh)
113 EV <<
"REDDropper: Queue length in " << qname <<
" exceeds the maximum threshold." << endl;
RMTQMonitorBase * qMonPolicy
bool dropOrMark(RMTQueue *queue)
int getThreshLength() const
void markCongestionOnLast()
virtual bool run(RMTQueue *queue)
Define_Module(REDDropper)