(八十二)学习wpa_supplicant-devel——chapter1
前言:对应wpa_supplicant-devel 中Developers’ documentation for wpa_supplicant and hostapd,主要内容就是wpa_supplicant和hostapd的简介
1.wpa_supplicant-devel简介
The goal of this documentation and comments in the source code is to give enough information for other
developers to understand how wpa_supplicant and hostapd have been implemented, how they can be mod-
ified, how new drivers can be supported, and how the source code can be ported to other operating systems.
If any information is missing, feel free to contact Jouni Malinen <[email protected]> for more information. Con-
tributions as patch files are also very welcome at the same address. Please note that this software is licensed
under dual license, GPLv2 or BSD at user’s choice. All contributions to wpa_supplicant and hostapd are
expected to use compatible licensing terms.
The source code and read-only access to the combined wpa_supplicant and hostapd Git repository
is available from the project home page at http://w1.fi/wpa_supplicant/. This develop-
ers’ documentation is also available as a PDF file from http://w1.fi/wpa_supplicant/wpa_-
supplicant-devel.pdf .
简单来说wpa_supplicant-devel是一个wpa_supplicant和hostapd的开发文档,涉及以下几部分内容
- wpa_supplicant和hostapd的实现方式
- wpa_supplicant和hostapd的修改方式
- 驱动如何支持
- 源码如何移植到其他的操作系统
2.wpa_supplicant简介
wpa_supplicant is a WPA Supplicant for Linux, BSD and Windows with support for WPA and WPA2
(IEEE 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in the client stations.
It implements key negotiation with a WPA Authenticator and it can optionally control roaming and IEEE
802.11 authentication/association of the wlan driver.
The design goal for wpa_supplicant was to use hardware, driver, and OS independent, portable C code
for all WPA functionality. The source code is divided into separate C files as shown on the code structure
page. All hardware/driver specific functionality is in separate files that implement a well-defined driver
API. Information about porting to different target boards and operating systems is available on the porting
page.
EAPOL (IEEE 802.1X) state machines are implemented as a separate module that interacts with EAP
peer implementation. In addition to programs aimed at normal production use, wpa_supplicant source tree
includes number of testing and development tools that make it easier to test the programs without having to
setup a full test setup with wireless cards. These tools can also be used to implement automatic test suites.
wpa_supplicant implements a control interface that can be used by external programs to control the opera-
tions of the wpa_supplicant daemon and to get status information and event notifications. There is a small
C library that provides helper functions to facilitate the use of the control interface. This library can also
be used with C++.
以上第一部分主要将wpa_supplicant是什么,第二部分讲它是做什么的,第三部分是补充说明。
1)wpa_supplicant是一个支持WPA和WPA2的用于Linux、BSD和Windows的WPA Supplicant.它实现了使用WPA认证器的秘钥协商,可以控制wlan驱动的漫游和IEEE 802.11 授权和连接。
2)wpa_supplicant设计目的是可以使用适用于所有WPA硬件驱动和OS独立的可移植的C代码。源码都被分割成单独的C文件,所有的硬件、驱动都被写入到单独的文件中,这些文件都实现了定义良好的驱动API。
3.hostapd简介
hostapd includes IEEE 802.11 access point management (authentication / association), IEEE 802.1X/W-
PA/WPA2 Authenticator, EAP server, and RADIUS authentication server functionality. It can be build
with various configuration option, e.g., a standalone AP management solution or a RADIUS authentication
server with support for number of EAP methods.
The design goal for hostapd was to use hardware, driver, and OS independent, portable C code for all
WPA functionality. The source code is divided into separate C files as shown on the code structure page.
All hardware/driver specific functionality is in separate files that implement a well-defined driver API.
Information about porting to different target boards and operating systems is available on the porting page.
EAPOL (IEEE 802.1X) state machines are implemented as a separate module that interacts with EAP
server implementation. Similarly, RADIUS authentication server is in its own separate module. Both IEEE
802.1X and RADIUS authentication server can use EAP server functionality.
hostapd implements a control interface that can be used by external programs to control the operations of
the hostapdt daemon and to get status information and event notifications. There is a small C library that
provides helper functions to facilitate the use of the control interface. This library can also be used with
C++.
hostapd包含了IEEE 802.11接入点管理、IEEE 802.1X/WPA/WPA2 授权、EAP服务器 和 RADIUS认证服务器功能。它可以使用多种配置编译,比如一个单独的AP 管理解决方案或者一个RADIUS支持许多EAP方法的授权服务器。
hostapd实现了一个可以用额外的可以控制hostapdt守护进程和获取状态信息事件通知的控制接口,并且有一个小的C语言库提供有用的功能来加强控制接口的使用。这个库也可以使用C++进行调用。