📄 etherswitch.hh
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -