wlantest: Add per-BSS counters for BIP deauth/disassoc

This commit is contained in:
Jouni Malinen 2010-11-21 21:50:28 +02:00
parent cdd71e307e
commit 783a082ccc
3 changed files with 9 additions and 0 deletions

View file

@ -784,6 +784,11 @@ static int check_bip(struct wlantest *wt, const u8 *data, size_t len)
os_memcpy(bss->ipn[keyid], mmie + 2, 6);
bss->counters[WLANTEST_BSS_COUNTER_VALID_BIP_MMIE]++;
if (stype == WLAN_FC_STYPE_DEAUTH)
bss->counters[WLANTEST_BSS_COUNTER_BIP_DEAUTH]++;
else if (stype == WLAN_FC_STYPE_DISASSOC)
bss->counters[WLANTEST_BSS_COUNTER_BIP_DISASSOC]++;
return 0;
}

View file

@ -569,6 +569,8 @@ static const struct bss_counters bss_counters[] = {
{ "valid_bip_mmie", WLANTEST_BSS_COUNTER_VALID_BIP_MMIE },
{ "invalid_bip_mmie", WLANTEST_BSS_COUNTER_INVALID_BIP_MMIE },
{ "missing_bip_mmie", WLANTEST_BSS_COUNTER_MISSING_BIP_MMIE },
{ "bip_deauth", WLANTEST_BSS_COUNTER_BIP_DEAUTH },
{ "bip_disassoc", WLANTEST_BSS_COUNTER_BIP_DISASSOC },
{ NULL, 0 }
};

View file

@ -60,6 +60,8 @@ enum wlantest_bss_counter {
WLANTEST_BSS_COUNTER_VALID_BIP_MMIE,
WLANTEST_BSS_COUNTER_INVALID_BIP_MMIE,
WLANTEST_BSS_COUNTER_MISSING_BIP_MMIE,
WLANTEST_BSS_COUNTER_BIP_DEAUTH,
WLANTEST_BSS_COUNTER_BIP_DISASSOC,
NUM_WLANTEST_BSS_COUNTER
};