etherswitch.hh

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

HH
45
字号
#ifndef CLICK_ETHERSWITCH_HH#define CLICK_ETHERSWITCH_HH#include <click/element.hh>#include <click/etheraddress.hh>#include <click/hashmap.hh>CLICK_DECLSclass EtherSwitch : public Element {   public:    EtherSwitch();  ~EtherSwitch();    const char *class_name() const		{ return "EtherSwitch"; }  const char *processing() const		{ return PUSH; }  const char *flow_code() const			{ return "#/[^#]"; }    void notify_ninputs(int);  void push(int port, Packet* p);  static String read_table(Element* f, void *);  void add_handlers();  void set_timeout(int seconds)			{ _timeout = seconds; }  struct AddrInfo {    int port;    timeval stamp;    AddrInfo(int p, const timeval& s);  };private:  typedef HashMap<EtherAddress, AddrInfo *> Table;  Table _table;  int _timeout;    void broadcast(int source, Packet*);};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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