hashswitch.hh

来自「Click is a modular router toolkit. To us」· HH 代码 · 共 47 行

HH
47
字号
#ifndef CLICK_HASHSWITCH_HH#define CLICK_HASHSWITCH_HH#include <click/element.hh>CLICK_DECLS/* * =c * HashSwitch(OFFSET, LENGTH) * =s classification * classifies packets by hash of contents * =d * Can have any number of outputs. * Chooses the output on which to emit each packet based on * a hash of the LENGTH bytes starting at OFFSET. * Could be used for stochastic fair queuing. * =e * This element expects IP packets and chooses the output * based on a hash of the IP destination address: * *   HashSwitch(16, 4) * =a * Switch, RoundRobinSwitch, StrideSwitch, RandomSwitch */class HashSwitch : public Element {  int _offset;  int _length; public:  HashSwitch();  ~HashSwitch();  const char *class_name() const		{ return "HashSwitch"; }  const char *port_count() const		{ return "1/1-"; }  const char *processing() const		{ return PUSH; }  int configure(Vector<String> &, ErrorHandler *);  void push(int port, Packet *);};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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