mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
List all neighbors with same score when kicking
The wnm_disassoc_imminent procedure takes a list of neighbor reports to send to the client. Instead of picking just one AP to be sent, send all that have the same score. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
This commit is contained in:
parent
3ba0fa4947
commit
a7a830950a
10 changed files with 211 additions and 153 deletions
|
|
@ -347,9 +347,14 @@ void send_beacon_reports(ap *a, int id);
|
|||
#define SORT_LENGTH 5
|
||||
extern char sort_string[];
|
||||
|
||||
struct kicking_nr {
|
||||
char nr[NEIGHBOR_REPORT_LEN];
|
||||
int score;
|
||||
struct kicking_nr *next;
|
||||
};
|
||||
|
||||
// ---------------- Functions -------------------
|
||||
int better_ap_available(ap *kicking_ap, struct dawn_mac client_addr, char* neighbor_report);
|
||||
int better_ap_available(ap *kicking_ap, struct dawn_mac client_addr, struct kicking_nr** neighbor_report);
|
||||
|
||||
// All users of datastorage should call init_ / destroy_mutex at initialisation and termination respectively
|
||||
int init_mutex();
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@
|
|||
#define MACSTR "%02X:%02X:%02X:%02X:%02X:%02X"
|
||||
#define MACSTRLOWER "%02x:%02x:%02x:%02x:%02x:%02x"
|
||||
|
||||
#define NR_MACSTR "%c%c:%c%c:%c%c:%c%c:%c%c:%c%c"
|
||||
#define NR_MAC2STR(a) *a, *(a+1), *(a+2), *(a+3), *(a+4), *(a+5), *(a+6), *(a+7), *(a+8), *(a+9), *(a+10), *(a+11)
|
||||
|
||||
#ifndef ETH_ALEN
|
||||
#define ETH_ALEN 6
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ int send_set_probe(struct dawn_mac client_addr);
|
|||
* @param duration
|
||||
* @return - 0 = asynchronous (client has been told to remove itself, and caller should manage arrays); 1 = synchronous (caller should assume arrays are updated)
|
||||
*/
|
||||
int wnm_disassoc_imminent(uint32_t id, const struct dawn_mac client_addr, char* dest_ap, uint32_t duration);
|
||||
int wnm_disassoc_imminent(uint32_t id, const struct dawn_mac client_addr, struct kicking_nr* neighbor_list, uint32_t duration);
|
||||
|
||||
/**
|
||||
* Send control message to all hosts to add the mac to a don't control list.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue