filterbyrange.hh

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

HH
47
字号
#ifndef CLICK_FILTERBYRANGE_HH#define CLICK_FILTERBYRANGE_HH#include <click/element.hh>#include "elements/grid/gridlocationinfo.hh"CLICK_DECLS/* * =c * FilterByRange(RANGE, LOCINFO) * =s Grid * =d * * Expects Grid MAC layer packets on input 0.  Any packet transmitted * by a Grid node within RANGE metres from this node is sent to output * 0.  Packets transmitted by ``out of range'' nodes are sent out * output 1.  RANGE is an Integer.  A negative range means no packets * are filtered out.  This element is useful for simulating physical * topologies.  This element uses the GridLocationInfo element named * LOCINFO. * * =a * GridLocationInfo  * FilterByGridHops */class FilterByRange : public Element {  public:    FilterByRange();  ~FilterByRange();    const char *class_name() const		{ return "FilterByRange"; }  const char *processing() const		{ return PUSH; }    int configure(Vector<String> &, ErrorHandler *);  int initialize(ErrorHandler *);    void push(int port, Packet *);private:  GridLocationInfo *_locinfo;  int _range; // in metres, negative meand don't filter};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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