Click
Loading...
Searching...
No Matches
ip6table.hh
1// -*- c-basic-offset: 2; related-file-name: "../../lib/ip6table.cc" -*-
2#ifndef CLICK_IP6TABLE_HH
3#define CLICK_IP6TABLE_HH
4#include <click/glue.hh>
5#include <click/vector.hh>
6#include <click/ip6address.hh>
7CLICK_DECLS
8
9// IP6 routing table.
10// Lookup by longest prefix.
11// Each entry contains a gateway and an output index.
12
13class IP6Table { public:
14
15 IP6Table();
16 ~IP6Table();
17
18 bool lookup(const IP6Address &dst, IP6Address &gw, int &index) const;
19
20 void add(const IP6Address &dst, const IP6Address &mask, const IP6Address &gw, int index);
21 void del(const IP6Address &dst, const IP6Address &mask);
22 void clear() { _v.clear(); }
23 String dump();
24
25 private:
26
27 struct Entry {
28 IP6Address _dst;
29 IP6Address _mask;
30 IP6Address _gw;
31 int _index;
32 int _valid;
33 };
35
36};
37
38CLICK_ENDDECLS
39#endif
A string of characters.
Definition string.hh:22
Vector template.
Definition vector.hh:111
Click's vector container template.