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,它目前主要支持基於HostAPprism54, 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,好了,下一篇博客將詳細說明幾個重要的源碼文件與數據結構。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM