📄 aliastable.hh
字号:
#ifndef CLICK_ALIASTABLE_HH#define CLICK_ALIASTABLE_HH#include <click/element.hh>//#include <click/ipaddress.hh>#include <click/etheraddress.hh>#include <click/bighashmap.hh>#include <click/glue.hh>uint8_t hashint(const EtherAddress& addr);class AliasTable : public Element { public: AliasTable(); ~AliasTable(); const char *class_name() const { return "AliasTable"; } void *cast(const char *); uint8_t lookup(const EtherAddress&); unsigned char* lookup_addr(uint8_t); const EtherAddress& get_random_neighbor(const EtherAddress&); private: uint8_t gen_alias(EtherAddress addr); typedef HashMap<EtherAddress, uint8_t> AliasTableType; AliasTableType _alias_table; // what id this node assigns to neighbours HashMap<uint8_t, EtherAddress> _alias_table_rev; // what id this node assigns to neighbours EtherAddress _bcast;};CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -