-
Notifications
You must be signed in to change notification settings - Fork 82
/
wepdecap.hh
65 lines (42 loc) · 1.09 KB
/
wepdecap.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
#ifndef CLICK_WEPDECAP_HH
#define CLICK_WEPDECAP_HH
#include <click/element.hh>
#include <clicknet/ether.h>
#include <elements/wifi/rc4.hh>
#include <clicknet/wifi.h>
CLICK_DECLS
/*
=c
WepDecap
=s Wifi
Turns 802.11 packets into ethernet packets
=d
=e
wifi_cl :: Classifier (0/00%0c,
0/04%0c,
0/08%0c);
wifi_cl [0] -> Discard; //mgt
wifi_cl [1] -> Discard; //ctl
wifi_cl [2] -> wifi_decap :: WepDecap() -> ...
=a WifiEncap
*/
class WepDecap : public Element { public:
WepDecap() CLICK_COLD;
~WepDecap() CLICK_COLD;
const char *class_name() const override { return "WepDecap"; }
const char *port_count() const override { return PORTS_1_1; }
const char *processing() const override { return AGNOSTIC; }
int configure(Vector<String> &, ErrorHandler *) CLICK_COLD;
bool can_live_reconfigure() const { return true; }
Packet *simple_action(Packet *);
void add_handlers() CLICK_COLD;
bool _debug;
bool _strict;
u_int32_t iv;
struct rc4_state _rc4;
String _key;
int _keyid;
private:
};
CLICK_ENDDECLS
#endif