adaptivered.hh
来自「COPE the first practical network coding 」· HH 代码 · 共 56 行
HH
56 行
// -*- 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_Q, MAX_P [, I<KEYWORDS>])=s droppingdrops packets according to Adaptive R<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_Q argument is the target queue length. RED's MIN_THRESH parameteris set to TARGET_Q/2, and MAX_THRESH to 3*TARGET_Q/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 cleanup(CleanupStage); void run_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 + =
减小字号Ctrl + -
显示快捷键?