block.hh

来自「COPE the first practical network coding 」· HH 代码 · 共 63 行

HH
63
字号
#ifndef CLICK_BLOCK_HH#define CLICK_BLOCK_HH#include <click/element.hh>CLICK_DECLS/* * =c * Block(THRESH) * =s dropping * drops packets with high rate * =d * THRESH is an integer. * * Splits packets based on the dst rate annotation set by Monitor. If the * annotation is less or equal to THRESH, the packet is pushed on output 0, * otherwise on 1. * * Is THRESH is 0 then all packets are pushed on output 0. * * =e *   b :: Block(500); *    *   ... -> Monitor(...) -> *   ... -> b[0] -> ... *   ... -> b[1] -> Discard; * * Discards all packets that are preceded by more than 500 siblings. * * =h thresh read/write * value of THRESH * * =a IPFlexMonitor */class Block : public Element {   public:    Block();  ~Block();  const char *class_name() const		{ return "Block"; }  const char *processing() const	        { return AGNOSTIC; }  void add_handlers();    int configure(Vector<String> &, ErrorHandler *);  // bool can_live_reconfigure() const		{ return true; }    void push(int port, Packet *);  // Packet *pull(int port); private:  int _thresh;  static int thresh_write_handler(const String &conf, Element *e, void *, ErrorHandler *errh);  static String thresh_read_handler(Element *e, void *);  };CLICK_ENDDECLS#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?