nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | #ifndef HAVE_LINKEDLIST_H |
2 | #define HAVE_LINKEDLIST_H |
||
3 | |||
4 | #include <stdint.h> |
||
5 | |||
6 | #include "mac_addr.h" |
||
7 | |||
8 | #define SHUFFLE_DISTANCE 16 //more shuffling => more cpu |
||
9 | |||
10 | struct clist |
||
11 | { |
||
12 | unsigned char *data; |
||
13 | int data_len; |
||
14 | int status; |
||
15 | struct clist *next; |
||
16 | }; |
||
17 | |||
18 | struct clistwidsap |
||
19 | { |
||
20 | struct ether_addr bssid; |
||
21 | int channel; |
||
22 | uint16_t capa; |
||
23 | char *ssid; |
||
24 | struct clistwidsap *next; |
||
25 | }; |
||
26 | |||
27 | struct clistwidsclient |
||
28 | { |
||
29 | struct ether_addr mac; |
||
30 | char status; //0=ready 1=authed 2=assoced |
||
31 | struct clistwidsclient *next; |
||
32 | unsigned char *data; |
||
33 | int data_len; |
||
34 | int retries; |
||
35 | uint16_t seq; |
||
36 | struct clistwidsap *bssid; |
||
37 | }; |
||
38 | |||
39 | struct clistauthdos |
||
40 | { |
||
41 | struct ether_addr ap; |
||
42 | unsigned char status; |
||
43 | unsigned int responses; |
||
44 | unsigned int missing; |
||
45 | struct clistauthdos *next; |
||
46 | }; |
||
47 | |||
48 | //All these calls are thread-safe via a single pthread_mutex! |
||
49 | |||
50 | struct clistauthdos *add_to_clistauthdos(struct clistauthdos *c, struct ether_addr ap, unsigned char status, unsigned int responses, unsigned int missing); |
||
51 | struct clistauthdos *search_ap(struct clistauthdos *c, struct ether_addr ap); |
||
52 | struct clistauthdos *search_authdos_status(struct clistauthdos *c, int desired_status); |
||
53 | |||
54 | struct clist *add_to_clist(struct clist *c, unsigned char *data, int status, int data_len); |
||
55 | struct clist *search_status(struct clist *c, int desired_status); |
||
56 | struct clist *search_data(struct clist *c, unsigned char *desired_data, int data_len); |
||
57 | |||
58 | struct clistwidsap *add_to_clistwidsap(struct clistwidsap *c, struct ether_addr bssid, int channel, uint16_t capa, char *ssid); |
||
59 | struct clistwidsap *search_bssid(struct clistwidsap *c, struct ether_addr desired_bssid); |
||
60 | struct clistwidsap *search_bssid_on_channel(struct clistwidsap *c, int desired_channel); |
||
61 | struct clistwidsap *shuffle_widsaps(struct clistwidsap *c); |
||
62 | struct clistwidsclient *add_to_clistwidsclient(struct clistwidsclient *c, struct ether_addr mac, int status, unsigned char *data, int data_len, uint16_t sequence, struct clistwidsap *bssid); |
||
63 | struct clistwidsclient *search_status_widsclient(struct clistwidsclient *c, int desired_status, int desired_channel); |
||
64 | struct clistwidsclient *search_client(struct clistwidsclient *c, struct ether_addr mac); |
||
65 | struct clistwidsclient *shuffle_widsclients(struct clistwidsclient *c); |
||
66 | |||
67 | #endif |