⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gridencap.hh

📁 Click is a modular router toolkit. To use it you ll need to know how to compile and install the sof
💻 HH
字号:
#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(ETH, IP) * * =s Grid * * Encapsulates packets in static Grid data encapsulation header * (GRID_NBR_ENCAP), including ethernet, Grid, and grid data encap * headers. * * =d * * ETH and IP are this node's ethernet and IP * addresses, respectively.  Sets the ethernet type to the Grid * ethertype; sets the ethernet source address to ETH.  Sets the Grid * src and tx IP to be IP.  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 *port_count() const		{ return PORTS_1_1; }  const char *processing() const		{ return AGNOSTIC; }  int configure(Vector<String> &, ErrorHandler *);  bool can_live_reconfigure() const		{ return true; }  int initialize(ErrorHandler *);  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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -