kernel -> wpa_supplicant
初始化: wpa_driver_nl80211_init_nl_global @ driver_nl80211.c (初始化注册process_global_event)
1、 监听nl套接字。
2、 int process_global_event(struct nl_msg *msg, void *arg) @ driver_nl80211_event.c
3、 void do_process_drv_event(struct i802_bss *bss, int cmd,struct nlattr **tb) @ driver_nl80211_event.c //解释gnlh->cmd(enum nl80211_commands)
4、 events.c 各种函数。
external APP -> wpa_supplicant
初始化 wpa_supplicant_ctrl_iface_receive 注册监听。
1、wpa_supplicant_ctrl_iface_receive
2、char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, char *buf, size_t *resp_len)
3、ctrl_iface.c定义各种命令。(Android有特殊实现)
原文:https://www.cnblogs.com/huangguanyuan/p/15310488.html