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

📄 iptable.hh

📁 COPE the first practical network coding scheme which is developped on click
💻 HH
字号:
// -*- c-basic-offset: 2; related-file-name: "../../lib/iptable.cc" -*-#ifndef CLICK_IPTABLE_HH#define CLICK_IPTABLE_HH#include <click/glue.hh>#include <click/vector.hh>#include <click/ipaddress.hh>CLICK_DECLS// IP routing table.// Lookup by longest prefix.// Each entry contains a gateway and an output index.class IPTable { public:    IPTable();  ~IPTable();  bool lookup(IPAddress dst, IPAddress &gw, int &index) const;    void add(IPAddress dst, IPAddress mask, IPAddress gw, int index);  void del(IPAddress dst, IPAddress mask);  void clear()				{ _v.clear(); } private:    struct Entry {    IPAddress dst;    IPAddress mask;    IPAddress gw;    int index;    bool valid() const			{ return mask || !dst; }  };  Vector<Entry> _v;  };CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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