wpa supplicant - WPA_supplicant authentication implementation -
i need have experience in playing wpa_supplicant code.
what understand wpa_supplicant dose in order supplicant connect ap (if what). hence steps as:
- scan
- get scan results
- auth
- assoc
- 4-hand shake
- data exchange
as understand first 4 steps managed wpa_supplicant. is, wpa_supplicant calls under laying driver perform these steps , after main event loop receives event_assoc msg. starts 4-handshake.
for part, fine first 2 steps carried out @ driver, ie., wpa_supplicant send scan req, driver perform scan , feed scan results.
my question is, correct wpa_supplicant cannot generate necessary packet , use, e.g., layer 2 (rawsocket) send authentication request ap ? , followed associate request ?... shall 1 provides these handle driver layer ?
as can see code in wpa_supplicant.c (void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, struct wpa_ssid *ssid))
that function calls function pointer selected driver eg. ".associate = wpa_driver_nl80211_associate" , here driver send down udnerlaying nl80211 driver code ? .... wpa_supplicant can not generate these packet self ?
i hope make sens, if not please ask :)
yes, understanding correct. send auth/assoc req, wpa_supplicant should construct corresponding nl80211 commands in following different scenarios: a) in case sme maintained in wpa_supplicant
- nl80211_cmd_authenticate
- nl80211_cmd_associate
b) in case sme maintained driver
- nl80211_cmd_connect
and these commands trigger corresponding cfg80211_ops hooks (.auth, .assoc, .connect) registered wifi driver called construct frames , send out frames.
Comments
Post a Comment