etherencap.hh

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

HH
71
字号
#ifndef CLICK_ETHERENCAP_HH#define CLICK_ETHERENCAP_HH#include <click/element.hh>#include <clicknet/ether.h>CLICK_DECLS/*=cEtherEncap(ETHERTYPE, SRC, DST)=s encapsulation, Ethernetencapsulates packets in Ethernet header=dEncapsulates each packet in the Ethernet header specified by its arguments.ETHERTYPE should be in host order.=eEncapsulate packets in an Ethernet header with typeETHERTYPE_IP (0x0800), source address 1:1:1:1:1:1, anddestination address 2:2:2:2:2:2:  EtherEncap(0x0800, 1:1:1:1:1:1, 2:2:2:2:2:2)=nFor IP packets you probably want to use ARPQuerier instead.=h src read/writeReturns or sets the SRC parameter.=h dst read/writeReturns or sets the DST parameter.=aARPQuerier, EnsureEther */class EtherEncap : public Element { public:    EtherEncap();  ~EtherEncap();  const char *class_name() const	{ return "EtherEncap"; }  const char *processing() const	{ return AGNOSTIC; }    int configure(Vector<String> &, ErrorHandler *);  bool can_live_reconfigure() const	{ return true; }  void add_handlers();  Packet *smaction(Packet *);  void push(int, Packet *);  Packet *pull(int);   private:  click_ether _ethh;  static String read_handler(Element *, void *);  };CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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