Click
Loading...
Searching...
No Matches
include
click
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>
7
CLICK_DECLS
8
9
// IP6 routing table.
10
// Lookup by longest prefix.
11
// Each entry contains a gateway and an output index.
12
13
class
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
};
34
Vector<Entry>
_v;
35
36
};
37
38
CLICK_ENDDECLS
39
#endif
String
A string of characters.
Definition
string.hh:22
Vector
Vector template.
Definition
vector.hh:111
vector.hh
Click's vector container template.
Generated on Mon Nov 2 2026 11:59:47 for Click by
1.9.8