📄 icmppingencap.hh
字号:
// -*- c-basic-offset: 4 -*-#ifndef CLICK_ICMPPINGENCAP_HH#define CLICK_ICMPPINGENCAP_HH#include <click/element.hh>#include <click/timer.hh>CLICK_DECLS/*=cICMPPingEncap(SRC, DST [, I<keyword> IDENTIFIER])=s icmpencapsulates packets in ICMP ping headers=dEncapsulates input packets in an ICMP ping header with source IP address SRCand destination IP address DST. Advances the "sequence" field by one foreach packet. (The sequence field is stored in network byte order in thepacket.)Keyword arguments are:=over 8=item IDENTIFIERInteger. Determines the ICMP identifier field in emitted pings. Default is0.=back=h src read/writeReturns or sets the SRC argument.=h dst read/writeReturns or sets the DST argument.=aICMPPingSource, ICMPPingResponder, ICMPPingRewriter */class ICMPPingEncap : public Element { public: ICMPPingEncap(); ~ICMPPingEncap(); const char *class_name() const { return "ICMPPingEncap"; } const char *port_count() const { return PORTS_1_1; } const char *processing() const { return AGNOSTIC; } const char *flags() const { return "A"; } int configure(Vector<String> &, ErrorHandler *); void add_handlers(); Packet *simple_action(Packet *); private: struct in_addr _src; struct in_addr _dst; uint16_t _icmp_id; uint16_t _ip_id;#if HAVE_FAST_CHECKSUM && FAST_CHECKSUM_ALIGNED bool _aligned;#endif static String read_handler(Element *, void *); static int write_handler(const String &, Element *, void *, ErrorHandler *);};CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -