hostapd阅读(openwrt)-1
好久没有来博客园写点东西了,这段时间主要搞了openwrt系统的移植,无线的校验等相关工作,鉴于我是一个懒惰的大龄菜鸟程序员,就先自我原谅自己了,好了废话少说,直奔主题--hostapd。
由于我主要从事OP的相关开发,故我们先来了解hostapd, hostapd-full, wpad, wpad-mini, supplicant等等,hostapd按照官方的说法是:“用户层无线接入管理守护程序:包括IEEE 802.1X/WPA/EAP认证器,RADIUS client, EAP server, and RADIUS authentication server,它目前主要支持基于HostAP,prism54, madwifi, mac80211的无线驱动框架”。hostadp-full通过编译时选择更多的组件(参考full-mini.patch文件),wpad是基于hostapd的编译移植版本。
--- files/hostapd-full.config 2016-08-01 14:09:21.708727013 +0800 +++ files/hostapd-mini.config 2016-08-01 14:09:21.708727013 +0800 @@ -36,7 +36,7 @@ #CONFIG_DRIVER_NONE=y # IEEE 802.11F/IAPP -CONFIG_IAPP=y +# CONFIG_IAPP=y # WPA2/IEEE 802.11i RSN pre-authentication CONFIG_RSN_PREAUTH=y @@ -51,25 +51,25 @@ #CONFIG_IEEE80211W=y # Integrated EAP server -CONFIG_EAP=y +#CONFIG_EAP=y # EAP-MD5 for the integrated EAP server -CONFIG_EAP_MD5=y +#CONFIG_EAP_MD5=y # EAP-TLS for the integrated EAP server -CONFIG_EAP_TLS=y +#CONFIG_EAP_TLS=y # EAP-MSCHAPv2 for the integrated EAP server -CONFIG_EAP_MSCHAPV2=y +#CONFIG_EAP_MSCHAPV2=y # EAP-PEAP for the integrated EAP server -CONFIG_EAP_PEAP=y +#CONFIG_EAP_PEAP=y # EAP-GTC for the integrated EAP server -CONFIG_EAP_GTC=y +#CONFIG_EAP_GTC=y # EAP-TTLS for the integrated EAP server -CONFIG_EAP_TTLS=y +#CONFIG_EAP_TTLS=y # EAP-SIM for the integrated EAP server #CONFIG_EAP_SIM=y @@ -103,8 +103,7 @@ #CONFIG_EAP_FAST=y # Wi-Fi Protected Setup (WPS) -CONFIG_WPS=y -CONFIG_WPS2=y +#CONFIG_WPS=y # Enable UPnP support for external WPS Registrars #CONFIG_WPS_UPNP=y @@ -116,17 +115,17 @@ # PKCS#12 (PFX) support (used to read private key and certificate file from # a file that usually has extension .p12 or .pfx) -CONFIG_PKCS12=y +#CONFIG_PKCS12=y # RADIUS authentication server. This provides access to the integrated EAP # server from external hosts using RADIUS. #CONFIG_RADIUS_SERVER=y # Build IPv6 support for RADIUS operations -CONFIG_IPV6=y +#CONFIG_IPV6=y # IEEE Std 802.11r-2008 (Fast BSS Transition) -CONFIG_IEEE80211R=y +#CONFIG_IEEE80211R=y # Use the hostapd's IEEE 802.11 authentication (ACL), but without # the IEEE 802.11 Management capability (e.g. FreeBSD/net80211) @@ -144,23 +143,17 @@ #CONFIG_NO_STDOUT_DEBUG=y # Remove support for RADIUS accounting -#CONFIG_NO_ACCOUNTING=y +CONFIG_NO_ACCOUNTING=y # Remove support for RADIUS -#CONFIG_NO_RADIUS=y +CONFIG_NO_RADIUS=y # Remove support for VLANs #CONFIG_NO_VLAN=y CONFIG_TLS=internal -CONFIG_INTERNAL_LIBTOMMATH=y -CONFIG_INTERNAL_AES=y -NEED_AES_DEC=y CONFIG_NO_RANDOM_POOL=y CONFIG_NO_DUMP_STATE=y -CONFIG_WPS=y -CONFIG_FULL_DYNAMIC_VLAN=y - CONFIG_UBUS=y
hostapd的配置相关说明可以参考:http://linuxwireless.org/en/users/Documentation/hostapd/ 说到底hostapd可以说是一个交互中介,用于通过nl80211用户与驱动子层(cfg80211与mac80211)进行交互管理。
好了,关于hostapd就说到这里面吧,源码下载地址:http://w1.fi/hostapd/ , 我们要想分析好hostapd源码,我们首先需要对hostapd的源码树与数据结构进行熟悉:
源码树:http://w1.fi/wpa_supplicant/devel/code_structure.html,数据结构:http://w1.fi/wpa_supplicant/devel/annotated.html,好了,下一篇博客将详细说明几个重要的源码文件与数据结构。