fixipsrc.hh

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

HH
47
字号
#ifndef CLICK_FIXIPSRC_HH#define CLICK_FIXIPSRC_HH#include <click/element.hh>#include <click/glue.hh>CLICK_DECLS/* * =c * FixIPSrc(IPADDR) * =s IP * sets IP source field if requested by annotation * =d * * Expects an IP packet as input. If its Fix IP Source annotation is set, then * changes its IP source address field to IPADDR and recomputes the checksum. * Used by elements such as ICMPError that are required by standards to use * the IP address on the outgoing interface as the source. Such elements must * set ip_src to something reasonable in case the outgoing interface has no IP * address. * * Also clears the Fix IP Source annotation. * * =n * * The Fix IP Source annotation is stored as user annotation 3. *  * =a ICMPError */class FixIPSrc : public Element {  struct in_addr _my_ip;public:  FixIPSrc();  ~FixIPSrc();    const char *class_name() const		{ return "FixIPSrc"; }  const char *processing() const		{ return AGNOSTIC; }  int configure(Vector<String> &, ErrorHandler *);  WritablePacket *fix_it(Packet *);  Packet *simple_action(Packet *);  };CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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