⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipencap.hh

📁 COPE the first practical network coding scheme which is developped on click
💻 HH
字号:
#ifndef CLICK_IPENCAP_HH#define CLICK_IPENCAP_HH#include <click/element.hh>#include <click/glue.hh>#include <click/atomic.hh>#include <clicknet/ip.h>CLICK_DECLS/*=cIPEncap(PROTOCOL, SRC, DST, I<KEYWORDS>)=s IP, encapsulationencapsulates packets in static IP header=dEncapsulates each incoming packet in an IP packet with protocolPROTOCOL, source address SRC, and destination address DST.This is most useful for IP-in-IP encapsulation.Its destination address annotation is also set to DST.Keyword arguments are:=over 8=item TTLByte. The IP header's time-to-live field. Default is 250.=item DSCPNumber between 0 and 63. The IP header's DSCP value. Default is 0.=item ECTBoolean or "2". If true, sets the IP header's ECN bits to ECN CapableTransport. If "true", "1" or "yes", sets the ECN bits to 1; but if "2", setsthem to 2. Default is false.=item CEBoolean. If true, sets the IP header's ECN bits to 3 (Congestion Experienced).Default is false.=item TOSByte. The IP header's TOS value. Default is 0. If you specify TOS, you may notspecify DSCP, ECT, ECT1, ECT2, or CE.=item DFBoolean. If true, sets the IP header's Don't Fragment bit to 1. Default isfalse.=backThe StripIPHeader element can be used by the receiver to get ridof the encapsulation header.=eWraps packets in an IP header specifying IP protocol 4(IP-in-IP), with source 18.26.4.24 and destination 140.247.60.147:  IPEncap(4, 18.26.4.24, 140.247.60.147)You could also say "C<IPEncap(ipip, ...)>".=h src read/writeReturns or sets the SRC parameter.=h dst read/writeReturns or sets the DST parameter.=a UDPIPEncap, StripIPHeader */class IPEncap : public Element { public:    IPEncap();  ~IPEncap();    const char *class_name() const		{ return "IPEncap"; }  const char *processing() const		{ return AGNOSTIC; }    int configure(Vector<String> &, ErrorHandler *);  bool can_live_reconfigure() const		{ return true; }  int initialize(ErrorHandler *);  void add_handlers();  Packet *simple_action(Packet *);   private:  click_ip _iph;#if HAVE_FAST_CHECKSUM && FAST_CHECKSUM_ALIGNED  bool _aligned;#endif  atomic_uint32_t _id;  static String read_handler(Element *, void *);  };CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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