developer.txt 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. Developer notes for hostapd
  2. ===========================
  3. hostapd daemon setup, operations, and shutdown
  4. ----------------------------------------------
  5. Files: hostapd.[ch]
  6. Externally called functions:
  7. hostapd_new_assoc_sta() is called when a station associates with the AP
  8. Event loop functions:
  9. handle_term() is called on SIGINT and SIGTERM to terminate hostapd process
  10. handle_reload() is called on SIGHUP to reload configuration
  11. handle_dump_state() is called on SIGUSR1 to dump station state data to a
  12. text file
  13. hostapd_rotate_wep() is called to periodically change WEP keys
  14. Configuration parsing
  15. ---------------------
  16. Configuration file parsing and data structure definition.
  17. Files: config.[ch]
  18. Externally called functions:
  19. hostapd_config_read() is called to read and parse a configuration file;
  20. allocates and returns configuration data structure
  21. hostapd_config_free() is called to free configuration data structure
  22. hostapd_maclist_found() is called to check whether a given address is found
  23. in a list of MAC addresses
  24. Kernel driver access
  25. --------------------
  26. Helper functions for configuring the Host AP kernel driver and
  27. accessing data from it.
  28. Files: driver.[ch]
  29. IEEE 802.11 frame handling (netdevice wlan#ap)
  30. ----------------------------------------------
  31. Receive all incoming IEEE 802.11 frames from the kernel driver via
  32. wlan#ap interface.
  33. Files: receive.c
  34. Externally called functions:
  35. hostapd_init_sockets() is called to initialize sockets for receiving and
  36. sending IEEE 802.11 frames via wlan#ap interface
  37. Event loop functions:
  38. handle_read() is called for each incoming packet from wlan#ap net device
  39. Station table
  40. -------------
  41. Files: sta_info.[ch], ap.h
  42. Event loop functions:
  43. ap_handle_timer() is called to check station activity and to remove
  44. inactive stations
  45. IEEE 802.11 management
  46. ----------------------
  47. IEEE 802.11 management frame sending and processing (mainly,
  48. authentication and association). IEEE 802.11 station functionality
  49. (authenticate and associate with another AP as an station).
  50. Files: ieee802_11.[ch]
  51. Externally called functions:
  52. ieee802_11_mgmt() is called for each received IEEE 802.11 management frame
  53. (from handle_frame() in hostapd.c)
  54. ieee802_11_mgmt_cb() is called for each received TX callback of IEEE 802.11
  55. management frame (from handle_tx_callback() in hostapd.c)
  56. ieee802_11_send_deauth() is called to send deauthentication frame
  57. ieee802_11_send_disassoc() is called to send disassociation frame
  58. ieee802_11_parse_elems() is used to parse information elements in
  59. IEEE 802.11 management frames
  60. Event loop functions:
  61. ieee802_11_sta_authenticate() called to retry authentication (with another
  62. AP)
  63. ieee802_11_sta_associate() called to retry association (with another AP)
  64. IEEE 802.11 authentication
  65. --------------------------
  66. Access control list for IEEE 802.11 authentication. Uses staticly
  67. configured ACL from configuration files or an external RADIUS
  68. server. Results from external RADIUS queries are cached to allow
  69. faster authentication frame processing.
  70. Files: ieee802_11_auth.[ch]
  71. Externally called functions:
  72. hostapd_acl_init() called once during hostapd startup
  73. hostapd_acl_deinit() called once during hostapd shutdown
  74. hostapd_acl_recv_radius() called by IEEE 802.1X code for incoming RADIUS
  75. Authentication messages (returns 0 if message was processed)
  76. hostapd_allowed_address() called to check whether a specified station can be
  77. authenticated
  78. Event loop functions:
  79. hostapd_acl_expire() is called to expire ACL cache entries
  80. IEEE 802.1X Authenticator
  81. -------------------------
  82. Files: ieee802_1x.[ch]
  83. Externally called functions:
  84. ieee802_1x_receive() is called for each incoming EAPOL frame from the
  85. wireless interface
  86. ieee802_1x_new_station() is called to start IEEE 802.1X authentication when
  87. a new station completes IEEE 802.11 association
  88. Event loop functions:
  89. ieee802_1x_receive_auth() called for each incoming RADIUS Authentication
  90. message
  91. EAPOL state machine
  92. -------------------
  93. IEEE 802.1X state machine for EAPOL.
  94. Files: eapol_sm.[ch]
  95. Externally called functions:
  96. eapol_sm_step() is called to advance EAPOL state machines after any change
  97. that could affect their state
  98. Event loop functions:
  99. eapol_port_timers_tick() called once per second to advance Port Timers state
  100. machine
  101. IEEE 802.11f (IAPP)
  102. -------------------
  103. Files: iapp.[ch]
  104. Externally called functions:
  105. iapp_new_station() is called to start accounting session when a new station
  106. completes IEEE 802.11 association or IEEE 802.1X authentication
  107. Event loop functions:
  108. iapp_receive_udp() is called for incoming IAPP frames over UDP
  109. Per station accounting
  110. ----------------------
  111. Send RADIUS Accounting start and stop messages to a RADIUS Accounting
  112. server. Process incoming RADIUS Accounting messages.
  113. Files: accounting.[ch]
  114. Externally called functions:
  115. accounting_init() called once during hostapd startup
  116. accounting_deinit() called once during hostapd shutdown
  117. accounting_sta_start() called when a station starts new session
  118. accounting_sta_stop() called when a station session is terminated
  119. Event loop functions:
  120. accounting_receive() called for each incoming RADIUS Accounting message
  121. accounting_list_timer() called to retransmit accounting messages and to
  122. remove expired entries
  123. RADIUS messages
  124. ---------------
  125. RADIUS message generation and parsing functions.
  126. Files: radius.[ch]
  127. Event loop
  128. ----------
  129. Event loop for registering timeout calls, signal handlers, and socket
  130. read events.
  131. Files: eloop.[ch]
  132. RC4
  133. ---
  134. RC4 encryption
  135. Files: rc4.[ch]
  136. MD5
  137. ---
  138. MD5 hash and HMAC-MD5.
  139. Files: md5.[ch]
  140. Miscellaneous helper functions
  141. ------------------------------
  142. Files: common.[ch]