-
Notifications
You must be signed in to change notification settings - Fork 78
/
setvlananno.hh
64 lines (40 loc) · 1.28 KB
/
setvlananno.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
#ifndef CLICK_SETVLANANNO_HH
#define CLICK_SETVLANANNO_HH
#include <click/batchelement.hh>
CLICK_DECLS
/*
=c
SetVLANAnno(VLAN_TCI [, VLAN_PCP])
=s ethernet
sets VLAN annotation
=d
Sets passing packets' VLAN_TCI annotations to the configured values. Set the
annotation using VLAN_TCI (the whole annotation), or VLAN_ID and VLAN_PCP
(setting the ID and Priority Code Point components, respectively).
=h vlan_tci read/write
Return or set the VLAN_TCI parameter.
=h vlan_id read/write
Return or set the VLAN_ID parameter.
=h vlan_pcp read/write
Return or set the VLAN_PCP parameter.
=a
EtherVLANEncap */
class SetVLANAnno : public BatchElement { public:
SetVLANAnno() CLICK_COLD;
~SetVLANAnno() CLICK_COLD;
const char *class_name() const override { return "SetVLANAnno"; }
const char *port_count() const override { return PORTS_1_1; }
int configure(Vector<String> &conf, ErrorHandler *errh) CLICK_COLD;
bool can_live_reconfigure() const { return true; }
void add_handlers() CLICK_COLD;
Packet *simple_action(Packet *p);
#if HAVE_BATCH
PacketBatch *simple_action_batch(PacketBatch *);
#endif
private:
uint16_t _vlan_tci;
enum { h_config, h_vlan_tci };
static String read_handler(Element *e, void *user_data) CLICK_COLD;
};
CLICK_ENDDECLS
#endif