aliastable.hh

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

HH
34
字号
#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 + =
减小字号Ctrl + -
显示快捷键?