📄 rxstats.hh
字号:
#ifndef CLICK_RXSTATS_HH#define CLICK_RXSTATS_HH#include <click/element.hh>#include <click/etheraddress.hh>#include <click/bighashmap.hh>#include <click/glue.hh>CLICK_DECLS/*=cRXStats=s WifiTrack RSSI for each ethernet source.=dAccumulate RSSI, noise for each ethernet source you hear a packet from.=h statsPrint information accumulated for each source=h resetClear all information for each source=a ExtraDecap*/class RXStats : public Element { public: RXStats(); ~RXStats(); const char *class_name() const { return "RXStats"; } const char *processing() const { return AGNOSTIC; } int configure(Vector<String> &, ErrorHandler *); bool can_live_reconfigure() const { return true; } Packet *simple_action(Packet *); void add_handlers(); class DstInfo { public: EtherAddress _eth; int _rate; int _noise; int _signal; int _packets; unsigned _sum_signal; unsigned _sum_noise; struct timeval _last_received; DstInfo() { memset(this, 0, sizeof(*this)); } DstInfo(EtherAddress eth) { memset(this, 0, sizeof(*this)); _eth = eth; } }; typedef HashMap<EtherAddress, DstInfo> NeighborTable; typedef NeighborTable::const_iterator NIter; NeighborTable _neighbors; EtherAddress _bcast; int _tau;};CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -