gridencap.hh

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

HH
61
字号
#ifndef CLICK_GRIDENCAP_HH#define CLICK_GRIDENCAP_HH#include <click/element.hh>#include <click/glue.hh>#include <click/ipaddress.hh>#include <click/etheraddress.hh>#include <clicknet/ether.h>#include <elements/grid/grid.hh>CLICK_DECLS/* * =c *  * GridEncap(MAC-ADDRESS, IP-ADDRESS) *  * =s Grid *  * Encapsulates packets in static Grid data encapsulation header * (GRID_NBR_ENCAP), including ethernet, Grid, and grid data encap * headers. * * =d * * MAC-ADDRESS and IP-ADDRESS are this node's ethernet and IP * addresses, respectively.  Sets the ethernet type to the Grid * ethertype; sets the ethernet source address to MAC-ADDRESS.  Sets the Grid * src and tx IP to be IP-ADDRESS.  Sets all locations to invalid. * Does not set checksum. *  * Sets the grid destination IP to the packet's dest_ip annotation. * *  * =a LookupLocalGridRoute, FixSrcLoc, FixDstLoc, SetGridChecksum */ class GridEncap : public Element { public:    GridEncap();  ~GridEncap();    const char *class_name() const		{ return "GridEncap"; }  const char *processing() const		{ return AGNOSTIC; }    int configure(Vector<String> &, ErrorHandler *);  bool can_live_reconfigure() const		{ return true; }  int initialize(ErrorHandler *);  void add_handlers();  Packet *simple_action(Packet *);   private:    EtherAddress _eth;  IPAddress _ip;  click_ether _eh;  grid_hdr _gh;  grid_nbr_encap _nb;};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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