-
Notifications
You must be signed in to change notification settings - Fork 82
/
neighborhoodtest.hh
46 lines (31 loc) · 1.1 KB
/
neighborhoodtest.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// -*- c-basic-offset: 4 -*-
#ifndef CLICK_NEIGHBORHOODTEST_HH
#define CLICK_NEIGHBORHOODTEST_HH
#include <click/element.hh>
#include <click/timer.hh>
CLICK_DECLS
/*
=c
NeighborhoodTest()
=s test
check ElementNeighborhoodVisitor functionality
=d
NeighborhoodTest provides handlers named "upstream" and "downstream" that,
when read, return the calculated upstream or downstream neighborhood, to the
diameter specified as the read parameter. "upstream0" through "upstreamN"
evaluate upstream neighborhoods for individual input ports, and similarly for
"downstream0" through "downstreamN".
*/
class NeighborhoodTest : public Element { public:
NeighborhoodTest() CLICK_COLD;
const char *class_name() const override { return "NeighborhoodTest"; }
const char *port_count() const override { return "-/-"; }
const char *flow_code() const override { return "x/y"; }
void add_handlers() CLICK_COLD;
Packet *simple_action(Packet *);
private:
static int handler(int operation, String &data, Element *element,
const Handler *handler, ErrorHandler *errh);
};
CLICK_ENDDECLS
#endif