踏实做事,认真做人
分类: 嵌入式
2013-07-17 09:36:22
Hostapd(0.8) init routine:
1)hostapd_global_init ->hostapd_interface_init
->hostapd_global_run
2)hostapd_interface_init->hostapd_init(get hostapd conf param)->hostapd_driver_init
->hapd_init
->get_capa();
->hostapd_setup_interface()
3)hostapd_setup_interface routine
->set_country()
->set_freq()
->set_rate_sets()
->set_rts
->set_frag
->hostapd_setup_bss()->
->set_tx_queue_params()
->commit()
4)hostapd_setup_bss() routine
->hostapd_if_add()[WPA_IF_AP_BSS] ->hostapd_flush_old_stations()
->hostapd_flush()
->flush()
->hostapd_drv_sta_deauth
->sta_deauth()
->hostapd_free_stas()
->hostapd_set_privacy->hostapd_broadcast_wep_clear() ->hostapd_setup_encryption()->hostapd_get_ssid() ->hostapd_setup_wpa_psk()
->set_privacy() ->set_key()[WPA_ALG_NONE] ->hapd_get_ssid()
->hostapd_set_ssid() -> radius_client_init() -> hostapd_acl_init() -> hostapd_init_wps() ->authsrv_init()
->hapd_set_ssid()
->ieee802_1x_init() ->hostapd_setup_wpa->accounting_init()->iapp_init() -> hapd_iface->ctrl_iface_init()
->ieee802_11_set_beacon->hostapd_drv_set_beacon()->hostapd_set_bss_params
->set_operate() ->set_beacon() ->set_ht_params()
->set_cts_protect()
->set_short_slot_time()
->set_preample()
->set_intra_bss()
5)hapd_init routine
|->linux_br_get->add_ifidx()->linux_set_iface_flags(0)->linux_set_ifhwaddr()->wpa_driver_nl80211_set_mode[IEEE80211_MODE_AP]
hapd_init->i802_init->wpa_driver_nl80211_init| ->linux_set_iface_flags(1)->create drv->capol_sock,register handle_eapol->linux_get_ifhwaddr()
|->wpa_driver_nl80211_init_nl()->create drv ioctl sock -> netlink_init(create netlink->sock,register netlink_receive()
| ->rfkill_init()->wpa_driver_nl80211_finish_drv_init()->wpa_driver_nl80211_capa[NL80211_CMD_GET_WIPHY]->linux_get_ifhwaddr
| ->nl80211_register_action_frames()->NL80211_CMD_REGISTER_ACTION
6)wpa_driver_nl80211_set_mnode routine
->nl80211_set_mode()[NL80211_CMD_SET_INTERFACE] ->nl80211_create_monitor_interface()->nl80211_create_iface[NL80211_IFTYPE_MONITOR]
->create drv monitor sock / register handle_monitor_read ->nl80211_create_iface_once()->NL80211_CMD_NEW_INTERFACE