-
Notifications
You must be signed in to change notification settings - Fork 81
/
ip6print.hh
74 lines (48 loc) · 1.43 KB
/
ip6print.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef CLICK_IP6PRINT_HH
#define CLICK_IP6PRINT_HH
#include <click/batchelement.hh>
#include <click/string.hh>
CLICK_DECLS
/*
=c
IP6Print([LABEL, NBYTES, CONTENTS, ACTIVE])
=s ip6
pretty-prints IP6 packets
=d
dumps simple information about ip6 packet.
LABEL specifies the label at the head of each
line. NBYTES specify how many bytes to print
and CONTENTS specify if the content should
be printed, in hex. NBYTES and CONTENTS
are keywords.
Keyword arguments are:
=over 4
=item LABEL
String. A label to print before each packet. Default is an empty label.
=item NBYTES
Integer. Determines how many bytes to print. Default is 1500 bytes.
=item CONTENTS
Boolean. Determines whether the packet data is printed (in hex). Default is false.
=item ACTIVE
Boolean. If false, then don't print messages. Default is true.
=back
=h active read-write
Sets/Gets the active flag of this element.
=a CheckIP6Header, IPPrint */
class IP6Print : public SimpleElement<IP6Print> {
public:
IP6Print();
~IP6Print();
const char *class_name() const override { return "IP6Print"; }
const char *port_count() const override { return PORTS_1_1; }
int configure(Vector<String> &, ErrorHandler *) CLICK_COLD;
void add_handlers() CLICK_COLD;
Packet *simple_action(Packet *);
private:
String _label;
unsigned _bytes;
bool _contents;
bool _active;
};
CLICK_ENDDECLS
#endif