availablerates.hh

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

HH
82
字号
#ifndef CLICK_AVAILABLERATES_HH#define CLICK_AVAILABLERATES_HH#include <click/element.hh>#include <click/ipaddress.hh>#include <click/etheraddress.hh>#include <click/bighashmap.hh>#include <click/glue.hh>CLICK_DECLS/*=c AvailableRates()=s Wifi, Wireless Station, Wireless AccessPointTracks bit-rate capabilities of other stations.=dTracks a list of bitrates other stations are capable of.=h insert write-onlyInserts an ethernet address and a list of bitrates to the database.=h remove write-onlyRemoves an ethernet address from the database.=h rates read-onlyShows the entries in the database.=a BeaconScanner */class AvailableRates : public Element { public:    AvailableRates();  ~AvailableRates();    const char *class_name() const		{ return "AvailableRates"; }  int configure(Vector<String> &, ErrorHandler *);  void *cast(const char *n);  bool can_live_reconfigure() const		{ return true; }  void add_handlers();  void take_state(Element *e, ErrorHandler *);  Vector<int> lookup(EtherAddress eth);  int insert(EtherAddress eth, Vector<int>);  EtherAddress _bcast;  bool _debug;  int parse_and_insert(String s, ErrorHandler *errh);  class DstInfo {  public:    EtherAddress _eth;    Vector<int> _rates;    DstInfo() {       memset(this, 0, sizeof(*this));    }    DstInfo(EtherAddress eth) {       memset(this, 0, sizeof(*this));      _eth = eth;    }  };    typedef HashMap<EtherAddress, DstInfo> RTable;  typedef RTable::const_iterator RIter;    RTable _rtable;  Vector<int> _default_rates;private:};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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