forcetcp.hh

来自「COPE the first practical network coding 」· HH 代码 · 共 41 行

HH
41
字号
#ifndef CLICK_FORCETCP_HH#define CLICK_FORCETCP_HH#include <click/element.hh>#include <click/glue.hh>CLICK_DECLS/* * =c * ForceTCP([DPORT [,RANDOM [, FLAGS]]]) * =s TCP * sets TCP packet fields * =d * Set the checksum and some other fields to try to make a packet look like * TCP. If DPORT is specified and not -1, forces the destination port to be * DPORT. Otherwise, if RANDOM is set, destination port may be randomly set. * If RANDOM is not set and DPORT is -1, destination port is untouched. RANDOM * has no effect if DPORT is not -1. If FLAGS is specified and not -1, set the * TCP flags field to FLAGS. */class ForceTCP : public Element {public:  ForceTCP();  ~ForceTCP();    const char *class_name() const		{ return "ForceTCP"; }  const char *processing() const		{ return AGNOSTIC; }  int configure(Vector<String> &conf, ErrorHandler *errh);  Packet *simple_action(Packet *);private:  int _count;  int _dport;  int _flags;  bool _random;};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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