📄 tcpdemux.hh
字号:
#ifndef CLICK_TCPDEMUX_HH#define CLICK_TCPDEMUX_HH#include <click/element.hh>#include <click/timer.hh>#include <clicknet/tcp.h>#include <click/bighashmap.hh>#include <click/ipflowid.hh>CLICK_DECLS/* * =c * TCPDemux() * =s TCP * demultiplexes TCP flows * =d * * for now, * * output 0 = SYN * output 1 = FIN | RST * output 2 = others */typedef HashMap<IPFlowID, int> FlowTable;class TCPDemux : public Element {private: FlowTable _flows; int find_flow(Packet *p);public: TCPDemux(); ~TCPDemux(); const char *class_name() const { return "TCPDemux"; } const char *processing() const { return PUSH; } int configure(Vector<String> &conf, ErrorHandler *errh); void push(int, Packet *); // add new flow to flow table; returns false if key already exists, true // otherwise. entry is not added to table in the former case bool add_flow(IPAddress sa, unsigned short sp, IPAddress da, unsigned short dp, unsigned port); // remove flow from table; returns true if removed an entry, false otherwise bool remove_flow(IPAddress sa, unsigned short sp, IPAddress da, unsigned short dp);};CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -