📄 adaptivered.hh
字号:
// -*- mode: c++; c-basic-offset: 4 -*-#ifndef CLICK_ADAPTIVERED_HH#define CLICK_ADAPTIVERED_HH#include "red.hh"#include <click/timer.hh>CLICK_DECLS/*=cAdaptiveRED(TARGET, MAX_P [, I<KEYWORDS>])=s aqmdrops packets according to Adaptive P<RED>=dImplements the Adaptive Random Early Detection packet dropping algorithm. Thisalgorithm implements Random Early Detection, as by the RED element, plusautomatic parameter setting.The TARGET argument is the target queue length. RED's MIN_THRESH parameteris set to TARGET/2, and MAX_THRESH to 3*TARGET/2. The MAX_P parameter, andQUEUES and STABILITY keywords, are as in the RED element.=a RED */class AdaptiveRED : public RED { public: AdaptiveRED(); ~AdaptiveRED(); const char *class_name() const { return "AdaptiveRED"; } void *cast(const char *); int configure(Vector<String> &, ErrorHandler *); int live_reconfigure(Vector<String> &, ErrorHandler *); int initialize(ErrorHandler *); void run_timer(Timer *); protected: Timer _timer; static const int ADAPTIVE_INTERVAL = 500; static const uint32_t ONE_HUNDREDTH = 655; static const uint32_t NINE_TENTHS = 58982;};CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -