mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Add print function for client list
This commit is contained in:
parent
d2f4a96311
commit
881b613d1e
2 changed files with 23 additions and 0 deletions
|
@ -59,6 +59,8 @@ pthread_mutex_t client_array_mutex;
|
|||
|
||||
void client_array_insert(client entry);
|
||||
client* client_array_delete(client entry);
|
||||
void print_client_array();
|
||||
void print_client_entry(client entry);
|
||||
|
||||
#define ARRAY_LEN 1000
|
||||
|
||||
|
|
|
@ -581,3 +581,24 @@ void print_probe_entry(probe_entry entry) {
|
|||
mac_buf_ap, mac_buf_client, mac_buf_target, entry.signal, entry.freq,
|
||||
entry.counter);
|
||||
}
|
||||
|
||||
void print_client_entry(client entry) {
|
||||
char mac_buf_ap[20];
|
||||
char mac_buf_client[20];
|
||||
|
||||
sprintf(mac_buf_ap, "%x:%x:%x:%x:%x:%x", MAC2STR(entry.bssid_addr));
|
||||
sprintf(mac_buf_client, "%x:%x:%x:%x:%x:%x", MAC2STR(entry.client_addr));
|
||||
|
||||
printf("bssid_addr: %s, client_addr: %s, freq: ""%d\n",
|
||||
mac_buf_ap, mac_buf_client, entry.freq);
|
||||
}
|
||||
|
||||
void print_client_array() {
|
||||
printf("--------Clients------\n");
|
||||
printf("Probe Entry Last: %d\n", client_entry_last);
|
||||
for(int i = 0; i <= client_entry_last; i++)
|
||||
{
|
||||
print_client_entry(client_array[i]);
|
||||
}
|
||||
printf("------------------\n");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue