mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
add function to get station cound of col domain
This commit is contained in:
parent
487d23f7f0
commit
39f23b83bd
2 changed files with 18 additions and 0 deletions
|
@ -236,6 +236,8 @@ int build_network_overview(struct blob_buf *b);
|
||||||
|
|
||||||
int probe_array_set_all_probe_count(uint8_t client_addr[], uint32_t probe_count);
|
int probe_array_set_all_probe_count(uint8_t client_addr[], uint32_t probe_count);
|
||||||
|
|
||||||
|
int ap_get_collision_count(int col_domain);
|
||||||
|
|
||||||
/* Utils */
|
/* Utils */
|
||||||
|
|
||||||
// ---------------- Defines -------------------
|
// ---------------- Defines -------------------
|
||||||
|
|
|
@ -759,6 +759,22 @@ ap insert_to_ap_array(ap entry) {
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ap_get_collision_count(int col_domain) {
|
||||||
|
|
||||||
|
int ret_sta_count = 0;
|
||||||
|
|
||||||
|
pthread_mutex_lock(&ap_array_mutex);
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i <= ap_entry_last; i++) {
|
||||||
|
if(ap_array[i].collision_domain == col_domain)
|
||||||
|
ret_sta_count += ap_array[i].station_count;
|
||||||
|
}
|
||||||
|
pthread_mutex_unlock(&ap_array_mutex);
|
||||||
|
|
||||||
|
return ret_sta_count;
|
||||||
|
}
|
||||||
|
|
||||||
ap ap_array_get_ap(uint8_t bssid_addr[]) {
|
ap ap_array_get_ap(uint8_t bssid_addr[]) {
|
||||||
ap ret;
|
ap ret;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue