decoderg.hh

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

HH
81
字号
#ifndef DECODERG_HH#define DECODERG_HHCLICK_DECLS/* * =c * Decoder () * =s Wifi, Wireless Routing * decodes received packets * =d * * Input 0: packets for decoding  * Output 0: decoded packets for normal processing (push) */#include<click/element.hh>//#include<click/bighashmap.hh>#include<click/timer.hh>#include<click/packet.hh>#include <click/ipaddress.hh>//#include <click/string.hh>#include "listenmanager.hh"#include "scramblequeue.hh"#include "recvmanager.hh"#include "sendmanager.hh"#include "common.hh"class EtherAddress;class DecoderG : public Element { public:    DecoderG();		  ~DecoderG();		    const char *class_name() const	{ return "DecoderG"; }  const char *processing() const	{ return PUSH;}  void *cast(const char *);  int configure(Vector<String> &conf, ErrorHandler *);  void add_handlers();  static String stats(Element *, void *);  static int static_clear(const String &arg, Element *e,                          void *, ErrorHandler *errh);  void push(int, Packet *);  // for statistics  int _decodedpkts;                     // counts how many packets have been decoded  // int _overheard;                // how many encoded packets overheard that's not for me  int _undecodable;                 // packets that cannot be decoded due to missing matching packets  int _duplicatepkts;                  // duplicate encoded packets received  int _nnewpkts;                    // number of new packets    int _decodedbytes;                // number of decoded bytes  int _duplicatebytes;              // number of duplicate bytes  int _nnewbytes;                   // number of new bytesprivate:  // ethernet address  EtherAddress _myea;  uint8_t _myalias;  ListenManager *_listenmgr;  AliasTable *_aliases;  RecvManager *_recvmgr;  ScrambleQueue *_scrambleq;  SendManager *_sendmgr;    WritablePacket* finish_decode(WritablePacket*, int);  void xor_decode(WritablePacket*, Packet*, int);  void set_ip_cksum(WritablePacket*);};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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