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

📄 simplelocquerier.hh

📁 Click is a modular router toolkit. To use it you ll need to know how to compile and install the sof
💻 HH
字号:
#ifndef SIMPLELOCQUERIER_HH#define SIMPLELOCQUERIER_HH/* * =c * SimpleLocQuerier(DEST-IP LAT LON [, ...]) * =s Grid * Sets Grid destination location by looking in a static table * =d * * Each argument is a 3-tuple of the destination IP, latitude, and * longitude (lat, lon as real numbers). * * Expects GRID_NBR_ENCAP packet with MAC headers as input, which will * be output with the destination location filled in to match the * header's destination address. * * =a FloodingLocQuerier */#include <click/element.hh>#include <click/ipaddress.hh>#include <click/bighashmap.hh>#include "grid.hh"CLICK_DECLSclass SimpleLocQuerier : public Element { public:  SimpleLocQuerier();  ~SimpleLocQuerier();  const char *class_name() const		{ return "SimpleLocQuerier"; }  const char *port_count() const		{ return PORTS_1_1; }  const char *processing() const		{ return PUSH; }  void add_handlers();  int configure(Vector<String> &, ErrorHandler *);  int initialize(ErrorHandler *);  void push(int port, Packet *); private:  typedef HashMap<IPAddress, grid_location> locmap;  locmap _locs;  void send_query_for(const IPAddress &);  static String read_table(Element *, void *);  static int add_entry(const String &arg, Element *element, void *, ErrorHandler *errh);};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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