mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Add insert and delete function
This commit is contained in:
parent
ecb6c6b80f
commit
454e44cf5d
4 changed files with 167 additions and 11 deletions
|
|
@ -17,7 +17,7 @@
|
|||
#define TIME_THRESHOLD 60 // every minute
|
||||
|
||||
// Probe entrys
|
||||
typedef struct {
|
||||
typedef struct probe_entry_s {
|
||||
uint8_t bssid_addr[ETH_ALEN];
|
||||
uint8_t client_addr[ETH_ALEN];
|
||||
uint8_t target_addr[ETH_ALEN];
|
||||
|
|
@ -27,6 +27,39 @@ typedef struct {
|
|||
int counter;
|
||||
} probe_entry;
|
||||
|
||||
|
||||
// Array
|
||||
|
||||
#define ARRAY_LEN 1000
|
||||
|
||||
struct probe_entry_s probe_array[ARRAY_LEN];
|
||||
|
||||
void insert_to_array(probe_entry entry, int inc_counter);
|
||||
void probe_array_insert(probe_entry entry);
|
||||
probe_entry* probe_array_delete(probe_entry entry);
|
||||
void print_array();
|
||||
|
||||
pthread_mutex_t probe_array_mutex;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// List
|
||||
typedef struct node {
|
||||
probe_entry data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue