print.hh

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

HH
75
字号
#ifndef CLICK_PRINT_HH#define CLICK_PRINT_HH#include <click/element.hh>#include <click/string.hh>CLICK_DECLS/*=cPrint([TAG, NBYTES, I<KEYWORDS>])=s debuggingprints packet contents=dPrints up to NBYTES bytes of data from each packet, in hex, preceded by theTAG text. Default NBYTES is 24.Keyword arguments are:=over 8=item NBYTESNumber of bytes to print. Default is 24.=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.=back=aIPPrint */class Print : public Element { public:  Print();  ~Print();    const char *class_name() const		{ return "Print"; }  const char *processing() const		{ return AGNOSTIC; }    int configure(Vector<String> &, ErrorHandler *);  bool can_live_reconfigure() const		{ return true; }    Packet *simple_action(Packet *);   private:    String _label;  unsigned _bytes;		// How many bytes of a packet to print  bool _timestamp : 1;#ifdef CLICK_LINUXMODULE  bool _cpu : 1;#endif  bool _print_anno;};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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