forked from vanhoefm/modwifi-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClientInfo.h
37 lines (30 loc) · 823 Bytes
/
ClientInfo.h
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
#ifndef JAMMER_CLIENTINFO_H
#define JAMMER_CLIENTINFO_H
#include <set>
#include <string.h>
#include "SeqnumInfo.h"
#include "eapol.h"
/**
* Used to store connected clients, new/old sequence numbers, and EAPOL handshake
*/
class ClientInfo
{
public:
static int test_new_seqnums();
ClientInfo();
ClientInfo(const uint8_t mac[6]);
ClientInfo(const uint8_t mac[6], const uint8_t bssid[6], const char *pw, const char *essid);
bool is_new_seqnum(uint16_t seqnum);
void set_key_info(const uint8_t bssid[6], const char *passphrase, const char *essid);
private:
void remove_old_seqnums();
void remove_all_seqnums();
public:
// MAC address of client
uint8_t mac[6];
// Latest captured sequence numbers
std::set<SeqnumInfo> seqnums;
// EAPOL handshake info
eapol_sta_info keys;
};
#endif // JAMMER_CLIENTINFO_H