queueyanktest.hh

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

HH
84
字号
// -*- c-basic-offset: 4 -*-#ifndef CLICK_QUEUEYANKTEST_HH#define CLICK_QUEUEYANKTEST_HH#include <click/element.hh>#include <click/timer.hh>#include "elements/standard/simplequeue.hh"CLICK_DECLS/*=cQueueYankTest(QUEUE)=s testcheck packets against a specification=dQueueYankTest compares all received packets against a specification provided bykeyword arguments. It prints error messages when incoming packets don't matchthe spec.Keyword arguments are as follows. Tests are performed for the keywordarguments you specify. If you don't want to run a test, don't supply thekeyword. QueueYankTest(), with no keywords, accepts every packet.=over 8=item DATAString. The contents of the packet (starting DATA_OFFSET bytes in) mustexactly match DATA.=item DATA_OFFSETInteger. Specifies the offset into the packet used for DATA matches. Defaultis 0.=item LENGTHInteger. The packet's length must equal LENGTH.=item LENGTH_GEInteger. The packet's length must be at least LENGTH_GE.=item LENGTH_LEInteger. The packet's length must be at most LENGTH_LE. Specify at most one ofLENGTH, LENGTH_GE, and LENGTH_LE.=item ALIGNMENTTwo space-separated integers, `MODULUS OFFSET'. The packet's data must bealigned OFFSET bytes off from a MODULUS-byte boundary.=aPacketTest */class QueueYankTest : public Element { public:    QueueYankTest();    ~QueueYankTest();    const char *class_name() const		{ return "QueueYankTest"; }    const char *processing() const		{ return AGNOSTIC; }    int configure(Vector<String> &, ErrorHandler *);    int initialize(ErrorHandler *);    void run_timer();  private:    SimpleQueue *_q;    Timer _t;};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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