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

📄 print.hh

📁 Click is a modular router toolkit. To use it you ll need to know how to compile and install the sof
💻 HH
字号:
#ifndef CLICK_PRINT_HH#define CLICK_PRINT_HH#include <click/element.hh>#include <click/string.hh>CLICK_DECLS/*=cPrint([LABEL, MAXLENGTH, I<keywords>])=s debuggingprints packet contents=dPrints up to MAXLENGTH bytes of data from each packet, in hex, preceded by theLABEL text. Default MAXLENGTH is 24.Keyword arguments are:=over 8=item MAXLENGTHMaximum number of content bytes to print. If negative, print entirepacket. Default is 24.=item CONTENTSDetermines whether the packet data is printed. It may be `NONE' (do not printpacket data), `HEX' (print packet data in hexadecimal), or `ASCII' (printpacket data in plaintext). Default is `HEX'.=item TIMESTAMPBoolean. Determines whether to print each packet's timestamp in seconds since1970. Default is false.=item PRINTANNOBoolean. Determines whether to print each packet's user annotation bytes.  Default is false.=item CPUBoolean; available only in the Linux kernel module. Determines whether toprint the current CPU ID for every packet. Default is false.=item HEADROOMBoolean.  Determines whether to print each packet's headroom and tailroom, inthe format "(h[headroom] t[tailroom])".  Defaut is false.=item ACTIVEBoolean. If false, don't print messages. Default is true.=back=h active read/writeReturns or sets the ACTIVE parameter.=aIPPrint */class Print : public Element { public:    Print();    ~Print();    const char *class_name() const		{ return "Print"; }    const char *port_count() const		{ return PORTS_1_1; }    const char *processing() const		{ return AGNOSTIC; }    int configure(Vector<String> &, ErrorHandler *);    bool can_live_reconfigure() const		{ return true; }    void add_handlers();    Packet *simple_action(Packet *); private:    String _label;    int _bytes;		// How many bytes of a packet to print    bool _active;    bool _timestamp : 1;    bool _headroom : 1;#ifdef CLICK_LINUXMODULE    bool _cpu : 1;#endif    bool _print_anno;    uint8_t _contents;};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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