📄 paintswitch.hh
字号:
#ifndef CLICK_PAINTSWITCH_HH#define CLICK_PAINTSWITCH_HH#include <click/element.hh>CLICK_DECLS/*=cPaintSwitch=s paintsends packet stream to output chosen per-packet=dPaintSwitch sends every incoming packet to one of its output ports --specifically, output port number K, where K is the value of theincoming packet's paint annotation. If the paint annotation is set to255, the packet is duplicated and sent to all outputs. Since thereare only 256 different paint annotations, including the special valueof 255, PaintSwitch can have up to 255 outputs. If there is no outputport K, the packet is dropped.PaintSwitch uses the PAINT annotation by default, but the ANNO argument canspecify any one-byte annotation.=a StaticSwitch, PullSwitch, RoundRobinSwitch, StrideSwitch, HashSwitch,RandomSwitch, Paint, PaintTee */class PaintSwitch : public Element { public: PaintSwitch(); ~PaintSwitch(); const char *class_name() const { return "PaintSwitch"; } const char *port_count() const { return "1/-"; } const char *processing() const { return PUSH; } int configure(Vector<String> &conf, ErrorHandler *errh); void push(int, Packet *); private: uint8_t _anno;};CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -