📄 switch.hh
字号:
#ifndef CLICK_SWITCH_HH#define CLICK_SWITCH_HH#include <click/element.hh>CLICK_DECLS/*=cSwitch([OUTPUT])=s classificationsends packet stream to settable output=dSwitch sends every incoming packet to one of its output ports --specifically, OUTPUT. The default OUTPUT is zero; negative OUTPUT means todestroy input packets instead of forwarding them. You can change OUTPUT with awrite handler. Switch has an unlimited number of outputs.=h switch read/writeReturn or set the OUTPUT parameter.=h CLICK_LLRPC_GET_SWITCH llrpcArgument is a pointer to an integer, in which the Switch's K parameter isstored.=h CLICK_LLRPC_SET_SWITCH llrpcArgument is a pointer to an integer. Sets the K parameter to that integer.=a StaticSwitch, PullSwitch, RoundRobinSwitch, StrideSwitch, HashSwitch,RandomSwitch */class Switch : public Element { public: Switch(); ~Switch(); const char *class_name() const { return "Switch"; } const char *port_count() const { return "1/-"; } const char *processing() const { return PUSH; } void add_handlers(); int configure(Vector<String> &, ErrorHandler *); bool can_live_reconfigure() const { return true; } void push(int, Packet *); int llrpc(unsigned, void *); private: int _output; static String read_param(Element *, void *); static int write_param(const String &, Element *, void *, ErrorHandler *);};CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -