1 Developer notes for hostapd
2 ===========================
4 hostapd daemon setup, operations, and shutdown
5 ----------------------------------------------
9 Externally called functions:
10 hostapd_new_assoc_sta() is called when a station associates with the AP
13 handle_term() is called on SIGINT and SIGTERM to terminate hostapd process
14 handle_reload() is called on SIGHUP to reload configuration
15 handle_dump_state() is called on SIGUSR1 to dump station state data to a
17 hostapd_rotate_wep() is called to periodically change WEP keys
23 Configuration file parsing and data structure definition.
27 Externally called functions:
28 hostapd_config_read() is called to read and parse a configuration file;
29 allocates and returns configuration data structure
30 hostapd_config_free() is called to free configuration data structure
31 hostapd_maclist_found() is called to check whether a given address is found
32 in a list of MAC addresses
38 Helper functions for configuring the Host AP kernel driver and
39 accessing data from it.
44 IEEE 802.11 frame handling (netdevice wlan#ap)
45 ----------------------------------------------
47 Receive all incoming IEEE 802.11 frames from the kernel driver via
52 Externally called functions:
53 hostapd_init_sockets() is called to initialize sockets for receiving and
54 sending IEEE 802.11 frames via wlan#ap interface
57 handle_read() is called for each incoming packet from wlan#ap net device
63 Files: sta_info.[ch], ap.h
66 ap_handle_timer() is called to check station activity and to remove
70 IEEE 802.11 management
71 ----------------------
73 IEEE 802.11 management frame sending and processing (mainly,
74 authentication and association). IEEE 802.11 station functionality
75 (authenticate and associate with another AP as an station).
77 Files: ieee802_11.[ch]
79 Externally called functions:
80 ieee802_11_mgmt() is called for each received IEEE 802.11 management frame
81 (from handle_frame() in hostapd.c)
82 ieee802_11_mgmt_cb() is called for each received TX callback of IEEE 802.11
83 management frame (from handle_tx_callback() in hostapd.c)
84 ieee802_11_send_deauth() is called to send deauthentication frame
85 ieee802_11_send_disassoc() is called to send disassociation frame
86 ieee802_11_parse_elems() is used to parse information elements in
87 IEEE 802.11 management frames
90 ieee802_11_sta_authenticate() called to retry authentication (with another
92 ieee802_11_sta_associate() called to retry association (with another AP)
95 IEEE 802.11 authentication
96 --------------------------
98 Access control list for IEEE 802.11 authentication. Uses staticly
99 configured ACL from configuration files or an external RADIUS
100 server. Results from external RADIUS queries are cached to allow
101 faster authentication frame processing.
103 Files: ieee802_11_auth.[ch]
105 Externally called functions:
106 hostapd_acl_init() called once during hostapd startup
107 hostapd_acl_deinit() called once during hostapd shutdown
108 hostapd_acl_recv_radius() called by IEEE 802.1X code for incoming RADIUS
109 Authentication messages (returns 0 if message was processed)
110 hostapd_allowed_address() called to check whether a specified station can be
113 Event loop functions:
114 hostapd_acl_expire() is called to expire ACL cache entries
117 IEEE 802.1X Authenticator
118 -------------------------
120 Files: ieee802_1x.[ch]
123 Externally called functions:
124 ieee802_1x_receive() is called for each incoming EAPOL frame from the
126 ieee802_1x_new_station() is called to start IEEE 802.1X authentication when
127 a new station completes IEEE 802.11 association
129 Event loop functions:
130 ieee802_1x_receive_auth() called for each incoming RADIUS Authentication
137 IEEE 802.1X state machine for EAPOL.
141 Externally called functions:
142 eapol_sm_step() is called to advance EAPOL state machines after any change
143 that could affect their state
145 Event loop functions:
146 eapol_port_timers_tick() called once per second to advance Port Timers state
155 Externally called functions:
156 iapp_new_station() is called to start accounting session when a new station
157 completes IEEE 802.11 association or IEEE 802.1X authentication
159 Event loop functions:
160 iapp_receive_udp() is called for incoming IAPP frames over UDP
163 Per station accounting
164 ----------------------
166 Send RADIUS Accounting start and stop messages to a RADIUS Accounting
167 server. Process incoming RADIUS Accounting messages.
169 Files: accounting.[ch]
171 Externally called functions:
172 accounting_init() called once during hostapd startup
173 accounting_deinit() called once during hostapd shutdown
174 accounting_sta_start() called when a station starts new session
175 accounting_sta_stop() called when a station session is terminated
177 Event loop functions:
178 accounting_receive() called for each incoming RADIUS Accounting message
179 accounting_list_timer() called to retransmit accounting messages and to
180 remove expired entries
186 RADIUS message generation and parsing functions.
194 Event loop for registering timeout calls, signal handlers, and socket
211 MD5 hash and HMAC-MD5.
216 Miscellaneous helper functions
217 ------------------------------