📄 adjustrate.hh
字号:
#ifndef CLICK_ADJUSTRATE_HH#define CLICK_ADJUSTRATE_HH#include <click/element.hh>#include <click/glue.hh>#include <click/ipaddress.hh>#include <click/etheraddress.hh>#include <click/bighashmap.hh>#include <elements/wifi/arptable.hh>CLICK_DECLS/*=cAdjustRate([I<KEYWORDS>])=s WifiSets the bit-rate for a packet.=dSets the Wifi TXRate Annotation on a packet.Regular Arguments:=over 8=item RATE Unsigned integer. Rate value is multiplied by 2 (i.e. 2means 1 Mbps, 11 means 5.5 Mbps)=back 8=h rate read/writeSame as RATE Argument=a AutoRateFallback, MadwifiRate, ProbeRate, ExtraEncap*/class AdjustRate : public Element { public: AdjustRate(); ~AdjustRate(); const char *class_name() const { return "AdjustRate"; } 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(); //static String read_handler(Element *e, void *); //static int write_handler(const String &arg, Element *e, // void *, ErrorHandler *errh);private: int _rate; uint16_t _et; // This protocol's ethertype unsigned _offset; IPAddress _ip; EtherAddress _eth; ARPTable* _arp_table; typedef HashMap<EtherAddress, int> NeighborRateTable; NeighborRateTable _nb_rate_table;};CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -