Measure connection times

Patrick Herrmann Patrick.Herrmann at rwth-aachen.de
Fri Feb 17 08:52:57 EST 2012


I need to measure the duration of the connection process to compare EAP full authorization with using a cached PMK for my diploma thesis. What is the best way to do this?

Currently I make timestamps at two points:

1. In event.c: (associate with new BSS)
wpa_supplicant_connect(...) {
...
if (wpa_s->reassociate ||
    (os_memcmp(selected->bssid, wpa_s->bssid, ETH_ALEN) != 0 &&
    (wpa_s->wpa_state != WPA_ASSOCIATING ||
    os_memcmp(selected->bssid, wpa_s->pending_bssid, ETH_ALEN) !=
    0))) {
...
// timestamp
...
}

2. In wpa_supplicant.c: (WPA state change to completed, i.e. 4way-handshake completed)
void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
                              enum wpa_states state) {
...
if (state == WPA_COMPLETED && wpa_s->new_connection) {
...
// timestamp
...
}

Thank you,
Patrick


More information about the HostAP mailing list