]> granicus.if.org Git - esp-idf/commitdiff
supplicant/esp_wifi: move supplicant to idf
authorDeng Xin <dengxin@espressif.com>
Mon, 13 Aug 2018 08:37:56 +0000 (16:37 +0800)
committerliuzhifu <liuzhifu@espressif.com>
Sat, 29 Jun 2019 14:46:52 +0000 (22:46 +0800)
Move supplicant to idf and do following refactoring:
1. Make the folder structure consitent with supplicant upstream
2. Remove duplicated header files and minimize the public header files
3. Refactor for WiFi/supplicant interfaces

185 files changed:
components/esp_wifi/CMakeLists.txt
components/esp_wifi/component.mk
components/esp_wifi/include/esp_wifi_crypto_types.h
components/esp_wifi/lib_esp32
components/esp_wifi/src/fast_crypto_ops.c
components/esp_wifi/src/wifi_init.c
components/esp_wifi/test/test_header_files_md5.c
components/wpa_supplicant/CMakeLists.txt
components/wpa_supplicant/Kconfig [new file with mode: 0644]
components/wpa_supplicant/component.mk
components/wpa_supplicant/include/crypto/common.h [deleted file]
components/wpa_supplicant/include/crypto/crypto.h
components/wpa_supplicant/include/crypto/dh_group5.h
components/wpa_supplicant/include/crypto/wepkey.h [new file with mode: 0644]
components/wpa_supplicant/include/esp_supplicant/esp_wpa.h [new file with mode: 0644]
components/wpa_supplicant/include/esp_supplicant/esp_wpa2.h [moved from components/esp_wifi/include/esp_wpa2.h with 93% similarity]
components/wpa_supplicant/include/esp_supplicant/esp_wps.h [moved from components/esp_wifi/include/esp_wps.h with 94% similarity]
components/wpa_supplicant/include/utils/common.h [moved from components/wpa_supplicant/include/wpa/common.h with 99% similarity]
components/wpa_supplicant/include/utils/wpa_debug.h [moved from components/wpa_supplicant/include/wpa/wpa_debug.h with 99% similarity]
components/wpa_supplicant/include/utils/wpabuf.h [moved from components/wpa_supplicant/include/wpa/wpabuf.h with 100% similarity]
components/wpa_supplicant/include/wpa/hostapd.h [deleted file]
components/wpa_supplicant/include/wpa/ieee80211_crypto.h [deleted file]
components/wpa_supplicant/include/wpa/ieee802_1x.h [deleted file]
components/wpa_supplicant/include/wpa/includes.h [deleted file]
components/wpa_supplicant/include/wpa/wpas_glue.h [deleted file]
components/wpa_supplicant/include/wpa2/utils/base64.h [deleted file]
components/wpa_supplicant/port/include/endian.h
components/wpa_supplicant/port/include/supplicant_opt.h [new file with mode: 0644]
components/wpa_supplicant/port/os_xtensa.c
components/wpa_supplicant/src/ap/ap_config.c [new file with mode: 0644]
components/wpa_supplicant/src/ap/ap_config.h [moved from components/wpa_supplicant/include/wpa/ap_config.h with 63% similarity]
components/wpa_supplicant/src/ap/hostapd.h [new file with mode: 0644]
components/wpa_supplicant/src/ap/ieee802_1x.c [new file with mode: 0644]
components/wpa_supplicant/src/ap/ieee802_1x.h [new file with mode: 0644]
components/wpa_supplicant/src/ap/sta_info.h [moved from components/wpa_supplicant/include/wpa/sta_info.h with 74% similarity]
components/wpa_supplicant/src/ap/wpa_auth.c [new file with mode: 0644]
components/wpa_supplicant/src/ap/wpa_auth.h [moved from components/wpa_supplicant/include/wpa/wpa_auth.h with 98% similarity]
components/wpa_supplicant/src/ap/wpa_auth_i.h [moved from components/wpa_supplicant/include/wpa/wpa_auth_i.h with 84% similarity]
components/wpa_supplicant/src/ap/wpa_auth_ie.c [new file with mode: 0644]
components/wpa_supplicant/src/ap/wpa_auth_ie.h [moved from components/wpa_supplicant/include/wpa/wpa_auth_ie.h with 100% similarity]
components/wpa_supplicant/src/common/defs.h [moved from components/wpa_supplicant/include/wpa/defs.h with 77% similarity]
components/wpa_supplicant/src/common/eapol_common.h [moved from components/wpa_supplicant/include/wpa/eapol_common.h with 100% similarity]
components/wpa_supplicant/src/common/ieee802_11_defs.h [moved from components/wpa_supplicant/include/wpa/ieee802_11_defs.h with 100% similarity]
components/wpa_supplicant/src/common/wpa_common.c [new file with mode: 0644]
components/wpa_supplicant/src/common/wpa_common.h [moved from components/wpa_supplicant/include/wpa/wpa_common.h with 96% similarity]
components/wpa_supplicant/src/common/wpa_ctrl.h [new file with mode: 0644]
components/wpa_supplicant/src/crypto/aes-cbc.c
components/wpa_supplicant/src/crypto/aes-internal-dec.c
components/wpa_supplicant/src/crypto/aes-internal-enc.c
components/wpa_supplicant/src/crypto/aes-internal.c
components/wpa_supplicant/src/crypto/aes-unwrap.c
components/wpa_supplicant/src/crypto/aes-wrap.c
components/wpa_supplicant/src/crypto/aes_i.h [moved from components/wpa_supplicant/include/crypto/aes_i.h with 99% similarity]
components/wpa_supplicant/src/crypto/bignum.c
components/wpa_supplicant/src/crypto/crypto_internal-cipher.c
components/wpa_supplicant/src/crypto/crypto_internal-modexp.c
components/wpa_supplicant/src/crypto/crypto_internal-rsa.c
components/wpa_supplicant/src/crypto/crypto_internal.c
components/wpa_supplicant/src/crypto/crypto_mbedtls.c
components/wpa_supplicant/src/crypto/des-internal.c
components/wpa_supplicant/src/crypto/des_i.h [new file with mode: 0644]
components/wpa_supplicant/src/crypto/dh_group5.c
components/wpa_supplicant/src/crypto/dh_groups.c
components/wpa_supplicant/src/crypto/md4-internal.c
components/wpa_supplicant/src/crypto/md5-internal.c
components/wpa_supplicant/src/crypto/md5.c
components/wpa_supplicant/src/crypto/md5_i.h [moved from components/wpa_supplicant/include/crypto/md5_i.h with 100% similarity]
components/wpa_supplicant/src/crypto/ms_funcs.c
components/wpa_supplicant/src/crypto/rc4.c
components/wpa_supplicant/src/crypto/sha1-internal.c
components/wpa_supplicant/src/crypto/sha1-pbkdf2.c
components/wpa_supplicant/src/crypto/sha1.c
components/wpa_supplicant/src/crypto/sha1_i.h [moved from components/wpa_supplicant/include/crypto/sha1_i.h with 100% similarity]
components/wpa_supplicant/src/crypto/sha256-internal.c
components/wpa_supplicant/src/crypto/sha256.c
components/wpa_supplicant/src/eap_peer/chap.c [moved from components/wpa_supplicant/src/wpa2/eap_peer/chap.c with 89% similarity]
components/wpa_supplicant/src/eap_peer/eap.c [moved from components/wpa_supplicant/src/wpa2/eap_peer/eap.c with 73% similarity]
components/wpa_supplicant/src/eap_peer/eap.h [moved from components/wpa_supplicant/include/wpa2/eap_peer/eap.h with 92% similarity]
components/wpa_supplicant/src/eap_peer/eap_common.c [moved from components/wpa_supplicant/src/wpa2/eap_peer/eap_common.c with 97% similarity]
components/wpa_supplicant/src/eap_peer/eap_common.h [moved from components/wpa_supplicant/include/wpa2/eap_peer/eap_common.h with 96% similarity]
components/wpa_supplicant/src/eap_peer/eap_config.h [moved from components/wpa_supplicant/include/wpa2/eap_peer/eap_config.h with 99% similarity]
components/wpa_supplicant/src/eap_peer/eap_defs.h [moved from components/wpa_supplicant/include/wpa2/eap_peer/eap_defs.h with 100% similarity]
components/wpa_supplicant/src/eap_peer/eap_i.h [moved from components/wpa_supplicant/include/wpa2/eap_peer/eap_i.h with 97% similarity]
components/wpa_supplicant/src/eap_peer/eap_methods.h [moved from components/wpa_supplicant/include/wpa2/eap_peer/eap_methods.h with 96% similarity]
components/wpa_supplicant/src/eap_peer/eap_mschapv2.c [moved from components/wpa_supplicant/src/wpa2/eap_peer/eap_mschapv2.c with 95% similarity]
components/wpa_supplicant/src/eap_peer/eap_peap.c [moved from components/wpa_supplicant/src/wpa2/eap_peer/eap_peap.c with 98% similarity]
components/wpa_supplicant/src/eap_peer/eap_peap_common.c [moved from components/wpa_supplicant/src/wpa2/eap_peer/eap_peap_common.c with 94% similarity]
components/wpa_supplicant/src/eap_peer/eap_peap_common.h [moved from components/wpa_supplicant/include/wpa2/eap_peer/eap_peap_common.h with 100% similarity]
components/wpa_supplicant/src/eap_peer/eap_tls.c [moved from components/wpa_supplicant/src/wpa2/eap_peer/eap_tls.c with 95% similarity]
components/wpa_supplicant/src/eap_peer/eap_tls.h [moved from components/wpa_supplicant/include/wpa2/eap_peer/eap_tls.h with 96% similarity]
components/wpa_supplicant/src/eap_peer/eap_tls_common.c [moved from components/wpa_supplicant/src/wpa2/eap_peer/eap_tls_common.c with 99% similarity]
components/wpa_supplicant/src/eap_peer/eap_tls_common.h [moved from components/wpa_supplicant/include/wpa2/eap_peer/eap_tls_common.h with 100% similarity]
components/wpa_supplicant/src/eap_peer/eap_tlv_common.h [moved from components/wpa_supplicant/include/wpa2/eap_peer/eap_tlv_common.h with 100% similarity]
components/wpa_supplicant/src/eap_peer/eap_ttls.c [moved from components/wpa_supplicant/src/wpa2/eap_peer/eap_ttls.c with 71% similarity]
components/wpa_supplicant/src/eap_peer/eap_ttls.h [moved from components/wpa_supplicant/include/wpa2/eap_peer/eap_ttls.h with 100% similarity]
components/wpa_supplicant/src/eap_peer/mschapv2.c [moved from components/wpa_supplicant/src/wpa2/eap_peer/mschapv2.c with 96% similarity]
components/wpa_supplicant/src/eap_peer/mschapv2.h [moved from components/wpa_supplicant/include/wpa2/eap_peer/mschapv2.h with 100% similarity]
components/wpa_supplicant/src/esp_supplicant/esp_hostap.c [new file with mode: 0644]
components/wpa_supplicant/src/esp_supplicant/esp_hostap.h [new file with mode: 0644]
components/wpa_supplicant/src/esp_supplicant/esp_wifi_driver.h [new file with mode: 0644]
components/wpa_supplicant/src/esp_supplicant/esp_wpa2.c [new file with mode: 0644]
components/wpa_supplicant/src/esp_supplicant/esp_wpa_err.h [new file with mode: 0644]
components/wpa_supplicant/src/esp_supplicant/esp_wpa_main.c [new file with mode: 0644]
components/wpa_supplicant/src/esp_supplicant/esp_wpas_glue.c [new file with mode: 0644]
components/wpa_supplicant/src/esp_supplicant/esp_wpas_glue.h [new file with mode: 0644]
components/wpa_supplicant/src/esp_supplicant/esp_wps.c [new file with mode: 0644]
components/wpa_supplicant/src/fast_crypto/fast_aes-cbc.c
components/wpa_supplicant/src/fast_crypto/fast_aes-unwrap.c
components/wpa_supplicant/src/fast_crypto/fast_aes-wrap.c
components/wpa_supplicant/src/fast_crypto/fast_crypto_internal-cipher.c
components/wpa_supplicant/src/fast_crypto/fast_crypto_internal-modexp.c
components/wpa_supplicant/src/fast_crypto/fast_crypto_internal.c
components/wpa_supplicant/src/fast_crypto/fast_sha256-internal.c
components/wpa_supplicant/src/fast_crypto/fast_sha256.c
components/wpa_supplicant/src/rsn_supp/wpa.c [new file with mode: 0644]
components/wpa_supplicant/src/rsn_supp/wpa.h [moved from components/wpa_supplicant/include/wpa/wpa_i.h with 60% similarity]
components/wpa_supplicant/src/rsn_supp/wpa_i.h [moved from components/wpa_supplicant/include/wpa/wpa.h with 72% similarity]
components/wpa_supplicant/src/rsn_supp/wpa_ie.c [new file with mode: 0644]
components/wpa_supplicant/src/rsn_supp/wpa_ie.h [moved from components/wpa_supplicant/include/wpa/wpa_ie.h with 93% similarity]
components/wpa_supplicant/src/tls/asn1.c [moved from components/wpa_supplicant/src/wpa2/tls/asn1.c with 98% similarity]
components/wpa_supplicant/src/tls/asn1.h [moved from components/wpa_supplicant/include/wpa2/tls/asn1.h with 100% similarity]
components/wpa_supplicant/src/tls/bignum.c [moved from components/wpa_supplicant/src/wpa2/tls/bignum.c with 97% similarity]
components/wpa_supplicant/src/tls/bignum.h [moved from components/wpa_supplicant/include/wpa2/tls/bignum.h with 100% similarity]
components/wpa_supplicant/src/tls/libtommath.h [moved from components/wpa_supplicant/include/wpa2/tls/libtommath.h with 99% similarity]
components/wpa_supplicant/src/tls/pkcs1.c [moved from components/wpa_supplicant/src/wpa2/tls/pkcs1.c with 97% similarity]
components/wpa_supplicant/src/tls/pkcs1.h [moved from components/wpa_supplicant/include/wpa2/tls/pkcs1.h with 100% similarity]
components/wpa_supplicant/src/tls/pkcs5.c [moved from components/wpa_supplicant/src/wpa2/tls/pkcs5.c with 79% similarity]
components/wpa_supplicant/src/tls/pkcs5.h [moved from components/wpa_supplicant/include/wpa2/tls/pkcs5.h with 100% similarity]
components/wpa_supplicant/src/tls/pkcs8.c [moved from components/wpa_supplicant/src/wpa2/tls/pkcs8.c with 96% similarity]
components/wpa_supplicant/src/tls/pkcs8.h [moved from components/wpa_supplicant/include/wpa2/tls/pkcs8.h with 100% similarity]
components/wpa_supplicant/src/tls/rsa.c [moved from components/wpa_supplicant/src/wpa2/tls/rsa.c with 98% similarity]
components/wpa_supplicant/src/tls/rsa.h [moved from components/wpa_supplicant/include/wpa2/tls/rsa.h with 100% similarity]
components/wpa_supplicant/src/tls/tls.h [moved from components/wpa_supplicant/include/wpa2/tls/tls.h with 100% similarity]
components/wpa_supplicant/src/tls/tls_internal.c [moved from components/wpa_supplicant/src/wpa2/tls/tls_internal.c with 98% similarity]
components/wpa_supplicant/src/tls/tlsv1_client.c [moved from components/wpa_supplicant/src/wpa2/tls/tlsv1_client.c with 99% similarity]
components/wpa_supplicant/src/tls/tlsv1_client.h [moved from components/wpa_supplicant/include/wpa2/tls/tlsv1_client.h with 100% similarity]
components/wpa_supplicant/src/tls/tlsv1_client_i.h [moved from components/wpa_supplicant/include/wpa2/tls/tlsv1_client_i.h with 100% similarity]
components/wpa_supplicant/src/tls/tlsv1_client_read.c [moved from components/wpa_supplicant/src/wpa2/tls/tlsv1_client_read.c with 97% similarity]
components/wpa_supplicant/src/tls/tlsv1_client_write.c [moved from components/wpa_supplicant/src/wpa2/tls/tlsv1_client_write.c with 89% similarity]
components/wpa_supplicant/src/tls/tlsv1_common.c [moved from components/wpa_supplicant/src/wpa2/tls/tlsv1_common.c with 84% similarity]
components/wpa_supplicant/src/tls/tlsv1_common.h [moved from components/wpa_supplicant/include/wpa2/tls/tlsv1_common.h with 100% similarity]
components/wpa_supplicant/src/tls/tlsv1_cred.c [moved from components/wpa_supplicant/src/wpa2/tls/tlsv1_cred.c with 97% similarity]
components/wpa_supplicant/src/tls/tlsv1_cred.h [moved from components/wpa_supplicant/include/wpa2/tls/tlsv1_cred.h with 100% similarity]
components/wpa_supplicant/src/tls/tlsv1_record.c [moved from components/wpa_supplicant/src/wpa2/tls/tlsv1_record.c with 73% similarity]
components/wpa_supplicant/src/tls/tlsv1_record.h [moved from components/wpa_supplicant/include/wpa2/tls/tlsv1_record.h with 100% similarity]
components/wpa_supplicant/src/tls/tlsv1_server.c [moved from components/wpa_supplicant/src/wpa2/tls/tlsv1_server.c with 98% similarity]
components/wpa_supplicant/src/tls/tlsv1_server.h [moved from components/wpa_supplicant/include/wpa2/tls/tlsv1_server.h with 100% similarity]
components/wpa_supplicant/src/tls/tlsv1_server_i.h [moved from components/wpa_supplicant/include/wpa2/tls/tlsv1_server_i.h with 100% similarity]
components/wpa_supplicant/src/tls/tlsv1_server_read.c [moved from components/wpa_supplicant/src/wpa2/tls/tlsv1_server_read.c with 94% similarity]
components/wpa_supplicant/src/tls/tlsv1_server_write.c [moved from components/wpa_supplicant/src/wpa2/tls/tlsv1_server_write.c with 93% similarity]
components/wpa_supplicant/src/tls/x509v3.c [moved from components/wpa_supplicant/src/wpa2/tls/x509v3.c with 94% similarity]
components/wpa_supplicant/src/tls/x509v3.h [moved from components/wpa_supplicant/include/wpa2/tls/x509v3.h with 100% similarity]
components/wpa_supplicant/src/utils/base64.c [moved from components/wpa_supplicant/src/wpa2/utils/base64.c with 98% similarity]
components/wpa_supplicant/src/utils/base64.h [moved from components/wpa_supplicant/include/crypto/base64.h with 100% similarity]
components/wpa_supplicant/src/utils/common.c [new file with mode: 0644]
components/wpa_supplicant/src/utils/ext_password.c [moved from components/wpa_supplicant/src/wpa2/utils/ext_password.c with 96% similarity]
components/wpa_supplicant/src/utils/ext_password.h [moved from components/wpa_supplicant/include/wpa2/utils/ext_password.h with 100% similarity]
components/wpa_supplicant/src/utils/ext_password_i.h [moved from components/wpa_supplicant/include/wpa2/utils/ext_password_i.h with 100% similarity]
components/wpa_supplicant/src/utils/includes.h [moved from components/wpa_supplicant/include/crypto/includes.h with 91% similarity]
components/wpa_supplicant/src/utils/list.h [moved from components/wpa_supplicant/include/wpa/list.h with 100% similarity]
components/wpa_supplicant/src/utils/state_machine.h [moved from components/wpa_supplicant/include/wpa/state_machine.h with 96% similarity]
components/wpa_supplicant/src/utils/uuid.c [moved from components/wpa_supplicant/src/wps/uuid.c with 93% similarity]
components/wpa_supplicant/src/utils/uuid.h [moved from components/wpa_supplicant/include/wps/utils/uuid.h with 100% similarity]
components/wpa_supplicant/src/utils/wpa_debug.c [new file with mode: 0644]
components/wpa_supplicant/src/utils/wpabuf.c [new file with mode: 0644]
components/wpa_supplicant/src/wps/eap_common.c [deleted file]
components/wpa_supplicant/src/wps/wps.c
components/wpa_supplicant/src/wps/wps.h [moved from components/wpa_supplicant/include/wps/wps.h with 98% similarity]
components/wpa_supplicant/src/wps/wps_attr_build.c
components/wpa_supplicant/src/wps/wps_attr_parse.c
components/wpa_supplicant/src/wps/wps_attr_parse.h [moved from components/wpa_supplicant/include/wps/wps_attr_parse.h with 100% similarity]
components/wpa_supplicant/src/wps/wps_attr_process.c
components/wpa_supplicant/src/wps/wps_common.c
components/wpa_supplicant/src/wps/wps_defs.h [moved from components/wpa_supplicant/include/wps/wps_defs.h with 100% similarity]
components/wpa_supplicant/src/wps/wps_dev_attr.c
components/wpa_supplicant/src/wps/wps_dev_attr.h [moved from components/wpa_supplicant/include/wps/wps_dev_attr.h with 100% similarity]
components/wpa_supplicant/src/wps/wps_enrollee.c
components/wpa_supplicant/src/wps/wps_i.h [moved from components/wpa_supplicant/include/wps/wps_i.h with 99% similarity]
components/wpa_supplicant/src/wps/wps_registrar.c
components/wpa_supplicant/src/wps/wps_validate.c
components/wpa_supplicant/tags [new file with mode: 0644]
components/wpa_supplicant/test/CMakeLists.txt
components/wpa_supplicant/test/component.mk
components/wpa_supplicant/test/test_header_files_md5.c [new file with mode: 0644]
examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c

index a5823fb617dca4a555b585ed71a1f35521298d4f..dd3e3d1d2dff3f6162eb1143aab1d7f278a4254e 100644 (file)
@@ -19,7 +19,7 @@ idf_build_get_property(build_dir BUILD_DIR)
 target_link_libraries(${COMPONENT_LIB} PUBLIC "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib_${idf_target}")
 
 if(NOT CONFIG_ESP32_NO_BLOBS)
-    set(blobs coexist core espnow mesh net80211 phy pp rtc smartconfig wpa2 wpa wps)
+    set(blobs coexist core espnow mesh net80211 phy pp rtc smartconfig)
     foreach(blob ${blobs})
         add_library(${blob} STATIC IMPORTED)
         set_property(TARGET ${blob} PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/lib_${idf_target}/lib${blob}.a)
index 866a1fdd11cc68ac1db7c4412716bd3bf24ec22a..aa196fd4ff044b9bd0bfa81903bef06c29bf21d3 100644 (file)
@@ -6,7 +6,7 @@ COMPONENT_ADD_INCLUDEDIRS := include $(IDF_TARGET)/include
 COMPONENT_SRCDIRS := src
 
 ifndef CONFIG_ESP32_NO_BLOBS
-    LIBS := core rtc net80211 pp wpa smartconfig coexist wps wpa2 espnow phy mesh
+    LIBS := core rtc net80211 pp smartconfig coexist espnow phy mesh
     COMPONENT_ADD_LDFLAGS += -L$(COMPONENT_PATH)/lib_$(IDF_TARGET) \
                           $(addprefix -l,$(LIBS))
 
index e1e2a51a131a8284dd01d20151deae1a3a958768..df2388259b1c4a9d7c734f9e8acaba3c57f97549 100644 (file)
@@ -62,43 +62,6 @@ typedef struct crypto_hash esp_crypto_hash_t;
  */
 typedef struct crypto_cipher esp_crypto_cipher_t;
 
-/**
-  * @brief The crypto callback function used in wpa enterprise hash operation when connect.
-  *        Initialize a esp_crypto_hash_t structure.
-  *
-  * @param alg  Hash algorithm.
-  * @param key  Key for keyed hash (e.g., HMAC) or %NULL if not needed.
-  * @param key_len  Length of the key in bytes
-  *
-  */
-typedef esp_crypto_hash_t * (*esp_crypto_hash_init_t)(esp_crypto_hash_alg_t alg, const unsigned char *key, int key_len);
-
-/**
-  * @brief The crypto callback function used in wpa enterprise hash operation when connect. 
-  *        Add data to hash calculation.
-  *
-  * @param ctz  Context pointer from esp_crypto_hash_init_t function.
-  * @param data  Data buffer to add.
-  * @param len  Length of the buffer.
-  *
-  */
-typedef void (*esp_crypto_hash_update_t)(esp_crypto_hash_t *ctx, const unsigned char *data, int len);
-
-/**
-  * @brief The crypto callback function used in wpa enterprise hash operation when connect. 
-  *        Complete hash calculation.
-  *
-  * @param ctz  Context pointer from esp_crypto_hash_init_t function.
-  * @param hash   Buffer for hash value or %NULL if caller is just freeing the hash
-  *               context.
-  * @param len  Pointer to length of the buffer or %NULL if caller is just freeing the
-  *             hash context; on return, this is set to the actual length of the hash value
-  *             Returns: 0 on success, -1 if buffer is too small (len set to needed length),
-  *             or -2 on other failures (including failed crypto_hash_update() operations)
-  *
-  */
-typedef int (*esp_crypto_hash_finish_t)(esp_crypto_hash_t *ctx, unsigned char *hash, int *len);
-
 /**
   * @brief The AES callback function when do WPS connect. 
   *
@@ -142,64 +105,6 @@ typedef int (*esp_aes_wrap_t)(const unsigned char *kek, int n, const unsigned ch
   */
 typedef int (*esp_aes_unwrap_t)(const unsigned char *kek, int n, const unsigned char *cipher, unsigned char *plain);
 
-/**
-  * @brief The crypto callback function used in wpa enterprise cipher operation when connect.
-  *        Initialize a esp_crypto_cipher_t structure.
-  *
-  * @param alg  cipher algorithm.
-  * @param iv  Initialization vector for block ciphers or %NULL for stream ciphers.
-  * @param key  Cipher key
-  * @param key_len  Length of key in bytes
-  *
-  */
-typedef esp_crypto_cipher_t * (*esp_crypto_cipher_init_t)(esp_crypto_cipher_alg_t alg, const unsigned char *iv, const unsigned char *key, int key_len);
-
-/**
-  * @brief The crypto callback function used in wpa enterprise cipher operation when connect.
-  *        Cipher encrypt.
-  *
-  * @param ctx  Context pointer from esp_crypto_cipher_init_t callback function.
-  * @param plain  Plaintext to cipher.
-  * @param crypt  Resulting ciphertext.
-  * @param len  Length of the plaintext.
-  *
-  */
-typedef int (*esp_crypto_cipher_encrypt_t)(esp_crypto_cipher_t *ctx,
-                                            const unsigned char *plain, unsigned char *crypt, int len);
-/**
-  * @brief The crypto callback function used in wpa enterprise cipher operation when connect.
-  *        Cipher decrypt.
-  *
-  * @param ctx  Context pointer from esp_crypto_cipher_init_t callback function.
-  * @param crypt  Ciphertext to decrypt.
-  * @param plain  Resulting plaintext.
-  * @param len  Length of the cipher text.
-  *
-  */
-typedef int (*esp_crypto_cipher_decrypt_t)(esp_crypto_cipher_t *ctx,
-                                            const unsigned char *crypt, unsigned char *plain, int len);
-/**
-  * @brief The crypto callback function used in wpa enterprise cipher operation when connect.
-  *        Free cipher context.
-  *
-  * @param ctx  Context pointer from esp_crypto_cipher_init_t callback function.
-  *
-  */
-typedef void (*esp_crypto_cipher_deinit_t)(esp_crypto_cipher_t *ctx);
-
-/**
-  * @brief The SHA256 callback function when do WPS connect. 
-  *
-  * @param key  Key for HMAC operations.
-  * @param key_len  Length of the key in bytes.
-  * @param data  Pointers to the data area.
-  * @param data_len  Length of the data area.
-  * @param mac  Buffer for the hash (20 bytes).
-  *
-  */
-typedef void (*esp_hmac_sha256_t)(const unsigned char *key, int key_len, const unsigned char *data,
-                                   int data_len, unsigned char *mac);
-
 /**
   * @brief The SHA256 callback function when do WPS connect. 
   *
@@ -229,37 +134,6 @@ typedef void (*esp_hmac_sha256_vector_t)(const unsigned char *key, int key_len,
 typedef void (*esp_sha256_prf_t)(const unsigned char *key, int key_len, const char *label,
                                   const unsigned char *data, int data_len, unsigned char *buf, int buf_len);
 
-/**
-  * @brief The SHA256 callback function when do WPS connect. 
-  *
-  * @param num_elem  Number of elements in the data vector.
-  * @param addr  Pointers to the data areas.
-  * @param len  Lengths of the data blocks.
-  * @paramac  Buffer for the hash.
-  *
-  */
-typedef int (*esp_sha256_vector_t)(int num_elem, const unsigned char *addr[], const int *len,
-                                    unsigned char *mac);
-
-/**
-  * @brief The bignum calculate callback function used when do connect. 
-  *        In WPS process, it used to calculate public key and private key.
-  *
-  * @param base  Base integer (big endian byte array).
-  * @param base_len  Length of base integer in bytes.
-  * @param power  Power integer (big endian byte array).
-  * @param power_len  Length of power integer in bytes.
-  * @param modulus  Modulus integer (big endian byte array).
-  * @param modulus_len  Length of modulus integer in bytes.
-  * @param result  Buffer for the result.
-  * @param result_len  Result length (max buffer size on input, real len on output).
-  *
-  */
-typedef int (*esp_crypto_mod_exp_t)(const unsigned char *base, int base_len,
-                                     const unsigned char *power, int power_len,
-                                     const unsigned char *modulus, int modulus_len,
-                                     unsigned char *result, unsigned int *result_len);
-
 /**
  * @brief HMAC-MD5 over data buffer (RFC 2104)'
  * 
@@ -441,258 +315,6 @@ typedef void * (*esp_aes_decrypt_init_t)(const unsigned char *key, unsigned int
  */
 typedef void (*esp_aes_decrypt_deinit_t)(void *ctx);
 
-/**
- * @brief Initialize TLS library
- * 
- * @conf: Configuration data for TLS library
- * Returns: Context data to be used as tls_ctx in calls to other functions,
- * or %NULL on failure.
- *
- * Called once during program startup and once for each RSN pre-authentication
- * session. In other words, there can be two concurrent TLS contexts. If global
- * library initialization is needed (i.e., one that is shared between both
- * authentication types), the TLS library wrapper should maintain a reference
- * counter and do global initialization only when moving from 0 to 1 reference.
- */
-typedef void * (*esp_tls_init_t)(void);
-
-/**
- * @brief Deinitialize TLS library
- * 
- * @tls_ctx: TLS context data from tls_init()
- *
- * Called once during program shutdown and once for each RSN pre-authentication
- * session. If global library deinitialization is needed (i.e., one that is
- * shared between both authentication types), the TLS library wrapper should
- * maintain a reference counter and do global deinitialization only when moving
- * from 1 to 0 references.
- */
-typedef void (*esp_tls_deinit_t)(void *tls_ctx);
-
-/**
- * @brief Add certificate and private key for connect
- * @sm: eap state machine
- * 
- * Returns: 0 for success, -1 state machine didn't exist, -2 short of certificate or key
- */
-typedef int (*esp_eap_peer_blob_init_t)(void *sm);
-
-/**
- * @brief delete the certificate and private
- * 
- * @sm: eap state machine
- * 
- */
-typedef void (*esp_eap_peer_blob_deinit_t)(void *sm);
-
-/**
- * @brief Initialize the eap state machine
- * 
- * @sm: eap state machine
- * @private_key_passwd: the start address of private_key_passwd
- * @private_key_passwd_len: length of private_key_password
- * 
- * Returns: 0 is success, -1 state machine didn't exist, -2 short of parameters
- * 
- */
-typedef int (*esp_eap_peer_config_init_t)(void *sm, unsigned char *private_key_passwd,int private_key_passwd_len);
-
-/**
- * @brief Deinit the eap state machine
- * 
- * @sm: eap state machine
- * 
- */
-typedef void (*esp_eap_peer_config_deinit_t)(void *sm);
-
-/**
- * @brief Register the eap method 
- * 
- * Note: ESP32 only support PEAP/TTLS/TLS three eap methods now.
- * 
- */
-typedef int (*esp_eap_peer_register_methods_t)(void);
-
-/**
- * @brief remove the eap method 
- * 
- * Note: ESP32 only support PEAP/TTLS/TLS three eap methods now.
- * 
- */
-typedef void (*esp_eap_peer_unregister_methods_t)(void);
-
-/**
- * @brief remove the eap method before build new connect
- * 
- * @sm: eap state machine
- * @txt: not used now
- */
-typedef void (*esp_eap_deinit_prev_method_t)(void *sm, const char *txt);
-
-/**
- * @brief Get EAP method based on type number
- * 
- * @vendor: EAP Vendor-Id (0 = IETF)
- * @method: EAP type number
- * Returns: Pointer to EAP method or %NULL if not found
- */
-typedef const void * (*esp_eap_peer_get_eap_method_t)(int vendor, int method);
-
-/**
- * @brief Abort EAP authentication
- * 
- * @sm: Pointer to EAP state machine allocated with eap_peer_sm_init()
- *
- * Release system resources that have been allocated for the authentication
- * session without fully deinitializing the EAP state machine.
- */
-typedef void (*esp_eap_sm_abort_t)(void *sm);
-
-/**
- * @brief Build EAP-NAK for the current network
- * 
- * @sm: Pointer to EAP state machine allocated with eap_peer_sm_init()
- * @type: EAP type of the fail reason
- * @id: EAP identifier for the packet
- *
- * This function allocates and builds a nak packet for the
- * current network. The caller is responsible for freeing the returned data.
- */
-typedef void * (*esp_eap_sm_build_nak_t)(void *sm, int type, unsigned char id);
-
-/**
- * @brief Build EAP-Identity/Response for the current network
- * 
- * @sm: Pointer to EAP state machine allocated with eap_peer_sm_init()
- * @id: EAP identifier for the packet
- * @encrypted: Whether the packet is for encrypted tunnel (EAP phase 2)
- * Returns: Pointer to the allocated EAP-Identity/Response packet or %NULL on
- * failure
- *
- * This function allocates and builds an EAP-Identity/Response packet for the
- * current network. The caller is responsible for freeing the returned data.
- */
-typedef void * (*esp_eap_sm_build_identity_resp_t)(void *sm, unsigned char id, int encrypted);
-
-/**
- * @brief Allocate a buffer for an EAP message
- * 
- * @vendor: Vendor-Id (0 = IETF)
- * @type: EAP type
- * @payload_len: Payload length in bytes (data after Type)
- * @code: Message Code (EAP_CODE_*)
- * @identifier: Identifier
- * Returns: Pointer to the allocated message buffer or %NULL on error
- *
- * This function can be used to allocate a buffer for an EAP message and fill
- * in the EAP header. This function is automatically using expanded EAP header
- * if the selected Vendor-Id is not IETF. In other words, most EAP methods do
- * not need to separately select which header type to use when using this
- * function to allocate the message buffers. The returned buffer has room for
- * payload_len bytes and has the EAP header and Type field already filled in.
- */
-typedef void * (*esp_eap_msg_alloc_t)(int vendor, int type, unsigned int payload_len,
-                             unsigned char code, unsigned char identifier);
-
-/**
- * @brief get the enrollee mac address
- * @mac_addr: instore the mac address of enrollee
- * @uuid: Universally Unique Identifer of the enrollee
- * 
- */                        
-typedef void (*esp_uuid_gen_mac_addr_t)(const unsigned char *mac_addr, unsigned char *uuid);
-
-/**
- * @brief free the message after finish DH
- * 
- */
-typedef void (*esp_dh5_free_t)(void *ctx);
-
-/**
- * @brief Build WPS IE for (Re)Association Request
- * 
- * @req_type: Value for Request Type attribute
- * Returns: WPS IE or %NULL on failure
- *
- * The caller is responsible for freeing the buffer.
- */
-typedef void * (*esp_wps_build_assoc_req_ie_t)(int req_type);
-
-/**
- * @brief Build WPS IE for (Re)Association Response
- * 
- * Returns: WPS IE or %NULL on failure
- *
- * The caller is responsible for freeing the buffer.
- */
-typedef void * (*esp_wps_build_assoc_resp_ie_t)(void);
-
-/**
- * @brief Build WPS IE for Probe Request
- * 
- * @pw_id: Password ID (DEV_PW_PUSHBUTTON for active PBC and DEV_PW_DEFAULT for
- * most other use cases)
- * @dev: Device attributes
- * @uuid: Own UUID
- * @req_type: Value for Request Type attribute
- * @num_req_dev_types: Number of requested device types
- * @req_dev_types: Requested device types (8 * num_req_dev_types octets) or
- *     %NULL if none
- * Returns: WPS IE or %NULL on failure
- *
- * The caller is responsible for freeing the buffer.
- */
-typedef void * (*esp_wps_build_probe_req_ie_t)(uint16_t pw_id, void *dev, const unsigned char *uuid,
-                             int req_type, unsigned int num_req_dev_types, const unsigned char *req_dev_types);
-
-/**
- * @brief build public key for exchange in M1
- * 
- * 
- */
-typedef int (*esp_wps_build_public_key_t)(void *wps, void *msg, int mode);
-
-
-/**
- * @brief get the wps information in exchange password
- * 
- * 
- */
-typedef void * (*esp_wps_enrollee_get_msg_t)(void *wps, void *op_code);
-
-/**
- * @brief deal with the wps information in exchange password
- * 
- * 
- */
-typedef int (*esp_wps_enrollee_process_msg_t)(void *wps, int op_code, const void *msg);
-
-/**
- * @brief Generate a random PIN
- * 
- * Returns: Eight digit PIN (i.e., including the checksum digit)
- */
-typedef unsigned int (*esp_wps_generate_pin_t)(void);
-
-/**
- * @brief Check whether WPS IE indicates active PIN
- * 
- * @msg: WPS IE contents from Beacon or Probe Response frame
- * Returns: 1 if PIN Registrar is active, 0 if not
- */
-typedef int (*esp_wps_is_selected_pin_registrar_t)(const void *msg, unsigned char *bssid);
-
-/**
- * @brief Check whether WPS IE indicates active PBC
- * 
- * @msg: WPS IE contents from Beacon or Probe Response frame
- * Returns: 1 if PBC Registrar is active, 0 if not
- */
-typedef int (*esp_wps_is_selected_pbc_registrar_t)(const void *msg, unsigned char *bssid);
-
-
-
 /**
   * @brief The crypto callback function structure used when do station security connect.
   *        The structure can be set as software crypto or the crypto optimized by ESP32
@@ -722,67 +344,6 @@ typedef struct {
     esp_aes_decrypt_deinit_t aes_decrypt_deinit;
 }wpa_crypto_funcs_t;
 
-/**
-  * @brief The crypto callback function structure used when do WPS process. The 
-  *        structure can be set as software crypto or the crypto optimized by ESP32
-  *        hardware.
-  */
-typedef struct{
-    uint32_t size;
-    uint32_t version;
-    esp_aes_128_encrypt_t aes_128_encrypt;          /**< function used to process message when do WPS */
-    esp_aes_128_decrypt_t aes_128_decrypt;          /**< function used to process message when do WPS */
-    esp_crypto_mod_exp_t crypto_mod_exp;            /**< function used to calculate public key and private key */
-    esp_hmac_sha256_t hmac_sha256;                  /**< function used to get attribute */
-    esp_hmac_sha256_vector_t hmac_sha256_vector;    /**< function used to process message when do WPS */
-    esp_sha256_vector_t sha256_vector;              /**< function used to process message when do WPS */
-    esp_uuid_gen_mac_addr_t uuid_gen_mac_addr;
-    esp_dh5_free_t dh5_free;
-    esp_wps_build_assoc_req_ie_t wps_build_assoc_req_ie;
-    esp_wps_build_assoc_resp_ie_t wps_build_assoc_resp_ie;
-    esp_wps_build_probe_req_ie_t wps_build_probe_req_ie;
-    esp_wps_build_public_key_t wps_build_public_key;
-    esp_wps_enrollee_get_msg_t wps_enrollee_get_msg;
-    esp_wps_enrollee_process_msg_t wps_enrollee_process_msg;
-    esp_wps_generate_pin_t wps_generate_pin;
-    esp_wps_is_selected_pin_registrar_t wps_is_selected_pin_registrar;
-    esp_wps_is_selected_pbc_registrar_t wps_is_selected_pbc_registrar;
-    esp_eap_msg_alloc_t eap_msg_alloc;
-}wps_crypto_funcs_t;
-
-/**
-  * @brief The crypto callback function structure used when do WPA enterprise connect.
-  *        The structure can be set as software crypto or the crypto optimized by ESP32
-  *        hardware.
-  */
-typedef struct {
-    uint32_t size;
-    uint32_t version;
-    esp_crypto_hash_init_t crypto_hash_init;                  /**< function used to initialize a crypto_hash structure when use TLSV1 */
-    esp_crypto_hash_update_t crypto_hash_update;              /**< function used to calculate hash data when use TLSV1 */
-    esp_crypto_hash_finish_t crypto_hash_finish;              /**< function used to finish the hash calculate when use TLSV1 */
-    esp_crypto_cipher_init_t crypto_cipher_init;              /**< function used to initialize a crypt_cipher structure when use TLSV1 */
-    esp_crypto_cipher_encrypt_t crypto_cipher_encrypt;        /**< function used to encrypt cipher when use TLSV1 */
-    esp_crypto_cipher_decrypt_t crypto_cipher_decrypt;        /**< function used to decrypt cipher when use TLSV1 */
-    esp_crypto_cipher_deinit_t crypto_cipher_deinit;          /**< function used to free context when use TLSV1 */
-    esp_crypto_mod_exp_t crypto_mod_exp;                      /**< function used to do key exchange when use TLSV1 */
-    esp_sha256_vector_t sha256_vector;                        /**< function used to do X.509v3 certificate parsing and processing */
-    esp_tls_init_t tls_init;
-    esp_tls_deinit_t tls_deinit;
-    esp_eap_peer_blob_init_t eap_peer_blob_init;
-    esp_eap_peer_blob_deinit_t eap_peer_blob_deinit;
-    esp_eap_peer_config_init_t eap_peer_config_init;
-    esp_eap_peer_config_deinit_t eap_peer_config_deinit;
-    esp_eap_peer_register_methods_t eap_peer_register_methods;
-    esp_eap_peer_unregister_methods_t eap_peer_unregister_methods;
-    esp_eap_deinit_prev_method_t eap_deinit_prev_method;
-    esp_eap_peer_get_eap_method_t eap_peer_get_eap_method;
-    esp_eap_sm_abort_t eap_sm_abort;
-    esp_eap_sm_build_nak_t eap_sm_build_nak;
-    esp_eap_sm_build_identity_resp_t eap_sm_build_identity_resp;
-    esp_eap_msg_alloc_t eap_msg_alloc;
-} wpa2_crypto_funcs_t;
-
 /**
   * @brief The crypto callback function structure used in mesh vendor IE encryption. The
   *        structure can be set as software crypto or the crypto optimized by ESP32
index fc518f822e23b6f4fd8870d61cb1dba107727df2..6579ef9a7ebdfa4196398056ee5337c300ca74e3 160000 (submodule)
@@ -1 +1 @@
-Subproject commit fc518f822e23b6f4fd8870d61cb1dba107727df2
+Subproject commit 6579ef9a7ebdfa4196398056ee5337c300ca74e3
index 7e05a7b8c9d459802f2c63b23b544892128c0d16..c8146b47e371d3238585f233c3a2bf1490a9f38b 100644 (file)
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/aes_wrap.h"
 #include "crypto/sha256.h"
 #include "crypto/crypto.h"
 #include "crypto/sha1.h"
 #include "crypto/aes.h"
 #include "crypto/dh_group5.h"
-#include "wps/wps.h"
-#include "wps/wps_i.h"
-#include "wpa2/eap_peer/eap.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/eap_peer/eap_methods.h"
-#include "wpa2/eap_peer/eap_i.h"
-#include "wpa2/eap_peer/eap_common.h"
 #include "esp_wifi_crypto_types.h"
 /* 
  * The parameters is used to set the cyrpto callback function for station connect when in security mode,
@@ -59,63 +52,6 @@ const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs = {
     .aes_decrypt_deinit = (esp_aes_decrypt_deinit_t)aes_decrypt_deinit
 };
 
-const wps_crypto_funcs_t g_wifi_default_wps_crypto_funcs = {
-    .size = sizeof(wps_crypto_funcs_t), 
-    .version = ESP_WIFI_CRYPTO_VERSION,
-    .aes_128_encrypt = (esp_aes_128_encrypt_t)fast_aes_128_cbc_encrypt,
-    .aes_128_decrypt = (esp_aes_128_decrypt_t)fast_aes_128_cbc_decrypt,
-    .crypto_mod_exp = (esp_crypto_mod_exp_t)fast_crypto_mod_exp,
-    .hmac_sha256 = (esp_hmac_sha256_t)fast_hmac_sha256,
-    .hmac_sha256_vector = (esp_hmac_sha256_vector_t)fast_hmac_sha256_vector,
-    .sha256_vector = (esp_sha256_vector_t)fast_sha256_vector,
-    .uuid_gen_mac_addr = (esp_uuid_gen_mac_addr_t)uuid_gen_mac_addr,
-    .dh5_free = (esp_dh5_free_t)dh5_free,
-    .wps_build_assoc_req_ie = (esp_wps_build_assoc_req_ie_t)wps_build_assoc_req_ie,
-    .wps_build_assoc_resp_ie = (esp_wps_build_assoc_resp_ie_t)wps_build_assoc_resp_ie,
-    .wps_build_probe_req_ie = (esp_wps_build_probe_req_ie_t)wps_build_probe_req_ie,
-    .wps_build_public_key = (esp_wps_build_public_key_t)wps_build_public_key,
-    .wps_enrollee_get_msg = (esp_wps_enrollee_get_msg_t)wps_enrollee_get_msg,
-    .wps_enrollee_process_msg = (esp_wps_enrollee_process_msg_t)wps_enrollee_process_msg,
-    .wps_generate_pin = (esp_wps_generate_pin_t)wps_generate_pin,
-    .wps_is_selected_pin_registrar = (esp_wps_is_selected_pin_registrar_t)wps_is_selected_pin_registrar,
-    .wps_is_selected_pbc_registrar = (esp_wps_is_selected_pbc_registrar_t)wps_is_selected_pbc_registrar,
-    .eap_msg_alloc = (esp_eap_msg_alloc_t)eap_msg_alloc
-};
-
-/*
- * What should notice is that the cyrpto hash type function and crypto cipher type function can not register
- * as different, i.e, if you use fast_crypto_hash_init, you should use fast_crypto_hash_update and 
- * fast_crypto_hash_finish for finish hash calculate, rather than call crypto_hash_update and 
- * crypto_hash_finish, so do crypto_cipher.
- */
-const wpa2_crypto_funcs_t g_wifi_default_wpa2_crypto_funcs = {
-    .size = sizeof(wpa2_crypto_funcs_t),
-    .version = ESP_WIFI_CRYPTO_VERSION,
-    .crypto_hash_init = (esp_crypto_hash_init_t)fast_crypto_hash_init,
-    .crypto_hash_update = (esp_crypto_hash_update_t)fast_crypto_hash_update,
-    .crypto_hash_finish = (esp_crypto_hash_finish_t)fast_crypto_hash_finish,
-    .crypto_cipher_init = (esp_crypto_cipher_init_t)fast_crypto_cipher_init,
-    .crypto_cipher_encrypt = (esp_crypto_cipher_encrypt_t)fast_crypto_cipher_encrypt,
-    .crypto_cipher_decrypt = (esp_crypto_cipher_decrypt_t)fast_crypto_cipher_decrypt,
-    .crypto_cipher_deinit = (esp_crypto_cipher_deinit_t)fast_crypto_cipher_deinit,
-    .crypto_mod_exp = (esp_crypto_mod_exp_t)crypto_mod_exp,
-    .sha256_vector = (esp_sha256_vector_t)fast_sha256_vector,
-    .tls_init = (esp_tls_init_t)tls_init,
-    .tls_deinit = (esp_tls_deinit_t)tls_deinit,
-    .eap_peer_blob_init = (esp_eap_peer_blob_init_t)eap_peer_blob_init,
-    .eap_peer_blob_deinit = (esp_eap_peer_blob_deinit_t)eap_peer_blob_deinit,
-    .eap_peer_config_init = (esp_eap_peer_config_init_t)eap_peer_config_init,
-    .eap_peer_config_deinit = (esp_eap_peer_config_deinit_t)eap_peer_config_deinit,
-    .eap_peer_register_methods = (esp_eap_peer_register_methods_t)eap_peer_register_methods,
-    .eap_peer_unregister_methods = (esp_eap_peer_unregister_methods_t)eap_peer_unregister_methods,
-    .eap_deinit_prev_method = (esp_eap_deinit_prev_method_t)eap_deinit_prev_method,
-    .eap_peer_get_eap_method = (esp_eap_peer_get_eap_method_t)eap_peer_get_eap_method,
-    .eap_sm_abort = (esp_eap_sm_abort_t)eap_sm_abort,
-    .eap_sm_build_nak = (esp_eap_sm_build_nak_t)eap_sm_build_nak,
-    .eap_sm_build_identity_resp = (esp_eap_sm_build_identity_resp_t)eap_sm_build_identity_resp,
-    .eap_msg_alloc = (esp_eap_msg_alloc_t)eap_msg_alloc
-};
-
 const mesh_crypto_funcs_t g_wifi_default_mesh_crypto_funcs = {
     .aes_128_encrypt = (esp_aes_128_encrypt_t)fast_aes_128_cbc_encrypt,
     .aes_128_decrypt = (esp_aes_128_decrypt_t)fast_aes_128_cbc_decrypt,
index 2091e1b509b5b592f060b787c1355c181b1855a3..b91614983e33ce10b567d42a3d3b05858e260673 100644 (file)
@@ -18,6 +18,7 @@
 #include "esp_private/wifi.h"
 #include "esp_pm.h"
 #include "soc/rtc.h"
+#include "esp_wpa.h"
 
 ESP_EVENT_DEFINE_BASE(WIFI_EVENT);
 
@@ -106,6 +107,17 @@ esp_err_t esp_wifi_init(const wifi_init_config_t *config)
     if (result == ESP_OK) {
         esp_wifi_set_debug_log();
         s_wifi_mac_time_update_cb = esp_wifi_internal_update_mac_time;
+
+        result = esp_supplicant_init();
+        if (result != ESP_OK) {
+            ESP_LOGE(TAG, "Failed to init supplicant (0x%x)", result);
+            esp_err_t deinit_ret = esp_wifi_deinit();
+            if (deinit_ret != ESP_OK) {
+                ESP_LOGE(TAG, "Failed to deinit Wi-Fi (0x%x)", deinit_ret);
+            }
+
+            return result;
+        } 
     }
 
     return result;
index cccf7028a698284708e90260bead9ed255962323..17b0cc3b94af16d6852ae6a51cf8235ac9bbcf60 100644 (file)
@@ -19,7 +19,7 @@ TEST_CASE("wifi os adapter MD5","[wifi]")
 }
 
 TEST_CASE("wifi crypto types MD5","[wifi]")
-{    
+{   
     const char *test_wifi_crypto_funcs_md5 = WIFI_CRYPTO_MD5;
 
     ESP_LOGI(TAG, "test wifi crypto adapter MD5...");
index 7389e1da6c90196d1d368a5bc11fe2d8155ea4bd..b7d2958e2b90d742741e9268e1dffad7f5b93f86 100644 (file)
@@ -1,5 +1,9 @@
-set(srcs 
-    "port/os_xtensa.c"
+set(srcs "port/os_xtensa.c"
+    "src/ap/ap_config.c"
+    "src/ap/ieee802_1x.c"
+    "src/ap/wpa_auth.c"
+    "src/ap/wpa_auth_ie.c"
+    "src/common/wpa_common.c"
     "src/crypto/aes-cbc.c"
     "src/crypto/aes-internal-dec.c"
     "src/crypto/aes-internal-enc.c"
@@ -33,37 +37,46 @@ set(srcs
     "src/fast_crypto/fast_crypto_internal.c"
     "src/fast_crypto/fast_sha256-internal.c"
     "src/fast_crypto/fast_sha256.c"
-    "src/wpa2/eap_peer/chap.c"
-    "src/wpa2/eap_peer/eap.c"
-    "src/wpa2/eap_peer/eap_common.c"
-    "src/wpa2/eap_peer/eap_mschapv2.c"
-    "src/wpa2/eap_peer/eap_peap.c"
-    "src/wpa2/eap_peer/eap_peap_common.c"
-    "src/wpa2/eap_peer/eap_tls.c"
-    "src/wpa2/eap_peer/eap_tls_common.c"
-    "src/wpa2/eap_peer/eap_ttls.c"
-    "src/wpa2/eap_peer/mschapv2.c"
-    "src/wpa2/tls/asn1.c"
-    "src/wpa2/tls/bignum.c"
-    "src/wpa2/tls/pkcs1.c"
-    "src/wpa2/tls/pkcs5.c"
-    "src/wpa2/tls/pkcs8.c"
-    "src/wpa2/tls/rsa.c"
-    "src/wpa2/tls/tls_internal.c"
-    "src/wpa2/tls/tlsv1_client.c"
-    "src/wpa2/tls/tlsv1_client_read.c"
-    "src/wpa2/tls/tlsv1_client_write.c"
-    "src/wpa2/tls/tlsv1_common.c"
-    "src/wpa2/tls/tlsv1_cred.c"
-    "src/wpa2/tls/tlsv1_record.c"
-    "src/wpa2/tls/tlsv1_server.c"
-    "src/wpa2/tls/tlsv1_server_read.c"
-    "src/wpa2/tls/tlsv1_server_write.c"
-    "src/wpa2/tls/x509v3.c"
-    "src/wpa2/utils/base64.c"
-    "src/wpa2/utils/ext_password.c"
-    "src/wps/eap_common.c"
-    "src/wps/uuid.c"
+    "src/eap_peer/chap.c"
+    "src/eap_peer/eap.c"
+    "src/eap_peer/eap_common.c"
+    "src/eap_peer/eap_mschapv2.c"
+    "src/eap_peer/eap_peap.c"
+    "src/eap_peer/eap_peap_common.c"
+    "src/eap_peer/eap_tls.c"
+    "src/eap_peer/eap_tls_common.c"
+    "src/eap_peer/eap_ttls.c"
+    "src/eap_peer/mschapv2.c"
+    "src/esp_supplicant/esp_hostap.c"
+    "src/esp_supplicant/esp_wpa2.c"
+    "src/esp_supplicant/esp_wpa_main.c"
+    "src/esp_supplicant/esp_wpas_glue.c"
+    "src/esp_supplicant/esp_wps.c"
+    "src/rsn_supp/wpa.c"
+    "src/rsn_supp/wpa_ie.c"
+    "src/tls/asn1.c"
+    "src/tls/bignum.c"
+    "src/tls/pkcs1.c"
+    "src/tls/pkcs5.c"
+    "src/tls/pkcs8.c"
+    "src/tls/rsa.c"
+    "src/tls/tls_internal.c"
+    "src/tls/tlsv1_client.c"
+    "src/tls/tlsv1_client_read.c"
+    "src/tls/tlsv1_client_write.c"
+    "src/tls/tlsv1_common.c"
+    "src/tls/tlsv1_cred.c"
+    "src/tls/tlsv1_record.c"
+    "src/tls/tlsv1_server.c"
+    "src/tls/tlsv1_server_read.c"
+    "src/tls/tlsv1_server_write.c"
+    "src/tls/x509v3.c"
+    "src/utils/base64.c"
+    "src/utils/common.c"
+    "src/utils/ext_password.c"
+    "src/utils/uuid.c"
+    "src/utils/wpabuf.c"
+    "src/utils/wpa_debug.c"
     "src/wps/wps.c"
     "src/wps/wps_attr_build.c"
     "src/wps/wps_attr_parse.c"
@@ -75,13 +88,14 @@ set(srcs
     "src/wps/wps_validate.c")
 
 idf_component_register(SRCS "${srcs}"
-                    INCLUDE_DIRS include port/include
+                    INCLUDE_DIRS include port/include include/esp_supplicant
+                    PRIV_INCLUDE_DIRS src
                     PRIV_REQUIRES mbedtls)
 
 target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-strict-aliasing)
 target_compile_definitions(${COMPONENT_LIB} PRIVATE
     __ets__
-    EMBEDDED_SUPP
+    ESP_SUPPLICANT
     IEEE8021X_EAPOL
     EAP_PEER_METHOD
     EAP_MSCHAPv2
diff --git a/components/wpa_supplicant/Kconfig b/components/wpa_supplicant/Kconfig
new file mode 100644 (file)
index 0000000..efcf5ec
--- /dev/null
@@ -0,0 +1,30 @@
+menu "Supplicant"
+
+    config WPA_ENTERPRISE
+        bool "Enable WPA/WPA2-Enterprise"
+        default n
+        help
+            Select this option to enable WiFi WPA/WPA2-Enterprise authentication.
+
+    config WPA_EAP_TLS
+        bool "Enable EAP-TLS"
+        depends on WPA_ENTERPRISE
+        default y
+        help
+            Select this option to support EAP-TLS.
+
+    config WPA_EAP_TTLS
+        bool "Enable EAP-TTLS"
+        depends on WPA_ENTERPRISE
+        default y
+        help
+            Select this option to support EAP-TTLS.
+
+    config WPA_EAP_PEAP
+        bool "Enable EAP-PEAP"
+        depends on WPA_ENTERPRISE
+        default y
+        help
+            Select this option to support EAP-PEAP.
+
+endmenu
index f4a57ef7e21f7e5a8a500403b5d79c23e85905cf..dfc2f17dfd116e9944406cf400e76ea3660864cc 100644 (file)
@@ -1,4 +1,5 @@
-COMPONENT_ADD_INCLUDEDIRS := include port/include
-COMPONENT_SRCDIRS := src/crypto port src/fast_crypto src/wpa2/eap_peer src/wpa2/tls src/wpa2/utils src/wps
+COMPONENT_ADD_INCLUDEDIRS := include port/include include/esp_supplicant
+COMPONENT_PRIV_INCLUDEDIRS := src
+COMPONENT_SRCDIRS := port src/ap src/common src/crypto src/eap_peer src/fast_crypto src/rsn_supp src/tls src/utils src/esp_supplicant src/wps
 
-CFLAGS += -DEMBEDDED_SUPP -DIEEE8021X_EAPOL -DEAP_PEER_METHOD -DEAP_MSCHAPv2 -DEAP_TTLS -DEAP_TLS -DEAP_PEAP -DUSE_WPA2_TASK -DCONFIG_WPS2 -DCONFIG_WPS_PIN -DUSE_WPS_TASK -DESPRESSIF_USE -DESP32_WORKAROUND -D__ets__ -DCONFIG_ECC -Wno-strict-aliasing
+CFLAGS += -DESP_SUPPLICANT -DIEEE8021X_EAPOL -DEAP_PEER_METHOD -DEAP_MSCHAPv2 -DUSE_WPA2_TASK -DCONFIG_WPS2 -DCONFIG_WPS_PIN -DUSE_WPS_TASK -DESPRESSIF_USE -DESP32_WORKAROUND -DCONFIG_ECC -D__ets__ -Wno-strict-aliasing
diff --git a/components/wpa_supplicant/include/crypto/common.h b/components/wpa_supplicant/include/crypto/common.h
deleted file mode 100644 (file)
index 319b861..0000000
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- * wpa_supplicant/hostapd / common helper functions, etc.
- * Copyright (c) 2002-2007, Jouni Malinen <j@w1.fi>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
- */
-
-#ifndef COMMON_H
-#define COMMON_H
-
-#include "os.h"
-
-#if defined(__XTENSA__)
-#include <machine/endian.h>
-#define __BYTE_ORDER     BYTE_ORDER
-#define __LITTLE_ENDIAN  LITTLE_ENDIAN
-#define __BIG_ENDIAN     BIG_ENDIAN
-#endif /*__XTENSA__*/
-
-#if defined(__linux__) || defined(__GLIBC__)
-#include <endian.h>
-#include <byteswap.h>
-#endif /* __linux__ */
-
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || \
-    defined(__OpenBSD__)
-#include <sys/types.h>
-#include <sys/endian.h>
-#define __BYTE_ORDER   _BYTE_ORDER
-#define        __LITTLE_ENDIAN _LITTLE_ENDIAN
-#define        __BIG_ENDIAN    _BIG_ENDIAN
-#ifdef __OpenBSD__
-#define bswap_16 swap16
-#define bswap_32 swap32
-#define bswap_64 swap64
-#else /* __OpenBSD__ */
-#define bswap_16 bswap16
-#define bswap_32 bswap32
-#define bswap_64 bswap64
-#endif /* __OpenBSD__ */
-#endif /* defined(__FreeBSD__) || defined(__NetBSD__) ||
-       * defined(__DragonFly__) || defined(__OpenBSD__) */
-
-#ifdef __APPLE__
-#include <sys/types.h>
-#include <machine/endian.h>
-#define __BYTE_ORDER   _BYTE_ORDER
-#define __LITTLE_ENDIAN        _LITTLE_ENDIAN
-#define __BIG_ENDIAN   _BIG_ENDIAN
-static inline unsigned short bswap_16(unsigned short v)
-{
-       return ((v & 0xff) << 8) | (v >> 8);
-}
-
-static inline unsigned int bswap_32(unsigned int v)
-{
-       return ((v & 0xff) << 24) | ((v & 0xff00) << 8) |
-               ((v & 0xff0000) >> 8) | (v >> 24);
-}
-#endif /* __APPLE__ */
-
-#ifdef CONFIG_TI_COMPILER
-#define __BIG_ENDIAN 4321
-#define __LITTLE_ENDIAN 1234
-#ifdef __big_endian__
-#define __BYTE_ORDER __BIG_ENDIAN
-#else
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#endif
-#endif /* CONFIG_TI_COMPILER */
-
-#ifdef __SYMBIAN32__
-#define __BIG_ENDIAN 4321
-#define __LITTLE_ENDIAN 1234
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#endif /* __SYMBIAN32__ */
-
-#ifdef CONFIG_NATIVE_WINDOWS
-#include <winsock.h>
-
-typedef int socklen_t;
-
-#ifndef MSG_DONTWAIT
-#define MSG_DONTWAIT 0 /* not supported */
-#endif
-
-#endif /* CONFIG_NATIVE_WINDOWS */
-
-#ifdef _MSC_VER
-#define inline __inline
-
-#undef vsnprintf
-#define vsnprintf _vsnprintf
-#undef close
-#define close closesocket
-#endif /* _MSC_VER */
-
-
-/* Define platform specific integer types */
-
-#ifdef _MSC_VER
-typedef UINT64 u64;
-typedef UINT32 u32;
-typedef UINT16 u16;
-typedef UINT8 u8;
-typedef INT64 s64;
-typedef INT32 s32;
-typedef INT16 s16;
-typedef INT8 s8;
-#define WPA_TYPES_DEFINED
-#endif /* _MSC_VER */
-
-#ifdef __vxworks
-typedef unsigned long long u64;
-typedef UINT32 u32;
-typedef UINT16 u16;
-typedef UINT8 u8;
-typedef long long s64;
-typedef INT32 s32;
-typedef INT16 s16;
-typedef INT8 s8;
-#define WPA_TYPES_DEFINED
-#endif /* __vxworks */
-
-#ifdef CONFIG_TI_COMPILER
-#ifdef _LLONG_AVAILABLE
-typedef unsigned long long u64;
-#else
-/*
- * TODO: 64-bit variable not available. Using long as a workaround to test the
- * build, but this will likely not work for all operations.
- */
-typedef unsigned long u64;
-#endif
-typedef unsigned int u32;
-typedef unsigned short u16;
-typedef unsigned char u8;
-#define WPA_TYPES_DEFINED
-#endif /* CONFIG_TI_COMPILER */
-
-#ifdef __SYMBIAN32__
-#define __REMOVE_PLATSEC_DIAGNOSTICS__
-#include <e32def.h>
-typedef TUint64 u64;
-typedef TUint32 u32;
-typedef TUint16 u16;
-typedef TUint8 u8;
-#define WPA_TYPES_DEFINED
-#endif /* __SYMBIAN32__ */
-
-#ifndef WPA_TYPES_DEFINED
-#ifdef CONFIG_USE_INTTYPES_H
-#include <inttypes.h>
-#else
-#include <stdint.h>
-#endif
-
-typedef uint64_t u64;
-typedef uint32_t u32;
-typedef uint16_t u16;
-typedef uint8_t u8;
-typedef int64_t s64;
-typedef int32_t s32;
-typedef int16_t s16;
-typedef int8_t s8;
-#define WPA_TYPES_DEFINED
-#endif /* !WPA_TYPES_DEFINED */
-
-
-/* Define platform specific byte swapping macros */
-
-#if defined(__CYGWIN__) || defined(CONFIG_NATIVE_WINDOWS)
-
-static inline unsigned short wpa_swap_16(unsigned short v)
-{
-       return ((v & 0xff) << 8) | (v >> 8);
-}
-
-static inline unsigned int wpa_swap_32(unsigned int v)
-{
-       return ((v & 0xff) << 24) | ((v & 0xff00) << 8) |
-               ((v & 0xff0000) >> 8) | (v >> 24);
-}
-
-#define le_to_host16(n) (n)
-#define host_to_le16(n) (n)
-#define be_to_host16(n) wpa_swap_16(n)
-#define host_to_be16(n) wpa_swap_16(n)
-#define le_to_host32(n) (n)
-#define be_to_host32(n) wpa_swap_32(n)
-#define host_to_be32(n) wpa_swap_32(n)
-
-#define WPA_BYTE_SWAP_DEFINED
-
-#endif /* __CYGWIN__ || CONFIG_NATIVE_WINDOWS */
-
-
-#ifndef WPA_BYTE_SWAP_DEFINED
-
-#ifndef __BYTE_ORDER
-#ifndef __LITTLE_ENDIAN
-#ifndef __BIG_ENDIAN
-#define __LITTLE_ENDIAN 1234
-#define __BIG_ENDIAN 4321
-#if defined(sparc)
-#define __BYTE_ORDER __BIG_ENDIAN
-#endif
-#endif /* __BIG_ENDIAN */
-#endif /* __LITTLE_ENDIAN */
-#endif /* __BYTE_ORDER */
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define le_to_host16(n) ((__force u16) (le16) (n))
-#define host_to_le16(n) ((__force le16) (u16) (n))
-#define be_to_host16(n) bswap_16((__force u16) (be16) (n))
-#define host_to_be16(n) ((__force be16) bswap_16((n)))
-#define le_to_host32(n) ((__force u32) (le32) (n))
-#define host_to_le32(n) ((__force le32) (u32) (n))
-#define be_to_host32(n) bswap_32((__force u32) (be32) (n))
-#define host_to_be32(n) ((__force be32) bswap_32((n)))
-#define le_to_host64(n) ((__force u64) (le64) (n))
-#define host_to_le64(n) ((__force le64) (u64) (n))
-#define be_to_host64(n) bswap_64((__force u64) (be64) (n))
-#define host_to_be64(n) ((__force be64) bswap_64((n)))
-#elif __BYTE_ORDER == __BIG_ENDIAN
-#define le_to_host16(n) bswap_16(n)
-#define host_to_le16(n) bswap_16(n)
-#define be_to_host16(n) (n)
-#define host_to_be16(n) (n)
-#define le_to_host32(n) bswap_32(n)
-#define be_to_host32(n) (n)
-#define host_to_be32(n) (n)
-#define le_to_host64(n) bswap_64(n)
-#define host_to_le64(n) bswap_64(n)
-#define be_to_host64(n) (n)
-#define host_to_be64(n) (n)
-#ifndef WORDS_BIGENDIAN
-#define WORDS_BIGENDIAN
-#endif
-#else
-#error Could not determine CPU byte order
-#endif
-
-#define WPA_BYTE_SWAP_DEFINED
-#endif /* !WPA_BYTE_SWAP_DEFINED */
-
-
-/* Macros for handling unaligned memory accesses */
-
-#define WPA_GET_BE16(a) ((u16) (((a)[0] << 8) | (a)[1]))
-#define WPA_PUT_BE16(a, val)                   \
-       do {                                    \
-               (a)[0] = ((u16) (val)) >> 8;    \
-               (a)[1] = ((u16) (val)) & 0xff;  \
-       } while (0)
-
-#define WPA_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0]))
-#define WPA_PUT_LE16(a, val)                   \
-       do {                                    \
-               (a)[1] = ((u16) (val)) >> 8;    \
-               (a)[0] = ((u16) (val)) & 0xff;  \
-       } while (0)
-
-#define WPA_GET_BE24(a) ((((u32) (a)[0]) << 16) | (((u32) (a)[1]) << 8) | \
-                        ((u32) (a)[2]))
-#define WPA_PUT_BE24(a, val)                                   \
-       do {                                                    \
-               (a)[0] = (u8) ((((u32) (val)) >> 16) & 0xff);   \
-               (a)[1] = (u8) ((((u32) (val)) >> 8) & 0xff);    \
-               (a)[2] = (u8) (((u32) (val)) & 0xff);           \
-       } while (0)
-
-#define WPA_GET_BE32(a) ((((u32) (a)[0]) << 24) | (((u32) (a)[1]) << 16) | \
-                        (((u32) (a)[2]) << 8) | ((u32) (a)[3]))
-#define WPA_PUT_BE32(a, val)                                   \
-       do {                                                    \
-               (a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff);   \
-               (a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff);   \
-               (a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff);    \
-               (a)[3] = (u8) (((u32) (val)) & 0xff);           \
-       } while (0)
-
-#define WPA_GET_LE32(a) ((((u32) (a)[3]) << 24) | (((u32) (a)[2]) << 16) | \
-                        (((u32) (a)[1]) << 8) | ((u32) (a)[0]))
-#define WPA_PUT_LE32(a, val)                                   \
-       do {                                                    \
-               (a)[3] = (u8) ((((u32) (val)) >> 24) & 0xff);   \
-               (a)[2] = (u8) ((((u32) (val)) >> 16) & 0xff);   \
-               (a)[1] = (u8) ((((u32) (val)) >> 8) & 0xff);    \
-               (a)[0] = (u8) (((u32) (val)) & 0xff);           \
-       } while (0)
-
-#define WPA_GET_BE64(a) ((((u64) (a)[0]) << 56) | (((u64) (a)[1]) << 48) | \
-                        (((u64) (a)[2]) << 40) | (((u64) (a)[3]) << 32) | \
-                        (((u64) (a)[4]) << 24) | (((u64) (a)[5]) << 16) | \
-                        (((u64) (a)[6]) << 8) | ((u64) (a)[7]))
-#define WPA_PUT_BE64(a, val)                           \
-       do {                                            \
-               (a)[0] = (u8) (((u64) (val)) >> 56);    \
-               (a)[1] = (u8) (((u64) (val)) >> 48);    \
-               (a)[2] = (u8) (((u64) (val)) >> 40);    \
-               (a)[3] = (u8) (((u64) (val)) >> 32);    \
-               (a)[4] = (u8) (((u64) (val)) >> 24);    \
-               (a)[5] = (u8) (((u64) (val)) >> 16);    \
-               (a)[6] = (u8) (((u64) (val)) >> 8);     \
-               (a)[7] = (u8) (((u64) (val)) & 0xff);   \
-       } while (0)
-
-#define WPA_GET_LE64(a) ((((u64) (a)[7]) << 56) | (((u64) (a)[6]) << 48) | \
-                        (((u64) (a)[5]) << 40) | (((u64) (a)[4]) << 32) | \
-                        (((u64) (a)[3]) << 24) | (((u64) (a)[2]) << 16) | \
-                        (((u64) (a)[1]) << 8) | ((u64) (a)[0]))
-
-
-#ifndef ETH_ALEN
-#define ETH_ALEN 6
-#endif
-#ifndef IFNAMSIZ
-#define IFNAMSIZ 16
-#endif
-#ifndef ETH_P_ALL
-#define ETH_P_ALL 0x0003
-#endif
-#ifndef ETH_P_PAE
-#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
-#endif /* ETH_P_PAE */
-#ifndef ETH_P_EAPOL
-#define ETH_P_EAPOL ETH_P_PAE
-#endif /* ETH_P_EAPOL */
-#ifndef ETH_P_RSN_PREAUTH
-#define ETH_P_RSN_PREAUTH 0x88c7
-#endif /* ETH_P_RSN_PREAUTH */
-#ifndef ETH_P_RRB
-#define ETH_P_RRB 0x890D
-#endif /* ETH_P_RRB */
-
-
-#ifdef __GNUC__
-#define PRINTF_FORMAT(a,b) __attribute__ ((format (printf, (a), (b))))
-#define STRUCT_PACKED __attribute__ ((packed))
-#else
-#define PRINTF_FORMAT(a,b)
-#define STRUCT_PACKED
-#endif
-
-#ifdef CONFIG_ANSI_C_EXTRA
-
-#if !defined(_MSC_VER) || _MSC_VER < 1400
-/* snprintf - used in number of places; sprintf() is _not_ a good replacement
- * due to possible buffer overflow; see, e.g.,
- * http://www.ijs.si/software/snprintf/ for portable implementation of
- * snprintf. */
-int snprintf(char *str, size_t size, const char *format, ...);
-
-/* vsnprintf - only used for wpa_msg() in wpa_supplicant.c */
-int vsnprintf(char *str, size_t size, const char *format, va_list ap);
-#endif /* !defined(_MSC_VER) || _MSC_VER < 1400 */
-
-/* getopt - only used in main.c */
-int getopt(int argc, char *const argv[], const char *optstring);
-extern char *optarg;
-extern int optind;
-
-#ifndef CONFIG_NO_SOCKLEN_T_TYPEDEF
-#ifndef __socklen_t_defined
-typedef int socklen_t;
-#endif
-#endif
-
-/* inline - define as __inline or just define it to be empty, if needed */
-#ifdef CONFIG_NO_INLINE
-#define inline
-#else
-#define inline __inline
-#endif
-
-#ifndef __func__
-#define __func__ "__func__ not defined"
-#endif
-
-#ifndef bswap_16
-#define bswap_16(a) ((((u16) (a) << 8) & 0xff00) | (((u16) (a) >> 8) & 0xff))
-#endif
-
-#ifndef bswap_32
-#define bswap_32(a) ((((u32) (a) << 24) & 0xff000000) | \
-                    (((u32) (a) << 8) & 0xff0000) | \
-                    (((u32) (a) >> 8) & 0xff00) | \
-                    (((u32) (a) >> 24) & 0xff))
-#endif
-
-#ifndef MSG_DONTWAIT
-#define MSG_DONTWAIT 0
-#endif
-
-#ifdef _WIN32_WCE
-void perror(const char *s);
-#endif /* _WIN32_WCE */
-
-#endif /* CONFIG_ANSI_C_EXTRA */
-
-#ifndef MAC2STR
-#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
-#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
-#endif
-
-#ifndef BIT
-#define BIT(x) (1 << (x))
-#endif
-
-/*
- * Definitions for sparse validation
- * (http://kernel.org/pub/linux/kernel/people/josh/sparse/)
- */
-#ifdef __CHECKER__
-#define __force __attribute__((force))
-#define __bitwise __attribute__((bitwise))
-#else
-#define __force
-#define __bitwise
-#endif
-
-typedef u16 __bitwise be16;
-typedef u16 __bitwise le16;
-typedef u32 __bitwise be32;
-typedef u32 __bitwise le32;
-typedef u64 __bitwise be64;
-typedef u64 __bitwise le64;
-
-#ifndef __must_check
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-#define __must_check __attribute__((__warn_unused_result__))
-#else
-#define __must_check
-#endif /* __GNUC__ */
-#endif /* __must_check */
-
-int hwaddr_aton(const char *txt, u8 *addr);
-int hwaddr_aton2(const char *txt, u8 *addr);
-int hexstr2bin(const char *hex, u8 *buf, size_t len);
-void inc_byte_array(u8 *counter, size_t len);
-void wpa_get_ntp_timestamp(u8 *buf);
-int wpa_snprintf_hex(char *buf, size_t buf_size, const u8 *data, size_t len);
-int wpa_snprintf_hex_uppercase(char *buf, size_t buf_size, const u8 *data,
-                              size_t len);
-
-#ifdef CONFIG_NATIVE_WINDOWS
-void wpa_unicode2ascii_inplace(TCHAR *str);
-TCHAR * wpa_strdup_tchar(const char *str);
-#else /* CONFIG_NATIVE_WINDOWS */
-#define wpa_unicode2ascii_inplace(s) do { } while (0)
-#define wpa_strdup_tchar(s) strdup((s))
-#endif /* CONFIG_NATIVE_WINDOWS */
-
-const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len);
-
-static inline int is_zero_ether_addr(const u8 *a)
-{
-       return !(a[0] | a[1] | a[2] | a[3] | a[4] | a[5]);
-}
-
-/*
- * gcc 4.4 ends up generating strict-aliasing warnings about some very common
- * networking socket uses that do not really result in a real problem and
- * cannot be easily avoided with union-based type-punning due to struct
- * definitions including another struct in system header files. To avoid having
- * to fully disable strict-aliasing warnings, provide a mechanism to hide the
- * typecast from aliasing for now. A cleaner solution will hopefully be found
- * in the future to handle these cases.
- */
-void * __hide_aliasing_typecast(void *foo);
-#define aliasing_hide_typecast(a,t) (t *) __hide_aliasing_typecast((a))
-
-#endif /* COMMON_H */
index f6b7b2f2c49ee76a798a51ac7ae30f20a7a1d967..fd69dc9682df946053ba17687622267a71423222 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef CRYPTO_H
 #define CRYPTO_H
 
-#include "common.h"
+#include "utils/common.h"
 
 /**
  * md4_vector - MD4 hash for data vector
index f92c1115d5efeb92c24698394aa811d258c52507..822d47a6e3ef3595760bd248e9d556533570a573 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef DH_GROUP5_H
 #define DH_GROUP5_H
 
-#include "wpa/wpabuf.h"
+#include "utils/wpabuf.h"
 
 void * dh5_init(struct wpabuf **priv, struct wpabuf **publ);
 struct wpabuf * dh5_derive_shared(void *ctx, const struct wpabuf *peer_public,
diff --git a/components/wpa_supplicant/include/crypto/wepkey.h b/components/wpa_supplicant/include/crypto/wepkey.h
new file mode 100644 (file)
index 0000000..32a8cf9
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef WEPKEY_H
+#define WEPKEY_H
+
+#define WEPKEY_64_BYTES   5
+#define WePKEY_128_BYTES  13
+
+unsigned int wepkey_64(uint8_t *out, unsigned int size, const char *in, int n);
+unsigned int wepkey_128(uint8_t *out, unsigned int size, const char *in, int n);
+
+#endif /* WEPKEY_H */
\ No newline at end of file
diff --git a/components/wpa_supplicant/include/esp_supplicant/esp_wpa.h b/components/wpa_supplicant/include/esp_supplicant/esp_wpa.h
new file mode 100644 (file)
index 0000000..33f0fe5
--- /dev/null
@@ -0,0 +1,66 @@
+// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef __ESP_WPA_H__
+#define __ESP_WPA_H__
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "esp_err.h"
+#include "esp_wifi_crypto_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** \defgroup WiFi_APIs WiFi Related APIs
+  * @brief WiFi APIs
+  */
+
+/** @addtogroup WiFi_APIs
+  * @{
+  */
+
+/** \defgroup WPA_APIs  WPS APIs
+  * @brief ESP32 Supplicant APIs
+  *
+  */
+
+/** @addtogroup WPA_APIs
+  * @{
+  */
+
+
+/**
+  * @brief     Supplicant initialization
+  *
+  * @return    
+  *          - ESP_OK : succeed
+  *          - ESP_ERR_NO_MEM : out of memory
+  */
+esp_err_t esp_supplicant_init(void);
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ESP_WPA_H__ */
similarity index 93%
rename from components/esp_wifi/include/esp_wpa2.h
rename to components/wpa_supplicant/include/esp_supplicant/esp_wpa2.h
index 1b2dfa5103875b8b795847c16eaf3619d2cdb902..5315606598fc02ac07b322333f01cb39371f5898 100644 (file)
@@ -1,4 +1,4 @@
-// Hardware crypto support Copyright 2017 Espressif Systems (Shanghai) PTE LTD
+// Hardware crypto support Copyright 2019 Espressif Systems (Shanghai) PTE LTD
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef ESP_WPA2_H
-#define ESP_WPA2_H
+#ifndef _ESP_WPA2_H
+#define _ESP_WPA2_H
 
 #include <stdbool.h>
 
 #include "esp_err.h"
-#include "esp_wifi_crypto_types.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-extern const wpa2_crypto_funcs_t g_wifi_default_wpa2_crypto_funcs;
-
-typedef struct {
-    const wpa2_crypto_funcs_t *crypto_funcs;
-}esp_wpa2_config_t;
-
-#define WPA2_CONFIG_INIT_DEFAULT() { \
-    .crypto_funcs = &g_wifi_default_wpa2_crypto_funcs \
-}
-
 /**
   * @brief  Enable wpa2 enterprise authentication.
   *
@@ -44,7 +33,7 @@ typedef struct {
   *    - ESP_OK: succeed.
   *    - ESP_ERR_NO_MEM: fail(internal memory malloc fail)
   */
-esp_err_t esp_wifi_sta_wpa2_ent_enable(const esp_wpa2_config_t *config);
+esp_err_t esp_wifi_sta_wpa2_ent_enable(void);
 
 /**
   * @brief  Disable wpa2 enterprise authentication.
similarity index 94%
rename from components/esp_wifi/include/esp_wps.h
rename to components/wpa_supplicant/include/esp_supplicant/esp_wps.h
index 9bd61cc3af1bebbed13756e45e098d0a686e48cd..5bf61d3090ec3b416574cd2decb09cf5c1529c7e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
+// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -54,8 +54,6 @@ typedef enum wps_type {
     WPS_TYPE_MAX,
 } wps_type_t;
 
-extern const wps_crypto_funcs_t g_wifi_default_wps_crypto_funcs;
-
 #define WPS_MAX_MANUFACTURER_LEN 65
 #define WPS_MAX_MODEL_NUMBER_LEN 33
 #define WPS_MAX_MODEL_NAME_LEN   33
@@ -70,13 +68,11 @@ typedef struct {
 
 typedef struct {
     wps_type_t wps_type;
-    const wps_crypto_funcs_t *crypto_funcs;
     wps_factory_information_t factory_info;
 } esp_wps_config_t;
 
 #define WPS_CONFIG_INIT_DEFAULT(type) { \
     .wps_type = type, \
-    .crypto_funcs = &g_wifi_default_wps_crypto_funcs, \
     .factory_info = {   \
         .manufacturer = "ESPRESSIF",  \
         .model_number = "ESP32",  \
similarity index 99%
rename from components/wpa_supplicant/include/wpa/common.h
rename to components/wpa_supplicant/include/utils/common.h
index 2e6012f8686b5af2ff62508915df9b7e9e432009..6fadca049bef462b66d73dc987f248f28906946f 100644 (file)
@@ -18,6 +18,7 @@
 #if defined(__ets__)
 #endif /* ets */
 #include "os.h"
+#include "esp_bit_defs.h"
 
 /* Define platform specific variable type macros */
 #if defined(ESP_PLATFORM)
similarity index 99%
rename from components/wpa_supplicant/include/wpa/wpa_debug.h
rename to components/wpa_supplicant/include/utils/wpa_debug.h
index 10fe928c3eb8add95b73a8e0a64b63006858dcea..b204ec7d87abc2e9e82ecec7923b3e8983898d08 100644 (file)
@@ -75,6 +75,7 @@ void wpa_debug_print_timestamp(void);
 #ifdef DEBUG_PRINT
 #define wpa_printf(level,fmt, args...) ESP_LOG_LEVEL_LOCAL(level, TAG, fmt, ##args)
 
+void wpa_dump_mem(char* desc, uint8_t *addr, uint16_t len);
 static inline void wpa_hexdump_ascii(int level, const char *title, const u8 *buf, size_t len)
 {
 
diff --git a/components/wpa_supplicant/include/wpa/hostapd.h b/components/wpa_supplicant/include/wpa/hostapd.h
deleted file mode 100644 (file)
index 1d52659..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- * hostapd / Initialization and configuration
- * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
- *
- * This software may be distributed under the terms of the BSD license.
- * See README for more details.
- */
-
-#ifndef HOSTAPD_H
-#define HOSTAPD_H
-
-#include "wpa/defs.h"
-#include "wpa/ap_config.h"
-
-struct wpa_driver_ops;
-struct wpa_ctrl_dst;
-struct radius_server_data;
-struct upnp_wps_device_sm;
-struct hostapd_data;
-struct sta_info;
-struct hostap_sta_driver_data;
-struct ieee80211_ht_capabilities;
-struct full_dynamic_vlan;
-enum wps_event;
-union wps_event_data;
-
-struct hostapd_iface;
-
-struct hapd_interfaces {
-       int (*reload_config)(struct hostapd_iface *iface);
-       struct hostapd_config * (*config_read_cb)(const char *config_fname);
-       int (*ctrl_iface_init)(struct hostapd_data *hapd);
-       void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
-       int (*for_each_interface)(struct hapd_interfaces *interfaces,
-                                 int (*cb)(struct hostapd_iface *iface,
-                                           void *ctx), void *ctx);
-       int (*driver_init)(struct hostapd_iface *iface);
-
-       size_t count;
-       int global_ctrl_sock;
-       char *global_iface_path;
-       char *global_iface_name;
-       struct hostapd_iface **iface;
-};
-
-
-struct hostapd_probereq_cb {
-       int (*cb)(void *ctx, const u8 *sa, const u8 *da, const u8 *bssid,
-                 const u8 *ie, size_t ie_len, int ssi_signal);
-       void *ctx;
-};
-
-#define HOSTAPD_RATE_BASIC 0x00000001
-
-struct hostapd_rate_data {
-       int rate; /* rate in 100 kbps */
-       int flags; /* HOSTAPD_RATE_ flags */
-};
-
-struct hostapd_frame_info {
-       u32 channel;
-       u32 datarate;
-       int ssi_signal; /* dBm */
-};
-
-
-/**
- * struct hostapd_data - hostapd per-BSS data structure
- */
-struct hostapd_data {
-//     struct hostapd_iface *iface;
-       struct hostapd_config *iconf;
-       struct hostapd_bss_config *conf;
-       int interface_added; /* virtual interface added for this BSS */
-
-       u8 own_addr[ETH_ALEN];
-
-       int num_sta; /* number of entries in sta_list */
-//     struct sta_info *sta_list; /* STA info list head */
-//#define STA_HASH_SIZE 256
-//#define STA_HASH(sta) (sta[5])
-//     struct sta_info *sta_hash[STA_HASH_SIZE];
-
-//     /*
-//      * Bitfield for indicating which AIDs are allocated. Only AID values
-//      * 1-2007 are used and as such, the bit at index 0 corresponds to AID
-//      * 1.
-//      */
-//#define AID_WORDS ((2008 + 31) / 32)
-//     u32 sta_aid[AID_WORDS];
-
-//     const struct wpa_driver_ops *driver;
-//     void *drv_priv;
-
-//     void (*new_assoc_sta_cb)(struct hostapd_data *hapd,
-//                              struct sta_info *sta, int reassoc);
-
-//     void *msg_ctx; /* ctx for wpa_msg() calls */
-//     void *msg_ctx_parent; /* parent interface ctx for wpa_msg() calls */
-
-//     struct radius_client_data *radius;
-//     u32 acct_session_id_hi, acct_session_id_lo;
-//     struct radius_das_data *radius_das;
-
-//     struct iapp_data *iapp;
-
-//     struct hostapd_cached_radius_acl *acl_cache;
-//     struct hostapd_acl_query_data *acl_queries;
-
-       struct wpa_authenticator *wpa_auth;
-//     struct eapol_authenticator *eapol_auth;
-
-//     struct rsn_preauth_interface *preauth_iface;
-//     time_t michael_mic_failure;
-//     int michael_mic_failures;
-//     int tkip_countermeasures;
-
-//     int ctrl_sock;
-//     struct wpa_ctrl_dst *ctrl_dst;
-
-//     void *ssl_ctx;
-//     void *eap_sim_db_priv;
-//     struct radius_server_data *radius_srv;
-
-//     int parameter_set_count;
-
-       /* Time Advertisement */
-//     u8 time_update_counter;
-//     struct wpabuf *time_adv;
-
-#ifdef CONFIG_FULL_DYNAMIC_VLAN
-       struct full_dynamic_vlan *full_dynamic_vlan;
-#endif /* CONFIG_FULL_DYNAMIC_VLAN */
-
-//     struct l2_packet_data *l2;
-//     struct wps_context *wps;
-
-//     int beacon_set_done;
-//     struct wpabuf *wps_beacon_ie;
-//     struct wpabuf *wps_probe_resp_ie;
-#ifdef CONFIG_WPS
-       unsigned int ap_pin_failures;
-       unsigned int ap_pin_failures_consecutive;
-       struct upnp_wps_device_sm *wps_upnp;
-       unsigned int ap_pin_lockout_time;
-#endif /* CONFIG_WPS */
-
-//     struct hostapd_probereq_cb *probereq_cb;
-//     size_t num_probereq_cb;
-
-//     void (*public_action_cb)(void *ctx, const u8 *buf, size_t len,
-//                              int freq);
-//     void *public_action_cb_ctx;
-
-//     int (*vendor_action_cb)(void *ctx, const u8 *buf, size_t len,
-//                             int freq);
-//     void *vendor_action_cb_ctx;
-
-//     void (*wps_reg_success_cb)(void *ctx, const u8 *mac_addr,
-//                                const u8 *uuid_e);
-//     void *wps_reg_success_cb_ctx;
-
-//     void (*wps_event_cb)(void *ctx, enum wps_event event,
-//                          union wps_event_data *data);
-//     void *wps_event_cb_ctx;
-
-//     void (*sta_authorized_cb)(void *ctx, const u8 *mac_addr,
-//                               int authorized, const u8 *p2p_dev_addr);
-//     void *sta_authorized_cb_ctx;
-
-//     void (*setup_complete_cb)(void *ctx);
-//     void *setup_complete_cb_ctx;
-
-#ifdef CONFIG_P2P
-       struct p2p_data *p2p;
-       struct p2p_group *p2p_group;
-       struct wpabuf *p2p_beacon_ie;
-       struct wpabuf *p2p_probe_resp_ie;
-
-       /* Number of non-P2P association stations */
-       int num_sta_no_p2p;
-
-       /* Periodic NoA (used only when no non-P2P clients in the group) */
-       int noa_enabled;
-       int noa_start;
-       int noa_duration;
-#endif /* CONFIG_P2P */
-#ifdef CONFIG_INTERWORKING
-       size_t gas_frag_limit;
-#endif /* CONFIG_INTERWORKING */
-
-#ifdef CONFIG_SQLITE
-       struct hostapd_eap_user tmp_eap_user;
-#endif /* CONFIG_SQLITE */
-};
-
-#if 0
-/**
- * struct hostapd_iface - hostapd per-interface data structure
- */
-struct hostapd_iface {
-       struct hapd_interfaces *interfaces;
-       void *owner;
-       char *config_fname;
-       struct hostapd_config *conf;
-
-       size_t num_bss;
-       struct hostapd_data **bss;
-
-       int num_ap; /* number of entries in ap_list */
-       struct ap_info *ap_list; /* AP info list head */
-       struct ap_info *ap_hash[STA_HASH_SIZE];
-       struct ap_info *ap_iter_list;
-
-       unsigned int drv_flags;
-
-       /*
-        * A bitmap of supported protocols for probe response offload. See
-        * struct wpa_driver_capa in driver.h
-        */
-       unsigned int probe_resp_offloads;
-
-       struct hostapd_hw_modes *hw_features;
-       int num_hw_features;
-       struct hostapd_hw_modes *current_mode;
-       /* Rates that are currently used (i.e., filtered copy of
-        * current_mode->channels */
-       int num_rates;
-       struct hostapd_rate_data *current_rates;
-       int *basic_rates;
-       int freq;
-
-       u16 hw_flags;
-
-       /* Number of associated Non-ERP stations (i.e., stations using 802.11b
-        * in 802.11g BSS) */
-       int num_sta_non_erp;
-
-       /* Number of associated stations that do not support Short Slot Time */
-       int num_sta_no_short_slot_time;
-
-       /* Number of associated stations that do not support Short Preamble */
-       int num_sta_no_short_preamble;
-
-       int olbc; /* Overlapping Legacy BSS Condition */
-
-       /* Number of HT associated stations that do not support greenfield */
-       int num_sta_ht_no_gf;
-
-       /* Number of associated non-HT stations */
-       int num_sta_no_ht;
-
-       /* Number of HT associated stations 20 MHz */
-       int num_sta_ht_20mhz;
-
-       /* Overlapping BSS information */
-       int olbc_ht;
-
-       u16 ht_op_mode;
-       void (*scan_cb)(struct hostapd_iface *iface);
-};
-#endif
-
-#if 0
-/* hostapd.c */
-int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
-                              int (*cb)(struct hostapd_iface *iface,
-                                        void *ctx), void *ctx);
-int hostapd_reload_config(struct hostapd_iface *iface);
-struct hostapd_data *
-hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
-                      struct hostapd_config *conf,
-                      struct hostapd_bss_config *bss);
-int hostapd_setup_interface(struct hostapd_iface *iface);
-int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
-void hostapd_interface_deinit(struct hostapd_iface *iface);
-void hostapd_interface_free(struct hostapd_iface *iface);
-void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
-                          int reassoc);
-void hostapd_interface_deinit_free(struct hostapd_iface *iface);
-int hostapd_enable_iface(struct hostapd_iface *hapd_iface);
-int hostapd_reload_iface(struct hostapd_iface *hapd_iface);
-int hostapd_disable_iface(struct hostapd_iface *hapd_iface);
-int hostapd_add_iface(struct hapd_interfaces *ifaces, char *buf);
-int hostapd_remove_iface(struct hapd_interfaces *ifaces, char *buf);
-
-/* utils.c */
-int hostapd_register_probereq_cb(struct hostapd_data *hapd,
-                                int (*cb)(void *ctx, const u8 *sa,
-                                          const u8 *da, const u8 *bssid,
-                                          const u8 *ie, size_t ie_len,
-                                          int ssi_signal),
-                                void *ctx);
-void hostapd_prune_associations(struct hostapd_data *hapd, const u8 *addr);
-
-/* drv_callbacks.c (TODO: move to somewhere else?) */
-int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
-                       const u8 *ie, size_t ielen, int reassoc);
-void hostapd_notif_disassoc(struct hostapd_data *hapd, const u8 *addr);
-void hostapd_event_sta_low_ack(struct hostapd_data *hapd, const u8 *addr);
-int hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa, const u8 *da,
-                        const u8 *bssid, const u8 *ie, size_t ie_len,
-                        int ssi_signal);
-void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
-                            int offset);
-
-const struct hostapd_eap_user *
-hostapd_get_eap_user(struct hostapd_data *hapd, const u8 *identity,
-                    size_t identity_len, int phase2);
-#endif
-
-#endif /* HOSTAPD_H */
diff --git a/components/wpa_supplicant/include/wpa/ieee80211_crypto.h b/components/wpa_supplicant/include/wpa/ieee80211_crypto.h
deleted file mode 100644 (file)
index be0fb9a..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-/*-
- * Copyright (c) 2001 Atsushi Onoe
- * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * copyright (c) 2010-2011  Espressif System
- */
-#ifndef _NET80211_IEEE80211_CRYPTO_H_
-#define _NET80211_IEEE80211_CRYPTO_H_
-
-//#include "pp/esf_buf.h"
-
-/*
- * 802.11 protocol crypto-related definitions.
- */
-#define        IEEE80211_KEYBUF_SIZE   16
-#define        IEEE80211_MICBUF_SIZE   (8+8)   /* space for both tx+rx keys */
-
-/*
- * Old WEP-style key.  Deprecated.
- */
-
-#if 0
-struct ieee80211_rsnparms {
-       uint8_t         rsn_mcastcipher;        /* mcast/group cipher */
-       uint8_t         rsn_mcastkeylen;        /* mcast key length */
-       uint8_t         rsn_ucastcipher;        /* selected unicast cipher */
-       uint8_t         rsn_ucastkeylen;        /* unicast key length */
-       uint8_t         rsn_keymgmt;            /* selected key mgmt algo */
-       uint16_t        rsn_caps;               /* capabilities */
-};
-#endif //0000
-
-/*
- * Template for a supported cipher.  Ciphers register with the
- * crypto code and are typically loaded as separate modules
- * (the null cipher is always present).
- * XXX may need refcnts
- */
-
-/*
- * Crypto key state.  There is sufficient room for all supported
- * ciphers (see below).  The underlying ciphers are handled
- * separately through loadable cipher modules that register with
- * the generic crypto support.  A key has a reference to an instance
- * of the cipher; any per-key state is hung off wk_private by the
- * cipher when it is attached.  Ciphers are automatically called
- * to detach and cleanup any such state when the key is deleted.
- *
- * The generic crypto support handles encap/decap of cipher-related
- * frame contents for both hardware- and software-based implementations.
- * A key requiring software crypto support is automatically flagged and
- * the cipher is expected to honor this and do the necessary work.
- * Ciphers such as TKIP may also support mixed hardware/software
- * encrypt/decrypt and MIC processing.
- */
-typedef uint16_t ieee80211_keyix;      /* h/w key index */
-
-struct ieee80211_key {
-       uint8_t         wk_keylen;      /* key length in bytes */
-       uint8_t         wk_pad;
-       uint16_t        wk_flags;
-#define        IEEE80211_KEY_XMIT      0x0001  /* key used for xmit */
-#define        IEEE80211_KEY_RECV      0x0002  /* key used for recv */
-#define        IEEE80211_KEY_GROUP     0x0004  /* key used for WPA group operation */
-#define        IEEE80211_KEY_SWENCRYPT 0x0010  /* host-based encrypt */
-#define        IEEE80211_KEY_SWDECRYPT 0x0020  /* host-based decrypt */
-#define        IEEE80211_KEY_SWENMIC   0x0040  /* host-based enmic */
-#define        IEEE80211_KEY_SWDEMIC   0x0080  /* host-based demic */
-#define        IEEE80211_KEY_DEVKEY    0x0100  /* device key request completed */
-#define        IEEE80211_KEY_CIPHER0   0x1000  /* cipher-specific action 0 */
-#define        IEEE80211_KEY_CIPHER1   0x2000  /* cipher-specific action 1 */
-#define IEEE80211_KEY_EMPTY     0x0000
-       ieee80211_keyix wk_keyix;       /* h/w key index */
-       ieee80211_keyix wk_rxkeyix;     /* optional h/w rx key index */
-       uint8_t         wk_key[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE];
-#define        wk_txmic        wk_key+IEEE80211_KEYBUF_SIZE+0  /* XXX can't () right */
-#define        wk_rxmic        wk_key+IEEE80211_KEYBUF_SIZE+8  /* XXX can't () right */
-                                       /* key receive sequence counter */
-       uint64_t        wk_keyrsc[IEEE80211_TID_SIZE];
-       uint64_t        wk_keytsc;      /* key transmit sequence counter */
-       const struct ieee80211_cipher *wk_cipher;
-       //void          *wk_private;    /* private cipher state */
-       //uint8_t               wk_macaddr[IEEE80211_ADDR_LEN]; //JLU: no need ...
-};
-#define        IEEE80211_KEY_COMMON            /* common flags passed in by apps */\
-       (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV | IEEE80211_KEY_GROUP)
-#define        IEEE80211_KEY_DEVICE            /* flags owned by device driver */\
-       (IEEE80211_KEY_DEVKEY|IEEE80211_KEY_CIPHER0|IEEE80211_KEY_CIPHER1)
-
-#define        IEEE80211_KEY_SWCRYPT \
-       (IEEE80211_KEY_SWENCRYPT | IEEE80211_KEY_SWDECRYPT)
-#define        IEEE80211_KEY_SWMIC     (IEEE80211_KEY_SWENMIC | IEEE80211_KEY_SWDEMIC)
-
-//#define      IEEE80211_KEYIX_NONE    ((ieee80211_keyix) -1)
-
-/*
- * NB: these values are ordered carefully; there are lots of
- * of implications in any reordering.  Beware that 4 is used
- * only to indicate h/w TKIP MIC support in driver capabilities;
- * there is no separate cipher support (it's rolled into the
- * TKIP cipher support).
- */
-#define        IEEE80211_CIPHER_NONE           0       /* pseudo value */
-#define        IEEE80211_CIPHER_TKIP           1
-#define        IEEE80211_CIPHER_AES_OCB        2
-#define        IEEE80211_CIPHER_AES_CCM        3
-#define        IEEE80211_CIPHER_TKIPMIC        4       /* TKIP MIC capability */
-#define        IEEE80211_CIPHER_CKIP           5
-#define        IEEE80211_CIPHER_WEP            6
-#define        IEEE80211_CIPHER_WEP40          7
-#define        IEEE80211_CIPHER_WEP104         8
-
-
-#define        IEEE80211_CIPHER_MAX            (IEEE80211_CIPHER_NONE+2)
-
-/* capability bits in ic_cryptocaps/iv_cryptocaps */
-#define        IEEE80211_CRYPTO_NONE           (1<<IEEE80211_CIPHER_NONE)
-#define        IEEE80211_CRYPTO_WEP            (1<<IEEE80211_CIPHER_WEP)
-#define        IEEE80211_CRYPTO_WEP40          (1<<IEEE80211_CIPHER_WEP40)
-#define        IEEE80211_CRYPTO_WEP104 (1<<IEEE80211_CIPHER_WEP104)
-#define        IEEE80211_CRYPTO_TKIP           (1<<IEEE80211_CIPHER_TKIP)
-#define        IEEE80211_CRYPTO_AES_OCB        (1<<IEEE80211_CIPHER_AES_OCB)
-#define        IEEE80211_CRYPTO_AES_CCM        (1<<IEEE80211_CIPHER_AES_CCM)
-#define        IEEE80211_CRYPTO_TKIPMIC        (1<<IEEE80211_CIPHER_TKIPMIC)
-#define        IEEE80211_CRYPTO_CKIP           (1<<IEEE80211_CIPHER_CKIP)
-
-struct ieee80211_cipher {
-       u_int   ic_cipher;              /* IEEE80211_CIPHER_* */
-       u_int   ic_header;              /* size of privacy header (bytes) */
-       u_int   ic_trailer;             /* size of privacy trailer (bytes) */
-       u_int   ic_miclen;              /* size of mic trailer (bytes) */
-//     int     (*ic_setkey)(struct ieee80211_key *);
-       int     (*ic_encap)(struct ieee80211_key *, esf_buf_t *, uint8_t);
-       int     (*ic_decap)(struct ieee80211_key *, esf_buf_t *, int);
-#ifdef EAGLE_SW_MIC
-       int     (*ic_enmic)(struct ieee80211_key *, esf_buf_t *, int);
-       int     (*ic_demic)(struct ieee80211_key *, esf_buf_t *, int);
-#endif /* EAGLE_SW_CRYPTO */
-};
-
-struct ieee80211com;
-struct ieee80211_conn;
-
-#define        IEEE80211_KEY_UNDEFINED(k) \
-       ((k)->wk_cipher == &ieee80211_cipher_none)
-
-struct ieee80211_key *ieee80211_crypto_encap(struct ieee80211_conn *,
-               esf_buf *);
-
-struct ieee80211_key *ieee80211_crypto_decap(struct ieee80211_conn *,
-               esf_buf *, int);
-
-#if 0 //H/W MIC
-/*
- * Check and remove any MIC.
- */
-static INLINE int
-ieee80211_crypto_demic(struct ieee80211vap *vap, struct ieee80211_key *k,
-       esf_buf *m, int force)
-{
-       const struct ieee80211_cipher *cip = k->wk_cipher;
-       return (cip->ic_miclen > 0 ? cip->ic_demic(k, m, force) : 1);
-}
-
-/*
- * Add any MIC.
- */
-static INLINE int
-ieee80211_crypto_enmic(struct ieee80211vap *vap,
-       struct ieee80211_key *k, esf_buf *m, int force)
-{
-       const struct ieee80211_cipher *cip = k->wk_cipher;
-       return (cip->ic_miclen > 0 ? cip->ic_enmic(k, m, force) : 1);
-}
-#endif //0000
-
-/* 
- * Setup crypto support for a device/shared instance.
- */
-void ieee80211_crypto_attach(struct ieee80211com *ic);
-
-/* 
- * Reset key state to an unused state.  The crypto
- * key allocation mechanism insures other state (e.g.
- * key data) is properly setup before a key is used.
- */
-static inline void
-ieee80211_crypto_resetkey(struct ieee80211_key *k)
-{
-       k->wk_cipher = NULL;
-       k->wk_flags = IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV;
-}
-
-/*
- * Crypt-related notification methods.
- */
-//void ieee80211_notify_replay_failure(const struct ieee80211_frame *, const struct ieee80211_key *,
-//             uint64_t rsc, int tid);
-//void ieee80211_notify_michael_failure(const struct ieee80211_frame *, u_int keyix);
-
-#endif /* _NET80211_IEEE80211_CRYPTO_H_ */
diff --git a/components/wpa_supplicant/include/wpa/ieee802_1x.h b/components/wpa_supplicant/include/wpa/ieee802_1x.h
deleted file mode 100644 (file)
index e10ff7b..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * hostapd / IEEE 802.1X-2004 Authenticator
- * Copyright (c) 2002-2012, Jouni Malinen <j@w1.fi>
- *
- * This software may be distributed under the terms of the BSD license.
- * See README for more details.
- */
-
-#ifndef IEEE802_1X_H
-#define IEEE802_1X_H
-
-struct hostapd_data;
-struct sta_info;
-struct eapol_state_machine;
-struct hostapd_config;
-struct hostapd_bss_config;
-struct hostapd_radius_attr;
-struct radius_msg;
-
-
-void ieee802_1x_receive(struct hostapd_data *hapd, const u8 *sa, const u8 *buf,
-                       size_t len);
-
-#if 0
-void ieee802_1x_new_station(struct hostapd_data *hapd, struct sta_info *sta);
-void ieee802_1x_free_station(struct sta_info *sta);
-
-void ieee802_1x_tx_key(struct hostapd_data *hapd, struct sta_info *sta);
-void ieee802_1x_abort_auth(struct hostapd_data *hapd, struct sta_info *sta);
-void ieee802_1x_set_sta_authorized(struct hostapd_data *hapd,
-                                  struct sta_info *sta, int authorized);
-void ieee802_1x_dump_state(FILE *f, const char *prefix, struct sta_info *sta);
-int ieee802_1x_init(struct hostapd_data *hapd);
-void ieee802_1x_deinit(struct hostapd_data *hapd);
-int ieee802_1x_tx_status(struct hostapd_data *hapd, struct sta_info *sta,
-                        const u8 *buf, size_t len, int ack);
-int ieee802_1x_eapol_tx_status(struct hostapd_data *hapd, struct sta_info *sta,
-                              const u8 *data, int len, int ack);
-u8 * ieee802_1x_get_identity(struct eapol_state_machine *sm, size_t *len);
-u8 * ieee802_1x_get_radius_class(struct eapol_state_machine *sm, size_t *len,
-                                int idx);
-struct wpabuf * ieee802_1x_get_radius_cui(struct eapol_state_machine *sm);
-const u8 * ieee802_1x_get_key(struct eapol_state_machine *sm, size_t *len);
-void ieee802_1x_notify_port_enabled(struct eapol_state_machine *sm,
-                                   int enabled);
-void ieee802_1x_notify_port_valid(struct eapol_state_machine *sm,
-                                 int valid);
-void ieee802_1x_notify_pre_auth(struct eapol_state_machine *sm, int pre_auth);
-int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen);
-int ieee802_1x_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta,
-                          char *buf, size_t buflen);
-void hostapd_get_ntp_timestamp(u8 *buf);
-char *eap_type_text(u8 type);
-
-const char *radius_mode_txt(struct hostapd_data *hapd);
-int radius_sta_rate(struct hostapd_data *hapd, struct sta_info *sta);
-
-int add_common_radius_attr(struct hostapd_data *hapd,
-                          struct hostapd_radius_attr *req_attr,
-                          struct sta_info *sta,
-                          struct radius_msg *msg);
-#endif
-
-#endif /* IEEE802_1X_H */
diff --git a/components/wpa_supplicant/include/wpa/includes.h b/components/wpa_supplicant/include/wpa/includes.h
deleted file mode 100644 (file)
index 993bc49..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * wpa_supplicant/hostapd - Default include files
- * Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
- *
- * This header file is included into all C files so that commonly used header
- * files can be selected with OS specific ifdef blocks in one place instead of
- * having to have OS/C library specific selection in many files.
- */
-
-#ifndef INCLUDES_H
-#define INCLUDES_H
-
-/* Include possible build time configuration before including anything else */
-//#include "build_config.h"  //don't need anymore
-
-//#include <stdlib.h>
-//#include <stdio.h>
-//#include <string.h>
-//#include <ctype.h>
-//#include <time.h>
-
-#endif /* INCLUDES_H */
diff --git a/components/wpa_supplicant/include/wpa/wpas_glue.h b/components/wpa_supplicant/include/wpa/wpas_glue.h
deleted file mode 100644 (file)
index 7e254a2..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * WPA Supplicant - Glue code to setup EAPOL and RSN modules
- * Copyright (c) 2003-2008, Jouni Malinen <j@w1.fi>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
- */
-
-#ifndef WPAS_GLUE_H
-#define WPAS_GLUE_H
-
-u8 * wpa_sm_alloc_eapol(struct wpa_sm *sm, u8 type,
-                                     const void *data, u16 data_len,
-                                     size_t *msg_len, void **data_pos);
-
-int wpa_sm_mlme_setprotection(struct wpa_sm *sm, const u8 *addr,
-                                           int protect_type, int key_type);
-
-void wpa_sm_deauthenticate(struct wpa_sm *sm, uint8 reason_code);
-
-void wpa_sm_disassociate(struct wpa_sm *sm, int reason_code);
-
-int wpa_sm_get_beacon_ie(struct wpa_sm *sm);
-
-#endif /* WPAS_GLUE_H */
diff --git a/components/wpa_supplicant/include/wpa2/utils/base64.h b/components/wpa_supplicant/include/wpa2/utils/base64.h
deleted file mode 100644 (file)
index aa21fd0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Base64 encoding/decoding (RFC1341)
- * Copyright (c) 2005, Jouni Malinen <j@w1.fi>
- *
- * This software may be distributed under the terms of the BSD license.
- * See README for more details.
- */
-
-#ifndef BASE64_H
-#define BASE64_H
-
-unsigned char * base64_encode(const unsigned char *src, size_t len,
-                             size_t *out_len);
-unsigned char * base64_decode(const unsigned char *src, size_t len,
-                             size_t *out_len);
-
-#endif /* BASE64_H */
index 0d0d4f5ba48b33fdf234d90244590c6e141f1d2c..392b40168b6902e87808a8c468c624b218c8c18b 100644 (file)
@@ -98,10 +98,6 @@ typedef      __uint64_t      uint64_t;
 #define        le32toh(x)      ((uint32_t)(x))
 #define        le64toh(x)      ((uint64_t)(x))
 
-#ifndef htons
-#define htons htobe16
-#endif //htons
-
 #else /* _BYTE_ORDER != _LITTLE_ENDIAN */
 #define        htobe16(x)      ((uint16_t)(x))
 #define        htobe32(x)      ((uint32_t)(x))
diff --git a/components/wpa_supplicant/port/include/supplicant_opt.h b/components/wpa_supplicant/port/include/supplicant_opt.h
new file mode 100644 (file)
index 0000000..4267a71
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef _SUPPLICANT_OPT_H
+#define _SUPPLICANT_OPT_H
+
+#include "sdkconfig.h"
+
+#if CONFIG_WPA_EAP_TLS
+#define EAP_TLS 1
+#endif
+
+#if CONFIG_WPA_EAP_TTLS
+#define EAP_TTLS 1
+#endif
+
+#if CONFIG_WPA_EAP_PEAP
+#define EAP_PEAP 1
+#endif
+
+#endif /* _SUPPLICANT_OPT_H */
index 2ab31825f2ae201b1ff7ed2fe9e94c3ae3d3b06f..6f52a85ea1c3184b643f786ffaa19c24c0a825d0 100644 (file)
@@ -27,7 +27,7 @@
 #include <time.h>
 #include <sys/time.h>
 #include "esp_system.h"
-#include "crypto/common.h"
+#include "utils/common.h"
 
 int os_get_time(struct os_time *t)
 {
diff --git a/components/wpa_supplicant/src/ap/ap_config.c b/components/wpa_supplicant/src/ap/ap_config.c
new file mode 100644 (file)
index 0000000..14f7354
--- /dev/null
@@ -0,0 +1,248 @@
+/*
+ * hostapd / Configuration helper functions
+ * Copyright (c) 2003-2012, Jouni Malinen <j@w1.fi>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#include "utils/includes.h"
+
+#include "utils/common.h"
+#include "crypto/sha1.h"
+#include "common/ieee802_11_defs.h"
+#include "common/eapol_common.h"
+#include "ap/wpa_auth.h"
+#include "ap/ap_config.h"
+#include "utils/wpa_debug.h"
+#include "ap/hostapd.h"
+#include "ap/wpa_auth_i.h"
+#include "esp_supplicant/esp_wifi_driver.h"
+#include "esp_wifi_types.h"
+
+void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
+{
+    bss->auth_algs = WPA_AUTH_ALG_OPEN | WPA_AUTH_ALG_SHARED;
+
+    bss->wep_rekeying_period = 300;
+    /* use key0 in individual key and key1 in broadcast key */
+    bss->broadcast_key_idx_min = 1;
+    bss->broadcast_key_idx_max = 2;
+
+    bss->wpa_group_rekey = 600;
+    bss->wpa_gmk_rekey = 86400;
+    bss->wpa_key_mgmt = WPA_KEY_MGMT_PSK;
+    bss->wpa_pairwise = WPA_CIPHER_TKIP;
+    bss->wpa_group = WPA_CIPHER_TKIP;
+    bss->rsn_pairwise = 0;
+
+    bss->max_num_sta = MAX_STA_COUNT;
+
+    bss->dtim_period = 2;
+
+    bss->ap_max_inactivity = 5*60;  //AP_MAX_INACTIVITY;
+    bss->eapol_version = EAPOL_VERSION;
+
+    bss->max_listen_interval = 65535;
+
+#ifdef CONFIG_IEEE80211W
+    bss->assoc_sa_query_max_timeout = 1000;
+    bss->assoc_sa_query_retry_timeout = 201;
+#endif /* CONFIG_IEEE80211W */
+#ifdef EAP_SERVER_FAST
+     /* both anonymous and authenticated provisioning */
+    bss->eap_fast_prov = 3;
+    bss->pac_key_lifetime = 7 * 24 * 60 * 60;
+    bss->pac_key_refresh_time = 1 * 24 * 60 * 60;
+#endif /* EAP_SERVER_FAST */
+
+    /* Set to -1 as defaults depends on HT in setup */
+    bss->wmm_enabled = -1;
+
+#ifdef CONFIG_IEEE80211R
+    bss->ft_over_ds = 1;
+#endif /* CONFIG_IEEE80211R */
+
+}
+
+
+struct hostapd_config * hostapd_config_defaults(void)
+{
+#define ecw2cw(ecw) ((1 << (ecw)) - 1)
+
+    struct hostapd_config *conf;
+    struct hostapd_bss_config *bss;
+#undef ecw2cw
+
+    conf = (struct hostapd_config *)os_zalloc(sizeof(*conf));
+    bss = (struct hostapd_bss_config *)os_zalloc(sizeof(*bss));
+    if (conf == NULL || bss == NULL) {
+       wpa_printf(MSG_DEBUG, "Failed to allocate memory for "
+               "configuration data.");
+        os_free(conf);
+        os_free(bss);
+        return NULL;
+    }
+
+    hostapd_config_defaults_bss(bss);
+
+    conf->num_bss = 1;
+    conf->bss = bss;
+
+    conf->beacon_int = 100;
+    conf->rts_threshold = -1; /* use driver default: 2347 */
+    conf->fragm_threshold = -1; /* user driver default: 2346 */
+    conf->send_probe_response = 1;
+
+    conf->ht_capab = HT_CAP_INFO_SMPS_DISABLED;
+
+    conf->ap_table_max_size = 255;
+    conf->ap_table_expiration_time = 60;
+
+    return conf;
+}
+
+
+int hostapd_mac_comp(const void *a, const void *b)
+{
+    return memcmp(a, b, sizeof(macaddr));
+}
+
+
+int hostapd_mac_comp_empty(const void *a)
+{
+    u8 empty[ETH_ALEN];
+
+    os_bzero(empty, ETH_ALEN);
+
+    return memcmp(a, empty, ETH_ALEN);
+}
+
+static int hostapd_derive_psk(struct hostapd_ssid *ssid)
+{
+    ssid->wpa_psk = (struct hostapd_wpa_psk *)os_zalloc(sizeof(struct hostapd_wpa_psk));
+    if (ssid->wpa_psk == NULL) {
+       wpa_printf(MSG_ERROR, "Unable to alloc space for PSK");
+        return -1;
+    }
+    wpa_hexdump_ascii(MSG_DEBUG, "SSID",
+              (u8 *) ssid->ssid, ssid->ssid_len);
+    wpa_hexdump_ascii_key(MSG_DEBUG, "PSK (ASCII passphrase)",
+                  (u8 *) ssid->wpa_passphrase,
+                  strlen(ssid->wpa_passphrase));
+#ifdef ESP_SUPPLICANT
+    memcpy(ssid->wpa_psk->psk, esp_wifi_ap_get_prof_pmk_internal(), PMK_LEN);
+#else
+    /* It's too SLOW */
+    pbkdf2_sha1(ssid->wpa_passphrase,
+            ssid->ssid, ssid->ssid_len,
+            4096, ssid->wpa_psk->psk, PMK_LEN);
+#endif
+    wpa_hexdump_key(MSG_DEBUG, "PSK (from passphrase)",
+            ssid->wpa_psk->psk, PMK_LEN);
+    return 0;
+}
+
+
+int hostapd_setup_wpa_psk(struct hostapd_bss_config *conf)
+{
+    struct hostapd_ssid *ssid = &conf->ssid;
+
+    if (ssid->wpa_passphrase != NULL) {
+        if (ssid->wpa_psk != NULL) {
+               wpa_printf(MSG_DEBUG, "Using pre-configured WPA PSK "
+                   "instead of passphrase");
+        } else {
+               wpa_printf(MSG_DEBUG, "Deriving WPA PSK based on "
+                   "passphrase\n");
+            if (hostapd_derive_psk(ssid) < 0)
+                return -1;
+        }
+        ssid->wpa_psk->group = 1;
+    }
+
+    return 0;
+}
+
+
+int hostapd_wep_key_cmp(struct hostapd_wep_keys *a, struct hostapd_wep_keys *b)
+{
+    int i;
+
+    if (a->idx != b->idx || a->default_len != b->default_len)
+        return 1;
+    for (i = 0; i < NUM_WEP_KEYS; i++)
+        if (a->len[i] != b->len[i] ||
+               memcmp(a->key[i], b->key[i], a->len[i]) != 0)
+            return 1;
+    return 0;
+}
+
+/**
+ * hostapd_maclist_found - Find a MAC address from a list
+ * @list: MAC address list
+ * @num_entries: Number of addresses in the list
+ * @addr: Address to search for
+ * @vlan_id: Buffer for returning VLAN ID or %NULL if not needed
+ * Returns: 1 if address is in the list or 0 if not.
+ *
+ * Perform a binary search for given MAC address from a pre-sorted list.
+ */
+int hostapd_maclist_found(struct mac_acl_entry *list, int num_entries,
+              const u8 *addr, int *vlan_id)
+{
+    int start, end, middle, res;
+
+    start = 0;
+    end = num_entries - 1;
+
+    while (start <= end) {
+        middle = (start + end) / 2;
+        res = memcmp(list[middle].addr, addr, ETH_ALEN);
+        if (res == 0) {
+            if (vlan_id)
+                *vlan_id = list[middle].vlan_id;
+            return 1;
+        }
+        if (res < 0)
+            start = middle + 1;
+        else
+            end = middle - 1;
+    }
+
+    return 0;
+}
+
+
+int hostapd_rate_found(int *list, int rate)
+{
+    int i;
+
+    if (list == NULL)
+        return 0;
+
+    for (i = 0; list[i] >= 0; i++)
+        if (list[i] == rate)
+            return 1;
+
+    return 0;
+}
+
+const u8 * hostapd_get_psk(const struct hostapd_bss_config *conf,
+                          const u8 *addr, const u8 *prev_psk)
+{
+    struct hostapd_wpa_psk *psk;
+    int next_ok = prev_psk == NULL;
+
+    for (psk = conf->ssid.wpa_psk; psk != NULL; psk = psk->next) {
+        if (next_ok &&
+            (psk->group || memcmp(psk->addr, addr, ETH_ALEN) == 0))
+            return psk->psk;
+
+        if (psk->psk == prev_psk)
+            next_ok = 1;
+    }
+
+    return NULL;
+}
+
similarity index 63%
rename from components/wpa_supplicant/include/wpa/ap_config.h
rename to components/wpa_supplicant/src/ap/ap_config.h
index 761becb48441952f58227a43dd2944553754e85e..ca695851fa286ac8c0d90386f1385ad17231c870 100644 (file)
@@ -9,11 +9,8 @@
 #ifndef HOSTAPD_CONFIG_H
 #define HOSTAPD_CONFIG_H
 
-#include "wpa/defs.h"
-//#include "ip_addr.h"
-#include "wpa/wpa_common.h"
-//#include "common/ieee802_11_common.h"
-//#include "wps/wps.h"
+#include "common/defs.h"
+#include "common/wpa_common.h"
 
 #define MAX_STA_COUNT 4
 #define MAX_VLAN_ID 4094
@@ -54,12 +51,8 @@ struct hostapd_ssid {
        unsigned int ssid_set:1;
        unsigned int utf8_ssid:1;
 
-//     char vlan[IFNAMSIZ + 1];
-//     secpolicy security_policy;
-
        struct hostapd_wpa_psk *wpa_psk;
        char *wpa_passphrase;
-//     char *wpa_psk_file;
 
        struct hostapd_wep_keys wep;
 
@@ -183,70 +176,22 @@ struct hostapd_nai_realm_data {
  * struct hostapd_bss_config - Per-BSS configuration
  */
 struct hostapd_bss_config {
-//     char iface[IFNAMSIZ + 1];
-//     char bridge[IFNAMSIZ + 1];
-//     char wds_bridge[IFNAMSIZ + 1];
-
-//     enum hostapd_logger_level logger_syslog_level, logger_stdout_level;
-
-//     unsigned int logger_syslog; /* module bitfield */
-//     unsigned int logger_stdout; /* module bitfield */
-
-//     char *dump_log_name; /* file name for state dump (SIGUSR1) */
-
        int max_num_sta; /* maximum number of STAs in station table */
 
        int dtim_period;
 
        int ieee802_1x; /* use IEEE 802.1X */
        int eapol_version;
-//     int eap_server; /* Use internal EAP server instead of external
-//                      * RADIUS server */
-//     struct hostapd_eap_user *eap_user;
-//     char *eap_user_sqlite;
-//     char *eap_sim_db;
-//     struct hostapd_ip_addr own_ip_addr;
-//     char *nas_identifier;
-//     struct hostapd_radius_servers *radius;
-//     int acct_interim_interval;
-//     int radius_request_cui;
-//     struct hostapd_radius_attr *radius_auth_req_attr;
-//     struct hostapd_radius_attr *radius_acct_req_attr;
-//     int radius_das_port;
-//     unsigned int radius_das_time_window;
-//     int radius_das_require_event_timestamp;
-//     struct hostapd_ip_addr radius_das_client_addr;
-//     u8 *radius_das_shared_secret;
-//     size_t radius_das_shared_secret_len;
-
        struct hostapd_ssid ssid;
 
-//     char *eap_req_id_text; /* optional displayable message sent with
-//                             * EAP Request-Identity */
-//     size_t eap_req_id_text_len;
-//     int eapol_key_index_workaround;
-
-//     size_t default_wep_key_len;
-//     int individual_wep_key_len;
        int wep_rekeying_period;
        int broadcast_key_idx_min, broadcast_key_idx_max;
-//     int eap_reauth_period;
-
-//     int ieee802_11f; /* use IEEE 802.11f (IAPP) */
-//     char iapp_iface[IFNAMSIZ + 1]; /* interface used with IAPP broadcast
-//                                     * frames */
 
        enum {
                ACCEPT_UNLESS_DENIED = 0,
                DENY_UNLESS_ACCEPTED = 1,
                USE_EXTERNAL_RADIUS_AUTH = 2
        } macaddr_acl;
-//     struct mac_acl_entry *accept_mac;
-//     int num_accept_mac;
-//     struct mac_acl_entry *deny_mac;
-//     int num_deny_mac;
-//     int wds_sta;
-//     int isolate;
 
        int auth_algs; /* bitfield of allowed IEEE 802.11 authentication
                        * algorithms, WPA_AUTH_ALG_{OPEN,SHARED,LEAP} */
@@ -288,49 +233,12 @@ struct hostapd_bss_config {
        int ft_over_ds;
 #endif /* CONFIG_IEEE80211R */
 
-//     char *ctrl_interface; /* directory for UNIX domain sockets */
-#ifndef CONFIG_NATIVE_WINDOWS
-//     gid_t ctrl_interface_gid;
-#endif /* CONFIG_NATIVE_WINDOWS */
-//     int ctrl_interface_gid_set;
-
-//     char *ca_cert;
-//     char *server_cert;
-//     char *private_key;
-//     char *private_key_passwd;
-//     int check_crl;
-//     char *dh_file;
-//     u8 *pac_opaque_encr_key;
-//     u8 *eap_fast_a_id;
-//     size_t eap_fast_a_id_len;
-//     char *eap_fast_a_id_info;
-//     int eap_fast_prov;
-//     int pac_key_lifetime;
-//     int pac_key_refresh_time;
-//     int eap_sim_aka_result_ind;
-//     int tnc;
-//     int fragment_size;
-//     u16 pwd_group;
-
-//     char *radius_server_clients;
-//     int radius_server_auth_port;
-//     int radius_server_ipv6;
-
-//     char *test_socket; /* UNIX domain socket path for driver_test */
-
-//     int use_pae_group_addr; /* Whether to send EAPOL frames to PAE group
-//                              * address instead of individual address
-//                              * (for driver_wired.c).
-//                              */
-
        int ap_max_inactivity;
        int ignore_broadcast_ssid;
 
        int wmm_enabled;
        int wmm_uapsd;
 
-//     struct hostapd_vlan *vlan, *vlan_tail;
-
        macaddr bssid;
 
        /*
@@ -340,10 +248,6 @@ struct hostapd_bss_config {
         */
        u16 max_listen_interval;
 
-//     int disable_pmksa_caching;
-//     int okc; /* Opportunistic Key Caching */
-
-//     int wps_state;
 #ifdef CONFIG_WPS
        int ap_setup_locked;
        u8 uuid[16];
@@ -375,71 +279,6 @@ struct hostapd_bss_config {
        struct wpabuf *wps_nfc_dh_privkey;
        struct wpabuf *wps_nfc_dev_pw;
 #endif /* CONFIG_WPS */
-//     int pbc_in_m1;
-
-#define P2P_ENABLED BIT(0)
-#define P2P_GROUP_OWNER BIT(1)
-#define P2P_GROUP_FORMATION BIT(2)
-#define P2P_MANAGE BIT(3)
-#define P2P_ALLOW_CROSS_CONNECTION BIT(4)
-//     int p2p;
-
-//     int disassoc_low_ack;
-//     int skip_inactivity_poll;
-
-#define TDLS_PROHIBIT BIT(0)
-#define TDLS_PROHIBIT_CHAN_SWITCH BIT(1)
-//     int tdls;
-//     int disable_11n;
-//     int disable_11ac;
-
-       /* IEEE 802.11v */
-//     int time_advertisement;
-//     char *time_zone;
-//     int wnm_sleep_mode;
-//     int bss_transition;
-
-       /* IEEE 802.11u - Interworking */
-//     int interworking;
-//     int access_network_type;
-//     int internet;
-//     int asra;
-//     int esr;
-//     int uesa;
-//     int venue_info_set;
-//     u8 venue_group;
-//     u8 venue_type;
-//     u8 hessid[ETH_ALEN];
-
-       /* IEEE 802.11u - Roaming Consortium list */
-//     unsigned int roaming_consortium_count;
-//     struct hostapd_roaming_consortium *roaming_consortium;
-
-       /* IEEE 802.11u - Venue Name duples */
-//     unsigned int venue_name_count;
-//     struct hostapd_lang_string *venue_name;
-
-       /* IEEE 802.11u - Network Authentication Type */
-//     u8 *network_auth_type;
-//     size_t network_auth_type_len;
-
-       /* IEEE 802.11u - IP Address Type Availability */
-//     u8 ipaddr_type_availability;
-//     u8 ipaddr_type_configured;
-
-       /* IEEE 802.11u - 3GPP Cellular Network */
-//     u8 *anqp_3gpp_cell_net;
-//     size_t anqp_3gpp_cell_net_len;
-
-       /* IEEE 802.11u - Domain Name */
-//     u8 *domain_name;
-//     size_t domain_name_len;
-
-//     unsigned int nai_realm_count;
-//     struct hostapd_nai_realm_data *nai_realm_data;
-
-//     u16 gas_comeback_delay;
-//     int gas_frag_limit;
 
 #ifdef CONFIG_HS20
        int hs20;
@@ -453,13 +292,10 @@ struct hostapd_bss_config {
        u8 hs20_operating_class_len;
 #endif /* CONFIG_HS20 */
 
-//     u8 wps_rf_bands; /* RF bands for WPS (WPS_RF_*) */
-
 #ifdef CONFIG_RADIUS_TEST
        char *dump_msk_file;
 #endif /* CONFIG_RADIUS_TEST */
 
-//     struct wpabuf *vendor_elements;
 };
 
 
@@ -498,8 +334,6 @@ struct hostapd_config {
 
        int ieee80211d;
 
-//     struct hostapd_tx_queue_params tx_queue[NUM_TX_QUEUES];
-
        /*
         * WMM AC parameters, in same order as 802.1D, i.e.
         * 0 = BE (best effort)
@@ -507,7 +341,6 @@ struct hostapd_config {
         * 2 = VI (video)
         * 3 = VO (voice)
         */
-//     struct hostapd_wmm_ac_params wmm_ac_params[4];
 
        int ht_op_mode_fixed;
        u16 ht_capab;
@@ -536,9 +369,7 @@ int hostapd_wep_key_cmp(struct hostapd_wep_keys *a,
 const u8 * hostapd_get_psk(const struct hostapd_bss_config *conf,
                           const u8 *addr, const u8 *prev_psk);
 int hostapd_setup_wpa_psk(struct hostapd_bss_config *conf);
-//const char * hostapd_get_vlan_id_ifname(struct hostapd_vlan *vlan,
-//                                     int vlan_id);
-//struct hostapd_radius_attr *
-//hostapd_config_get_radius_attr(struct hostapd_radius_attr *attr, u8 type);
+bool wpa_ap_join(void** sm, uint8_t *bssid, uint8_t *wpa_ie, uint8_t wpa_ie_len);
+bool wpa_ap_remove(void* sm);
 
 #endif /* HOSTAPD_CONFIG_H */
diff --git a/components/wpa_supplicant/src/ap/hostapd.h b/components/wpa_supplicant/src/ap/hostapd.h
new file mode 100644 (file)
index 0000000..5bedf09
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * hostapd / Initialization and configuration
+ * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#ifndef HOSTAPD_H
+#define HOSTAPD_H
+
+#include "common/defs.h"
+#include "ap/ap_config.h"
+
+struct wpa_driver_ops;
+struct wpa_ctrl_dst;
+struct radius_server_data;
+struct upnp_wps_device_sm;
+struct hostapd_data;
+struct sta_info;
+struct hostap_sta_driver_data;
+struct ieee80211_ht_capabilities;
+struct full_dynamic_vlan;
+enum wps_event;
+union wps_event_data;
+
+struct hostapd_iface;
+
+struct hapd_interfaces {
+       int (*reload_config)(struct hostapd_iface *iface);
+       struct hostapd_config * (*config_read_cb)(const char *config_fname);
+       int (*ctrl_iface_init)(struct hostapd_data *hapd);
+       void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
+       int (*for_each_interface)(struct hapd_interfaces *interfaces,
+                                 int (*cb)(struct hostapd_iface *iface,
+                                           void *ctx), void *ctx);
+       int (*driver_init)(struct hostapd_iface *iface);
+
+       size_t count;
+       int global_ctrl_sock;
+       char *global_iface_path;
+       char *global_iface_name;
+       struct hostapd_iface **iface;
+};
+
+
+struct hostapd_probereq_cb {
+       int (*cb)(void *ctx, const u8 *sa, const u8 *da, const u8 *bssid,
+                 const u8 *ie, size_t ie_len, int ssi_signal);
+       void *ctx;
+};
+
+#define HOSTAPD_RATE_BASIC 0x00000001
+
+struct hostapd_rate_data {
+       int rate; /* rate in 100 kbps */
+       int flags; /* HOSTAPD_RATE_ flags */
+};
+
+struct hostapd_frame_info {
+       u32 channel;
+       u32 datarate;
+       int ssi_signal; /* dBm */
+};
+
+
+/**
+ * struct hostapd_data - hostapd per-BSS data structure
+ */
+struct hostapd_data {
+       struct hostapd_config *iconf;
+       struct hostapd_bss_config *conf;
+       int interface_added; /* virtual interface added for this BSS */
+
+       u8 own_addr[ETH_ALEN];
+
+       int num_sta; /* number of entries in sta_list */
+
+       struct wpa_authenticator *wpa_auth;
+
+#ifdef CONFIG_FULL_DYNAMIC_VLAN
+       struct full_dynamic_vlan *full_dynamic_vlan;
+#endif /* CONFIG_FULL_DYNAMIC_VLAN */
+
+#ifdef CONFIG_WPS
+       unsigned int ap_pin_failures;
+       unsigned int ap_pin_failures_consecutive;
+       struct upnp_wps_device_sm *wps_upnp;
+       unsigned int ap_pin_lockout_time;
+#endif /* CONFIG_WPS */
+
+#ifdef CONFIG_P2P
+       struct p2p_data *p2p;
+       struct p2p_group *p2p_group;
+       struct wpabuf *p2p_beacon_ie;
+       struct wpabuf *p2p_probe_resp_ie;
+
+       /* Number of non-P2P association stations */
+       int num_sta_no_p2p;
+
+       /* Periodic NoA (used only when no non-P2P clients in the group) */
+       int noa_enabled;
+       int noa_start;
+       int noa_duration;
+#endif /* CONFIG_P2P */
+#ifdef CONFIG_INTERWORKING
+       size_t gas_frag_limit;
+#endif /* CONFIG_INTERWORKING */
+
+#ifdef CONFIG_SQLITE
+       struct hostapd_eap_user tmp_eap_user;
+#endif /* CONFIG_SQLITE */
+};
+
+#endif /* HOSTAPD_H */
diff --git a/components/wpa_supplicant/src/ap/ieee802_1x.c b/components/wpa_supplicant/src/ap/ieee802_1x.c
new file mode 100644 (file)
index 0000000..5b459a7
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * hostapd / IEEE 802.1X-2004 Authenticator
+ * Copyright (c) 2002-2012, Jouni Malinen <j@w1.fi>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#include "utils/includes.h"
+
+#include "utils/common.h"
+#include "crypto/crypto.h"
+#include "crypto/random.h"
+#include "common/ieee802_11_defs.h"
+#include "hostapd.h"
+#include "ap/sta_info.h"
+#include "ap/wpa_auth.h"
+#include "ap/ap_config.h"
+#include "ap/ieee802_1x.h"
+#include "utils/wpa_debug.h"
+
+/**
+ * ieee802_1x_receive - Process the EAPOL frames from the Supplicant
+ * @hapd: hostapd BSS data
+ * @sa: Source address (sender of the EAPOL frame)
+ * @buf: EAPOL frame
+ * @len: Length of buf in octets
+ *
+ * This function is called for each incoming EAPOL frame from the interface
+ */
+void ieee802_1x_receive(struct hostapd_data *hapd, const u8 *sa, const u8 *buf,
+                       size_t len)
+{
+       struct sta_info *sta;
+       struct ieee802_1x_hdr *hdr;
+       struct ieee802_1x_eapol_key *key;
+       u16 datalen;
+
+       wpa_printf( MSG_DEBUG, "IEEE 802.1X: %lu bytes from " MACSTR,
+                  (unsigned long) len, MAC2STR(sa));
+       sta = ap_get_sta(hapd, sa);
+       if (!sta || !(sta->flags & (WLAN_STA_ASSOC | WLAN_STA_PREAUTH))) {
+               wpa_printf( MSG_DEBUG, "IEEE 802.1X data frame from not "
+                          "associated/Pre-authenticating STA");
+               return;
+       }
+
+       if (len < sizeof(*hdr)) {
+               wpa_printf( MSG_DEBUG, "   too short IEEE 802.1X packet\n");
+               return;
+       }
+
+       hdr = (struct ieee802_1x_hdr *) buf;
+       datalen = be_to_host16(hdr->length);
+       wpa_printf( MSG_DEBUG, "   IEEE 802.1X: version=%d type=%d length=%d",
+                  hdr->version, hdr->type, datalen);
+
+       if (len - sizeof(*hdr) < datalen) {
+               wpa_printf( MSG_DEBUG, "   frame too short for this IEEE 802.1X packet\n");
+               return;
+       }
+       if (len - sizeof(*hdr) > datalen) {
+               wpa_printf( MSG_DEBUG, "   ignoring %lu extra octets after "
+                          "IEEE 802.1X packet",
+                          (unsigned long) len - sizeof(*hdr) - datalen);
+       }
+
+       key = (struct ieee802_1x_eapol_key *) (hdr + 1);
+       if (datalen >= sizeof(struct ieee802_1x_eapol_key) &&
+           hdr->type == IEEE802_1X_TYPE_EAPOL_KEY &&
+           (key->type == EAPOL_KEY_TYPE_WPA ||
+            key->type == EAPOL_KEY_TYPE_RSN)) {
+               wpa_receive(hapd->wpa_auth, sta->wpa_sm, (u8 *) hdr,
+                           sizeof(*hdr) + datalen);
+               return;
+       }
+}
+
diff --git a/components/wpa_supplicant/src/ap/ieee802_1x.h b/components/wpa_supplicant/src/ap/ieee802_1x.h
new file mode 100644 (file)
index 0000000..60051ee
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * hostapd / IEEE 802.1X-2004 Authenticator
+ * Copyright (c) 2002-2012, Jouni Malinen <j@w1.fi>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#ifndef IEEE802_1X_H
+#define IEEE802_1X_H
+
+struct hostapd_data;
+struct sta_info;
+struct eapol_state_machine;
+struct hostapd_config;
+struct hostapd_bss_config;
+struct hostapd_radius_attr;
+struct radius_msg;
+
+
+void ieee802_1x_receive(struct hostapd_data *hapd, const u8 *sa, const u8 *buf,
+                       size_t len);
+
+#endif /* IEEE802_1X_H */
similarity index 74%
rename from components/wpa_supplicant/include/wpa/sta_info.h
rename to components/wpa_supplicant/src/ap/sta_info.h
index 44874a2ff9983624358baa7104f6738b615a9a17..b187933f7edbb85097c1d01913ac1bff66899534 100644 (file)
@@ -48,61 +48,14 @@ struct sta_info {
        u16 listen_interval; /* or beacon_int for APs */
        u8 supported_rates[WLAN_SUPP_RATES_MAX];
        int supported_rates_len;
-//     u8 qosinfo; /* Valid when WLAN_STA_WMM is set */
-
-//     unsigned int nonerp_set:1;
-//     unsigned int no_short_slot_time_set:1;
-//     unsigned int no_short_preamble_set:1;
-//     unsigned int no_ht_gf_set:1;
-//     unsigned int no_ht_set:1;
-//     unsigned int ht_20mhz_set:1;
-//     unsigned int no_p2p_set:1;
 
        u16 auth_alg;
-//     u8 previous_ap[6];
 
        enum {
                STA_NULLFUNC = 0, STA_DISASSOC, STA_DEAUTH, STA_REMOVE
        } timeout_next;
 
-//     u16 deauth_reason;
-//     u16 disassoc_reason;
-
-       /* IEEE 802.1X related data */
-//     struct eapol_state_machine *eapol_sm;
-
-       /* IEEE 802.11f (IAPP) related data */
-//     struct ieee80211_mgmt *last_assoc_req;
-
-//     u32 acct_session_id_hi;
-//     u32 acct_session_id_lo;
-//     time_t acct_session_start;
-//     int acct_session_started;
-//     int acct_terminate_cause; /* Acct-Terminate-Cause */
-//     int acct_interim_interval; /* Acct-Interim-Interval */
-
-//     unsigned long last_rx_bytes;
-//     unsigned long last_tx_bytes;
-//     u32 acct_input_gigawords; /* Acct-Input-Gigawords */
-//     u32 acct_output_gigawords; /* Acct-Output-Gigawords */
-
-//     u8 *challenge; /* IEEE 802.11 Shared Key Authentication Challenge */
-
        struct wpa_state_machine *wpa_sm;
-//     struct rsn_preauth_interface *preauth_iface;
-
-       struct hostapd_ssid *ssid; /* SSID selection based on (Re)AssocReq */
-//     struct hostapd_ssid *ssid_probe; /* SSID selection based on ProbeReq */
-
-//     int vlan_id;
-        /* PSKs from RADIUS authentication server */
-//     struct hostapd_sta_wpa_psk_short *psk;
-
-//     char *identity; /* User-Name from RADIUS */
-//     char *radius_cui; /* Chargeable-User-Identity from RADIUS */
-
-//     struct ieee80211_ht_capabilities *ht_capabilities;
-//     struct ieee80211_vht_capabilities *vht_capabilities;
 
 #ifdef CONFIG_IEEE80211W
        int sa_query_count; /* number of pending SA Query requests;
@@ -120,12 +73,6 @@ struct sta_info {
        u8 gas_dialog_next;
 #endif /* CONFIG_INTERWORKING */
 
-//     struct wpabuf *wps_ie; /* WPS IE from (Re)Association Request */
-//     struct wpabuf *p2p_ie; /* P2P IE from (Re)Association Request */
-//     struct wpabuf *hs20_ie; /* HS 2.0 IE from (Re)Association Request */
-
-//     struct os_time connected_time;
-
 #ifdef CONFIG_SAE
        enum { SAE_INIT, SAE_COMMIT, SAE_CONFIRM } sae_state;
        u16 sae_send_confirm;
diff --git a/components/wpa_supplicant/src/ap/wpa_auth.c b/components/wpa_supplicant/src/ap/wpa_auth.c
new file mode 100644 (file)
index 0000000..5ee342e
--- /dev/null
@@ -0,0 +1,2439 @@
+/*
+ * IEEE 802.11 RSN / WPA Authenticator
+ * Copyright (c) 2004-2011, Jouni Malinen <j@w1.fi>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#include "utils/includes.h"
+#include "utils/common.h"
+#include "utils/state_machine.h"
+#include "common/ieee802_11_defs.h"
+#include "ap/wpa_auth.h"
+#include "ap/wpa_auth_i.h"
+#include "ap/wpa_auth_ie.h"
+#include "utils/wpa_debug.h"
+#include "hostapd.h"
+#include "rsn_supp/wpa.h"
+#include "ap/ap_config.h"
+#include "common/wpa_common.h"
+
+#include "crypto/aes_wrap.h"
+#include "crypto/crypto.h"
+#include "crypto/sha1.h"
+#include "crypto/sha256.h"
+#include "crypto/random.h"
+
+#include "esp_supplicant/esp_wifi_driver.h"
+#include "esp_wifi.h"
+#include "esp_private/wifi.h"
+
+#define STATE_MACHINE_DATA struct wpa_state_machine
+#define STATE_MACHINE_DEBUG_PREFIX "WPA"
+#define STATE_MACHINE_ADDR sm->addr
+
+
+static void wpa_send_eapol_timeout(void *eloop_ctx, void *timeout_ctx);
+static int wpa_sm_step(struct wpa_state_machine *sm);
+static int wpa_verify_key_mic(struct wpa_ptk *PTK, u8 *data, size_t data_len);
+static void wpa_group_sm_step(struct wpa_authenticator *wpa_auth,
+                  struct wpa_group *group);
+static void wpa_request_new_ptk(struct wpa_state_machine *sm);
+static int wpa_gtk_update(struct wpa_authenticator *wpa_auth,
+              struct wpa_group *group);
+static int wpa_group_config_group_keys(struct wpa_authenticator *wpa_auth,
+                       struct wpa_group *group);
+
+static const u32 dot11RSNAConfigGroupUpdateCount = 4;
+static const u32 dot11RSNAConfigPairwiseUpdateCount = 4;
+static const u32 eapol_key_timeout_first = 100; /* ms */
+static const u32 eapol_key_timeout_subseq = 1000; /* ms */
+static const u32 eapol_key_timeout_first_group = 500; /* ms */
+
+#define WPA_SM_MAX_INDEX 16
+static void *s_sm_table[WPA_SM_MAX_INDEX];
+static u32 s_sm_valid_bitmap = 0;
+
+static struct wpa_state_machine * wpa_auth_get_sm(u32 index)
+{
+    if ( (index < WPA_SM_MAX_INDEX) && (BIT(index) & s_sm_valid_bitmap)){
+        return s_sm_table[index];
+    }
+
+    return NULL;
+}
+
+static void wpa_auth_add_sm(struct wpa_state_machine *sm)
+{
+    if (sm) {
+        u8 i;
+        for (i=0; i<WPA_SM_MAX_INDEX; i++) {
+            if (BIT(i) & s_sm_valid_bitmap) {
+                if (s_sm_table[i] == sm) {
+                    wpa_printf( MSG_INFO, "add sm already exist i=%d", i);
+                }
+                continue;
+            }
+            s_sm_table[i] = sm;
+            s_sm_valid_bitmap |= BIT(i);
+            sm->index = i;
+            wpa_printf( MSG_DEBUG, "add sm, index=%d bitmap=%x\n", i, s_sm_valid_bitmap);
+            return;
+        }
+    }
+}
+
+static void wpa_auth_del_sm(struct wpa_state_machine *sm)
+{
+    if (sm && (sm->index < WPA_SM_MAX_INDEX)) {
+        if (sm != s_sm_table[sm->index]) {
+            wpa_printf( MSG_INFO, "del sm error %d", sm->index);
+        }
+        s_sm_table[sm->index] = NULL;
+        s_sm_valid_bitmap &= ~BIT(sm->index);
+        wpa_printf( MSG_DEBUG, "del sm, index=%d bitmap=%x\n", sm->index, s_sm_valid_bitmap);
+    }
+}
+
+static inline int wpa_auth_mic_failure_report(
+    struct wpa_authenticator *wpa_auth, const u8 *addr)
+{
+    return 0;
+}
+
+
+static inline void wpa_auth_set_eapol(struct wpa_authenticator *wpa_auth,
+                      const u8 *addr, wpa_eapol_variable var,
+                      int value)
+{
+}
+
+
+static inline int wpa_auth_get_eapol(struct wpa_authenticator *wpa_auth,
+                     const u8 *addr, wpa_eapol_variable var)
+{
+    return -1;
+}
+
+static inline const u8 * wpa_auth_get_psk(struct wpa_authenticator *wpa_auth,
+                      const u8 *addr, const u8 *prev_psk)
+{
+    struct hostapd_data *hapd = (struct hostapd_data *)esp_wifi_get_hostap_private_internal();
+
+    if (!hapd){
+        return NULL;
+    }
+
+    return (u8*)hostapd_get_psk(hapd->conf, addr, prev_psk);
+}
+
+static inline int wpa_auth_get_msk(struct wpa_authenticator *wpa_auth,
+                   const u8 *addr, u8 *msk, size_t *len)
+{
+    return -1;
+}
+
+static inline int wpa_auth_set_key(struct wpa_authenticator *wpa_auth,
+                   int vlan_id,
+                   enum wpa_alg alg, const u8 *addr, int idx,
+                   u8 *key, size_t key_len)
+{
+    return esp_wifi_set_ap_key_internal(alg, addr, idx, key, key_len);
+}
+
+
+static inline int wpa_auth_get_seqnum(struct wpa_authenticator *wpa_auth,
+                      const u8 *addr, int idx, u8 *seq)
+{
+    return -1;
+}
+
+/* fix buf for tx for now */
+#define WPA_TX_MSG_BUFF_MAXLEN 200
+
+static inline int 
+wpa_auth_send_eapol(struct wpa_authenticator *wpa_auth, const u8 *addr,
+            const u8 *data, size_t data_len, int encrypt)
+{
+    void *buffer = os_malloc(256);
+    struct l2_ethhdr *eth = buffer;
+
+    if (!buffer){
+        wpa_printf( MSG_DEBUG, "send_eapol, buffer=%p\n", buffer);
+        return -1;
+    }
+
+    memcpy(eth->h_dest, addr, ETH_ALEN);
+    memcpy(eth->h_source, wpa_auth->addr, ETH_ALEN);
+    eth->h_proto = host_to_be16(ETH_P_EAPOL);
+
+    memcpy((char *)buffer + sizeof(struct l2_ethhdr), data, data_len);
+    esp_wifi_internal_tx(1, buffer, sizeof(struct l2_ethhdr) + data_len);
+    os_free(buffer);
+    return 0;
+}
+
+int wpa_auth_for_each_sta(struct wpa_authenticator *wpa_auth,
+              int (*cb)(struct wpa_state_machine *sm, void *ctx),
+              void *cb_ctx)
+{
+    return 0;
+}
+
+static void wpa_sta_disconnect(struct wpa_authenticator *wpa_auth,
+                   const u8 *addr)
+{
+    wpa_printf(MSG_DEBUG, "wpa_sta_disconnect STA " MACSTR, MAC2STR(addr));
+    esp_wifi_ap_deauth_internal((uint8_t*)addr, WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT);
+    return;
+}
+
+static int wpa_use_aes_cmac(struct wpa_state_machine *sm)
+{
+    int ret = 0;
+#ifdef CONFIG_IEEE80211R
+    if (wpa_key_mgmt_ft(sm->wpa_key_mgmt))
+        ret = 1;
+#endif /* CONFIG_IEEE80211R */
+#ifdef CONFIG_IEEE80211W
+    if (wpa_key_mgmt_sha256(sm->wpa_key_mgmt))
+        ret = 1;
+#endif /* CONFIG_IEEE80211W */
+    return ret;
+}
+
+static void wpa_rekey_gtk(void *eloop_ctx, void *timeout_ctx)
+{
+    struct wpa_authenticator *wpa_auth = eloop_ctx;
+    struct wpa_group *group;
+
+    for (group = wpa_auth->group; group; group = group->next) {
+        group->GTKReKey = TRUE;
+        do {
+            group->changed = FALSE;
+            wpa_group_sm_step(wpa_auth, group);
+        } while (group->changed);
+    }
+
+    if (wpa_auth->conf.wpa_group_rekey) {
+        eloop_register_timeout(wpa_auth->conf.wpa_group_rekey,
+                       0, wpa_rekey_gtk, wpa_auth, NULL);
+    }
+}
+
+
+static void wpa_rekey_ptk(void *eloop_ctx, void *timeout_ctx)
+{
+    struct wpa_state_machine *sm = timeout_ctx;
+
+    wpa_request_new_ptk(sm);
+    wpa_sm_step(sm);
+}
+
+static int wpa_group_init_gmk_and_counter(struct wpa_authenticator *wpa_auth,
+                      struct wpa_group *group)
+{
+    u8 buf[ETH_ALEN + 8 + sizeof(group)];
+    u8 rkey[32];
+
+    if (os_get_random(group->GMK, WPA_GMK_LEN) < 0)
+        return -1;
+    wpa_hexdump_key(MSG_DEBUG, "GMK", group->GMK, WPA_GMK_LEN);
+
+    /*
+     * Counter = PRF-256(Random number, "Init Counter",
+     *                   Local MAC Address || Time)
+     */
+    memcpy(buf, wpa_auth->addr, ETH_ALEN);
+    wpa_get_ntp_timestamp(buf + ETH_ALEN);
+    memcpy(buf + ETH_ALEN + 8, &group, sizeof(group));
+    if (os_get_random(rkey, sizeof(rkey)) < 0)
+        return -1;
+
+    if (sha1_prf(rkey, sizeof(rkey), "Init Counter", buf, sizeof(buf),
+            group->Counter, WPA_NONCE_LEN) < 0)
+        return -1;
+    wpa_hexdump_key(MSG_DEBUG, "Key Counter",
+            group->Counter, WPA_NONCE_LEN);
+
+    return 0;
+}
+
+static struct wpa_group * wpa_group_init(struct wpa_authenticator *wpa_auth,
+                     int vlan_id, int delay_init)
+{
+    struct wpa_group *group;
+    group = (struct wpa_group *)os_zalloc(sizeof(struct wpa_group));
+    if (group == NULL)
+        return NULL;
+
+    group->GTKAuthenticator = TRUE;
+    group->GTK_len = wpa_cipher_key_len(wpa_auth->conf.wpa_group);
+
+    if (random_pool_ready() != 1) {
+        wpa_printf( MSG_INFO, "WPA: Not enough entropy in random pool "
+               "for secure operations - update keys later when "
+               "the first station connects");
+    }
+
+    /*
+     * Set initial GMK/Counter value here. The actual values that will be
+     * used in negotiations will be set once the first station tries to
+     * connect. This allows more time for collecting additional randomness
+     * on embedded devices.
+     */
+    if (wpa_group_init_gmk_and_counter(wpa_auth, group) < 0) {
+        wpa_printf( MSG_ERROR, "Failed to get random data for WPA "
+               "initialization.");
+        os_free(group);
+        return NULL;
+    }
+
+    group->GInit = TRUE;
+    if (delay_init) {
+        wpa_printf( MSG_DEBUG, "WPA: Delay group state machine start "
+               "until Beacon frames have been configured\n");
+        /* Initialization is completed in wpa_init_keys(). */
+    } else {
+        wpa_group_sm_step(wpa_auth, group);
+        group->GInit = FALSE;
+        wpa_group_sm_step(wpa_auth, group);
+    }
+
+    return group;
+}
+
+
+/**
+ * wpa_init - Initialize WPA authenticator
+ * @addr: Authenticator address
+ * @conf: Configuration for WPA authenticator
+ * @cb: Callback functions for WPA authenticator
+ * Returns: Pointer to WPA authenticator data or %NULL on failure
+ */
+struct wpa_authenticator * wpa_init(const u8 *addr,
+                    struct wpa_auth_config *conf,
+                    struct wpa_auth_callbacks *cb)
+{
+    struct wpa_authenticator *wpa_auth;
+    wpa_auth = (struct wpa_authenticator *)os_zalloc(sizeof(struct wpa_authenticator));
+    if (wpa_auth == NULL)
+        return NULL;
+    memcpy(wpa_auth->addr, addr, ETH_ALEN);
+    memcpy(&wpa_auth->conf, conf, sizeof(*conf));
+
+    if (wpa_auth_gen_wpa_ie(wpa_auth)) {
+        wpa_printf( MSG_ERROR, "Could not generate WPA IE.");
+        os_free(wpa_auth);
+        return NULL;
+    }
+
+    wpa_auth->group = wpa_group_init(wpa_auth, 0, 0);
+    if (wpa_auth->group == NULL) {
+        os_free(wpa_auth->wpa_ie);
+        os_free(wpa_auth);
+        return NULL;
+    }
+
+#ifdef CONFIG_IEEE80211R
+    wpa_auth->ft_pmk_cache = wpa_ft_pmk_cache_init();
+    if (wpa_auth->ft_pmk_cache == NULL) {
+        wpa_printf( MSG_ERROR, "FT PMK cache initialization failed.");
+        os_free(wpa_auth->wpa_ie);
+        pmksa_cache_auth_deinit(wpa_auth->pmksa);
+        os_free(wpa_auth);
+        return NULL;
+    }
+#endif /* CONFIG_IEEE80211R */
+
+    return wpa_auth;
+}
+
+struct wpa_state_machine * 
+wpa_auth_sta_init(struct wpa_authenticator *wpa_auth, const u8 *addr)
+{
+    struct wpa_state_machine *sm;
+
+    sm = (struct wpa_state_machine *)os_zalloc(sizeof(struct wpa_state_machine));
+    if (sm == NULL)
+        return NULL;
+    memcpy(sm->addr, addr, ETH_ALEN);
+
+    sm->wpa_auth = wpa_auth;
+    sm->group = wpa_auth->group;
+    wpa_auth_add_sm(sm);
+
+    return sm;
+}
+
+int wpa_auth_sta_associated(struct wpa_authenticator *wpa_auth,
+                struct wpa_state_machine *sm)
+{
+    if (wpa_auth == NULL || !wpa_auth->conf.wpa || sm == NULL)
+        return -1;
+
+#ifdef CONFIG_IEEE80211R
+    if (sm->ft_completed) {
+        wpa_auth_logger(wpa_auth, sm->addr, LOGGER_DEBUG,
+                "FT authentication already completed - do not "
+                "start 4-way handshake");
+        return 0;
+    }
+#endif /* CONFIG_IEEE80211R */
+
+    if (sm->started) {
+        memset(&sm->key_replay, 0, sizeof(sm->key_replay));
+        sm->ReAuthenticationRequest = TRUE;
+        return wpa_sm_step(sm);
+    }
+
+    sm->started = 1;
+
+    sm->Init = TRUE;
+    if (wpa_sm_step(sm) == 1)
+        return 1; /* should not really happen */
+    sm->Init = FALSE;
+    sm->AuthenticationRequest = TRUE;
+    return wpa_sm_step(sm);
+}
+
+
+void wpa_auth_sta_no_wpa(struct wpa_state_machine *sm)
+{
+    /* WPA/RSN was not used - clear WPA state. This is needed if the STA
+     * reassociates back to the same AP while the previous entry for the
+     * STA has not yet been removed. */
+    if (sm == NULL)
+        return;
+
+    sm->wpa_key_mgmt = 0;
+}
+
+
+static void wpa_free_sta_sm(struct wpa_state_machine *sm)
+{
+    wpa_auth_del_sm(sm);
+    if (sm->GUpdateStationKeys) {
+        sm->group->GKeyDoneStations--;
+        sm->GUpdateStationKeys = FALSE;
+    }
+#ifdef CONFIG_IEEE80211R
+    os_free(sm->assoc_resp_ftie);
+#endif /* CONFIG_IEEE80211R */
+    wpa_printf( MSG_DEBUG, "wpa_free_sta_sm: free eapol=%p\n", sm->last_rx_eapol_key);
+    os_free(sm->last_rx_eapol_key);
+    os_free(sm->wpa_ie);
+    os_free(sm);
+}
+
+
+void wpa_auth_sta_deinit(struct wpa_state_machine *sm)
+{
+    wpa_printf( MSG_DEBUG, "deinit sm=%p\n", sm);
+    if (sm == NULL)
+        return;
+
+    ets_timer_disarm(&sm->resend_eapol);
+    ets_timer_done(&sm->resend_eapol);
+
+    if (sm->in_step_loop) {
+        /* Must not free state machine while wpa_sm_step() is running.
+         * Freeing will be completed in the end of wpa_sm_step(). */
+        wpa_printf( MSG_DEBUG, "WPA: Registering pending STA state "
+               "machine deinit for " MACSTR, MAC2STR(sm->addr));
+        sm->pending_deinit = 1;
+    } else
+        wpa_free_sta_sm(sm);
+}
+
+
+static void wpa_request_new_ptk(struct wpa_state_machine *sm)
+{
+    if (sm == NULL)
+        return;
+
+    sm->PTKRequest = TRUE;
+    sm->PTK_valid = 0;
+}
+
+static int wpa_replay_counter_valid(struct wpa_key_replay_counter *ctr,
+                    const u8 *replay_counter)
+{
+    int i;
+    for (i = 0; i < RSNA_MAX_EAPOL_RETRIES; i++) {
+        if (!ctr[i].valid)
+            break;
+        if (memcmp(replay_counter, ctr[i].counter,
+                  WPA_REPLAY_COUNTER_LEN) == 0)
+            return 1;
+    }
+    return 0;
+}
+
+static void wpa_replay_counter_mark_invalid(struct wpa_key_replay_counter *ctr,
+                        const u8 *replay_counter)
+{
+    int i;
+    for (i = 0; i < RSNA_MAX_EAPOL_RETRIES; i++) {
+        if (ctr[i].valid &&
+            (replay_counter == NULL ||
+             memcmp(replay_counter, ctr[i].counter,
+                   WPA_REPLAY_COUNTER_LEN) == 0))
+            ctr[i].valid = FALSE;
+    }
+}
+
+#ifdef CONFIG_IEEE80211R
+static int ICACHE_FLASH_ATTR ft_check_msg_2_of_4(struct wpa_authenticator *wpa_auth,
+                   struct wpa_state_machine *sm,
+                   struct wpa_eapol_ie_parse *kde)
+{
+    struct wpa_ie_data ie;
+    struct rsn_mdie *mdie;
+
+    if (wpa_parse_wpa_ie_rsn(kde->rsn_ie, kde->rsn_ie_len, &ie) < 0 ||
+        ie.num_pmkid != 1 || ie.pmkid == NULL) {
+        wpa_printf( MSG_DEBUG, "FT: No PMKR1Name in "
+               "FT 4-way handshake message 2/4");
+        return -1;
+    }
+
+    memcpy(sm->sup_pmk_r1_name, ie.pmkid, PMKID_LEN);
+    wpa_hexdump(MSG_DEBUG, "FT: PMKR1Name from Supplicant",
+            sm->sup_pmk_r1_name, PMKID_LEN);
+
+    if (!kde->mdie || !kde->ftie) {
+        wpa_printf( MSG_DEBUG, "FT: No %s in FT 4-way handshake "
+               "message 2/4", kde->mdie ? "FTIE" : "MDIE");
+        return -1;
+    }
+
+    mdie = (struct rsn_mdie *) (kde->mdie + 2);
+    if (kde->mdie[1] < sizeof(struct rsn_mdie) ||
+       memcmp(wpa_auth->conf.mobility_domain, mdie->mobility_domain,
+              MOBILITY_DOMAIN_ID_LEN) != 0) {
+        wpa_printf( MSG_DEBUG, "FT: MDIE mismatch");
+        return -1;
+    }
+
+    if (sm->assoc_resp_ftie &&
+        (kde->ftie[1] != sm->assoc_resp_ftie[1] ||
+        memcmp(kde->ftie, sm->assoc_resp_ftie,
+               2 + sm->assoc_resp_ftie[1]) != 0)) {
+        wpa_printf( MSG_DEBUG, "FT: FTIE mismatch");
+        wpa_hexdump(MSG_DEBUG, "FT: FTIE in EAPOL-Key msg 2/4",
+                kde->ftie, kde->ftie_len);
+        wpa_hexdump(MSG_DEBUG, "FT: FTIE in (Re)AssocResp",
+                sm->assoc_resp_ftie, 2 + sm->assoc_resp_ftie[1]);
+        return -1;
+    }
+
+    return 0;
+}
+#endif /* CONFIG_IEEE80211R */
+
+static int wpa_receive_error_report(struct wpa_authenticator *wpa_auth,
+                    struct wpa_state_machine *sm, int group)
+{
+    if (group && wpa_auth->conf.wpa_group != WPA_CIPHER_TKIP) {
+    } else if (!group && sm->pairwise != WPA_CIPHER_TKIP) {
+    } else {
+        if (wpa_auth_mic_failure_report(wpa_auth, sm->addr) > 0)
+            return 1; /* STA entry was removed */
+    }
+
+    /*
+     * Error report is not a request for a new key handshake, but since
+     * Authenticator may do it, let's change the keys now anyway.
+     */
+    wpa_request_new_ptk(sm);
+    return 0;
+}
+
+void wpa_receive(struct wpa_authenticator *wpa_auth, struct wpa_state_machine *sm, u8 *data, size_t data_len)
+{
+    struct ieee802_1x_hdr *hdr;
+    struct wpa_eapol_key *key;
+    u16 key_info, key_data_length;
+    enum { PAIRWISE_2, PAIRWISE_4, GROUP_2, REQUEST,
+           SMK_M1, SMK_M3, SMK_ERROR } msg;
+    struct wpa_eapol_ie_parse kde;
+    int ft;
+    const u8 *eapol_key_ie;
+    size_t eapol_key_ie_len;
+
+    if (wpa_auth == NULL || !wpa_auth->conf.wpa || sm == NULL)
+        return;
+
+    if (data_len < sizeof(*hdr) + sizeof(*key))
+        return;
+
+    hdr = (struct ieee802_1x_hdr *) data;
+    key = (struct wpa_eapol_key *) (hdr + 1);
+    key_info = WPA_GET_BE16(key->key_info);
+    key_data_length = WPA_GET_BE16(key->key_data_length);
+    wpa_printf( MSG_DEBUG, "WPA: Received EAPOL-Key from " MACSTR
+           " key_info=0x%x type=%u key_data_length=%u\n",
+           MAC2STR(sm->addr), key_info, key->type, key_data_length);
+    if (key_data_length > data_len - sizeof(*hdr) - sizeof(*key)) {
+        wpa_printf( MSG_INFO, "WPA: Invalid EAPOL-Key frame - "
+               "key_data overflow (%d > %lu)\n",
+               key_data_length,
+               (unsigned long) (data_len - sizeof(*hdr) -
+                        sizeof(*key)));
+        return;
+    }
+
+    if (sm->wpa == WPA_VERSION_WPA2) {
+        if (key->type == EAPOL_KEY_TYPE_WPA) {
+            /*
+             * Some deployed station implementations seem to send
+             * msg 4/4 with incorrect type value in WPA2 mode.
+             */
+            wpa_printf( MSG_DEBUG, "Workaround: Allow EAPOL-Key "
+                   "with unexpected WPA type in RSN mode\n");
+        } else if (key->type != EAPOL_KEY_TYPE_RSN) {
+            wpa_printf( MSG_DEBUG, "Ignore EAPOL-Key with "
+                   "unexpected type %d in RSN mode\n",
+                   key->type);
+            return;
+        }
+    } else {
+        if (key->type != EAPOL_KEY_TYPE_WPA) {
+            wpa_printf( MSG_DEBUG, "Ignore EAPOL-Key with "
+                   "unexpected type %d in WPA mode\n",
+                   key->type);
+            return;
+        }
+    }
+
+    wpa_hexdump(MSG_DEBUG, "WPA: Received Key Nonce", key->key_nonce,
+            WPA_NONCE_LEN);
+    wpa_hexdump(MSG_DEBUG, "WPA: Received Replay Counter",
+            key->replay_counter, WPA_REPLAY_COUNTER_LEN);
+
+    /* FIX: verify that the EAPOL-Key frame was encrypted if pairwise keys
+     * are set */
+
+    if ((key_info & (WPA_KEY_INFO_SMK_MESSAGE | WPA_KEY_INFO_REQUEST)) ==
+        (WPA_KEY_INFO_SMK_MESSAGE | WPA_KEY_INFO_REQUEST)) {
+        if (key_info & WPA_KEY_INFO_ERROR) {
+            msg = SMK_ERROR;
+        } else {
+            msg = SMK_M1;
+        }
+    } else if (key_info & WPA_KEY_INFO_SMK_MESSAGE) {
+        msg = SMK_M3;
+    } else if (key_info & WPA_KEY_INFO_REQUEST) {
+        msg = REQUEST;
+    } else if (!(key_info & WPA_KEY_INFO_KEY_TYPE)) {
+        msg = GROUP_2;
+    } else if (key_data_length == 0) {
+        msg = PAIRWISE_4;
+    } else {
+        msg = PAIRWISE_2;
+    }
+
+    /* TODO: key_info type validation for PeerKey */
+    if (msg == REQUEST || msg == PAIRWISE_2 || msg == PAIRWISE_4 ||
+        msg == GROUP_2) {
+        u16 ver = key_info & WPA_KEY_INFO_TYPE_MASK;
+        if (sm->pairwise == WPA_CIPHER_CCMP ||
+            sm->pairwise == WPA_CIPHER_GCMP) {
+            if (wpa_use_aes_cmac(sm) &&
+                ver != WPA_KEY_INFO_TYPE_AES_128_CMAC) {
+                return;
+            }
+
+            if (!wpa_use_aes_cmac(sm) &&
+                ver != WPA_KEY_INFO_TYPE_HMAC_SHA1_AES) {
+                return;
+            }
+        }
+    }
+
+    if (key_info & WPA_KEY_INFO_REQUEST) {
+        if (sm->req_replay_counter_used &&
+               memcmp(key->replay_counter, sm->req_replay_counter,
+                  WPA_REPLAY_COUNTER_LEN) <= 0) {
+            return;
+        }
+    }
+
+    if (!(key_info & WPA_KEY_INFO_REQUEST) &&
+        !wpa_replay_counter_valid(sm->key_replay, key->replay_counter)) {
+        int i;
+
+        if (msg == PAIRWISE_2 &&
+            wpa_replay_counter_valid(sm->prev_key_replay,
+                         key->replay_counter) &&
+            sm->wpa_ptk_state == WPA_PTK_PTKINITNEGOTIATING &&
+            memcmp(sm->SNonce, key->key_nonce, WPA_NONCE_LEN) != 0)
+        {
+            /*
+             * Some supplicant implementations (e.g., Windows XP
+             * WZC) update SNonce for each EAPOL-Key 2/4. This
+             * breaks the workaround on accepting any of the
+             * pending requests, so allow the SNonce to be updated
+             * even if we have already sent out EAPOL-Key 3/4.
+             */
+            sm->update_snonce = 1;
+            wpa_replay_counter_mark_invalid(sm->prev_key_replay,
+                            key->replay_counter);
+            goto continue_processing;
+        }
+
+        if (msg == PAIRWISE_2 &&
+            wpa_replay_counter_valid(sm->prev_key_replay,
+                         key->replay_counter) &&
+            sm->wpa_ptk_state == WPA_PTK_PTKINITNEGOTIATING) {
+        } else {
+        }
+        for (i = 0; i < RSNA_MAX_EAPOL_RETRIES; i++) {
+            if (!sm->key_replay[i].valid)
+                break;
+            wpa_hexdump(MSG_DEBUG, "pending replay counter",
+                    sm->key_replay[i].counter,
+                    WPA_REPLAY_COUNTER_LEN);
+        }
+        wpa_hexdump(MSG_DEBUG, "received replay counter",
+                key->replay_counter, WPA_REPLAY_COUNTER_LEN);
+        return;
+    }
+
+continue_processing:
+    switch (msg) {
+    case PAIRWISE_2:
+        if (sm->wpa_ptk_state != WPA_PTK_PTKSTART &&
+            sm->wpa_ptk_state != WPA_PTK_PTKCALCNEGOTIATING &&
+            (!sm->update_snonce ||
+             sm->wpa_ptk_state != WPA_PTK_PTKINITNEGOTIATING)) {
+            return;
+        }
+        random_add_randomness(key->key_nonce, WPA_NONCE_LEN);
+        if (sm->group->reject_4way_hs_for_entropy) {
+            /*
+             * The system did not have enough entropy to generate
+             * strong random numbers. Reject the first 4-way
+             * handshake(s) and collect some entropy based on the
+             * information from it. Once enough entropy is
+             * available, the next atempt will trigger GMK/Key
+             * Counter update and the station will be allowed to
+             * continue.
+             */
+            wpa_printf( MSG_DEBUG, "WPA: Reject 4-way handshake to "
+                   "collect more entropy for random number "
+                   "generation");
+            random_mark_pool_ready();
+            wpa_sta_disconnect(wpa_auth, sm->addr);
+            return;
+        }
+        if (wpa_parse_kde_ies((u8 *) (key + 1), key_data_length,
+                      &kde) < 0) {
+            return;
+        }
+        if (kde.rsn_ie) {
+            eapol_key_ie = kde.rsn_ie;
+            eapol_key_ie_len = kde.rsn_ie_len;
+        } else {
+            eapol_key_ie = kde.wpa_ie;
+            eapol_key_ie_len = kde.wpa_ie_len;
+        }
+        ft = sm->wpa == WPA_VERSION_WPA2 &&
+            wpa_key_mgmt_ft(sm->wpa_key_mgmt);
+        if (sm->wpa_ie == NULL ||
+            wpa_compare_rsn_ie(ft,
+                       sm->wpa_ie, sm->wpa_ie_len,
+                       eapol_key_ie, eapol_key_ie_len)) {
+            if (sm->wpa_ie) {
+                wpa_hexdump(MSG_DEBUG, "WPA IE in AssocReq",
+                        sm->wpa_ie, sm->wpa_ie_len);
+            }
+            wpa_hexdump(MSG_DEBUG, "WPA IE in msg 2/4",
+                    eapol_key_ie, eapol_key_ie_len);
+            /* MLME-DEAUTHENTICATE.request */
+            wpa_sta_disconnect(wpa_auth, sm->addr);
+            return;
+        }
+#ifdef CONFIG_IEEE80211R
+        if (ft && ft_check_msg_2_of_4(wpa_auth, sm, &kde) < 0) {
+            wpa_sta_disconnect(wpa_auth, sm->addr);
+            return;
+        }
+#endif /* CONFIG_IEEE80211R */
+        break;
+    case PAIRWISE_4:
+        if (sm->wpa_ptk_state != WPA_PTK_PTKINITNEGOTIATING ||
+            !sm->PTK_valid) {
+            return;
+        }
+        break;
+    case GROUP_2:
+        if (sm->wpa_ptk_group_state != WPA_PTK_GROUP_REKEYNEGOTIATING
+            || !sm->PTK_valid) {
+            return;
+        }
+        break;
+#ifdef CONFIG_PEERKEY
+    case SMK_M1:
+    case SMK_M3:
+    case SMK_ERROR:
+        if (!wpa_auth->conf.peerkey) {
+            wpa_printf( MSG_DEBUG, "RSN: SMK M1/M3/Error, but "
+                   "PeerKey use disabled - ignoring message");
+            return;
+        }
+        if (!sm->PTK_valid) {
+            return;
+        }
+        break;
+#else /* CONFIG_PEERKEY */
+    case SMK_M1:
+    case SMK_M3:
+    case SMK_ERROR:
+        return; /* STSL disabled - ignore SMK messages */
+#endif /* CONFIG_PEERKEY */
+    case REQUEST:
+        break;
+    }
+
+
+    if (key_info & WPA_KEY_INFO_ACK) {
+        return;
+    }
+
+    if (!(key_info & WPA_KEY_INFO_MIC)) {
+        return;
+    }
+
+    sm->MICVerified = FALSE;
+    if (sm->PTK_valid && !sm->update_snonce) {
+        if (wpa_verify_key_mic(&sm->PTK, data, data_len)) {
+            return;
+        }
+        sm->MICVerified = TRUE;
+        eloop_cancel_timeout(wpa_send_eapol_timeout, wpa_auth, sm);
+        ets_timer_disarm(&sm->resend_eapol);
+        ets_timer_done(&sm->resend_eapol);
+        sm->pending_1_of_4_timeout = 0;
+    }
+
+    if (key_info & WPA_KEY_INFO_REQUEST) {
+        if (sm->MICVerified) {
+            sm->req_replay_counter_used = 1;
+            memcpy(sm->req_replay_counter, key->replay_counter,
+                  WPA_REPLAY_COUNTER_LEN);
+        } else {
+            return;
+        }
+
+        /*
+         * TODO: should decrypt key data field if encryption was used;
+         * even though MAC address KDE is not normally encrypted,
+         * supplicant is allowed to encrypt it.
+         */
+        if (msg == SMK_ERROR) {
+#ifdef CONFIG_PEERKEY
+            wpa_smk_error(wpa_auth, sm, key);
+#endif /* CONFIG_PEERKEY */
+            return;
+        } else if (key_info & WPA_KEY_INFO_ERROR) {
+            if (wpa_receive_error_report(
+                    wpa_auth, sm,
+                    !(key_info & WPA_KEY_INFO_KEY_TYPE)) > 0)
+                return; /* STA entry was removed */
+        } else if (key_info & WPA_KEY_INFO_KEY_TYPE) {
+            wpa_request_new_ptk(sm);
+#ifdef CONFIG_PEERKEY
+        } else if (msg == SMK_M1) {
+            wpa_smk_m1(wpa_auth, sm, key);
+#endif /* CONFIG_PEERKEY */
+        } else if (key_data_length > 0 &&
+               wpa_parse_kde_ies((const u8 *) (key + 1),
+                         key_data_length, &kde) == 0 &&
+               kde.mac_addr) {
+        } else {
+            eloop_cancel_timeout(wpa_rekey_gtk, wpa_auth, NULL);
+            wpa_rekey_gtk(wpa_auth, NULL);
+        }
+    } else {
+        /* Do not allow the same key replay counter to be reused. */
+        wpa_replay_counter_mark_invalid(sm->key_replay,
+                        key->replay_counter);
+
+        if (msg == PAIRWISE_2) {
+            /*
+             * Maintain a copy of the pending EAPOL-Key frames in
+             * case the EAPOL-Key frame was retransmitted. This is
+             * needed to allow EAPOL-Key msg 2/4 reply to another
+             * pending msg 1/4 to update the SNonce to work around
+             * unexpected supplicant behavior.
+             */
+            memcpy(sm->prev_key_replay, sm->key_replay,
+                  sizeof(sm->key_replay));
+        } else {
+            memset(sm->prev_key_replay, 0,
+                  sizeof(sm->prev_key_replay));
+        }
+
+        /*
+         * Make sure old valid counters are not accepted anymore and
+         * do not get copied again.
+         */
+        wpa_replay_counter_mark_invalid(sm->key_replay, NULL);
+    }
+
+#ifdef CONFIG_PEERKEY
+    if (msg == SMK_M3) {
+        wpa_smk_m3(wpa_auth, sm, key);
+        return;
+    }
+#endif /* CONFIG_PEERKEY */
+
+    wpa_printf( MSG_DEBUG, "wpa_rx: free eapol=%p\n", sm->last_rx_eapol_key);
+    os_free(sm->last_rx_eapol_key);
+    sm->last_rx_eapol_key = (u8 *)os_malloc(data_len);
+    if (sm->last_rx_eapol_key == NULL)
+        return;
+    wpa_printf( MSG_DEBUG, "wpa_rx: new eapol=%p\n", sm->last_rx_eapol_key);
+    memcpy(sm->last_rx_eapol_key, data, data_len);
+    sm->last_rx_eapol_key_len = data_len;
+
+    sm->rx_eapol_key_secure = !!(key_info & WPA_KEY_INFO_SECURE);
+    sm->EAPOLKeyReceived = TRUE;
+    sm->EAPOLKeyPairwise = !!(key_info & WPA_KEY_INFO_KEY_TYPE);
+    sm->EAPOLKeyRequest = !!(key_info & WPA_KEY_INFO_REQUEST);
+    memcpy(sm->SNonce, key->key_nonce, WPA_NONCE_LEN);
+    wpa_sm_step(sm);
+}
+
+
+static int wpa_gmk_to_gtk(const u8 *gmk, const char *label, const u8 *addr,
+              const u8 *gnonce, u8 *gtk, size_t gtk_len)
+{
+    u8 data[ETH_ALEN + WPA_NONCE_LEN + 8 + 16];
+    u8 *pos;
+    int ret = 0;
+
+    /* GTK = PRF-X(GMK, "Group key expansion",
+     *    AA || GNonce || Time || random data)
+     * The example described in the IEEE 802.11 standard uses only AA and
+     * GNonce as inputs here. Add some more entropy since this derivation
+     * is done only at the Authenticator and as such, does not need to be
+     * exactly same.
+     */
+    memcpy(data, addr, ETH_ALEN);
+    memcpy(data + ETH_ALEN, gnonce, WPA_NONCE_LEN);
+    pos = data + ETH_ALEN + WPA_NONCE_LEN;
+    wpa_get_ntp_timestamp(pos);
+    pos += 8;
+    if (os_get_random(pos, 16) < 0)
+        ret = -1;
+
+#ifdef CONFIG_IEEE80211W
+    fast_sha256_prf(gmk, WPA_GMK_LEN, label, data, sizeof(data), gtk, gtk_len);
+#else /* CONFIG_IEEE80211W */
+    if (sha1_prf(gmk, WPA_GMK_LEN, label, data, sizeof(data), gtk, gtk_len) < 0)
+        ret = -1;
+#endif /* CONFIG_IEEE80211W */
+
+    return ret;
+}
+
+
+static void wpa_send_eapol_timeout(void *eloop_ctx, void *timeout_ctx)
+{
+    struct wpa_state_machine *sm = timeout_ctx;
+
+    sm->pending_1_of_4_timeout = 0;
+    sm->TimeoutEvt = TRUE;
+    wpa_sm_step(sm);
+}
+
+
+void __wpa_send_eapol(struct wpa_authenticator *wpa_auth,
+              struct wpa_state_machine *sm, int key_info,
+              const u8 *key_rsc, const u8 *nonce,
+              const u8 *kde, size_t kde_len,
+              int keyidx, int encr, int force_version)
+{
+    struct ieee802_1x_hdr *hdr;
+    struct wpa_eapol_key *key;
+    size_t len;
+    int alg;
+    int key_data_len, pad_len = 0;
+    u8 *buf, *pos;
+    int version, pairwise;
+    int i;
+
+    wpa_printf( MSG_DEBUG, "wpa_auth=%p sm=%p  kdersc=%p kde=%p nounce=%p kde_len=%u keyidx=%d encr=%d force=%d\n",
+                   wpa_auth,sm, key_rsc, kde, nonce, kde_len, keyidx, encr, force_version);
+    len = sizeof(struct ieee802_1x_hdr) + sizeof(struct wpa_eapol_key);
+
+    if (force_version)
+        version = force_version;
+    else if (wpa_use_aes_cmac(sm))
+        version = WPA_KEY_INFO_TYPE_AES_128_CMAC;
+    else if (sm->pairwise != WPA_CIPHER_TKIP)
+        version = WPA_KEY_INFO_TYPE_HMAC_SHA1_AES;
+    else
+        version = WPA_KEY_INFO_TYPE_HMAC_MD5_RC4;
+
+    pairwise = key_info & WPA_KEY_INFO_KEY_TYPE;
+
+    wpa_printf( MSG_DEBUG, "WPA: Send EAPOL(version=%d secure=%d mic=%d "
+           "ack=%d install=%d pairwise=%d kde_len=%lu keyidx=%d "
+           "encr=%d)\n",
+           version,
+           (key_info & WPA_KEY_INFO_SECURE) ? 1 : 0,
+           (key_info & WPA_KEY_INFO_MIC) ? 1 : 0,
+           (key_info & WPA_KEY_INFO_ACK) ? 1 : 0,
+           (key_info & WPA_KEY_INFO_INSTALL) ? 1 : 0,
+           pairwise, (unsigned long) kde_len, keyidx, encr);
+
+    key_data_len = kde_len;
+
+    if ((version == WPA_KEY_INFO_TYPE_HMAC_SHA1_AES ||
+         version == WPA_KEY_INFO_TYPE_AES_128_CMAC) && encr) {
+        pad_len = key_data_len % 8;
+        if (pad_len)
+            pad_len = 8 - pad_len;
+        key_data_len += pad_len + 8;
+    }
+
+    len += key_data_len;
+
+    hdr = (struct ieee802_1x_hdr *)os_zalloc(len);
+    if (hdr == NULL)
+        return;
+    hdr->version = wpa_auth->conf.eapol_version;
+    hdr->type = IEEE802_1X_TYPE_EAPOL_KEY;
+    hdr->length = host_to_be16(len  - sizeof(*hdr));
+    key = (struct wpa_eapol_key *) (hdr + 1);
+
+    key->type = sm->wpa == WPA_VERSION_WPA2 ?
+        EAPOL_KEY_TYPE_RSN : EAPOL_KEY_TYPE_WPA;
+    key_info |= version;
+    if (encr && sm->wpa == WPA_VERSION_WPA2)
+        key_info |= WPA_KEY_INFO_ENCR_KEY_DATA;
+    if (sm->wpa != WPA_VERSION_WPA2)
+        key_info |= keyidx << WPA_KEY_INFO_KEY_INDEX_SHIFT;
+    WPA_PUT_BE16(key->key_info, key_info);
+
+    alg = pairwise ? sm->pairwise : wpa_auth->conf.wpa_group;
+    WPA_PUT_BE16(key->key_length, wpa_cipher_key_len(alg));
+    if (key_info & WPA_KEY_INFO_SMK_MESSAGE)
+        WPA_PUT_BE16(key->key_length, 0);
+
+    /* FIX: STSL: what to use as key_replay_counter? */
+    for (i = RSNA_MAX_EAPOL_RETRIES - 1; i > 0; i--) {
+        sm->key_replay[i].valid = sm->key_replay[i - 1].valid;
+        memcpy(sm->key_replay[i].counter,
+              sm->key_replay[i - 1].counter,
+              WPA_REPLAY_COUNTER_LEN);
+    }
+    inc_byte_array(sm->key_replay[0].counter, WPA_REPLAY_COUNTER_LEN);
+    memcpy(key->replay_counter, sm->key_replay[0].counter,
+          WPA_REPLAY_COUNTER_LEN);
+    sm->key_replay[0].valid = TRUE;
+
+    if (nonce)
+        memcpy(key->key_nonce, nonce, WPA_NONCE_LEN);
+
+    if (key_rsc)
+        memcpy(key->key_rsc, key_rsc, WPA_KEY_RSC_LEN);
+
+    if (kde && !encr) {
+        memcpy(key + 1, kde, kde_len);
+        WPA_PUT_BE16(key->key_data_length, kde_len);
+    } else if (encr && kde) {
+        buf = (u8 *)os_zalloc(key_data_len);
+        if (buf == NULL) {
+            os_free(hdr);
+            return;
+        }
+        pos = buf;
+        memcpy(pos, kde, kde_len);
+        pos += kde_len;
+
+        if (pad_len)
+            *pos++ = 0xdd;
+
+        wpa_hexdump_key(MSG_DEBUG, "Plaintext EAPOL-Key Key Data",
+                buf, key_data_len);
+        if (version == WPA_KEY_INFO_TYPE_HMAC_SHA1_AES ||
+            version == WPA_KEY_INFO_TYPE_AES_128_CMAC) {
+            if (fast_aes_wrap(sm->PTK.kek, (key_data_len - 8) / 8, buf,
+                       (u8 *) (key + 1))) {
+               os_free(hdr);
+               os_free(buf);
+               return;
+            }
+            WPA_PUT_BE16(key->key_data_length, key_data_len);
+        } else {
+            u8 ek[32];
+            memcpy(key->key_iv,
+                  sm->group->Counter + WPA_NONCE_LEN - 16, 16);
+            inc_byte_array(sm->group->Counter, WPA_NONCE_LEN);
+            memcpy(ek, key->key_iv, 16);
+            memcpy(ek + 16, sm->PTK.kek, 16);
+            memcpy(key + 1, buf, key_data_len);
+            rc4_skip(ek, 32, 256, (u8 *) (key + 1), key_data_len);
+            WPA_PUT_BE16(key->key_data_length, key_data_len);
+        }
+        os_free(buf);
+    }
+
+    if (key_info & WPA_KEY_INFO_MIC) {
+        if (!sm->PTK_valid) {
+            os_free(hdr);
+            return;
+        }
+        wpa_eapol_key_mic(sm->PTK.kck, version, (u8 *) hdr, len,
+                  key->key_mic);
+    }
+
+    wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_inc_EapolFramesTx, 1);
+    wpa_auth_send_eapol(wpa_auth, sm->addr, (u8 *) hdr, len, sm->pairwise_set);
+    os_free(hdr);
+}
+
+int hostap_eapol_resend_process(void *timeout_ctx)
+{
+    u32 index = (u32)timeout_ctx;
+    struct wpa_state_machine *sm = wpa_auth_get_sm(index);
+
+    wpa_printf( MSG_DEBUG, "resend eapol1");
+
+    if(sm) {
+        sm->pending_1_of_4_timeout = 0;
+        sm->TimeoutEvt = TRUE;
+        sm->in_step_loop = 0;
+        wpa_sm_step(sm);
+    } else {
+       wpa_printf( MSG_INFO, "Station left, stop send EAPOL frame");
+    }
+
+    return ESP_OK;
+}
+
+void resend_eapol_handle(void *timeout_ctx)
+{
+    wifi_ipc_config_t cfg;
+
+    cfg.fn = hostap_eapol_resend_process;
+    cfg.arg = timeout_ctx;
+    cfg.arg_size = 0;
+    esp_wifi_ipc_internal(&cfg, false);
+}
+
+static void wpa_send_eapol(struct wpa_authenticator *wpa_auth,
+               struct wpa_state_machine *sm, int key_info,
+               const u8 *key_rsc, const u8 *nonce,
+               const u8 *kde, size_t kde_len,
+               int keyidx, int encr)
+{
+    int timeout_ms;
+    int pairwise = key_info & WPA_KEY_INFO_KEY_TYPE;
+    int ctr;
+
+    if (sm == NULL)
+        return;
+
+    __wpa_send_eapol(wpa_auth, sm, key_info, key_rsc, nonce, kde, kde_len,
+             keyidx, encr, 0);
+
+    ctr = pairwise ? sm->TimeoutCtr : sm->GTimeoutCtr;
+    if (ctr == 1 && wpa_auth->conf.tx_status)
+        timeout_ms = pairwise ? eapol_key_timeout_first :
+            eapol_key_timeout_first_group;
+    else
+        timeout_ms = eapol_key_timeout_subseq;
+    if (pairwise && ctr == 1 && !(key_info & WPA_KEY_INFO_MIC))
+        sm->pending_1_of_4_timeout = 1;
+    wpa_printf( MSG_DEBUG, "WPA: Use EAPOL-Key timeout of %u ms (retry "
+           "counter %d)\n", timeout_ms, ctr);
+    eloop_register_timeout(timeout_ms / 1000, (timeout_ms % 1000) * 1000,
+                   wpa_send_eapol_timeout, wpa_auth, sm);
+    ets_timer_disarm(&sm->resend_eapol);
+    ets_timer_setfn(&sm->resend_eapol, (ETSTimerFunc *)resend_eapol_handle, (void*)(sm->index));
+    ets_timer_arm(&sm->resend_eapol, 1000, 0);
+}
+
+
+static int wpa_verify_key_mic(struct wpa_ptk *PTK, u8 *data, size_t data_len)
+{
+    struct ieee802_1x_hdr *hdr;
+    struct wpa_eapol_key *key;
+    u16 key_info;
+    int ret = 0;
+    int mic_ret = 0;
+    u8 mic[16];
+    char debug_log[8];
+
+    if (data_len < sizeof(*hdr) + sizeof(*key)){
+        wpa_printf( MSG_DEBUG, "invalid data length, len=%u\n", data_len);
+        return -1;
+    }
+
+    hdr = (struct ieee802_1x_hdr *) data;
+    key = (struct wpa_eapol_key *) (hdr + 1);
+    key_info = WPA_GET_BE16(key->key_info);
+    memcpy(mic, key->key_mic, 16);
+    memset(key->key_mic, 0, 16);
+
+    mic_ret = wpa_eapol_key_mic(PTK->kck, key_info & WPA_KEY_INFO_TYPE_MASK, data, data_len, key->key_mic);
+    if ( mic_ret || memcmp(mic, key->key_mic, 16) != 0) {
+        ret = -1;
+    }
+    os_memset(debug_log, 0, 8);
+    os_memcpy(debug_log, "you mic", sizeof("you mic"));
+    wpa_dump_mem(debug_log, mic, 16);
+    os_memset(debug_log, 0, 8);
+    os_memcpy(debug_log, "my mic", sizeof("my mic"));
+    wpa_dump_mem(debug_log, key->key_mic, 16);
+
+    memcpy(key->key_mic, mic, 16);
+    return ret;
+}
+
+
+void wpa_remove_ptk(struct wpa_state_machine *sm)
+{
+    sm->PTK_valid = FALSE;
+    memset(&sm->PTK, 0, sizeof(sm->PTK));
+    wpa_auth_set_key(sm->wpa_auth, 0, WPA_ALG_NONE, sm->addr, 0, NULL, 0);
+    sm->pairwise_set = FALSE;
+    eloop_cancel_timeout(wpa_rekey_ptk, sm->wpa_auth, sm);
+}
+
+
+int wpa_auth_sm_event(struct wpa_state_machine *sm, wpa_event event)
+{
+    int remove_ptk = 1;
+
+    if (sm == NULL)
+        return -1;
+    
+    switch (event) {
+    case WPA_AUTH:
+    case WPA_ASSOC:
+        break;
+    case WPA_DEAUTH:
+    case WPA_DISASSOC:
+        sm->DeauthenticationRequest = TRUE;
+        break;
+    case WPA_REAUTH:
+    case WPA_REAUTH_EAPOL:
+        if (!sm->started) {
+            /*
+             * When using WPS, we may end up here if the STA
+             * manages to re-associate without the previous STA
+             * entry getting removed. Consequently, we need to make
+             * sure that the WPA state machines gets initialized
+             * properly at this point.
+             */
+            wpa_printf( MSG_DEBUG, "WPA state machine had not been "
+                   "started - initialize now");
+            sm->started = 1;
+            sm->Init = TRUE;
+            if (wpa_sm_step(sm) == 1)
+                return 1; /* should not really happen */
+            sm->Init = FALSE;
+            sm->AuthenticationRequest = TRUE;
+            break;
+        }
+        if (sm->GUpdateStationKeys) {
+            /*
+             * Reauthentication cancels the pending group key
+             * update for this STA.
+             */
+            sm->group->GKeyDoneStations--;
+            sm->GUpdateStationKeys = FALSE;
+            sm->PtkGroupInit = TRUE;
+        }
+        sm->ReAuthenticationRequest = TRUE;
+        break;
+    case WPA_ASSOC_FT:
+#ifdef CONFIG_IEEE80211R
+        wpa_printf( MSG_DEBUG, "FT: Retry PTK configuration "
+               "after association");
+        wpa_ft_install_ptk(sm);
+
+        /* Using FT protocol, not WPA auth state machine */
+        sm->ft_completed = 1;
+        return 0;
+#else /* CONFIG_IEEE80211R */
+        break;
+#endif /* CONFIG_IEEE80211R */
+    }
+
+#ifdef CONFIG_IEEE80211R
+    sm->ft_completed = 0;
+#endif /* CONFIG_IEEE80211R */
+
+#ifdef CONFIG_IEEE80211W
+    if (sm->mgmt_frame_prot && event == WPA_AUTH)
+        remove_ptk = 0;
+#endif /* CONFIG_IEEE80211W */
+
+    if (remove_ptk) {
+        sm->PTK_valid = FALSE;
+        memset(&sm->PTK, 0, sizeof(sm->PTK));
+
+        if (event != WPA_REAUTH_EAPOL)
+            wpa_remove_ptk(sm);
+    }
+
+    return wpa_sm_step(sm);
+}
+
+
+SM_STATE(WPA_PTK, INITIALIZE)
+{
+    SM_ENTRY_MA(WPA_PTK, INITIALIZE, wpa_ptk);
+    if (sm->Init) {
+        /* Init flag is not cleared here, so avoid busy
+         * loop by claiming nothing changed. */
+        sm->changed = FALSE;
+    }
+
+    sm->keycount = 0;
+    if (sm->GUpdateStationKeys)
+        sm->group->GKeyDoneStations--;
+    sm->GUpdateStationKeys = FALSE;
+    if (sm->wpa == WPA_VERSION_WPA)
+        sm->PInitAKeys = FALSE;
+    if (1 /* Unicast cipher supported AND (ESS OR ((IBSS or WDS) and
+           * Local AA > Remote AA)) */) {
+        sm->Pair = TRUE;
+    }
+    wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portEnabled, 0);
+    wpa_remove_ptk(sm);
+    wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portValid, 0);
+    sm->TimeoutCtr = 0;
+    if (wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt)) {
+        wpa_auth_set_eapol(sm->wpa_auth, sm->addr,
+                   WPA_EAPOL_authorized, 0);
+    }
+}
+
+
+SM_STATE(WPA_PTK, DISCONNECT)
+{
+    SM_ENTRY_MA(WPA_PTK, DISCONNECT, wpa_ptk);
+    sm->Disconnect = FALSE;
+    wpa_sta_disconnect(sm->wpa_auth, sm->addr);
+}
+
+
+SM_STATE(WPA_PTK, DISCONNECTED)
+{
+    SM_ENTRY_MA(WPA_PTK, DISCONNECTED, wpa_ptk);
+    sm->DeauthenticationRequest = FALSE;
+}
+
+
+SM_STATE(WPA_PTK, AUTHENTICATION)
+{
+    SM_ENTRY_MA(WPA_PTK, AUTHENTICATION, wpa_ptk);
+    memset(&sm->PTK, 0, sizeof(sm->PTK));
+    sm->PTK_valid = FALSE;
+    wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portControl_Auto,
+               1);
+    wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portEnabled, 1);
+    sm->AuthenticationRequest = FALSE;
+}
+
+
+static void wpa_group_ensure_init(struct wpa_authenticator *wpa_auth,
+                  struct wpa_group *group)
+{
+    if (group->first_sta_seen)
+        return;
+    /*
+     * System has run bit further than at the time hostapd was started
+     * potentially very early during boot up. This provides better chances
+     * of collecting more randomness on embedded systems. Re-initialize the
+     * GMK and Counter here to improve their strength if there was not
+     * enough entropy available immediately after system startup.
+     */
+    wpa_printf( MSG_DEBUG, "WPA: Re-initialize GMK/Counter on first "
+           "station\n");
+    if (random_pool_ready() != 1) {
+        wpa_printf( MSG_INFO, "WPA: Not enough entropy in random pool "
+               "to proceed - reject first 4-way handshake");
+        group->reject_4way_hs_for_entropy = TRUE;
+    } else {
+        group->first_sta_seen = TRUE;
+        group->reject_4way_hs_for_entropy = FALSE;
+    }
+
+    wpa_group_init_gmk_and_counter(wpa_auth, group);
+    wpa_gtk_update(wpa_auth, group);
+    wpa_group_config_group_keys(wpa_auth, group);
+}
+
+
+SM_STATE(WPA_PTK, AUTHENTICATION2)
+{
+    SM_ENTRY_MA(WPA_PTK, AUTHENTICATION2, wpa_ptk);
+
+    wpa_group_ensure_init(sm->wpa_auth, sm->group);
+
+    /*
+     * Definition of ANonce selection in IEEE Std 802.11i-2004 is somewhat
+     * ambiguous. The Authenticator state machine uses a counter that is
+     * incremented by one for each 4-way handshake. However, the security
+     * analysis of 4-way handshake points out that unpredictable nonces
+     * help in preventing precomputation attacks. Instead of the state
+     * machine definition, use an unpredictable nonce value here to provide
+     * stronger protection against potential precomputation attacks.
+     */
+    if (os_get_random(sm->ANonce, WPA_NONCE_LEN)) {
+        wpa_printf( MSG_ERROR, "WPA: Failed to get random data for "
+               "ANonce.");
+        wpa_sta_disconnect(sm->wpa_auth, sm->addr);
+        return;
+    }
+    wpa_hexdump(MSG_DEBUG, "WPA: Assign ANonce", sm->ANonce,
+            WPA_NONCE_LEN);
+    sm->ReAuthenticationRequest = FALSE;
+    /* IEEE 802.11i does not clear TimeoutCtr here, but this is more
+     * logical place than INITIALIZE since AUTHENTICATION2 can be
+     * re-entered on ReAuthenticationRequest without going through
+     * INITIALIZE. */
+    sm->TimeoutCtr = 0;
+}
+
+
+SM_STATE(WPA_PTK, INITPMK)
+{
+    u8 msk[2 * PMK_LEN];
+    size_t len = 2 * PMK_LEN;
+
+    SM_ENTRY_MA(WPA_PTK, INITPMK, wpa_ptk);
+#ifdef CONFIG_IEEE80211R
+    sm->xxkey_len = 0;
+#endif /* CONFIG_IEEE80211R */
+
+    if (wpa_auth_get_msk(sm->wpa_auth, sm->addr, msk, &len) == 0) {
+        wpa_printf( MSG_DEBUG, "WPA: PMK from EAPOL state machine "
+               "(len=%lu)", (unsigned long) len);
+        memcpy(sm->PMK, msk, PMK_LEN);
+#ifdef CONFIG_IEEE80211R
+        if (len >= 2 * PMK_LEN) {
+            memcpy(sm->xxkey, msk + PMK_LEN, PMK_LEN);
+            sm->xxkey_len = PMK_LEN;
+        }
+#endif /* CONFIG_IEEE80211R */
+    } else {
+        wpa_printf( MSG_DEBUG, "WPA: Could not get PMK");
+    }
+
+    sm->req_replay_counter_used = 0;
+    /* IEEE 802.11i does not set keyRun to FALSE, but not doing this
+     * will break reauthentication since EAPOL state machines may not be
+     * get into AUTHENTICATING state that clears keyRun before WPA state
+     * machine enters AUTHENTICATION2 state and goes immediately to INITPMK
+     * state and takes PMK from the previously used AAA Key. This will
+     * eventually fail in 4-Way Handshake because Supplicant uses PMK
+     * derived from the new AAA Key. Setting keyRun = FALSE here seems to
+     * be good workaround for this issue. */
+    wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_keyRun, 0);
+}
+
+
+SM_STATE(WPA_PTK, INITPSK)
+{
+    const u8 *psk;
+    SM_ENTRY_MA(WPA_PTK, INITPSK, wpa_ptk);
+    psk = wpa_auth_get_psk(sm->wpa_auth, sm->addr, NULL);
+    if (psk) {
+        memcpy(sm->PMK, psk, PMK_LEN);
+#ifdef CONFIG_IEEE80211R
+        memcpy(sm->xxkey, psk, PMK_LEN);
+        sm->xxkey_len = PMK_LEN;
+#endif /* CONFIG_IEEE80211R */
+    }
+    sm->req_replay_counter_used = 0;
+}
+
+
+SM_STATE(WPA_PTK, PTKSTART)
+{
+    u8 buf[2 + RSN_SELECTOR_LEN + PMKID_LEN], *pmkid = NULL;
+    size_t pmkid_len = 0;
+
+    SM_ENTRY_MA(WPA_PTK, PTKSTART, wpa_ptk);
+    sm->PTKRequest = FALSE;
+    sm->TimeoutEvt = FALSE;
+
+    sm->TimeoutCtr++;
+    if (sm->TimeoutCtr > (int) dot11RSNAConfigPairwiseUpdateCount) {
+        /* No point in sending the EAPOL-Key - we will disconnect
+         * immediately following this. */
+        return;
+    }
+
+    /*
+     * TODO: Could add PMKID even with WPA2-PSK, but only if there is only
+     * one possible PSK for this STA.
+     */
+    if (sm->wpa == WPA_VERSION_WPA2 &&
+        wpa_key_mgmt_wpa_ieee8021x(sm->wpa_key_mgmt)) {
+        pmkid = buf;
+        pmkid_len = 2 + RSN_SELECTOR_LEN + PMKID_LEN;
+        pmkid[0] = WLAN_EID_VENDOR_SPECIFIC;
+        pmkid[1] = RSN_SELECTOR_LEN + PMKID_LEN;
+        RSN_SELECTOR_PUT(&pmkid[2], RSN_KEY_DATA_PMKID);
+
+        {
+            /*
+             * Calculate PMKID since no PMKSA cache entry was
+             * available with pre-calculated PMKID.
+             */
+            rsn_pmkid(sm->PMK, PMK_LEN, sm->wpa_auth->addr,
+                  sm->addr, &pmkid[2 + RSN_SELECTOR_LEN],
+                  wpa_key_mgmt_sha256(sm->wpa_key_mgmt));
+        }
+    }
+    wpa_send_eapol(sm->wpa_auth, sm,
+               WPA_KEY_INFO_ACK | WPA_KEY_INFO_KEY_TYPE, NULL,
+               sm->ANonce, pmkid, pmkid_len, 0, 0);
+}
+
+
+static int wpa_derive_ptk(struct wpa_state_machine *sm, const u8 *pmk,
+              struct wpa_ptk *ptk)
+{
+    size_t ptk_len = sm->pairwise != WPA_CIPHER_TKIP ? 48 : 64;
+#ifdef CONFIG_IEEE80211R
+    if (wpa_key_mgmt_ft(sm->wpa_key_mgmt))
+        return wpa_auth_derive_ptk_ft(sm, pmk, ptk, ptk_len);
+#endif /* CONFIG_IEEE80211R */
+
+    wpa_pmk_to_ptk(pmk, PMK_LEN, "Pairwise key expansion",
+               sm->wpa_auth->addr, sm->addr, sm->ANonce, sm->SNonce,
+               (u8 *) ptk, ptk_len,
+               wpa_key_mgmt_sha256(sm->wpa_key_mgmt));
+
+    return 0;
+}
+
+
+SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
+{
+    struct wpa_ptk PTK;
+    int ok = 0;
+    const u8 *pmk = NULL;
+
+    SM_ENTRY_MA(WPA_PTK, PTKCALCNEGOTIATING, wpa_ptk);
+    sm->EAPOLKeyReceived = FALSE;
+    sm->update_snonce = FALSE;
+
+    /* WPA with IEEE 802.1X: use the derived PMK from EAP
+     * WPA-PSK: iterate through possible PSKs and select the one matching
+     * the packet */
+    for (;;) {
+        if (wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt)) {
+            wpa_printf( MSG_DEBUG, "wpa psk\n");
+            pmk = wpa_auth_get_psk(sm->wpa_auth, sm->addr, pmk);
+            if (pmk == NULL){
+                wpa_printf( MSG_DEBUG, "pmk is null\n");
+                break;
+            }
+        } else {
+            pmk = sm->PMK;
+        }
+
+        wpa_derive_ptk(sm, pmk, &PTK);
+
+        if (wpa_verify_key_mic(&PTK, sm->last_rx_eapol_key,
+                       sm->last_rx_eapol_key_len) == 0) {
+            wpa_printf( MSG_DEBUG, "mic verify ok, pmk=%p\n", pmk);
+            ok = 1;
+            break;
+        } else {
+            wpa_printf( MSG_DEBUG, "mic verify fail, pmk=%p\n", pmk);
+        }
+
+        if (!wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt)){
+            wpa_printf( MSG_DEBUG, "wpa_key_mgmt=%x\n", sm->wpa_key_mgmt);
+            break;
+        }
+    }
+
+    if (!ok) {
+        return;
+    }
+
+#ifdef CONFIG_IEEE80211R
+    if (sm->wpa == WPA_VERSION_WPA2 && wpa_key_mgmt_ft(sm->wpa_key_mgmt)) {
+        /*
+         * Verify that PMKR1Name from EAPOL-Key message 2/4 matches
+         * with the value we derived.
+         */
+        if (memcmp(sm->sup_pmk_r1_name, sm->pmk_r1_name,
+                  WPA_PMK_NAME_LEN) != 0) {
+            wpa_hexdump(MSG_DEBUG, "FT: PMKR1Name from "
+                    "Supplicant",
+                    sm->sup_pmk_r1_name, WPA_PMK_NAME_LEN);
+            wpa_hexdump(MSG_DEBUG, "FT: Derived PMKR1Name",
+                    sm->pmk_r1_name, WPA_PMK_NAME_LEN);
+            return;
+        }
+    }
+#endif /* CONFIG_IEEE80211R */
+
+    sm->pending_1_of_4_timeout = 0;
+    eloop_cancel_timeout(wpa_send_eapol_timeout, sm->wpa_auth, sm);
+
+    if (wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt)) {
+        /* PSK may have changed from the previous choice, so update
+         * state machine data based on whatever PSK was selected here.
+         */
+        memcpy(sm->PMK, pmk, PMK_LEN);
+    }
+
+    sm->MICVerified = TRUE;
+
+    memcpy(&sm->PTK, &PTK, sizeof(PTK));
+    sm->PTK_valid = TRUE;
+}
+
+
+SM_STATE(WPA_PTK, PTKCALCNEGOTIATING2)
+{
+    SM_ENTRY_MA(WPA_PTK, PTKCALCNEGOTIATING2, wpa_ptk);
+    sm->TimeoutCtr = 0;
+}
+
+
+#ifdef CONFIG_IEEE80211W
+
+static int ieee80211w_kde_len(struct wpa_state_machine *sm)
+{
+    if (sm->mgmt_frame_prot) {
+        return 2 + RSN_SELECTOR_LEN + sizeof(struct wpa_igtk_kde);
+    }
+
+    return 0;
+}
+
+
+static u8 * ieee80211w_kde_add(struct wpa_state_machine *sm, u8 *pos)
+{
+    struct wpa_igtk_kde igtk;
+    struct wpa_group *gsm = sm->group;
+
+    if (!sm->mgmt_frame_prot)
+        return pos;
+
+    igtk.keyid[0] = gsm->GN_igtk;
+    igtk.keyid[1] = 0;
+    if (gsm->wpa_group_state != WPA_GROUP_SETKEYSDONE ||
+        wpa_auth_get_seqnum(sm->wpa_auth, NULL, gsm->GN_igtk, igtk.pn) < 0)
+        memset(igtk.pn, 0, sizeof(igtk.pn));
+    memcpy(igtk.igtk, gsm->IGTK[gsm->GN_igtk - 4], WPA_IGTK_LEN);
+    if (sm->wpa_auth->conf.disable_gtk) {
+        /*
+         * Provide unique random IGTK to each STA to prevent use of
+         * IGTK in the BSS.
+         */
+        if (os_get_random(igtk.igtk, WPA_IGTK_LEN) < 0)
+            return pos;
+    }
+    pos = wpa_add_kde(pos, RSN_KEY_DATA_IGTK,
+              (const u8 *) &igtk, sizeof(igtk), NULL, 0);
+
+    return pos;
+}
+
+#else /* CONFIG_IEEE80211W */
+
+static int ieee80211w_kde_len(struct wpa_state_machine *sm)
+{
+    return 0;
+}
+
+
+static u8 * ieee80211w_kde_add(struct wpa_state_machine *sm, u8 *pos)
+{
+    return pos;
+}
+
+#endif /* CONFIG_IEEE80211W */
+
+
+SM_STATE(WPA_PTK, PTKINITNEGOTIATING)
+{
+    u8 rsc[WPA_KEY_RSC_LEN], *_rsc, *gtk, *kde, *pos, dummy_gtk[32];
+    size_t gtk_len, kde_len;
+    struct wpa_group *gsm = sm->group;
+    u8 *wpa_ie;
+    int wpa_ie_len, secure, keyidx, encr = 0;
+
+    SM_ENTRY_MA(WPA_PTK, PTKINITNEGOTIATING, wpa_ptk);
+    sm->TimeoutEvt = FALSE;
+
+    sm->TimeoutCtr++;
+    if (sm->TimeoutCtr > (int) dot11RSNAConfigPairwiseUpdateCount) {
+        /* No point in sending the EAPOL-Key - we will disconnect
+         * immediately following this. */
+        return;
+    }
+
+    /* Send EAPOL(1, 1, 1, Pair, P, RSC, ANonce, MIC(PTK), RSNIE, [MDIE],
+       GTK[GN], IGTK, [FTIE], [TIE * 2])
+     */
+    memset(rsc, 0, WPA_KEY_RSC_LEN);
+    wpa_auth_get_seqnum(sm->wpa_auth, NULL, gsm->GN, rsc);
+    /* If FT is used, wpa_auth->wpa_ie includes both RSNIE and MDIE */
+    wpa_ie = sm->wpa_auth->wpa_ie;
+    wpa_ie_len = sm->wpa_auth->wpa_ie_len;
+    if (sm->wpa == WPA_VERSION_WPA &&
+        (sm->wpa_auth->conf.wpa & WPA_PROTO_RSN) &&
+        wpa_ie_len > wpa_ie[1] + 2 && wpa_ie[0] == WLAN_EID_RSN) {
+        /* WPA-only STA, remove RSN IE */
+        wpa_ie = wpa_ie + wpa_ie[1] + 2;
+        wpa_ie_len = wpa_ie[1] + 2;
+    }
+    if (sm->wpa == WPA_VERSION_WPA2) {
+        /* WPA2 send GTK in the 4-way handshake */
+        secure = 1;
+        gtk = gsm->GTK[gsm->GN - 1];
+        gtk_len = gsm->GTK_len;
+        if (sm->wpa_auth->conf.disable_gtk) {
+            /*
+             * Provide unique random GTK to each STA to prevent use
+             * of GTK in the BSS.
+             */
+            if (os_get_random(dummy_gtk, gtk_len) < 0)
+                return;
+            gtk = dummy_gtk;
+        }
+        keyidx = gsm->GN;
+        _rsc = rsc;
+        encr = 1;
+    } else {
+        /* WPA does not include GTK in msg 3/4 */
+        secure = 0;
+        gtk = NULL;
+        gtk_len = 0;
+        keyidx = 0;
+        _rsc = NULL;
+        if (sm->rx_eapol_key_secure) {
+            /*
+             * It looks like Windows 7 supplicant tries to use
+             * Secure bit in msg 2/4 after having reported Michael
+             * MIC failure and it then rejects the 4-way handshake
+             * if msg 3/4 does not set Secure bit. Work around this
+             * by setting the Secure bit here even in the case of
+             * WPA if the supplicant used it first.
+             */
+            secure = 1;
+        }
+    }
+
+    kde_len = wpa_ie_len + ieee80211w_kde_len(sm);
+    if (gtk)
+        kde_len += 2 + RSN_SELECTOR_LEN + 2 + gtk_len;
+#ifdef CONFIG_IEEE80211R
+    if (wpa_key_mgmt_ft(sm->wpa_key_mgmt)) {
+        kde_len += 2 + PMKID_LEN; /* PMKR1Name into RSN IE */
+        kde_len += 300; /* FTIE + 2 * TIE */
+    }
+#endif /* CONFIG_IEEE80211R */
+    kde = (u8 *)os_malloc(kde_len);
+    if (kde == NULL)
+        return;
+
+    pos = kde;
+    memcpy(pos, wpa_ie, wpa_ie_len);
+    pos += wpa_ie_len;
+#ifdef CONFIG_IEEE80211R
+    if (wpa_key_mgmt_ft(sm->wpa_key_mgmt)) {
+        int res = wpa_insert_pmkid(kde, pos - kde, sm->pmk_r1_name);
+        if (res < 0) {
+            wpa_printf( MSG_ERROR, "FT: Failed to insert "
+                   "PMKR1Name into RSN IE in EAPOL-Key data");
+            os_free(kde);
+            return;
+        }
+        pos += res;
+    }
+#endif /* CONFIG_IEEE80211R */
+    if (gtk) {
+        u8 hdr[2];
+        hdr[0] = keyidx & 0x03;
+        hdr[1] = 0;
+        pos = wpa_add_kde(pos, RSN_KEY_DATA_GROUPKEY, hdr, 2,
+                  gtk, gtk_len);
+    }
+    pos = ieee80211w_kde_add(sm, pos);
+
+#ifdef CONFIG_IEEE80211R
+    if (wpa_key_mgmt_ft(sm->wpa_key_mgmt)) {
+        int res;
+        struct wpa_auth_config *conf;
+
+        conf = &sm->wpa_auth->conf;
+        res = wpa_write_ftie(conf, conf->r0_key_holder,
+                     conf->r0_key_holder_len,
+                     NULL, NULL, pos, kde + kde_len - pos,
+                     NULL, 0);
+        if (res < 0) {
+            wpa_printf( MSG_ERROR, "FT: Failed to insert FTIE "
+                   "into EAPOL-Key Key Data");
+            os_free(kde);
+            return;
+        }
+        pos += res;
+
+        /* TIE[ReassociationDeadline] (TU) */
+        *pos++ = WLAN_EID_TIMEOUT_INTERVAL;
+        *pos++ = 5;
+        *pos++ = WLAN_TIMEOUT_REASSOC_DEADLINE;
+        WPA_PUT_LE32(pos, conf->reassociation_deadline);
+        pos += 4;
+
+        /* TIE[KeyLifetime] (seconds) */
+        *pos++ = WLAN_EID_TIMEOUT_INTERVAL;
+        *pos++ = 5;
+        *pos++ = WLAN_TIMEOUT_KEY_LIFETIME;
+        WPA_PUT_LE32(pos, conf->r0_key_lifetime * 60);
+        pos += 4;
+    }
+#endif /* CONFIG_IEEE80211R */
+
+    wpa_send_eapol(sm->wpa_auth, sm,
+               (secure ? WPA_KEY_INFO_SECURE : 0) | WPA_KEY_INFO_MIC |
+               WPA_KEY_INFO_ACK | WPA_KEY_INFO_INSTALL |
+               WPA_KEY_INFO_KEY_TYPE,
+               _rsc, sm->ANonce, kde, pos - kde, keyidx, encr);
+    os_free(kde);
+}
+
+
+SM_STATE(WPA_PTK, PTKINITDONE)
+{
+    SM_ENTRY_MA(WPA_PTK, PTKINITDONE, wpa_ptk);
+    sm->EAPOLKeyReceived = FALSE;
+    if (sm->Pair) {
+        enum wpa_alg alg = wpa_cipher_to_alg(sm->pairwise);
+        int klen = wpa_cipher_key_len(sm->pairwise);
+        if (wpa_auth_set_key(sm->wpa_auth, 0, alg, sm->addr, 0,
+                     sm->PTK.tk1, klen)) {
+            wpa_sta_disconnect(sm->wpa_auth, sm->addr);
+            return;
+        }
+        /* FIX: MLME-SetProtection.Request(TA, Tx_Rx) */
+        sm->pairwise_set = TRUE;
+
+        if (sm->wpa_auth->conf.wpa_ptk_rekey) {
+            eloop_cancel_timeout(wpa_rekey_ptk, sm->wpa_auth, sm);
+            eloop_register_timeout(sm->wpa_auth->conf.
+                           wpa_ptk_rekey, 0, wpa_rekey_ptk,
+                           sm->wpa_auth, sm);
+        }
+
+        if (wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt)) {
+            wpa_auth_set_eapol(sm->wpa_auth, sm->addr,
+                       WPA_EAPOL_authorized, 1);
+        }
+    }
+
+    if (0 /* IBSS == TRUE */) {
+        sm->keycount++;
+        if (sm->keycount == 2) {
+            wpa_auth_set_eapol(sm->wpa_auth, sm->addr,
+                       WPA_EAPOL_portValid, 1);
+        }
+    } else {
+        wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portValid,
+                   1);
+    }
+    wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_keyAvailable, 0);
+    wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_keyDone, 1);
+    if (sm->wpa == WPA_VERSION_WPA)
+        sm->PInitAKeys = TRUE;
+    else
+        sm->has_GTK = TRUE;
+
+
+{
+    esp_wifi_wpa_ptk_init_done_internal(sm->addr);
+}
+#ifdef CONFIG_IEEE80211R
+    wpa_ft_push_pmk_r1(sm->wpa_auth, sm->addr);
+#endif /* CONFIG_IEEE80211R */
+}
+
+
+SM_STEP(WPA_PTK)
+{
+
+    if (sm->Init)
+        SM_ENTER(WPA_PTK, INITIALIZE);
+    else if (sm->Disconnect
+         /* || FIX: dot11RSNAConfigSALifetime timeout */) {
+        SM_ENTER(WPA_PTK, DISCONNECT);
+    }
+    else if (sm->DeauthenticationRequest)
+        SM_ENTER(WPA_PTK, DISCONNECTED);
+    else if (sm->AuthenticationRequest)
+        SM_ENTER(WPA_PTK, AUTHENTICATION);
+    else if (sm->ReAuthenticationRequest)
+        SM_ENTER(WPA_PTK, AUTHENTICATION2);
+    else if (sm->PTKRequest)
+        SM_ENTER(WPA_PTK, PTKSTART);
+    else switch (sm->wpa_ptk_state) {
+    case WPA_PTK_INITIALIZE:
+        break;
+    case WPA_PTK_DISCONNECT:
+        SM_ENTER(WPA_PTK, DISCONNECTED);
+        break;
+    case WPA_PTK_DISCONNECTED:
+        SM_ENTER(WPA_PTK, INITIALIZE);
+        break;
+    case WPA_PTK_AUTHENTICATION:
+        SM_ENTER(WPA_PTK, AUTHENTICATION2);
+        break;
+    case WPA_PTK_AUTHENTICATION2:
+        if (wpa_key_mgmt_wpa_ieee8021x(sm->wpa_key_mgmt) &&
+            wpa_auth_get_eapol(sm->wpa_auth, sm->addr,
+                       WPA_EAPOL_keyRun) > 0)
+            SM_ENTER(WPA_PTK, INITPMK);
+        else if (wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt)
+             /* FIX: && 802.1X::keyRun */)
+            SM_ENTER(WPA_PTK, INITPSK);
+        break;
+    case WPA_PTK_INITPMK:
+        if (wpa_auth_get_eapol(sm->wpa_auth, sm->addr,
+                       WPA_EAPOL_keyAvailable) > 0)
+            SM_ENTER(WPA_PTK, PTKSTART);
+        else {
+            SM_ENTER(WPA_PTK, DISCONNECT);
+        }
+        break;
+    case WPA_PTK_INITPSK:
+        if (wpa_auth_get_psk(sm->wpa_auth, sm->addr, NULL))
+            SM_ENTER(WPA_PTK, PTKSTART);
+        else {
+            SM_ENTER(WPA_PTK, DISCONNECT);
+        }
+        break;
+    case WPA_PTK_PTKSTART:
+        if (sm->EAPOLKeyReceived && !sm->EAPOLKeyRequest &&
+            sm->EAPOLKeyPairwise)
+            SM_ENTER(WPA_PTK, PTKCALCNEGOTIATING);
+        else if (sm->TimeoutCtr >
+             (int) dot11RSNAConfigPairwiseUpdateCount) {
+            SM_ENTER(WPA_PTK, DISCONNECT);
+        } else if (sm->TimeoutEvt)
+            SM_ENTER(WPA_PTK, PTKSTART);
+        break;
+    case WPA_PTK_PTKCALCNEGOTIATING:
+        if (sm->MICVerified)
+            SM_ENTER(WPA_PTK, PTKCALCNEGOTIATING2);
+        else if (sm->EAPOLKeyReceived && !sm->EAPOLKeyRequest &&
+             sm->EAPOLKeyPairwise)
+            SM_ENTER(WPA_PTK, PTKCALCNEGOTIATING);
+        else if (sm->TimeoutEvt)
+            SM_ENTER(WPA_PTK, PTKSTART);
+        break;
+    case WPA_PTK_PTKCALCNEGOTIATING2:
+        SM_ENTER(WPA_PTK, PTKINITNEGOTIATING);
+        break;
+    case WPA_PTK_PTKINITNEGOTIATING:
+        if (sm->update_snonce)
+            SM_ENTER(WPA_PTK, PTKCALCNEGOTIATING);
+        else if (sm->EAPOLKeyReceived && !sm->EAPOLKeyRequest &&
+             sm->EAPOLKeyPairwise && sm->MICVerified)
+            SM_ENTER(WPA_PTK, PTKINITDONE);
+        else if (sm->TimeoutCtr >
+             (int) dot11RSNAConfigPairwiseUpdateCount) {
+            SM_ENTER(WPA_PTK, DISCONNECT);
+        } else if (sm->TimeoutEvt)
+            SM_ENTER(WPA_PTK, PTKINITNEGOTIATING);
+        break;
+    case WPA_PTK_PTKINITDONE:
+        break;
+    }
+}
+
+
+SM_STATE(WPA_PTK_GROUP, IDLE)
+{
+    SM_ENTRY_MA(WPA_PTK_GROUP, IDLE, wpa_ptk_group);
+    if (sm->Init) {
+        /* Init flag is not cleared here, so avoid busy
+         * loop by claiming nothing changed. */
+        sm->changed = FALSE;
+    }
+    sm->GTimeoutCtr = 0;
+}
+
+
+SM_STATE(WPA_PTK_GROUP, REKEYNEGOTIATING)
+{
+    u8 rsc[WPA_KEY_RSC_LEN];
+    struct wpa_group *gsm = sm->group;
+    u8 *kde, *pos, hdr[2];
+    size_t kde_len;
+    u8 *gtk, dummy_gtk[32];
+
+    SM_ENTRY_MA(WPA_PTK_GROUP, REKEYNEGOTIATING, wpa_ptk_group);
+
+    sm->GTimeoutCtr++;
+    if (sm->GTimeoutCtr > (int) dot11RSNAConfigGroupUpdateCount) {
+        /* No point in sending the EAPOL-Key - we will disconnect
+         * immediately following this. */
+        return;
+    }
+
+    if (sm->wpa == WPA_VERSION_WPA)
+        sm->PInitAKeys = FALSE;
+    sm->TimeoutEvt = FALSE;
+    /* Send EAPOL(1, 1, 1, !Pair, G, RSC, GNonce, MIC(PTK), GTK[GN]) */
+    memset(rsc, 0, WPA_KEY_RSC_LEN);
+    if (gsm->wpa_group_state == WPA_GROUP_SETKEYSDONE)
+        wpa_auth_get_seqnum(sm->wpa_auth, NULL, gsm->GN, rsc);
+
+    gtk = gsm->GTK[gsm->GN - 1];
+    if (sm->wpa_auth->conf.disable_gtk) {
+        /*
+         * Provide unique random GTK to each STA to prevent use
+         * of GTK in the BSS.
+         */
+        if (os_get_random(dummy_gtk, gsm->GTK_len) < 0)
+            return;
+        gtk = dummy_gtk;
+    }
+    if (sm->wpa == WPA_VERSION_WPA2) {
+        kde_len = 2 + RSN_SELECTOR_LEN + 2 + gsm->GTK_len +
+            ieee80211w_kde_len(sm);
+        kde = (u8 *)os_malloc(kde_len);
+        if (kde == NULL)
+            return;
+
+        pos = kde;
+        hdr[0] = gsm->GN & 0x03;
+        hdr[1] = 0;
+        pos = wpa_add_kde(pos, RSN_KEY_DATA_GROUPKEY, hdr, 2,
+                  gtk, gsm->GTK_len);
+        pos = ieee80211w_kde_add(sm, pos);
+    } else {
+        kde = gtk;
+        pos = kde + gsm->GTK_len;
+    }
+
+    wpa_send_eapol(sm->wpa_auth, sm,
+               WPA_KEY_INFO_SECURE | WPA_KEY_INFO_MIC |
+               WPA_KEY_INFO_ACK |
+               (!sm->Pair ? WPA_KEY_INFO_INSTALL : 0),
+               rsc, gsm->GNonce, kde, pos - kde, gsm->GN, 1);
+    if (sm->wpa == WPA_VERSION_WPA2)
+        os_free(kde);
+}
+
+
+SM_STATE(WPA_PTK_GROUP, REKEYESTABLISHED)
+{
+    SM_ENTRY_MA(WPA_PTK_GROUP, REKEYESTABLISHED, wpa_ptk_group);
+    sm->EAPOLKeyReceived = FALSE;
+    if (sm->GUpdateStationKeys)
+        sm->group->GKeyDoneStations--;
+    sm->GUpdateStationKeys = FALSE;
+    sm->GTimeoutCtr = 0;
+    /* FIX: MLME.SetProtection.Request(TA, Tx_Rx) */
+    sm->has_GTK = TRUE;
+}
+
+
+SM_STATE(WPA_PTK_GROUP, KEYERROR)
+{
+    SM_ENTRY_MA(WPA_PTK_GROUP, KEYERROR, wpa_ptk_group);
+    if (sm->GUpdateStationKeys)
+        sm->group->GKeyDoneStations--;
+    sm->GUpdateStationKeys = FALSE;
+    sm->Disconnect = TRUE;
+}
+
+
+SM_STEP(WPA_PTK_GROUP)
+{
+    if (sm->Init || sm->PtkGroupInit) {
+        SM_ENTER(WPA_PTK_GROUP, IDLE);
+        sm->PtkGroupInit = FALSE;
+    } else switch (sm->wpa_ptk_group_state) {
+    case WPA_PTK_GROUP_IDLE:
+        if (sm->GUpdateStationKeys ||
+            (sm->wpa == WPA_VERSION_WPA && sm->PInitAKeys))
+            SM_ENTER(WPA_PTK_GROUP, REKEYNEGOTIATING);
+        break;
+    case WPA_PTK_GROUP_REKEYNEGOTIATING:
+        if (sm->EAPOLKeyReceived && !sm->EAPOLKeyRequest &&
+            !sm->EAPOLKeyPairwise && sm->MICVerified)
+            SM_ENTER(WPA_PTK_GROUP, REKEYESTABLISHED);
+        else if (sm->GTimeoutCtr >
+             (int) dot11RSNAConfigGroupUpdateCount)
+            SM_ENTER(WPA_PTK_GROUP, KEYERROR);
+        else if (sm->TimeoutEvt)
+            SM_ENTER(WPA_PTK_GROUP, REKEYNEGOTIATING);
+        break;
+    case WPA_PTK_GROUP_KEYERROR:
+        SM_ENTER(WPA_PTK_GROUP, IDLE);
+        break;
+    case WPA_PTK_GROUP_REKEYESTABLISHED:
+        SM_ENTER(WPA_PTK_GROUP, IDLE);
+        break;
+    }
+}
+
+
+static int wpa_gtk_update(struct wpa_authenticator *wpa_auth,
+              struct wpa_group *group)
+{
+    int ret = 0;
+
+    memcpy(group->GNonce, group->Counter, WPA_NONCE_LEN);
+    inc_byte_array(group->Counter, WPA_NONCE_LEN);
+
+    if (wpa_gmk_to_gtk(group->GMK, "Group key expansion",
+               wpa_auth->addr, group->GNonce,
+               group->GTK[group->GN - 1], group->GTK_len) < 0)
+        ret = -1;
+    wpa_hexdump_key(MSG_DEBUG, "GTK",
+            group->GTK[group->GN - 1], group->GTK_len);
+
+#ifdef CONFIG_IEEE80211W
+    if (wpa_auth->conf.ieee80211w != NO_MGMT_FRAME_PROTECTION) {
+        memcpy(group->GNonce, group->Counter, WPA_NONCE_LEN);
+        inc_byte_array(group->Counter, WPA_NONCE_LEN);
+        if (wpa_gmk_to_gtk(group->GMK, "IGTK key expansion",
+                   wpa_auth->addr, group->GNonce,
+                   group->IGTK[group->GN_igtk - 4],
+                   WPA_IGTK_LEN) < 0)
+            ret = -1;
+        wpa_hexdump_key(MSG_DEBUG, "IGTK",
+                group->IGTK[group->GN_igtk - 4], WPA_IGTK_LEN);
+    }
+#endif /* CONFIG_IEEE80211W */
+
+    return ret;
+}
+
+
+static void wpa_group_gtk_init(struct wpa_authenticator *wpa_auth,
+                   struct wpa_group *group)
+{
+    wpa_printf( MSG_DEBUG, "WPA: group state machine entering state "
+           "GTK_INIT (VLAN-ID %d)\n", group->vlan_id);
+    group->changed = FALSE; /* GInit is not cleared here; avoid loop */
+    group->wpa_group_state = WPA_GROUP_GTK_INIT;
+
+    /* GTK[0..N] = 0 */
+    memset(group->GTK, 0, sizeof(group->GTK));
+    group->GN = 1;
+    group->GM = 2;
+#ifdef CONFIG_IEEE80211W
+    group->GN_igtk = 4;
+    group->GM_igtk = 5;
+#endif /* CONFIG_IEEE80211W */
+    /* GTK[GN] = CalcGTK() */
+    wpa_gtk_update(wpa_auth, group);
+}
+
+
+static int wpa_group_update_sta(struct wpa_state_machine *sm, void *ctx)
+{
+    if (ctx != NULL && ctx != sm->group)
+        return 0;
+
+    if (sm->wpa_ptk_state != WPA_PTK_PTKINITDONE) {
+        sm->GUpdateStationKeys = FALSE;
+        return 0;
+    }
+    if (sm->GUpdateStationKeys) {
+        /*
+         * This should not really happen, so add a debug log entry.
+         * Since we clear the GKeyDoneStations before the loop, the
+         * station needs to be counted here anyway.
+         */
+    }
+
+    /* Do not rekey GTK/IGTK when STA is in WNM-Sleep Mode */
+    if (sm->is_wnmsleep)
+        return 0;
+
+    sm->group->GKeyDoneStations++;
+    sm->GUpdateStationKeys = TRUE;
+
+    wpa_sm_step(sm);
+    return 0;
+}
+
+
+#ifdef CONFIG_WNM
+/* update GTK when exiting WNM-Sleep Mode */
+void wpa_wnmsleep_rekey_gtk(struct wpa_state_machine *sm)
+{
+    if (sm->is_wnmsleep)
+        return;
+
+    wpa_group_update_sta(sm, NULL);
+}
+
+
+void wpa_set_wnmsleep(struct wpa_state_machine *sm, int flag)
+{
+    sm->is_wnmsleep = !!flag;
+}
+
+
+int wpa_wnmsleep_gtk_subelem(struct wpa_state_machine *sm, u8 *pos)
+{
+    struct wpa_group *gsm = sm->group;
+    u8 *start = pos;
+
+    /*
+     * GTK subelement:
+     * Sub-elem ID[1] | Length[1] | Key Info[2] | Key Length[1] | RSC[8] |
+     * Key[5..32]
+     */
+    *pos++ = WNM_SLEEP_SUBELEM_GTK;
+    *pos++ = 11 + gsm->GTK_len;
+    /* Key ID in B0-B1 of Key Info */
+    WPA_PUT_LE16(pos, gsm->GN & 0x03);
+    pos += 2;
+    *pos++ = gsm->GTK_len;
+    if (wpa_auth_get_seqnum(sm->wpa_auth, NULL, gsm->GN, pos) != 0)
+        return 0;
+    pos += 8;
+    memcpy(pos, gsm->GTK[gsm->GN - 1], gsm->GTK_len);
+    pos += gsm->GTK_len;
+
+    wpa_printf( MSG_DEBUG, "WNM: GTK Key ID %u in WNM-Sleep Mode exit",
+           gsm->GN);
+    wpa_hexdump_key(MSG_DEBUG, "WNM: GTK in WNM-Sleep Mode exit",
+            gsm->GTK[gsm->GN - 1], gsm->GTK_len);
+
+    return pos - start;
+}
+
+
+#ifdef CONFIG_IEEE80211W
+int wpa_wnmsleep_igtk_subelem(struct wpa_state_machine *sm, u8 *pos)
+{
+    struct wpa_group *gsm = sm->group;
+    u8 *start = pos;
+
+    /*
+     * IGTK subelement:
+     * Sub-elem ID[1] | Length[1] | KeyID[2] | PN[6] | Key[16]
+     */
+    *pos++ = WNM_SLEEP_SUBELEM_IGTK;
+    *pos++ = 2 + 6 + WPA_IGTK_LEN;
+    WPA_PUT_LE16(pos, gsm->GN_igtk);
+    pos += 2;
+    if (wpa_auth_get_seqnum(sm->wpa_auth, NULL, gsm->GN_igtk, pos) != 0)
+        return 0;
+    pos += 6;
+
+    memcpy(pos, gsm->IGTK[gsm->GN_igtk - 4], WPA_IGTK_LEN);
+    pos += WPA_IGTK_LEN;
+
+    wpa_printf( MSG_DEBUG, "WNM: IGTK Key ID %u in WNM-Sleep Mode exit",
+           gsm->GN_igtk);
+    wpa_hexdump_key(MSG_DEBUG, "WNM: IGTK in WNM-Sleep Mode exit",
+            gsm->IGTK[gsm->GN_igtk - 4], WPA_IGTK_LEN);
+
+    return pos - start;
+}
+#endif /* CONFIG_IEEE80211W */
+#endif /* CONFIG_WNM */
+
+
+static void wpa_group_setkeys(struct wpa_authenticator *wpa_auth,
+                  struct wpa_group *group)
+{
+    int tmp;
+
+    wpa_printf( MSG_DEBUG, "WPA: group state machine entering state "
+           "SETKEYS (VLAN-ID %d)\n", group->vlan_id);
+    group->changed = TRUE;
+    group->wpa_group_state = WPA_GROUP_SETKEYS;
+    group->GTKReKey = FALSE;
+    tmp = group->GM;
+    group->GM = group->GN;
+    group->GN = tmp;
+#ifdef CONFIG_IEEE80211W
+    tmp = group->GM_igtk;
+    group->GM_igtk = group->GN_igtk;
+    group->GN_igtk = tmp;
+#endif /* CONFIG_IEEE80211W */
+    /* "GKeyDoneStations = GNoStations" is done in more robust way by
+     * counting the STAs that are marked with GUpdateStationKeys instead of
+     * including all STAs that could be in not-yet-completed state. */
+    wpa_gtk_update(wpa_auth, group);
+
+    if (group->GKeyDoneStations) {
+        wpa_printf( MSG_DEBUG, "wpa_group_setkeys: Unexpected "
+               "GKeyDoneStations=%d when starting new GTK rekey",
+               group->GKeyDoneStations);
+        group->GKeyDoneStations = 0;
+    }
+    wpa_auth_for_each_sta(wpa_auth, wpa_group_update_sta, group);
+    wpa_printf( MSG_DEBUG, "wpa_group_setkeys: GKeyDoneStations=%d",
+           group->GKeyDoneStations);
+}
+
+
+static int wpa_group_config_group_keys(struct wpa_authenticator *wpa_auth,
+                       struct wpa_group *group)
+{
+    int ret = 0;
+    if (wpa_auth_set_key(wpa_auth, group->vlan_id,
+                 wpa_cipher_to_alg(wpa_auth->conf.wpa_group),
+                 (uint8_t *)broadcast_ether_addr, group->GN,
+                 group->GTK[group->GN - 1], group->GTK_len) < 0)
+        ret = -1;
+
+#ifdef CONFIG_IEEE80211W
+    if (wpa_auth->conf.ieee80211w != NO_MGMT_FRAME_PROTECTION &&
+        wpa_auth_set_key(wpa_auth, group->vlan_id, WPA_ALG_IGTK,
+                        broadcast_ether_addr, group->GN_igtk,
+                 group->IGTK[group->GN_igtk - 4],
+                 WPA_IGTK_LEN) < 0)
+        ret = -1;
+#endif /* CONFIG_IEEE80211W */
+
+    return ret;
+}
+
+
+static int wpa_group_setkeysdone(struct wpa_authenticator *wpa_auth,
+                 struct wpa_group *group)
+{
+    wpa_printf( MSG_DEBUG, "WPA: group state machine entering state "
+           "SETKEYSDONE (VLAN-ID %d)\n", group->vlan_id);
+    group->changed = TRUE;
+    group->wpa_group_state = WPA_GROUP_SETKEYSDONE;
+
+    if (wpa_group_config_group_keys(wpa_auth, group) < 0)
+        return -1;
+
+    return 0;
+}
+
+
+static void wpa_group_sm_step(struct wpa_authenticator *wpa_auth,
+                  struct wpa_group *group)
+{
+    if (group->GInit) {
+        wpa_group_gtk_init(wpa_auth, group);
+    } else if (group->wpa_group_state == WPA_GROUP_GTK_INIT &&
+           group->GTKAuthenticator) {
+        wpa_group_setkeysdone(wpa_auth, group);
+    } else if (group->wpa_group_state == WPA_GROUP_SETKEYSDONE &&
+           group->GTKReKey) {
+        wpa_group_setkeys(wpa_auth, group);
+    } else if (group->wpa_group_state == WPA_GROUP_SETKEYS) {
+        if (group->GKeyDoneStations == 0)
+            wpa_group_setkeysdone(wpa_auth, group);
+        else if (group->GTKReKey)
+            wpa_group_setkeys(wpa_auth, group);
+    }
+}
+
+
+static int wpa_sm_step(struct wpa_state_machine *sm)
+{
+    if (sm == NULL)
+        return 0;
+
+    if (sm->in_step_loop) {
+        /* This should not happen, but if it does, make sure we do not
+         * end up freeing the state machine too early by exiting the
+         * recursive call. */
+        wpa_printf( MSG_ERROR, "WPA: wpa_sm_step() called recursively");
+        return 0;
+    }
+
+    sm->in_step_loop = 1;
+    do {
+        if (sm->pending_deinit)
+            break;
+
+        sm->changed = FALSE;
+        sm->wpa_auth->group->changed = FALSE;
+
+        SM_STEP_RUN(WPA_PTK);
+        if (sm->pending_deinit)
+            break;
+        SM_STEP_RUN(WPA_PTK_GROUP);
+        if (sm->pending_deinit)
+            break;
+        wpa_group_sm_step(sm->wpa_auth, sm->group);
+    } while (sm->changed || sm->wpa_auth->group->changed);
+    sm->in_step_loop = 0;
+
+    if (sm->pending_deinit) {
+        wpa_printf( MSG_DEBUG, "WPA: Completing pending STA state "
+               "machine deinit for " MACSTR, MAC2STR(sm->addr));
+        wpa_free_sta_sm(sm);
+        return 1;
+    }
+    return 0;
+}
+
+bool wpa_ap_join(void** sm, uint8_t *bssid, uint8_t *wpa_ie, uint8_t wpa_ie_len)
+{
+    struct hostapd_data *hapd = (struct hostapd_data*)esp_wifi_get_hostap_private_internal();
+    struct wpa_state_machine   **wpa_sm;
+
+    if (!sm || !bssid || !wpa_ie){
+        return false;
+    }
+
+   
+    wpa_sm = (struct wpa_state_machine  **)sm;
+
+    if (hapd) {
+        if (hapd->wpa_auth->conf.wpa) {
+            if (*wpa_sm){
+                wpa_auth_sta_deinit(*wpa_sm);
+            }
+
+            *wpa_sm = wpa_auth_sta_init(hapd->wpa_auth, bssid);
+            wpa_printf( MSG_DEBUG, "init wpa sm=%p\n", *wpa_sm);
+
+            if (*wpa_sm == NULL) {
+                return false;
+            }
+
+            if (wpa_validate_wpa_ie(hapd->wpa_auth, *wpa_sm, wpa_ie, wpa_ie_len)) {
+                return false;
+            }
+        }
+
+        wpa_auth_sta_associated(hapd->wpa_auth, *wpa_sm);
+    }
+
+    return true;
+}
+
+bool wpa_ap_remove(void* sm)
+{
+    struct wpa_state_machine   *wpa_sm;
+    if (!sm) return false;
+
+    wpa_sm = (struct wpa_state_machine*)sm;
+    wpa_auth_sta_deinit(wpa_sm);
+
+    return true;
+}
+
similarity index 98%
rename from components/wpa_supplicant/include/wpa/wpa_auth.h
rename to components/wpa_supplicant/src/ap/wpa_auth.h
index c72992349440b6d068d6169bf876f0b95926a578..ee40c2d43d2a8ca320f6dcde3497394ffccc2eea 100644 (file)
@@ -9,14 +9,16 @@
 #ifndef WPA_AUTH_H
 #define WPA_AUTH_H
 
-#include "wpa/defs.h"
-#include "wpa/eapol_common.h"
-#include "wpa/wpa_common.h"
+#include "common/defs.h"
+#include "common/eapol_common.h"
+#include "common/wpa_common.h"
 
 #ifdef _MSC_VER
 #pragma pack(push, 1)
 #endif /* _MSC_VER */
 
+#define WPA_IS_MULTICAST(_a) (*(_a) & 0x01)
+
 /* IEEE Std 802.11r-2008, 11A.10.3 - Remote request/response frame definition
  */
 struct ft_rrb_frame {
similarity index 84%
rename from components/wpa_supplicant/include/wpa/wpa_auth_i.h
rename to components/wpa_supplicant/src/ap/wpa_auth_i.h
index 53ad8ea941d977ec6714d673c7e233456c7db009..6a55cdee53e466b4f6f4a56f890a2d3d7ade4b87 100644 (file)
@@ -102,10 +102,6 @@ struct wpa_state_machine {
        } wpa;
        int pairwise; /* Pairwise cipher suite, WPA_CIPHER_* */
        int wpa_key_mgmt; /* the selected WPA_KEY_MGMT_* */
-//     struct rsn_pmksa_cache_entry *pmksa;
-
-//     u32 dot11RSNAStatsTKIPLocalMICFailures;
-//     u32 dot11RSNAStatsTKIPRemoteMICFailures;
 
 #ifdef CONFIG_IEEE80211R
        u8 xxkey[PMK_LEN]; /* PSK or the second 256 bits of MSK */
@@ -120,6 +116,8 @@ struct wpa_state_machine {
 #endif /* CONFIG_IEEE80211R */
 
        int pending_1_of_4_timeout;
+       u32 index;
+       ETSTimer resend_eapol;
 };
 
 
@@ -160,40 +158,18 @@ struct wpa_ft_pmk_cache;
 struct wpa_authenticator {
        struct wpa_group *group;
 
-//     unsigned int dot11RSNAStatsTKIPRemoteMICFailures;
-//     u32 dot11RSNAAuthenticationSuiteSelected;
-//     u32 dot11RSNAPairwiseCipherSelected;
-//     u32 dot11RSNAGroupCipherSelected;
-//     u8 dot11RSNAPMKIDUsed[PMKID_LEN];
-//     u32 dot11RSNAAuthenticationSuiteRequested; /* FIX: update */
-//     u32 dot11RSNAPairwiseCipherRequested; /* FIX: update */
-//     u32 dot11RSNAGroupCipherRequested; /* FIX: update */
-//     unsigned int dot11RSNATKIPCounterMeasuresInvoked;
-//     unsigned int dot11RSNA4WayHandshakeFailures;
-
-//     struct wpa_stsl_negotiation *stsl_negotiations;
-
        struct wpa_auth_config conf;
-//     struct wpa_auth_callbacks cb;
 
        u8 *wpa_ie;
        size_t wpa_ie_len;
 
        u8 addr[ETH_ALEN];
 
-//     struct rsn_pmksa_cache *pmksa;
-//     struct wpa_ft_pmk_cache *ft_pmk_cache;
 };
 
 
 int wpa_write_rsn_ie(struct wpa_auth_config *conf, u8 *buf, size_t len,
                     const u8 *pmkid);
-#if 0
-void wpa_auth_logger(struct wpa_authenticator *wpa_auth, const u8 *addr,
-                    logger_level level, const char *txt);
-void wpa_auth_vlogger(struct wpa_authenticator *wpa_auth, const u8 *addr,
-                     logger_level level, const char *fmt, ...);
-#endif
 void __wpa_send_eapol(struct wpa_authenticator *wpa_auth,
                      struct wpa_state_machine *sm, int key_info,
                      const u8 *key_rsc, const u8 *nonce,
diff --git a/components/wpa_supplicant/src/ap/wpa_auth_ie.c b/components/wpa_supplicant/src/ap/wpa_auth_ie.c
new file mode 100644 (file)
index 0000000..34f1221
--- /dev/null
@@ -0,0 +1,705 @@
+/*
+ * hostapd - WPA/RSN IE and KDE definitions
+ * Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+#include "utils/includes.h"
+#include "utils/common.h"
+#include "common/ieee802_11_defs.h"
+#include "ap/wpa_auth.h"
+#include "ap/wpa_auth_ie.h"
+#include "ap/wpa_auth_i.h"
+#include "common/wpa_common.h"
+#include "utils/wpa_debug.h"
+
+#ifdef CONFIG_RSN_TESTING
+int rsn_testing = 0;
+#endif /* CONFIG_RSN_TESTING */
+
+
+static int wpa_write_wpa_ie(struct wpa_auth_config *conf, u8 *buf, size_t len)
+{
+       struct wpa_ie_hdr *hdr;
+       int num_suites;
+       u8 *pos, *count;
+       u32 suite;
+
+       hdr = (struct wpa_ie_hdr *) buf;
+       hdr->elem_id = WLAN_EID_VENDOR_SPECIFIC;
+       RSN_SELECTOR_PUT(hdr->oui, WPA_OUI_TYPE);
+       WPA_PUT_LE16(hdr->version, WPA_VERSION);
+       pos = (u8 *) (hdr + 1);
+
+       suite = wpa_cipher_to_suite(WPA_PROTO_WPA, conf->wpa_group);
+       if (suite == 0) {
+               wpa_printf( MSG_DEBUG, "Invalid group cipher (%d).",
+                          conf->wpa_group);
+               return -1;
+       }
+       RSN_SELECTOR_PUT(pos, suite);
+       pos += WPA_SELECTOR_LEN;
+
+       count = pos;
+       pos += 2;
+
+       num_suites = wpa_cipher_put_suites(pos, conf->wpa_pairwise);
+       if (num_suites == 0) {
+               wpa_printf( MSG_DEBUG, "Invalid pairwise cipher (%d).",
+                          conf->wpa_pairwise);
+               return -1;
+       }
+       pos += num_suites * WPA_SELECTOR_LEN;
+       WPA_PUT_LE16(count, num_suites);
+
+       num_suites = 0;
+       count = pos;
+       pos += 2;
+
+       if (conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X) {
+               RSN_SELECTOR_PUT(pos, WPA_AUTH_KEY_MGMT_UNSPEC_802_1X);
+               pos += WPA_SELECTOR_LEN;
+               num_suites++;
+       }
+       if (conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK) {
+               RSN_SELECTOR_PUT(pos, WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X);
+               pos += WPA_SELECTOR_LEN;
+               num_suites++;
+       }
+
+       if (num_suites == 0) {
+               wpa_printf( MSG_DEBUG, "Invalid key management type (%d).",
+                          conf->wpa_key_mgmt);
+               return -1;
+       }
+       WPA_PUT_LE16(count, num_suites);
+
+       /* WPA Capabilities; use defaults, so no need to include it */
+
+       hdr->len = (pos - buf) - 2;
+
+       return pos - buf;
+}
+
+
+int wpa_write_rsn_ie(struct wpa_auth_config *conf, u8 *buf, size_t len,
+                    const u8 *pmkid)
+{
+       struct rsn_ie_hdr *hdr;
+       int num_suites, res;
+       u8 *pos, *count;
+       u16 capab;
+       u32 suite;
+
+       hdr = (struct rsn_ie_hdr *) buf;
+       hdr->elem_id = WLAN_EID_RSN;
+       WPA_PUT_LE16(hdr->version, RSN_VERSION);
+       pos = (u8 *) (hdr + 1);
+
+       suite = wpa_cipher_to_suite(WPA_PROTO_RSN, conf->wpa_group);
+       if (suite == 0) {
+               wpa_printf( MSG_DEBUG, "Invalid group cipher (%d).",
+                          conf->wpa_group);
+               return -1;
+       }
+       RSN_SELECTOR_PUT(pos, suite);
+       pos += RSN_SELECTOR_LEN;
+
+       num_suites = 0;
+       count = pos;
+       pos += 2;
+
+#ifdef CONFIG_RSN_TESTING
+       if (rsn_testing) {
+               RSN_SELECTOR_PUT(pos, RSN_SELECTOR(0x12, 0x34, 0x56, 1));
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+#endif /* CONFIG_RSN_TESTING */
+
+       res = rsn_cipher_put_suites(pos, conf->rsn_pairwise);
+       num_suites += res;
+       pos += res * RSN_SELECTOR_LEN;
+
+#ifdef CONFIG_RSN_TESTING
+       if (rsn_testing) {
+               RSN_SELECTOR_PUT(pos, RSN_SELECTOR(0x12, 0x34, 0x56, 2));
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+#endif /* CONFIG_RSN_TESTING */
+
+       if (num_suites == 0) {
+               wpa_printf( MSG_DEBUG, "Invalid pairwise cipher (%d).",
+                          conf->rsn_pairwise);
+               return -1;
+       }
+       WPA_PUT_LE16(count, num_suites);
+
+       num_suites = 0;
+       count = pos;
+       pos += 2;
+
+#ifdef CONFIG_RSN_TESTING
+       if (rsn_testing) {
+               RSN_SELECTOR_PUT(pos, RSN_SELECTOR(0x12, 0x34, 0x56, 1));
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+#endif /* CONFIG_RSN_TESTING */
+
+       if (conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X) {
+               RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_UNSPEC_802_1X);
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+       if (conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK) {
+               RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X);
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+#ifdef CONFIG_IEEE80211R
+       if (conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_IEEE8021X) {
+               RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_FT_802_1X);
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+       if (conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_PSK) {
+               RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_FT_PSK);
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+#endif /* CONFIG_IEEE80211R */
+#ifdef CONFIG_IEEE80211W
+       if (conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X_SHA256) {
+               RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_802_1X_SHA256);
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+       if (conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK_SHA256) {
+               RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_PSK_SHA256);
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+#endif /* CONFIG_IEEE80211W */
+#ifdef CONFIG_SAE
+       if (conf->wpa_key_mgmt & WPA_KEY_MGMT_SAE) {
+               RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_SAE);
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+       if (conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_SAE) {
+               RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_FT_SAE);
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+#endif /* CONFIG_SAE */
+
+#ifdef CONFIG_RSN_TESTING
+       if (rsn_testing) {
+               RSN_SELECTOR_PUT(pos, RSN_SELECTOR(0x12, 0x34, 0x56, 2));
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+#endif /* CONFIG_RSN_TESTING */
+
+       if (num_suites == 0) {
+               wpa_printf( MSG_DEBUG, "Invalid key management type (%d).",
+                          conf->wpa_key_mgmt);
+               return -1;
+       }
+       WPA_PUT_LE16(count, num_suites);
+
+       /* RSN Capabilities */
+       capab = 0;
+       if (conf->rsn_preauth)
+               capab |= WPA_CAPABILITY_PREAUTH;
+       if (conf->peerkey)
+               capab |= WPA_CAPABILITY_PEERKEY_ENABLED;
+       if (conf->wmm_enabled) {
+               /* 4 PTKSA replay counters when using WMM */
+               capab |= (RSN_NUM_REPLAY_COUNTERS_16 << 2);
+       }
+#ifdef CONFIG_IEEE80211W
+       if (conf->ieee80211w != NO_MGMT_FRAME_PROTECTION) {
+               capab |= WPA_CAPABILITY_MFPC;
+               if (conf->ieee80211w == MGMT_FRAME_PROTECTION_REQUIRED)
+                       capab |= WPA_CAPABILITY_MFPR;
+       }
+#endif /* CONFIG_IEEE80211W */
+#ifdef CONFIG_RSN_TESTING
+       if (rsn_testing)
+               capab |= BIT(8) | BIT(14) | BIT(15);
+#endif /* CONFIG_RSN_TESTING */
+       WPA_PUT_LE16(pos, capab);
+       pos += 2;
+
+       if (pmkid) {
+               if (pos + 2 + PMKID_LEN > buf + len)
+                       return -1;
+               /* PMKID Count */
+               WPA_PUT_LE16(pos, 1);
+               pos += 2;
+               memcpy(pos, pmkid, PMKID_LEN);
+               pos += PMKID_LEN;
+       }
+
+#ifdef CONFIG_IEEE80211W
+       if (conf->ieee80211w != NO_MGMT_FRAME_PROTECTION) {
+               if (pos + 2 + 4 > buf + len)
+                       return -1;
+               if (pmkid == NULL) {
+                       /* PMKID Count */
+                       WPA_PUT_LE16(pos, 0);
+                       pos += 2;
+               }
+
+               /* Management Group Cipher Suite */
+               RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_AES_128_CMAC);
+               pos += RSN_SELECTOR_LEN;
+       }
+#endif /* CONFIG_IEEE80211W */
+
+#ifdef CONFIG_RSN_TESTING
+       if (rsn_testing) {
+               /*
+                * Fill in any defined fields and add extra data to the end of
+                * the element.
+                */
+               int pmkid_count_set = pmkid != NULL;
+               if (conf->ieee80211w != NO_MGMT_FRAME_PROTECTION)
+                       pmkid_count_set = 1;
+               /* PMKID Count */
+               WPA_PUT_LE16(pos, 0);
+               pos += 2;
+               if (conf->ieee80211w == NO_MGMT_FRAME_PROTECTION) {
+                       /* Management Group Cipher Suite */
+                       RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_AES_128_CMAC);
+                       pos += RSN_SELECTOR_LEN;
+               }
+
+               memset(pos, 0x12, 17);
+               pos += 17;
+       }
+#endif /* CONFIG_RSN_TESTING */
+
+       hdr->len = (pos - buf) - 2;
+
+       return pos - buf;
+}
+
+
+int wpa_auth_gen_wpa_ie(struct wpa_authenticator *wpa_auth)
+{
+       u8 *pos, buf[128];
+       int res;
+
+       pos = buf;
+
+       if (wpa_auth->conf.wpa & WPA_PROTO_RSN) {
+               res = wpa_write_rsn_ie(&wpa_auth->conf,
+                                      pos, buf + sizeof(buf) - pos, NULL);
+               if (res < 0)
+                       return res;
+               pos += res;
+       }
+#ifdef CONFIG_IEEE80211R
+       if (wpa_key_mgmt_ft(wpa_auth->conf.wpa_key_mgmt)) {
+               res = wpa_write_mdie(&wpa_auth->conf, pos,
+                                    buf + sizeof(buf) - pos);
+               if (res < 0)
+                       return res;
+               pos += res;
+       }
+#endif /* CONFIG_IEEE80211R */
+       if (wpa_auth->conf.wpa & WPA_PROTO_WPA) {
+               res = wpa_write_wpa_ie(&wpa_auth->conf,
+                                      pos, buf + sizeof(buf) - pos);
+               if (res < 0)
+                       return res;
+               pos += res;
+       }
+
+       os_free(wpa_auth->wpa_ie);
+       wpa_auth->wpa_ie = os_malloc(pos - buf);
+       if (wpa_auth->wpa_ie == NULL)
+               return -1;
+       memcpy(wpa_auth->wpa_ie, buf, pos - buf);
+       wpa_auth->wpa_ie_len = pos - buf;
+
+       return 0;
+}
+
+u8 * wpa_add_kde(u8 *pos, u32 kde, const u8 *data, size_t data_len,
+                const u8 *data2, size_t data2_len)
+{
+       *pos++ = WLAN_EID_VENDOR_SPECIFIC;
+       *pos++ = RSN_SELECTOR_LEN + data_len + data2_len;
+       RSN_SELECTOR_PUT(pos, kde);
+       pos += RSN_SELECTOR_LEN;
+       memcpy(pos, data, data_len);
+       pos += data_len;
+       if (data2) {
+               memcpy(pos, data2, data2_len);
+               pos += data2_len;
+       }
+       return pos;
+}
+
+int wpa_validate_wpa_ie(struct wpa_authenticator *wpa_auth,
+                       struct wpa_state_machine *sm,
+                       const u8 *wpa_ie, size_t wpa_ie_len/*,
+                       const u8 *mdie, size_t mdie_len*/)
+{
+       struct wpa_ie_data data;
+       int ciphers, key_mgmt, res, version;
+       u32 selector;
+
+       if (wpa_auth == NULL || sm == NULL)
+               return WPA_NOT_ENABLED;
+
+       if (wpa_ie == NULL || wpa_ie_len < 1)
+               return WPA_INVALID_IE;
+
+       if (wpa_ie[0] == WLAN_EID_RSN)
+               version = WPA_PROTO_RSN;
+       else
+               version = WPA_PROTO_WPA;
+
+       if (!(wpa_auth->conf.wpa & version)) {
+               wpa_printf( MSG_DEBUG, "Invalid WPA proto (%d) from " MACSTR,
+                          version, MAC2STR(sm->addr));
+               return WPA_INVALID_PROTO;
+       }
+
+       if (version == WPA_PROTO_RSN) {
+               res = wpa_parse_wpa_ie_rsn(wpa_ie, wpa_ie_len, &data);
+
+               selector = RSN_AUTH_KEY_MGMT_UNSPEC_802_1X;
+               if (0) {
+               }
+#ifdef CONFIG_IEEE80211R
+               else if (data.key_mgmt & WPA_KEY_MGMT_FT_IEEE8021X)
+                       selector = RSN_AUTH_KEY_MGMT_FT_802_1X;
+               else if (data.key_mgmt & WPA_KEY_MGMT_FT_PSK)
+                       selector = RSN_AUTH_KEY_MGMT_FT_PSK;
+#endif /* CONFIG_IEEE80211R */
+#ifdef CONFIG_IEEE80211W
+               else if (data.key_mgmt & WPA_KEY_MGMT_IEEE8021X_SHA256)
+                       selector = RSN_AUTH_KEY_MGMT_802_1X_SHA256;
+               else if (data.key_mgmt & WPA_KEY_MGMT_PSK_SHA256)
+                       selector = RSN_AUTH_KEY_MGMT_PSK_SHA256;
+#endif /* CONFIG_IEEE80211W */
+#ifdef CONFIG_SAE
+               else if (data.key_mgmt & WPA_KEY_MGMT_SAE)
+                       selector = RSN_AUTH_KEY_MGMT_SAE;
+               else if (data.key_mgmt & WPA_KEY_MGMT_FT_SAE)
+                       selector = RSN_AUTH_KEY_MGMT_FT_SAE;
+#endif /* CONFIG_SAE */
+               else if (data.key_mgmt & WPA_KEY_MGMT_IEEE8021X)
+                       selector = RSN_AUTH_KEY_MGMT_UNSPEC_802_1X;
+               else if (data.key_mgmt & WPA_KEY_MGMT_PSK)
+                       selector = RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X;
+
+               selector = wpa_cipher_to_suite(WPA_PROTO_RSN,
+                                              data.pairwise_cipher);
+               if (!selector)
+                       selector = RSN_CIPHER_SUITE_CCMP;
+
+               selector = wpa_cipher_to_suite(WPA_PROTO_RSN,
+                                              data.group_cipher);
+               if (!selector)
+                       selector = RSN_CIPHER_SUITE_CCMP;
+       } else {
+               res = wpa_parse_wpa_ie_wpa(wpa_ie, wpa_ie_len, &data);
+
+               selector = WPA_AUTH_KEY_MGMT_UNSPEC_802_1X;
+               if (data.key_mgmt & WPA_KEY_MGMT_IEEE8021X)
+                       selector = WPA_AUTH_KEY_MGMT_UNSPEC_802_1X;
+               else if (data.key_mgmt & WPA_KEY_MGMT_PSK)
+                       selector = WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X;
+
+               selector = wpa_cipher_to_suite(WPA_PROTO_WPA,
+                                              data.pairwise_cipher);
+               if (!selector)
+                       selector = RSN_CIPHER_SUITE_TKIP;
+
+               selector = wpa_cipher_to_suite(WPA_PROTO_WPA,
+                                              data.group_cipher);
+               if (!selector)
+                       selector = WPA_CIPHER_SUITE_TKIP;
+       }
+       if (res) {
+               wpa_printf( MSG_DEBUG, "Failed to parse WPA/RSN IE from "
+                          MACSTR " (res=%d)", MAC2STR(sm->addr), res);
+               wpa_hexdump(MSG_DEBUG, "WPA/RSN IE", wpa_ie, wpa_ie_len);
+               return WPA_INVALID_IE;
+       }
+
+       if (data.group_cipher != wpa_auth->conf.wpa_group) {
+               wpa_printf( MSG_DEBUG, "Invalid WPA group cipher (0x%x) from "
+                          MACSTR, data.group_cipher, MAC2STR(sm->addr));
+               return WPA_INVALID_GROUP;
+       }
+
+       key_mgmt = data.key_mgmt & wpa_auth->conf.wpa_key_mgmt;
+       if (!key_mgmt) {
+               wpa_printf( MSG_DEBUG, "Invalid WPA key mgmt (0x%x) from "
+                          MACSTR, data.key_mgmt, MAC2STR(sm->addr));
+               return WPA_INVALID_AKMP;
+       }
+       if (0) {
+       }
+#ifdef CONFIG_IEEE80211R
+       else if (key_mgmt & WPA_KEY_MGMT_FT_IEEE8021X)
+               sm->wpa_key_mgmt = WPA_KEY_MGMT_FT_IEEE8021X;
+       else if (key_mgmt & WPA_KEY_MGMT_FT_PSK)
+               sm->wpa_key_mgmt = WPA_KEY_MGMT_FT_PSK;
+#endif /* CONFIG_IEEE80211R */
+#ifdef CONFIG_IEEE80211W
+       else if (key_mgmt & WPA_KEY_MGMT_IEEE8021X_SHA256)
+               sm->wpa_key_mgmt = WPA_KEY_MGMT_IEEE8021X_SHA256;
+       else if (key_mgmt & WPA_KEY_MGMT_PSK_SHA256)
+               sm->wpa_key_mgmt = WPA_KEY_MGMT_PSK_SHA256;
+#endif /* CONFIG_IEEE80211W */
+#ifdef CONFIG_SAE
+       else if (key_mgmt & WPA_KEY_MGMT_SAE)
+               sm->wpa_key_mgmt = WPA_KEY_MGMT_SAE;
+       else if (key_mgmt & WPA_KEY_MGMT_FT_SAE)
+               sm->wpa_key_mgmt = WPA_KEY_MGMT_FT_SAE;
+#endif /* CONFIG_SAE */
+       else if (key_mgmt & WPA_KEY_MGMT_IEEE8021X)
+               sm->wpa_key_mgmt = WPA_KEY_MGMT_IEEE8021X;
+       else
+               sm->wpa_key_mgmt = WPA_KEY_MGMT_PSK;
+
+       if (version == WPA_PROTO_RSN)
+               ciphers = data.pairwise_cipher & wpa_auth->conf.rsn_pairwise;
+       else
+               ciphers = data.pairwise_cipher & wpa_auth->conf.wpa_pairwise;
+       if (!ciphers) {
+               wpa_printf( MSG_DEBUG, "Invalid %s pairwise cipher (0x%x) "
+                          "from " MACSTR,
+                          version == WPA_PROTO_RSN ? "RSN" : "WPA",
+                          data.pairwise_cipher, MAC2STR(sm->addr));
+               return WPA_INVALID_PAIRWISE;
+       }
+
+#ifdef CONFIG_IEEE80211W
+       if (wpa_auth->conf.ieee80211w == MGMT_FRAME_PROTECTION_REQUIRED) {
+               if (!(data.capabilities & WPA_CAPABILITY_MFPC)) {
+                       wpa_printf( MSG_DEBUG, "Management frame protection "
+                                  "required, but client did not enable it");
+                       return WPA_MGMT_FRAME_PROTECTION_VIOLATION;
+               }
+
+               if (ciphers & WPA_CIPHER_TKIP) {
+                       wpa_printf( MSG_DEBUG, "Management frame protection "
+                                  "cannot use TKIP");
+                       return WPA_MGMT_FRAME_PROTECTION_VIOLATION;
+               }
+
+               if (data.mgmt_group_cipher != WPA_CIPHER_AES_128_CMAC) {
+                       wpa_printf( MSG_DEBUG, "Unsupported management group "
+                                  "cipher %d", data.mgmt_group_cipher);
+                       return WPA_INVALID_MGMT_GROUP_CIPHER;
+               }
+       }
+
+       if (wpa_auth->conf.ieee80211w == NO_MGMT_FRAME_PROTECTION ||
+           !(data.capabilities & WPA_CAPABILITY_MFPC))
+               sm->mgmt_frame_prot = 0;
+       else
+               sm->mgmt_frame_prot = 1;
+#endif /* CONFIG_IEEE80211W */
+
+#ifdef CONFIG_IEEE80211R
+       if (wpa_key_mgmt_ft(sm->wpa_key_mgmt)) {
+               if (mdie == NULL || mdie_len < MOBILITY_DOMAIN_ID_LEN + 1) {
+                       wpa_printf( MSG_DEBUG, "RSN: Trying to use FT, but "
+                                  "MDIE not included");
+                       return WPA_INVALID_MDIE;
+               }
+               if (memcmp(mdie, wpa_auth->conf.mobility_domain,
+                             MOBILITY_DOMAIN_ID_LEN) != 0) {
+                       wpa_hexdump(MSG_DEBUG, "RSN: Attempted to use unknown "
+                                   "MDIE", mdie, MOBILITY_DOMAIN_ID_LEN);
+                       return WPA_INVALID_MDIE;
+               }
+       }
+#endif /* CONFIG_IEEE80211R */
+
+       if (ciphers & WPA_CIPHER_CCMP)
+               sm->pairwise = WPA_CIPHER_CCMP;
+       else if (ciphers & WPA_CIPHER_GCMP)
+               sm->pairwise = WPA_CIPHER_GCMP;
+       else
+               sm->pairwise = WPA_CIPHER_TKIP;
+
+       /* TODO: clear WPA/WPA2 state if STA changes from one to another */
+       if (wpa_ie[0] == WLAN_EID_RSN)
+               sm->wpa = WPA_VERSION_WPA2;
+       else
+               sm->wpa = WPA_VERSION_WPA;
+
+       if (sm->wpa_ie == NULL || sm->wpa_ie_len < wpa_ie_len) {
+               os_free(sm->wpa_ie);
+               sm->wpa_ie = os_malloc(wpa_ie_len);
+               if (sm->wpa_ie == NULL)
+                       return WPA_ALLOC_FAIL;
+       }
+       memcpy(sm->wpa_ie, wpa_ie, wpa_ie_len);
+       sm->wpa_ie_len = wpa_ie_len;
+
+       return WPA_IE_OK;
+}
+
+/**
+ * wpa_parse_generic - Parse EAPOL-Key Key Data Generic IEs
+ * @pos: Pointer to the IE header
+ * @end: Pointer to the end of the Key Data buffer
+ * @ie: Pointer to parsed IE data
+ * Returns: 0 on success, 1 if end mark is found, -1 on failure
+ */
+static int wpa_parse_generic(const u8 *pos, const u8 *end,
+                            struct wpa_eapol_ie_parse *ie)
+{
+       if (pos[1] == 0)
+               return 1;
+
+       if (pos[1] >= 6 &&
+           RSN_SELECTOR_GET(pos + 2) == WPA_OUI_TYPE &&
+           pos[2 + WPA_SELECTOR_LEN] == 1 &&
+           pos[2 + WPA_SELECTOR_LEN + 1] == 0) {
+               ie->wpa_ie = pos;
+               ie->wpa_ie_len = pos[1] + 2;
+               return 0;
+       }
+
+       if (pos + 1 + RSN_SELECTOR_LEN < end &&
+           pos[1] >= RSN_SELECTOR_LEN + PMKID_LEN &&
+           RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_PMKID) {
+               ie->pmkid = pos + 2 + RSN_SELECTOR_LEN;
+               return 0;
+       }
+
+       if (pos[1] > RSN_SELECTOR_LEN + 2 &&
+           RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_GROUPKEY) {
+               ie->gtk = pos + 2 + RSN_SELECTOR_LEN;
+               ie->gtk_len = pos[1] - RSN_SELECTOR_LEN;
+               return 0;
+       }
+
+       if (pos[1] > RSN_SELECTOR_LEN + 2 &&
+           RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_MAC_ADDR) {
+               ie->mac_addr = pos + 2 + RSN_SELECTOR_LEN;
+               ie->mac_addr_len = pos[1] - RSN_SELECTOR_LEN;
+               return 0;
+       }
+
+#ifdef CONFIG_PEERKEY
+       if (pos[1] > RSN_SELECTOR_LEN + 2 &&
+           RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_SMK) {
+               ie->smk = pos + 2 + RSN_SELECTOR_LEN;
+               ie->smk_len = pos[1] - RSN_SELECTOR_LEN;
+               return 0;
+       }
+
+       if (pos[1] > RSN_SELECTOR_LEN + 2 &&
+           RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_NONCE) {
+               ie->nonce = pos + 2 + RSN_SELECTOR_LEN;
+               ie->nonce_len = pos[1] - RSN_SELECTOR_LEN;
+               return 0;
+       }
+
+       if (pos[1] > RSN_SELECTOR_LEN + 2 &&
+           RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_LIFETIME) {
+               ie->lifetime = pos + 2 + RSN_SELECTOR_LEN;
+               ie->lifetime_len = pos[1] - RSN_SELECTOR_LEN;
+               return 0;
+       }
+
+       if (pos[1] > RSN_SELECTOR_LEN + 2 &&
+           RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_ERROR) {
+               ie->error = pos + 2 + RSN_SELECTOR_LEN;
+               ie->error_len = pos[1] - RSN_SELECTOR_LEN;
+               return 0;
+       }
+#endif /* CONFIG_PEERKEY */
+
+#ifdef CONFIG_IEEE80211W
+       if (pos[1] > RSN_SELECTOR_LEN + 2 &&
+           RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_IGTK) {
+               ie->igtk = pos + 2 + RSN_SELECTOR_LEN;
+               ie->igtk_len = pos[1] - RSN_SELECTOR_LEN;
+               return 0;
+       }
+#endif /* CONFIG_IEEE80211W */
+
+       return 0;
+}
+
+
+/**
+ * wpa_parse_kde_ies - Parse EAPOL-Key Key Data IEs
+ * @buf: Pointer to the Key Data buffer
+ * @len: Key Data Length
+ * @ie: Pointer to parsed IE data
+ * Returns: 0 on success, -1 on failure
+ */
+int wpa_parse_kde_ies(const u8 *buf, size_t len, struct wpa_eapol_ie_parse *ie)
+{
+       const u8 *pos, *end;
+       int ret = 0;
+
+       memset(ie, 0, sizeof(*ie));
+       for (pos = buf, end = pos + len; pos + 1 < end; pos += 2 + pos[1]) {
+               if (pos[0] == 0xdd &&
+                   ((pos == buf + len - 1) || pos[1] == 0)) {
+                       /* Ignore padding */
+                       break;
+               }
+               if (pos + 2 + pos[1] > end) {
+                       wpa_printf( MSG_DEBUG, "WPA: EAPOL-Key Key Data "
+                                  "underflow (ie=%d len=%d pos=%d)",
+                                  pos[0], pos[1], (int) (pos - buf));
+                       wpa_hexdump_key(MSG_DEBUG, "WPA: Key Data",
+                                       buf, len);
+                       ret = -1;
+                       break;
+               }
+               if (*pos == WLAN_EID_RSN) {
+                       ie->rsn_ie = pos;
+                       ie->rsn_ie_len = pos[1] + 2;
+#ifdef CONFIG_IEEE80211R
+               } else if (*pos == WLAN_EID_MOBILITY_DOMAIN) {
+                       ie->mdie = pos;
+                       ie->mdie_len = pos[1] + 2;
+               } else if (*pos == WLAN_EID_FAST_BSS_TRANSITION) {
+                       ie->ftie = pos;
+                       ie->ftie_len = pos[1] + 2;
+#endif /* CONFIG_IEEE80211R */
+               } else if (*pos == WLAN_EID_VENDOR_SPECIFIC) {
+                       ret = wpa_parse_generic(pos, end, ie);
+                       if (ret < 0)
+                               break;
+                       if (ret > 0) {
+                               ret = 0;
+                               break;
+                       }
+               } else {
+                       wpa_hexdump(MSG_DEBUG, "WPA: Unrecognized EAPOL-Key "
+                                   "Key Data IE", pos, 2 + pos[1]);
+               }
+       }
+
+       return ret;
+}
+
+
+int wpa_auth_uses_mfp(struct wpa_state_machine *sm)
+{
+       return sm ? sm->mgmt_frame_prot : 0;
+}
similarity index 77%
rename from components/wpa_supplicant/include/wpa/defs.h
rename to components/wpa_supplicant/src/common/defs.h
index f019cee9927bb4c5b62fe9b7d6457da4e665b0a4..578604296b156f785f68005411e80a9283fbaf41 100644 (file)
 #endif
 typedef enum { FALSE = 0, TRUE = 1 } Boolean;
 
-/*
-#define WPA_CIPHER_NONE BIT(0)
-#define WPA_CIPHER_WEP40 BIT(1)
-#define WPA_CIPHER_WEP104 BIT(2)
-#define WPA_CIPHER_TKIP BIT(3)
-#define WPA_CIPHER_CCMP BIT(4)
-#ifdef CONFIG_IEEE80211W
-#define WPA_CIPHER_AES_128_CMAC BIT(5)
-#endif 
-*/
-
-/*
- * NB: these values are ordered carefully; there are lots of
- * of implications in any reordering.  Beware that 4 is used
- * only to indicate h/w TKIP MIC support in driver capabilities;
- * there is no separate cipher support (it's rolled into the
- * TKIP cipher support).
- */
-#define        IEEE80211_CIPHER_NONE           0       /* pseudo value */
-#define        IEEE80211_CIPHER_TKIP           1
-#define        IEEE80211_CIPHER_AES_OCB        2
-#define        IEEE80211_CIPHER_AES_CCM        3
-#define        IEEE80211_CIPHER_TKIPMIC        4       /* TKIP MIC capability */
-#define        IEEE80211_CIPHER_CKIP           5
-#define        IEEE80211_CIPHER_WEP            6
-#define        IEEE80211_CIPHER_WEP40          7
-#define        IEEE80211_CIPHER_WEP104         8
-
-
-#define        IEEE80211_CIPHER_MAX            (IEEE80211_CIPHER_NONE+2)
-
-/* capability bits in ic_cryptocaps/iv_cryptocaps */
-#define        IEEE80211_CRYPTO_NONE           (1<<IEEE80211_CIPHER_NONE)
-#define        IEEE80211_CRYPTO_WEP            (1<<IEEE80211_CIPHER_WEP)
-#define        IEEE80211_CRYPTO_WEP40          (1<<IEEE80211_CIPHER_WEP40)
-#define        IEEE80211_CRYPTO_WEP104 (1<<IEEE80211_CIPHER_WEP104)
-#define        IEEE80211_CRYPTO_TKIP           (1<<IEEE80211_CIPHER_TKIP)
-#define        IEEE80211_CRYPTO_AES_OCB        (1<<IEEE80211_CIPHER_AES_OCB)
-#define        IEEE80211_CRYPTO_AES_CCM        (1<<IEEE80211_CIPHER_AES_CCM)
-#define        IEEE80211_CRYPTO_TKIPMIC        (1<<IEEE80211_CIPHER_TKIPMIC)
-#define        IEEE80211_CRYPTO_CKIP           (1<<IEEE80211_CIPHER_CKIP)
-
-#define WPA_CIPHER_NONE                     IEEE80211_CRYPTO_NONE
-#define WPA_CIPHER_WEP40                    IEEE80211_CRYPTO_WEP40
-#define WPA_CIPHER_WEP104                  IEEE80211_CRYPTO_WEP104
-#define WPA_CIPHER_TKIP                       IEEE80211_CRYPTO_TKIP
-#define WPA_CIPHER_CCMP                     IEEE80211_CRYPTO_AES_CCM
-#ifdef CONFIG_IEEE80211W
-#define WPA_CIPHER_AES_128_CMAC    IEEE80211_CRYPTO_AES_OCB
-#endif /* CONFIG_IEEE80211W */
-#define WPA_CIPHER_GCMP BIT(6)
+#define WPA_CIPHER_NONE                 BIT(0)
+#define WPA_CIPHER_WEP40                BIT(7)
+#define WPA_CIPHER_WEP104               BIT(8)
+#define WPA_CIPHER_TKIP                 BIT(1)
+#define WPA_CIPHER_CCMP                 BIT(3)
+#define WPA_CIPHER_AES_128_CMAC         BIT(2)
+#define WPA_CIPHER_GCMP                 BIT(6)
 
 #define WPA_KEY_MGMT_IEEE8021X BIT(0)
 #define WPA_KEY_MGMT_PSK BIT(1)
@@ -124,7 +80,7 @@ static inline int wpa_key_mgmt_sha256(int akm)
 #define WPA_AUTH_ALG_FT BIT(3)
 
 
-enum ieee80211_key_alg {
+enum wifi_key_alg {
        ALG_WEP,
        ALG_TKIP,
        ALG_CCMP,
diff --git a/components/wpa_supplicant/src/common/wpa_common.c b/components/wpa_supplicant/src/common/wpa_common.c
new file mode 100644 (file)
index 0000000..2685cc3
--- /dev/null
@@ -0,0 +1,668 @@
+/*
+ * WPA/RSN - Shared functions for supplicant and authenticator
+ * Copyright (c) 2002-2008, Jouni Malinen <j@w1.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+ #ifdef ESP_SUPPLICANT
+
+#include "utils/includes.h"
+#include "utils/common.h"
+#include "common/defs.h"
+#include "common/ieee802_11_defs.h"
+#include "common/wpa_common.h"
+#include "rsn_supp/wpa.h"
+#include "crypto/sha1.h"
+#include "crypto/sha256.h"
+#include "crypto/md5.h"
+#define MD5_MAC_LEN 16
+
+#ifndef CONFIG_NO_WPA2
+static int rsn_selector_to_bitfield(const u8 *s)
+{
+       if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_NONE)
+               return WPA_CIPHER_NONE;
+       if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_WEP40)
+               return WPA_CIPHER_WEP40;
+       if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_TKIP)
+               return WPA_CIPHER_TKIP;
+       if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_CCMP)
+               return WPA_CIPHER_CCMP;
+       if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_WEP104)
+               return WPA_CIPHER_WEP104;
+#ifdef CONFIG_IEEE80211W
+       if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_AES_128_CMAC)
+               return WPA_CIPHER_AES_128_CMAC;
+#endif /* CONFIG_IEEE80211W */
+       return 0;
+}
+
+static int rsn_key_mgmt_to_bitfield(const u8 *s)
+{
+       if (RSN_SELECTOR_GET(s) == RSN_AUTH_KEY_MGMT_UNSPEC_802_1X)
+               return WPA_KEY_MGMT_IEEE8021X;
+       if (RSN_SELECTOR_GET(s) == RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X)
+               return WPA_KEY_MGMT_PSK;
+#ifdef CONFIG_IEEE80211R
+       if (RSN_SELECTOR_GET(s) == RSN_AUTH_KEY_MGMT_FT_802_1X)
+               return WPA_KEY_MGMT_FT_IEEE8021X;
+       if (RSN_SELECTOR_GET(s) == RSN_AUTH_KEY_MGMT_FT_PSK)
+               return WPA_KEY_MGMT_FT_PSK;
+#endif /* CONFIG_IEEE80211R */
+#ifdef CONFIG_IEEE80211W
+       if (RSN_SELECTOR_GET(s) == RSN_AUTH_KEY_MGMT_802_1X_SHA256)
+               return WPA_KEY_MGMT_IEEE8021X_SHA256;
+       if (RSN_SELECTOR_GET(s) == RSN_AUTH_KEY_MGMT_PSK_SHA256)
+               return WPA_KEY_MGMT_PSK_SHA256;
+#endif /* CONFIG_IEEE80211W */
+       return 0;
+}
+
+static int wpa_selector_to_bitfield(const u8 *s)
+{
+       if (RSN_SELECTOR_GET(s) == WPA_CIPHER_SUITE_NONE)
+               return WPA_CIPHER_NONE;
+       if (RSN_SELECTOR_GET(s) == WPA_CIPHER_SUITE_WEP40)
+               return WPA_CIPHER_WEP40;
+       if (RSN_SELECTOR_GET(s) == WPA_CIPHER_SUITE_TKIP)
+               return WPA_CIPHER_TKIP;
+       if (RSN_SELECTOR_GET(s) == WPA_CIPHER_SUITE_CCMP)
+               return WPA_CIPHER_CCMP;
+       if (RSN_SELECTOR_GET(s) == WPA_CIPHER_SUITE_WEP104)
+               return WPA_CIPHER_WEP104;
+       return 0;
+}
+
+static int wpa_key_mgmt_to_bitfield(const u8 *s)
+{
+       if (RSN_SELECTOR_GET(s) == WPA_AUTH_KEY_MGMT_UNSPEC_802_1X)
+               return WPA_KEY_MGMT_IEEE8021X;
+       if (RSN_SELECTOR_GET(s) == WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X)
+               return WPA_KEY_MGMT_PSK;
+       if (RSN_SELECTOR_GET(s) == WPA_AUTH_KEY_MGMT_NONE)
+               return WPA_KEY_MGMT_WPA_NONE;
+       return 0;
+}
+#endif /* CONFIG_NO_WPA2 */
+/**
+ * wpa_parse_wpa_ie_rsn - Parse RSN IE
+ * @rsn_ie: Buffer containing RSN IE
+ * @rsn_ie_len: RSN IE buffer length (including IE number and length octets)
+ * @data: Pointer to structure that will be filled in with parsed data
+ * Returns: 0 on success, <0 on failure
+ */
+int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len,
+                        struct wpa_ie_data *data)
+{
+#ifndef CONFIG_NO_WPA2
+       const struct rsn_ie_hdr *hdr;
+       const u8 *pos;
+       int left;
+       int i, count;
+
+       memset(data, 0, sizeof(*data));
+       data->proto = WPA_PROTO_RSN;
+       data->pairwise_cipher = WPA_CIPHER_CCMP;
+       data->group_cipher = WPA_CIPHER_CCMP;
+       data->key_mgmt = WPA_KEY_MGMT_IEEE8021X;
+       data->capabilities = 0;
+       data->pmkid = NULL;
+       data->num_pmkid = 0;
+       data->mgmt_group_cipher = 0;
+
+       if (rsn_ie_len == 0) {
+               /* No RSN IE - fail silently */
+               return -1;
+       }
+
+       if (rsn_ie_len < sizeof(struct rsn_ie_hdr)) {
+           #ifdef DEBUG_PRINT  
+               wpa_printf(MSG_DEBUG, "%s: ie len too short %lu",
+                          __func__, (unsigned long) rsn_ie_len);
+           #endif      
+               return -1;
+       }
+
+       hdr = (const struct rsn_ie_hdr *) rsn_ie;
+
+       if (hdr->elem_id != WLAN_EID_RSN ||
+           hdr->len != rsn_ie_len - 2 ||
+           WPA_GET_LE16(hdr->version) != RSN_VERSION) {
+           #ifdef DEBUG_PRINT  
+               wpa_printf(MSG_DEBUG, "%s: malformed ie or unknown version",
+                          __func__);
+            #endif             
+               return -2;
+       }
+
+       pos = (const u8 *) (hdr + 1);
+       left = rsn_ie_len - sizeof(*hdr);
+
+       if (left >= RSN_SELECTOR_LEN) {
+               data->group_cipher = rsn_selector_to_bitfield(pos);
+               pos += RSN_SELECTOR_LEN;
+               left -= RSN_SELECTOR_LEN;
+       } else if (left > 0) {
+           #ifdef DEBUG_PRINT  
+               wpa_printf(MSG_DEBUG, "%s: ie length mismatch, %u too much",
+                          __func__, left);
+            #endif     
+               return -3;
+       }
+
+       if (left >= 2) {
+               data->pairwise_cipher = 0;
+               count = WPA_GET_LE16(pos);
+               pos += 2;
+               left -= 2;
+               if (count == 0 || left < count * RSN_SELECTOR_LEN) {
+                   #ifdef DEBUG_PRINT          
+                       wpa_printf(MSG_DEBUG, "%s: ie count botch (pairwise), "
+                                  "count %u left %u", __func__, count, left);
+                   #endif      
+                       return -4;
+               }
+               for (i = 0; i < count; i++) {
+                       data->pairwise_cipher |= rsn_selector_to_bitfield(pos);
+                       pos += RSN_SELECTOR_LEN;
+                       left -= RSN_SELECTOR_LEN;
+               }
+       } else if (left == 1) {
+           #ifdef DEBUG_PRINT  
+               wpa_printf(MSG_DEBUG, "%s: ie too short (for key mgmt)",
+                          __func__);
+           #endif      
+               return -5;
+       }
+
+       if (left >= 2) {
+               data->key_mgmt = 0;
+               count = WPA_GET_LE16(pos);
+               pos += 2;
+               left -= 2;
+               if (count == 0 || left < count * RSN_SELECTOR_LEN) {
+                   #ifdef DEBUG_PRINT          
+                       wpa_printf(MSG_DEBUG, "%s: ie count botch (key mgmt), "
+                                  "count %u left %u", __func__, count, left);
+                   #endif      
+                       return -6;
+               }
+               for (i = 0; i < count; i++) {
+                       data->key_mgmt |= rsn_key_mgmt_to_bitfield(pos);
+                       pos += RSN_SELECTOR_LEN;
+                       left -= RSN_SELECTOR_LEN;
+               }
+       } else if (left == 1) {
+           #ifdef DEBUG_PRINT  
+               wpa_printf(MSG_DEBUG, "%s: ie too short (for capabilities)",
+                          __func__);
+           #endif      
+               return -7;
+       }
+
+       if (left >= 2) {
+               data->capabilities = WPA_GET_LE16(pos);
+               pos += 2;
+               left -= 2;
+       }
+
+       if (left >= 2) {
+               data->num_pmkid = WPA_GET_LE16(pos);
+               pos += 2;
+               left -= 2;
+               if (left < (int) data->num_pmkid * PMKID_LEN) {
+                   #ifdef DEBUG_PRINT  
+                       wpa_printf(MSG_DEBUG, "%s: PMKID underflow "
+                                  "(num_pmkid=%lu left=%d)",
+                                  __func__, (unsigned long) data->num_pmkid,
+                                  left);
+                   #endif      
+                       data->num_pmkid = 0;
+                       return -9;
+               } else {
+                       data->pmkid = pos;
+                       pos += data->num_pmkid * PMKID_LEN;
+                       left -= data->num_pmkid * PMKID_LEN;
+               }
+       }
+
+       if (left > 0) {
+           #ifdef DEBUG_PRINT  
+               wpa_printf(MSG_DEBUG, "%s: ie has %u trailing bytes - ignored",
+                          __func__, left);
+           #endif      
+       }
+
+       return 0;
+#else /* CONFIG_NO_WPA2 */
+       return -1;
+#endif /* CONFIG_NO_WPA2 */
+}
+
+int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len,
+                        struct wpa_ie_data *data)
+{
+       const struct wpa_ie_hdr *hdr;
+       const u8 *pos;
+       int left;
+       int i, count;
+
+       memset(data, 0, sizeof(*data));
+       data->proto = WPA_PROTO_WPA;
+       data->pairwise_cipher = WPA_CIPHER_TKIP;
+       data->group_cipher = WPA_CIPHER_TKIP;
+       data->key_mgmt = WPA_KEY_MGMT_IEEE8021X;
+       data->capabilities = 0;
+       data->pmkid = NULL;
+       data->num_pmkid = 0;
+       data->mgmt_group_cipher = 0;
+
+       if (wpa_ie_len == 0) {
+               /* No WPA IE - fail silently */
+               return -1;
+       }
+
+       if (wpa_ie_len < sizeof(struct wpa_ie_hdr)) {
+               wpa_printf(MSG_DEBUG, "%s: ie len too short %lu",
+                          __func__, (unsigned long) wpa_ie_len);
+               return -1;
+       }
+
+       hdr = (const struct wpa_ie_hdr *) wpa_ie;
+
+       if (hdr->elem_id != WLAN_EID_VENDOR_SPECIFIC ||
+           hdr->len != wpa_ie_len - 2 ||
+           RSN_SELECTOR_GET(hdr->oui) != WPA_OUI_TYPE ||
+           WPA_GET_LE16(hdr->version) != WPA_VERSION) {
+               wpa_printf(MSG_DEBUG, "%s: malformed ie or unknown version",
+                          __func__);
+               return -2;
+       }
+
+       pos = (const u8 *) (hdr + 1);
+       left = wpa_ie_len - sizeof(*hdr);
+
+       if (left >= WPA_SELECTOR_LEN) {
+               data->group_cipher = wpa_selector_to_bitfield(pos);
+               pos += WPA_SELECTOR_LEN;
+               left -= WPA_SELECTOR_LEN;
+       } else if (left > 0) {
+               wpa_printf(MSG_DEBUG, "%s: ie length mismatch, %u too much",
+                          __func__, left);
+               return -3;
+       }
+
+       if (left >= 2) {
+               data->pairwise_cipher = 0;
+               count = WPA_GET_LE16(pos);
+               pos += 2;
+               left -= 2;
+               if (count == 0 || left < count * WPA_SELECTOR_LEN) {
+                       wpa_printf(MSG_DEBUG, "%s: ie count botch (pairwise), "
+                                  "count %u left %u", __func__, count, left);
+                       return -4;
+               }
+               for (i = 0; i < count; i++) {
+                       data->pairwise_cipher |= wpa_selector_to_bitfield(pos);
+                       pos += WPA_SELECTOR_LEN;
+                       left -= WPA_SELECTOR_LEN;
+               }
+       } else if (left == 1) {
+               wpa_printf(MSG_DEBUG, "%s: ie too short (for key mgmt)",
+                          __func__);
+               return -5;
+       }
+
+       if (left >= 2) {
+               data->key_mgmt = 0;
+               count = WPA_GET_LE16(pos);
+               pos += 2;
+               left -= 2;
+               if (count == 0 || left < count * WPA_SELECTOR_LEN) {
+                       wpa_printf(MSG_DEBUG, "%s: ie count botch (key mgmt), "
+                                  "count %u left %u", __func__, count, left);
+                       return -6;
+               }
+               for (i = 0; i < count; i++) {
+                       data->key_mgmt |= wpa_key_mgmt_to_bitfield(pos);
+                       pos += WPA_SELECTOR_LEN;
+                       left -= WPA_SELECTOR_LEN;
+               }
+       } else if (left == 1) {
+               wpa_printf(MSG_DEBUG, "%s: ie too short (for capabilities)",
+                          __func__);
+               return -7;
+       }
+
+       if (left >= 2) {
+               data->capabilities = WPA_GET_LE16(pos);
+               pos += 2;
+               left -= 2;
+       }
+
+       if (left > 0) {
+               wpa_printf(MSG_DEBUG, "%s: ie has %u trailing bytes - ignored",
+                          __func__, left);
+       }
+
+       return 0;
+}
+
+
+/**
+ * wpa_eapol_key_mic - Calculate EAPOL-Key MIC
+ * @key: EAPOL-Key Key Confirmation Key (KCK)
+ * @ver: Key descriptor version (WPA_KEY_INFO_TYPE_*)
+ * @buf: Pointer to the beginning of the EAPOL header (version field)
+ * @len: Length of the EAPOL frame (from EAPOL header to the end of the frame)
+ * @mic: Pointer to the buffer to which the EAPOL-Key MIC is written
+ * Returns: 0 on success, -1 on failure
+ *
+ * Calculate EAPOL-Key MIC for an EAPOL-Key packet. The EAPOL-Key MIC field has
+ * to be cleared (all zeroes) when calling this function.
+ *
+ * Note: 'IEEE Std 802.11i-2004 - 8.5.2 EAPOL-Key frames' has an error in the
+ * description of the Key MIC calculation. It includes packet data from the
+ * beginning of the EAPOL-Key header, not EAPOL header. This incorrect change
+ * happened during final editing of the standard and the correct behavior is
+ * defined in the last draft (IEEE 802.11i/D10).
+ */
+int wpa_eapol_key_mic(const u8 *key, int ver, const u8 *buf, size_t len,
+                     u8 *mic)
+{
+       u8 hash[SHA1_MAC_LEN];
+
+       switch (ver) {
+       case WPA_KEY_INFO_TYPE_HMAC_MD5_RC4:
+                   return hmac_md5(key, 16, buf, len, mic);
+       case WPA_KEY_INFO_TYPE_HMAC_SHA1_AES:
+               if (hmac_sha1(key, 16, buf, len, hash))
+                       return -1;
+               memcpy(mic, hash, MD5_MAC_LEN);
+               break;
+       default:
+               return -1;
+       }
+
+       return 0;
+}
+
+int wpa_compare_rsn_ie(int ft_initial_assoc,
+                      const u8 *ie1, size_t ie1len,
+                      const u8 *ie2, size_t ie2len)
+{
+       if (ie1 == NULL || ie2 == NULL)
+               return -1;
+
+       if (ie1len == ie2len && memcmp(ie1, ie2, ie1len) == 0)
+               return 0; /* identical IEs */
+
+#ifdef CONFIG_IEEE80211R
+       if (ft_initial_assoc) {
+               struct wpa_ie_data ie1d, ie2d;
+               /*
+                * The PMKID-List in RSN IE is different between Beacon/Probe
+                * Response/(Re)Association Request frames and EAPOL-Key
+                * messages in FT initial mobility domain association. Allow
+                * for this, but verify that other parts of the RSN IEs are
+                * identical.
+                */
+               if (wpa_parse_wpa_ie_rsn(ie1, ie1len, &ie1d) < 0 ||
+                   wpa_parse_wpa_ie_rsn(ie2, ie2len, &ie2d) < 0)
+                       return -1;
+               if (ie1d.proto == ie2d.proto &&
+                   ie1d.pairwise_cipher == ie2d.pairwise_cipher &&
+                   ie1d.group_cipher == ie2d.group_cipher &&
+                   ie1d.key_mgmt == ie2d.key_mgmt &&
+                   ie1d.capabilities == ie2d.capabilities &&
+                   ie1d.mgmt_group_cipher == ie2d.mgmt_group_cipher)
+                       return 0;
+       }
+#endif /* CONFIG_IEEE80211R */
+
+       return -1;
+}
+
+#ifdef DEBUG_PRINT
+/**
+ * wpa_cipher_txt - Convert cipher suite to a text string
+ * @cipher: Cipher suite (WPA_CIPHER_* enum)
+ * Returns: Pointer to a text string of the cipher suite name
+ */
+const char * wpa_cipher_txt(int cipher)
+{
+       switch (cipher) {
+       case WPA_CIPHER_NONE:
+               return "NONE";
+       case WPA_CIPHER_WEP40:
+               return "WEP-40";
+       case WPA_CIPHER_WEP104:
+               return "WEP-104";
+       case WPA_CIPHER_TKIP:
+               return "TKIP";
+       case WPA_CIPHER_CCMP:
+               return "CCMP";
+       case WPA_CIPHER_CCMP | WPA_CIPHER_TKIP:
+               return "CCMP+TKIP";
+       default:
+               return "UNKNOWN";
+       }
+}
+#endif
+
+/**
+ * wpa_pmk_to_ptk - Calculate PTK from PMK, addresses, and nonces
+ * @pmk: Pairwise master key
+ * @pmk_len: Length of PMK
+ * @label: Label to use in derivation
+ * @addr1: AA or SA
+ * @addr2: SA or AA
+ * @nonce1: ANonce or SNonce
+ * @nonce2: SNonce or ANonce
+ * @ptk: Buffer for pairwise transient key
+ * @ptk_len: Length of PTK
+ * @use_sha256: Whether to use SHA256-based KDF
+ *
+ * IEEE Std 802.11i-2004 - 8.5.1.2 Pairwise key hierarchy
+ * PTK = PRF-X(PMK, "Pairwise key expansion",
+ *             Min(AA, SA) || Max(AA, SA) ||
+ *             Min(ANonce, SNonce) || Max(ANonce, SNonce))
+ *
+ * STK = PRF-X(SMK, "Peer key expansion",
+ *             Min(MAC_I, MAC_P) || Max(MAC_I, MAC_P) ||
+ *             Min(INonce, PNonce) || Max(INonce, PNonce))
+ */
+void wpa_pmk_to_ptk(const u8 *pmk, size_t pmk_len, const char *label,
+                   const u8 *addr1, const u8 *addr2,
+                   const u8 *nonce1, const u8 *nonce2,
+                   u8 *ptk, size_t ptk_len, int use_sha256)
+{
+       u8 data[2 * ETH_ALEN + 2 * WPA_NONCE_LEN];
+
+       if (memcmp(addr1, addr2, ETH_ALEN) < 0) {
+               memcpy(data, addr1, ETH_ALEN);
+               memcpy(data + ETH_ALEN, addr2, ETH_ALEN);
+       } else {
+               memcpy(data, addr2, ETH_ALEN);
+               memcpy(data + ETH_ALEN, addr1, ETH_ALEN);
+       }
+
+       if (memcmp(nonce1, nonce2, WPA_NONCE_LEN) < 0) {
+               memcpy(data + 2 * ETH_ALEN, nonce1, WPA_NONCE_LEN);
+               memcpy(data + 2 * ETH_ALEN + WPA_NONCE_LEN, nonce2,
+                         WPA_NONCE_LEN);
+       } else {
+               memcpy(data + 2 * ETH_ALEN, nonce2, WPA_NONCE_LEN);
+               memcpy(data + 2 * ETH_ALEN + WPA_NONCE_LEN, nonce1,
+                         WPA_NONCE_LEN);
+       }
+
+#ifdef CONFIG_IEEE80211W
+       if (use_sha256) {
+               fast_sha256_prf(pmk, pmk_len, label, data, sizeof(data),
+                       ptk, ptk_len);
+       }
+       else
+#endif /* CONFIG_IEEE80211W */
+       {
+           sha1_prf(pmk, pmk_len, label, data, sizeof(data), ptk, ptk_len);
+       }
+       wpa_printf(MSG_DEBUG, "WPA: PTK derivation - A1=" MACSTR " A2=" MACSTR"\n",
+                  MAC2STR(addr1), MAC2STR(addr2));
+
+       wpa_hexdump(MSG_MSGDUMP, "WPA: PMK", pmk, pmk_len);
+       wpa_hexdump(MSG_MSGDUMP, "WPA: PTK", ptk, ptk_len);
+}
+
+/**
+ * rsn_pmkid - Calculate PMK identifier
+ * @pmk: Pairwise master key
+ * @pmk_len: Length of pmk in bytes
+ * @aa: Authenticator address
+ * @spa: Supplicant address
+ * @pmkid: Buffer for PMKID
+ * @use_sha256: Whether to use SHA256-based KDF
+ *
+ * IEEE Std 802.11i-2004 - 8.5.1.2 Pairwise key hierarchy
+ * PMKID = HMAC-SHA1-128(PMK, "PMK Name" || AA || SPA)
+ */
+void rsn_pmkid(const u8 *pmk, size_t pmk_len, const u8 *aa, const u8 *spa,
+              u8 *pmkid, int use_sha256)
+{
+       char title[9];
+       const u8 *addr[3];
+       const size_t len[3] = { 8, ETH_ALEN, ETH_ALEN };
+       unsigned char hash[SHA256_MAC_LEN];
+
+    os_memcpy(title, "PMK Name", sizeof("PMK Name"));
+       addr[0] = (u8 *) title;
+       addr[1] = aa;
+       addr[2] = spa;
+
+#ifdef CONFIG_IEEE80211W
+       if (use_sha256) {
+               fast_hmac_sha256_vector(pmk, pmk_len, 3, addr, len, hash);
+       }
+       else
+#endif /* CONFIG_IEEE80211W */
+       hmac_sha1_vector(pmk, pmk_len, 3, addr, len, hash);
+       memcpy(pmkid, hash, PMKID_LEN);
+}
+
+int wpa_cipher_key_len(int cipher)
+{
+       switch (cipher) {
+       case WPA_CIPHER_CCMP:
+       case WPA_CIPHER_GCMP:
+               return 16;
+       case WPA_CIPHER_TKIP:
+               return 32;
+       case WPA_CIPHER_WEP104:
+               return 13;
+       case WPA_CIPHER_WEP40:
+               return 5;
+       }
+
+       return 0;
+}
+
+int wpa_cipher_to_alg(int cipher)
+{
+       switch (cipher) {
+       case WPA_CIPHER_CCMP:
+               return WPA_ALG_CCMP;
+       case WPA_CIPHER_GCMP:
+               return WPA_ALG_GCMP;
+       case WPA_CIPHER_TKIP:
+               return WPA_ALG_TKIP;
+       case WPA_CIPHER_WEP104:
+       case WPA_CIPHER_WEP40:
+               return WPA_ALG_WEP;
+       }
+       return WPA_ALG_NONE;
+}
+
+u32 wpa_cipher_to_suite(int proto, int cipher)
+{
+       if (cipher & WPA_CIPHER_CCMP)
+               return (proto == WPA_PROTO_RSN ?
+                       RSN_CIPHER_SUITE_CCMP : WPA_CIPHER_SUITE_CCMP);
+       if (cipher & WPA_CIPHER_GCMP)
+               return RSN_CIPHER_SUITE_GCMP;
+       if (cipher & WPA_CIPHER_TKIP)
+               return (proto == WPA_PROTO_RSN ?
+                       RSN_CIPHER_SUITE_TKIP : WPA_CIPHER_SUITE_TKIP);
+       if (cipher & WPA_CIPHER_WEP104)
+               return (proto == WPA_PROTO_RSN ?
+                       RSN_CIPHER_SUITE_WEP104 : WPA_CIPHER_SUITE_WEP104);
+       if (cipher & WPA_CIPHER_WEP40)
+               return (proto == WPA_PROTO_RSN ?
+                       RSN_CIPHER_SUITE_WEP40 : WPA_CIPHER_SUITE_WEP40);
+       if (cipher & WPA_CIPHER_NONE)
+               return (proto == WPA_PROTO_RSN ?
+                       RSN_CIPHER_SUITE_NONE : WPA_CIPHER_SUITE_NONE);
+       return 0;
+}
+
+int rsn_cipher_put_suites(u8 *pos, int ciphers)
+{
+       int num_suites = 0;
+
+       if (ciphers & WPA_CIPHER_CCMP) {
+               RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_CCMP);
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+       if (ciphers & WPA_CIPHER_GCMP) {
+               RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_GCMP);
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+       if (ciphers & WPA_CIPHER_TKIP) {
+               RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_TKIP);
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+       if (ciphers & WPA_CIPHER_NONE) {
+               RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_NONE);
+               pos += RSN_SELECTOR_LEN;
+               num_suites++;
+       }
+
+       return num_suites;
+}
+
+int wpa_cipher_put_suites(u8 *pos, int ciphers)
+{
+       int num_suites = 0;
+
+       if (ciphers & WPA_CIPHER_CCMP) {
+               RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_CCMP);
+               pos += WPA_SELECTOR_LEN;
+               num_suites++;
+       }
+       if (ciphers & WPA_CIPHER_TKIP) {
+               RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_TKIP);
+               pos += WPA_SELECTOR_LEN;
+               num_suites++;
+       }
+       if (ciphers & WPA_CIPHER_NONE) {
+               RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_NONE);
+               pos += WPA_SELECTOR_LEN;
+               num_suites++;
+       }
+
+       return num_suites;
+}
+
+#endif // ESP_SUPPLICANT
+
+
similarity index 96%
rename from components/wpa_supplicant/include/wpa/wpa_common.h
rename to components/wpa_supplicant/src/common/wpa_common.h
index 480cf0e27e64950b75bea823ece9963b2ec8e146..07d549aac2d93886e06f98524a6f2756fccba36e 100644 (file)
@@ -42,9 +42,6 @@
 #define WPA_CIPHER_SUITE_NONE RSN_SELECTOR(0x00, 0x50, 0xf2, 0)
 #define WPA_CIPHER_SUITE_WEP40 RSN_SELECTOR(0x00, 0x50, 0xf2, 1)
 #define WPA_CIPHER_SUITE_TKIP RSN_SELECTOR(0x00, 0x50, 0xf2, 2)
-#if 0
-#define WPA_CIPHER_SUITE_WRAP RSN_SELECTOR(0x00, 0x50, 0xf2, 3)
-#endif
 #define WPA_CIPHER_SUITE_CCMP RSN_SELECTOR(0x00, 0x50, 0xf2, 4)
 #define WPA_CIPHER_SUITE_WEP104 RSN_SELECTOR(0x00, 0x50, 0xf2, 5)
 
@@ -61,9 +58,6 @@
 #define RSN_CIPHER_SUITE_NONE RSN_SELECTOR(0x00, 0x0f, 0xac, 0)
 #define RSN_CIPHER_SUITE_WEP40 RSN_SELECTOR(0x00, 0x0f, 0xac, 1)
 #define RSN_CIPHER_SUITE_TKIP RSN_SELECTOR(0x00, 0x0f, 0xac, 2)
-#if 0
-#define RSN_CIPHER_SUITE_WRAP RSN_SELECTOR(0x00, 0x0f, 0xac, 3)
-#endif
 #define RSN_CIPHER_SUITE_CCMP RSN_SELECTOR(0x00, 0x0f, 0xac, 4)
 #define RSN_CIPHER_SUITE_WEP104 RSN_SELECTOR(0x00, 0x0f, 0xac, 5)
 #ifdef CONFIG_IEEE80211W
@@ -76,9 +70,6 @@
  * GroupKey and PeerKey require encryption, otherwise, encryption is optional.
  */
 #define RSN_KEY_DATA_GROUPKEY RSN_SELECTOR(0x00, 0x0f, 0xac, 1)
-#if 0
-#define RSN_KEY_DATA_STAKEY RSN_SELECTOR(0x00, 0x0f, 0xac, 2)
-#endif
 #define RSN_KEY_DATA_MAC_ADDR RSN_SELECTOR(0x00, 0x0f, 0xac, 3)
 #define RSN_KEY_DATA_PMKID RSN_SELECTOR(0x00, 0x0f, 0xac, 4)
 #ifdef CONFIG_PEERKEY
@@ -329,4 +320,17 @@ void wpa_pmk_to_ptk(const u8 *pmk, size_t pmk_len, const char *label,
 void rsn_pmkid(const u8 *pmk, size_t pmk_len, const u8 *aa, const u8 *spa,
               u8 *pmkid, int use_sha256);
 
+int wpa_cipher_key_len(int cipher);
+
+int wpa_cipher_to_alg(int cipher);
+
+u32 wpa_cipher_to_suite(int proto, int cipher);
+
+int wpa_cipher_put_suites(u8 *pos, int ciphers);
+
+int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len,
+           struct wpa_ie_data *data);
+
+int rsn_cipher_put_suites(u8 *pos, int ciphers);
+
 #endif /* WPA_COMMON_H */
diff --git a/components/wpa_supplicant/src/common/wpa_ctrl.h b/components/wpa_supplicant/src/common/wpa_ctrl.h
new file mode 100644 (file)
index 0000000..d005591
--- /dev/null
@@ -0,0 +1,196 @@
+/*
+ * wpa_supplicant/hostapd control interface library
+ * Copyright (c) 2004-2006, Jouni Malinen <j@w1.fi>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#ifndef WPA_CTRL_H
+#define WPA_CTRL_H
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+/* wpa_supplicant control interface - fixed message prefixes */
+
+/** Interactive request for identity/password/pin */
+#define WPA_CTRL_REQ "CTRL-REQ-"
+
+/** Response to identity/password/pin request */
+#define WPA_CTRL_RSP "CTRL-RSP-"
+
+/* Event messages with fixed prefix */
+/** Authentication completed successfully and data connection enabled */
+#define WPA_EVENT_CONNECTED "CTRL-EVENT-CONNECTED "
+/** Disconnected, data connection is not available */
+#define WPA_EVENT_DISCONNECTED "CTRL-EVENT-DISCONNECTED "
+/** Association rejected during connection attempt */
+#define WPA_EVENT_ASSOC_REJECT "CTRL-EVENT-ASSOC-REJECT "
+/** wpa_supplicant is exiting */
+#define WPA_EVENT_TERMINATING "CTRL-EVENT-TERMINATING "
+/** Password change was completed successfully */
+#define WPA_EVENT_PASSWORD_CHANGED "CTRL-EVENT-PASSWORD-CHANGED "
+/** EAP-Request/Notification received */
+#define WPA_EVENT_EAP_NOTIFICATION "CTRL-EVENT-EAP-NOTIFICATION "
+/** EAP authentication started (EAP-Request/Identity received) */
+#define WPA_EVENT_EAP_STARTED "CTRL-EVENT-EAP-STARTED "
+/** EAP method proposed by the server */
+#define WPA_EVENT_EAP_PROPOSED_METHOD "CTRL-EVENT-EAP-PROPOSED-METHOD "
+/** EAP method selected */
+#define WPA_EVENT_EAP_METHOD "CTRL-EVENT-EAP-METHOD "
+/** EAP peer certificate from TLS */
+#define WPA_EVENT_EAP_PEER_CERT "CTRL-EVENT-EAP-PEER-CERT "
+/** EAP TLS certificate chain validation error */
+#define WPA_EVENT_EAP_TLS_CERT_ERROR "CTRL-EVENT-EAP-TLS-CERT-ERROR "
+/** EAP status */
+#define WPA_EVENT_EAP_STATUS "CTRL-EVENT-EAP-STATUS "
+/** EAP authentication completed successfully */
+#define WPA_EVENT_EAP_SUCCESS "CTRL-EVENT-EAP-SUCCESS "
+/** EAP authentication failed (EAP-Failure received) */
+#define WPA_EVENT_EAP_FAILURE "CTRL-EVENT-EAP-FAILURE "
+/** Network block temporarily disabled (e.g., due to authentication failure) */
+#define WPA_EVENT_TEMP_DISABLED "CTRL-EVENT-SSID-TEMP-DISABLED "
+/** Temporarily disabled network block re-enabled */
+#define WPA_EVENT_REENABLED "CTRL-EVENT-SSID-REENABLED "
+/** New scan results available */
+#define WPA_EVENT_SCAN_RESULTS "CTRL-EVENT-SCAN-RESULTS "
+/** wpa_supplicant state change */
+#define WPA_EVENT_STATE_CHANGE "CTRL-EVENT-STATE-CHANGE "
+/** A new BSS entry was added (followed by BSS entry id and BSSID) */
+#define WPA_EVENT_BSS_ADDED "CTRL-EVENT-BSS-ADDED "
+/** A BSS entry was removed (followed by BSS entry id and BSSID) */
+#define WPA_EVENT_BSS_REMOVED "CTRL-EVENT-BSS-REMOVED "
+#ifdef ANDROID_P2P
+/** Notify the Userspace about the freq conflict */
+#define WPA_EVENT_FREQ_CONFLICT "CTRL-EVENT-FREQ-CONFLICT "
+#endif
+
+/** RSN IBSS 4-way handshakes completed with specified peer */
+#define IBSS_RSN_COMPLETED "IBSS-RSN-COMPLETED "
+
+/** WPS overlap detected in PBC mode */
+#define WPS_EVENT_OVERLAP "WPS-OVERLAP-DETECTED "
+/** Available WPS AP with active PBC found in scan results */
+#define WPS_EVENT_AP_AVAILABLE_PBC "WPS-AP-AVAILABLE-PBC "
+/** Available WPS AP with our address as authorized in scan results */
+#define WPS_EVENT_AP_AVAILABLE_AUTH "WPS-AP-AVAILABLE-AUTH "
+/** Available WPS AP with recently selected PIN registrar found in scan results
+ */
+#define WPS_EVENT_AP_AVAILABLE_PIN "WPS-AP-AVAILABLE-PIN "
+/** Available WPS AP found in scan results */
+#define WPS_EVENT_AP_AVAILABLE "WPS-AP-AVAILABLE "
+/** A new credential received */
+#define WPS_EVENT_CRED_RECEIVED "WPS-CRED-RECEIVED "
+/** M2D received */
+#define WPS_EVENT_M2D "WPS-M2D "
+/** WPS registration failed after M2/M2D */
+#define WPS_EVENT_FAIL "WPS-FAIL "
+/** WPS registration completed successfully */
+#define WPS_EVENT_SUCCESS "WPS-SUCCESS "
+/** WPS enrollment attempt timed out and was terminated */
+#define WPS_EVENT_TIMEOUT "WPS-TIMEOUT "
+/* PBC mode was activated */
+#define WPS_EVENT_ACTIVE "WPS-PBC-ACTIVE "
+/* PBC mode was disabled */
+#define WPS_EVENT_DISABLE "WPS-PBC-DISABLE "
+
+#define WPS_EVENT_ENROLLEE_SEEN "WPS-ENROLLEE-SEEN "
+
+#define WPS_EVENT_OPEN_NETWORK "WPS-OPEN-NETWORK "
+
+/* WPS ER events */
+#define WPS_EVENT_ER_AP_ADD "WPS-ER-AP-ADD "
+#define WPS_EVENT_ER_AP_REMOVE "WPS-ER-AP-REMOVE "
+#define WPS_EVENT_ER_ENROLLEE_ADD "WPS-ER-ENROLLEE-ADD "
+#define WPS_EVENT_ER_ENROLLEE_REMOVE "WPS-ER-ENROLLEE-REMOVE "
+#define WPS_EVENT_ER_AP_SETTINGS "WPS-ER-AP-SETTINGS "
+#define WPS_EVENT_ER_SET_SEL_REG "WPS-ER-AP-SET-SEL-REG "
+
+/** P2P device found */
+#define P2P_EVENT_DEVICE_FOUND "P2P-DEVICE-FOUND "
+
+/** P2P device lost */
+#define P2P_EVENT_DEVICE_LOST "P2P-DEVICE-LOST "
+
+/** A P2P device requested GO negotiation, but we were not ready to start the
+ * negotiation */
+#define P2P_EVENT_GO_NEG_REQUEST "P2P-GO-NEG-REQUEST "
+#define P2P_EVENT_GO_NEG_SUCCESS "P2P-GO-NEG-SUCCESS "
+#define P2P_EVENT_GO_NEG_FAILURE "P2P-GO-NEG-FAILURE "
+#define P2P_EVENT_GROUP_FORMATION_SUCCESS "P2P-GROUP-FORMATION-SUCCESS "
+#define P2P_EVENT_GROUP_FORMATION_FAILURE "P2P-GROUP-FORMATION-FAILURE "
+#define P2P_EVENT_GROUP_STARTED "P2P-GROUP-STARTED "
+#define P2P_EVENT_GROUP_REMOVED "P2P-GROUP-REMOVED "
+#define P2P_EVENT_CROSS_CONNECT_ENABLE "P2P-CROSS-CONNECT-ENABLE "
+#define P2P_EVENT_CROSS_CONNECT_DISABLE "P2P-CROSS-CONNECT-DISABLE "
+/* parameters: <peer address> <PIN> */
+#define P2P_EVENT_PROV_DISC_SHOW_PIN "P2P-PROV-DISC-SHOW-PIN "
+/* parameters: <peer address> */
+#define P2P_EVENT_PROV_DISC_ENTER_PIN "P2P-PROV-DISC-ENTER-PIN "
+/* parameters: <peer address> */
+#define P2P_EVENT_PROV_DISC_PBC_REQ "P2P-PROV-DISC-PBC-REQ "
+/* parameters: <peer address> */
+#define P2P_EVENT_PROV_DISC_PBC_RESP "P2P-PROV-DISC-PBC-RESP "
+/* parameters: <peer address> <status> */
+#define P2P_EVENT_PROV_DISC_FAILURE "P2P-PROV-DISC-FAILURE"
+/* parameters: <freq> <src addr> <dialog token> <update indicator> <TLVs> */
+#define P2P_EVENT_SERV_DISC_REQ "P2P-SERV-DISC-REQ "
+/* parameters: <src addr> <update indicator> <TLVs> */
+#define P2P_EVENT_SERV_DISC_RESP "P2P-SERV-DISC-RESP "
+#define P2P_EVENT_INVITATION_RECEIVED "P2P-INVITATION-RECEIVED "
+#define P2P_EVENT_INVITATION_RESULT "P2P-INVITATION-RESULT "
+#define P2P_EVENT_FIND_STOPPED "P2P-FIND-STOPPED "
+#define P2P_EVENT_PERSISTENT_PSK_FAIL "P2P-PERSISTENT-PSK-FAIL id="
+
+/* parameters: <PMF enabled> <timeout in ms> <Session Information URL> */
+#define ESS_DISASSOC_IMMINENT "ESS-DISASSOC-IMMINENT "
+
+#define INTERWORKING_AP "INTERWORKING-AP "
+#define INTERWORKING_NO_MATCH "INTERWORKING-NO-MATCH "
+
+#define GAS_RESPONSE_INFO "GAS-RESPONSE-INFO "
+
+/* hostapd control interface - fixed message prefixes */
+#define WPS_EVENT_PIN_NEEDED "WPS-PIN-NEEDED "
+#define WPS_EVENT_NEW_AP_SETTINGS "WPS-NEW-AP-SETTINGS "
+#define WPS_EVENT_REG_SUCCESS "WPS-REG-SUCCESS "
+#define WPS_EVENT_AP_SETUP_LOCKED "WPS-AP-SETUP-LOCKED "
+#define WPS_EVENT_AP_SETUP_UNLOCKED "WPS-AP-SETUP-UNLOCKED "
+#define WPS_EVENT_AP_PIN_ENABLED "WPS-AP-PIN-ENABLED "
+#define WPS_EVENT_AP_PIN_DISABLED "WPS-AP-PIN-DISABLED "
+#define AP_STA_CONNECTED "AP-STA-CONNECTED "
+#define AP_STA_DISCONNECTED "AP-STA-DISCONNECTED "
+
+#define AP_REJECTED_MAX_STA "AP-REJECTED-MAX-STA "
+#define AP_REJECTED_BLOCKED_STA "AP-REJECTED-BLOCKED-STA "
+
+/* BSS command information masks */
+
+#define WPA_BSS_MASK_ALL               0xFFFDFFFF
+#define WPA_BSS_MASK_ID                        BIT(0)
+#define WPA_BSS_MASK_BSSID             BIT(1)
+#define WPA_BSS_MASK_FREQ              BIT(2)
+#define WPA_BSS_MASK_BEACON_INT                BIT(3)
+#define WPA_BSS_MASK_CAPABILITIES      BIT(4)
+#define WPA_BSS_MASK_QUAL              BIT(5)
+#define WPA_BSS_MASK_NOISE             BIT(6)
+#define WPA_BSS_MASK_LEVEL             BIT(7)
+#define WPA_BSS_MASK_TSF               BIT(8)
+#define WPA_BSS_MASK_AGE               BIT(9)
+#define WPA_BSS_MASK_IE                        BIT(10)
+#define WPA_BSS_MASK_FLAGS             BIT(11)
+#define WPA_BSS_MASK_SSID              BIT(12)
+#define WPA_BSS_MASK_WPS_SCAN          BIT(13)
+#define WPA_BSS_MASK_P2P_SCAN          BIT(14)
+#define WPA_BSS_MASK_INTERNETW         BIT(15)
+#define WPA_BSS_MASK_WIFI_DISPLAY      BIT(16)
+#define WPA_BSS_MASK_DELIM             BIT(17)
+
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif /* WPA_CTRL_H */
index 016207795eedabb15fbbc27f6b1c2ea530bbed15..b592279098b5c8c58911b9babb88faea366e6286 100644 (file)
@@ -13,9 +13,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/aes.h"
 #include "crypto/aes_wrap.h"
 
index 46371c555714e0e077454311de611df85e22cd86..5cea5f745f93dacccc4240b79fbfcb6807fd0938 100644 (file)
@@ -21,9 +21,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 #include "crypto/aes_i.h"
 
index 7b1080c450fb008e7c27a90165d18378b91459e4..5b714fedbabc4f98e6348c9896acb55b5438c111 100644 (file)
@@ -21,8 +21,8 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
-#include "crypto/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 #include "crypto/aes_i.h"
 
index 9618239f93e5d75442cb3698ba388f71856392f0..537d4034a71b6b853362309637871b860f8adc29 100644 (file)
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-//#include "wpa/common.h"
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 #include "crypto/aes_i.h"
 
index 4a92f1cd31b03f852e31de747a4cf123a5193f0b..2e5a0a1c5f431af58f55eb16a06672869e4481ad 100644 (file)
@@ -13,9 +13,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/aes.h"
 #include "crypto/aes_wrap.h"
 
index 388dd97a82fb161d3db92f3faa4d2943f222d05a..40eb98c546cf1b6706e606c8baa44ee65cfd1259 100644 (file)
@@ -7,9 +7,9 @@
  * See README for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/aes.h"
 #include "crypto/aes_wrap.h"
 
similarity index 99%
rename from components/wpa_supplicant/include/crypto/aes_i.h
rename to components/wpa_supplicant/src/crypto/aes_i.h
index 1063422a8100348bd59f457686be878a4a595d1b..290ac423bdb241c9883b7750a3234b54e72a4353 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef AES_I_H
 #define AES_I_H
 
-#include "aes.h"
+#include "crypto/aes.h"
 
 /* #define FULL_UNROLL */
 #define AES_SMALL_TABLES
index 7b8446c3baee4daf390eb2d9cc8e22568af66863..12a273e5ff9c063f5433c1138e2feaef593f6199 100644 (file)
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
-#include "crypto/common.h"
-#include "wpa/wpabuf.h"
-#include "wpa/wpa_debug.h"
+#include "utils/includes.h"
+#include "utils/common.h"
+#include "utils/wpabuf.h"
+#include "utils/wpa_debug.h"
 #include "bignum.h"
 
 #define CONFIG_INTERNAL_LIBTOMMATH 
index 7d89795797bad8bc650380906f9044e492de023a..f197aa35e2119215d3b9e9f9beaf19adef400481 100644 (file)
@@ -6,21 +6,13 @@
  * See README for more details.
  */
 
-//#include "wpa/includes.h"
-
-//#include "wpa/common.h"
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 #include "crypto/aes.h"
 #if defined(CONFIG_DES) || defined(CONFIG_DES3)
 #include "crypto/des_i.h"
 #endif
 
-#ifdef MEMLEAK_DEBUG
-static const char mem_debug_file[] ICACHE_RODATA_ATTR = __FILE__;
-#endif
-
-
 struct crypto_cipher {
        enum crypto_cipher_alg alg;
        union {
index ea978570057a66b788996d384ae170c0b3916672..2bf67df34cf6acb0bef5c63fb3570381b2258607 100644 (file)
@@ -12,9 +12,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "bignum.h"
 #include "crypto/crypto.h"
 
index 19934f063bb60102ba2787b31e6cf1a44081f60e..de7c8091e987b2e47328b2e1ec3f8492afc8ff47 100644 (file)
@@ -6,16 +6,16 @@
  * See README for more details.
  */
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 
-#include "wpa/includes.h"
-#include "wpa/common.h"
-#include "wpa/wpa_debug.h"
+#include "utils/includes.h"
+#include "utils/common.h"
+#include "utils/wpa_debug.h"
 
-#include "wpa2/tls/rsa.h"
-#include "wpa2/tls/pkcs1.h"
-#include "wpa2/tls/pkcs8.h"
+#include "tls/rsa.h"
+#include "tls/pkcs1.h"
+#include "tls/pkcs8.h"
 
 /* Dummy structures; these are just typecast to struct crypto_rsa_key */
 struct crypto_public_key;
index d8d59dfb9de74deb2a874c52a4382504b7774699..5a1d5951ceade719a6770c232faabbcff4d4bd0d 100644 (file)
@@ -6,19 +6,12 @@
  * See README for more details.
  */
 
-#include "crypto/includes.h"
-#include "crypto/common.h"
-//#include "wpa/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
-//#include "crypto/sha256_i.h"
 #include "crypto/sha1_i.h"
 #include "crypto/md5_i.h"
 
-#ifdef MEMLEAK_DEBUG
-static const char mem_debug_file[] ICACHE_RODATA_ATTR = __FILE__;
-#endif
-
-
 struct crypto_hash {
        enum crypto_hash_alg alg;
        union {
index 7bbee6d25386c057ec4fb63ef23ae8e0cf404b68..315a6834ffef5a8893ced9de865ccd70f521cea8 100644 (file)
@@ -17,8 +17,8 @@
 #include "mbedtls/bignum.h"
 #endif
 
-#include "crypto/includes.h"
-#include "crypto/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 
 #include "mbedtls/ecp.h"
index a29c21a1bbbf8cdc2cebfd74a49e19b5643afc58..7c66412286fd48ce26aba8dbbe3fd20ced75fa62 100644 (file)
@@ -9,9 +9,9 @@
  */
 
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 //#include "des_i.h"
 
diff --git a/components/wpa_supplicant/src/crypto/des_i.h b/components/wpa_supplicant/src/crypto/des_i.h
new file mode 100644 (file)
index 0000000..c9563d2
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * DES and 3DES-EDE ciphers
+ * Copyright (c) 2006-2009, Jouni Malinen <j@w1.fi>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#ifndef DES_I_H
+#define DES_I_H
+
+struct des3_key_s {
+       u32 ek[3][32];
+       u32 dk[3][32];
+};
+
+void des_key_setup(const u8 *key, u32 *ek, u32 *dk);
+void des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt);
+void des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain);
+
+void des3_key_setup(const u8 *key, struct des3_key_s *dkey);
+void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt);
+void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain);
+
+#endif /* DES_I_H */
index 710f5c7d02d5fd781c2924966e6404fe2c453d47..5ae75da2e1979ad99949a9fe8a81be955723bec7 100644 (file)
@@ -12,9 +12,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/dh_groups.h"
 #include "crypto/dh_group5.h"
 
index c08f8f29dfdb2bea1737510e2d354e871f7a325f..9f85846034955f30ae78df131b0030c1853b8c4d 100644 (file)
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 #include "crypto/random.h"
 #include "crypto/dh_groups.h"
-#include "wpa/wpabuf.h"
-#include "wpa/wpa_debug.h"
+#include "utils/wpabuf.h"
+#include "utils/wpa_debug.h"
 #include "esp_wifi_crypto_types.h"
 
-extern wps_crypto_funcs_t wps_crypto_funcs;
-
 #ifdef ALL_DH_GROUPS
 
 /* RFC 4306, B.1. Group 1 - 768 Bit MODP
@@ -588,16 +586,10 @@ dh_init(const struct dh_group *dh, struct wpabuf **priv)
        if (pv == NULL)
                return NULL;
 
-       if (wps_crypto_funcs.crypto_mod_exp) {
-               if (wps_crypto_funcs.crypto_mod_exp(dh->generator, dh->generator_len,
-                                                   wpabuf_head(*priv), wpabuf_len(*priv),
-                                                   dh->prime, dh->prime_len, wpabuf_mhead(pv),
-                                                   &pv_len)) {
-                       wpabuf_free(pv);
-                       wpa_printf(MSG_INFO, "DH: crypto_mod_exp failed");
-                       return NULL;
-               }
-       } else {
+       if (fast_crypto_mod_exp(dh->generator, dh->generator_len,
+                                               wpabuf_head(*priv), wpabuf_len(*priv),
+                                               dh->prime, dh->prime_len, wpabuf_mhead(pv),
+                                               &pv_len)) {
                wpabuf_free(pv);
                wpa_printf(MSG_INFO, "DH: crypto_mod_exp failed");
                return NULL;
@@ -632,16 +624,10 @@ dh_derive_shared(const struct wpabuf *peer_public,
        if (shared == NULL)
                return NULL;
 
-       if (wps_crypto_funcs.crypto_mod_exp) {
-               if (wps_crypto_funcs.crypto_mod_exp(wpabuf_head(peer_public), wpabuf_len(peer_public),
-                                                   wpabuf_head(own_private), wpabuf_len(own_private),
-                                                   dh->prime, dh->prime_len,
-                                                   wpabuf_mhead(shared), &shared_len)) {
-                       wpabuf_free(shared);
-                       wpa_printf(MSG_INFO, "DH: crypto_mod_exp failed");
-                       return NULL;
-               }
-       } else {
+       if (fast_crypto_mod_exp(wpabuf_head(peer_public), wpabuf_len(peer_public),
+                                               wpabuf_head(own_private), wpabuf_len(own_private),
+                                               dh->prime, dh->prime_len,
+                                               wpabuf_mhead(shared), &shared_len)) {
                wpabuf_free(shared);
                wpa_printf(MSG_INFO, "DH: crypto_mod_exp failed");
                return NULL;
index a3ad58129a6f95d75e879a31ee3f340d02ac757f..cc988492d3f1458437afd8bf25764f46811828f8 100644 (file)
@@ -4,8 +4,8 @@
  * This software may be distributed under the terms of BSD license.
  */
 
-#include "crypto/includes.h"
-#include "crypto/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 
 #define MD4_BLOCK_LENGTH       64
index a430e297a5ac2d48e8e7aafa415f7d01b93cbeb9..3a98b36d49186a237c7773daa64d37162458986f 100644 (file)
@@ -12,9 +12,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/md5.h"
 #include "crypto/md5_i.h"
 #include "crypto/crypto.h"
index 3125c98311c5825c88ea14c23280edc47e801b67..3a0574296184b7098657b8e5a4f50f8de2953291 100644 (file)
@@ -12,9 +12,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/md5.h"
 #include "crypto/crypto.h"
 
index 038f5af950ecdb26ee74aea186ef076c3e8e35bc..191aa2bcf2d6d27e43be9ae92907629020d29fd4 100644 (file)
@@ -7,9 +7,9 @@
  */
 
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/sha1.h"
 #include "crypto/ms_funcs.h"
 #include "crypto/crypto.h"
index 678632297f0e64e28ee711e739dad3e5a8ca6c8e..aa914dcc727285e9aa2ea92edd5bdff533cf7aa3 100644 (file)
@@ -12,9 +12,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 
 #define S_SWAP(a,b) do { u8 t = S[a]; S[a] = S[b]; S[b] = t; } while(0)
index a1c255e416090ebe7326ad11f9123e7799243703..9eb190039e8eec93e856da0e10c3121f351c3234 100644 (file)
@@ -12,9 +12,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/sha1.h"
 #include "crypto/sha1_i.h"
 #include "crypto/md5.h"
index 915a23aa78eaa710c08dc3b14aa5930347ca4bdc..ec7100142c6e9e4844329ae94e93b97ef866b26e 100644 (file)
@@ -12,8 +12,8 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
-#include "crypto/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 #include "crypto/sha1.h"
 #include "crypto/md5.h"
 #include "crypto/crypto.h"
index 3d6da417ac54e29c3cb1090061714faee0a02d01..5b228292b289fcef288bc9893ec94d58a9b75b01 100644 (file)
@@ -12,9 +12,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/sha1.h"
 #include "crypto/crypto.h"
 
index 9a1fca1c1720bfc4869ec5eed3a56f2490c0998c..376dbd98f238439399366459a641cc861712bbbf 100644 (file)
@@ -12,9 +12,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/sha256.h"
 #include "crypto/crypto.h"
 
index f62cc118272929b28c2c4bb12d9887fb7002ee4f..49f248c3349d8ea524229c40b0db0ca04eb49ed9 100644 (file)
@@ -12,9 +12,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/sha256.h"
 #include "crypto/crypto.h"
 
similarity index 89%
rename from components/wpa_supplicant/src/wpa2/eap_peer/chap.c
rename to components/wpa_supplicant/src/eap_peer/chap.c
index eb613ca4c14440f0b236364ff735257d3c275e6c..f48db98193ecbb6c85aee46ebed70435dc46f5cb 100644 (file)
@@ -4,8 +4,8 @@
  */
 #ifdef CHAP_MD5
 
-#include "wpa/includes.h"
-#include "wpa/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 #include "wpa2/eap_peer/chap.h"
 
similarity index 73%
rename from components/wpa_supplicant/src/wpa2/eap_peer/eap.c
rename to components/wpa_supplicant/src/eap_peer/eap.c
index 3ddd294274ab0a9e4da07001ffddb94761348ab2..114985c9e5a038e2740a15502e640ae6e6c8604d 100644 (file)
      
 #include "esp_err.h"
 
-#include "wpa/includes.h"
-#include "wpa/common.h"
-#include "wpa/wpa_debug.h"
-#include "wpa/eapol_common.h"
-#include "wpa/ieee802_11_defs.h"
-#include "wpa/state_machine.h"
-#include "wpa/wpa.h"
+#include "utils/includes.h"
+#include "utils/common.h"
+#include "utils/wpa_debug.h"
+#include "common/eapol_common.h"
+#include "common/ieee802_11_defs.h"
+#include "utils/state_machine.h"
+#include "rsn_supp/wpa.h"
 
 #include "crypto/crypto.h"
 
-#include "wpa2/utils/ext_password.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/eap_peer/eap_i.h"
-#include "wpa2/eap_peer/eap_config.h"
-#include "wpa2/eap_peer/eap.h"
-#include "wpa2/eap_peer/eap_tls.h"
+#include "utils/ext_password.h"
+#include "tls/tls.h"
+#include "eap_peer/eap_i.h"
+#include "eap_peer/eap_config.h"
+#include "eap_peer/eap.h"
+#include "eap_peer/eap_tls.h"
+#include "esp_supplicant/esp_wifi_driver.h"
 #ifdef EAP_PEER_METHOD
-#include "wpa2/eap_peer/eap_methods.h"
+#include "eap_peer/eap_methods.h"
 #endif
 
+#include "supplicant_opt.h"
+
 
-static bool gl_disable_time_check = true;
 void eap_peer_config_deinit(struct eap_sm *sm);
 void eap_peer_blob_deinit(struct eap_sm *sm);
 void eap_deinit_prev_method(struct eap_sm *sm, const char *txt);
 
-extern bool ieee80211_unregister_wpa2_cb(void);
-
 #ifdef EAP_PEER_METHOD
 static struct eap_method *eap_methods = NULL;
 
@@ -333,7 +333,7 @@ struct wpabuf * eap_sm_build_nak(struct eap_sm *sm, EapType type, u8 id)
 #endif
 
 int eap_peer_config_init(
-       struct eap_sm *sm, u8 *private_key_passwd,
+       struct eap_sm *sm, const u8 *private_key_passwd,
        int private_key_passwd_len)
 {
        if (!sm)
@@ -478,8 +478,6 @@ void eap_sm_abort(struct eap_sm *sm)
 {
        wpabuf_free(sm->lastRespData);
        sm->lastRespData = NULL;
-       //os_free(sm->eapKeyData);
-       //sm->eapKeyData = NULL;
 }
 
 /**
@@ -559,184 +557,3 @@ const struct wpa_config_blob * eap_get_config_blob(struct eap_sm *sm,
        return NULL;
 }
 
-esp_err_t esp_wifi_sta_wpa2_ent_set_cert_key(const unsigned char *client_cert, int client_cert_len, const unsigned char *private_key, int private_key_len, const unsigned char *private_key_passwd, int private_key_passwd_len)
-{
-       if (client_cert && client_cert_len > 0) {
-               g_wpa_client_cert = client_cert;
-               g_wpa_client_cert_len = client_cert_len;
-       }
-       if (private_key && private_key_len > 0) {
-               g_wpa_private_key = private_key;
-               g_wpa_private_key_len = private_key_len;
-       } 
-       if (private_key_passwd && private_key_passwd_len > 0) {
-               g_wpa_private_key_passwd = private_key_passwd;
-               g_wpa_private_key_passwd_len = private_key_passwd_len;
-       }
-
-       return ESP_OK;
-}
-
-void esp_wifi_sta_wpa2_ent_clear_cert_key(void)
-{
-       ieee80211_unregister_wpa2_cb();
-
-    g_wpa_client_cert = NULL;
-    g_wpa_client_cert_len = 0;
-    g_wpa_private_key = NULL;
-    g_wpa_private_key_len = 0;
-    g_wpa_private_key_passwd = NULL;
-    g_wpa_private_key_passwd_len = 0;
-}
-
-esp_err_t esp_wifi_sta_wpa2_ent_set_ca_cert(const unsigned char *ca_cert, int ca_cert_len)
-{
-       if (ca_cert && ca_cert_len > 0) {
-               g_wpa_ca_cert = ca_cert;
-               g_wpa_ca_cert_len = ca_cert_len;        
-       }
-
-       return ESP_OK;
-}
-
-void esp_wifi_sta_wpa2_ent_clear_ca_cert(void)
-{
-       g_wpa_ca_cert = NULL;
-       g_wpa_ca_cert_len = 0;
-}
-
-#define ANONYMOUS_ID_LEN_MAX 128
-esp_err_t esp_wifi_sta_wpa2_ent_set_identity(const unsigned char *identity, int len)
-{
-       if (len <= 0 || len > ANONYMOUS_ID_LEN_MAX) {
-               return ESP_ERR_INVALID_ARG;
-       }
-
-       if (g_wpa_anonymous_identity) {
-               os_free(g_wpa_anonymous_identity);
-               g_wpa_anonymous_identity = NULL;
-       }
-
-       g_wpa_anonymous_identity = (u8 *)os_zalloc(len);
-       if (g_wpa_anonymous_identity == NULL) {
-               return ESP_ERR_NO_MEM;
-       }
-
-       os_memcpy(g_wpa_anonymous_identity, identity, len);
-       g_wpa_anonymous_identity_len = len;
-
-       return ESP_OK;
-}
-
-void esp_wifi_sta_wpa2_ent_clear_identity(void)
-{
-       if (g_wpa_anonymous_identity)
-               os_free(g_wpa_anonymous_identity);
-
-       g_wpa_anonymous_identity = NULL;
-       g_wpa_anonymous_identity_len = 0;
-}
-
-#define USERNAME_LEN_MAX 128
-esp_err_t esp_wifi_sta_wpa2_ent_set_username(const unsigned char *username, int len)
-{
-       if (len <= 0 || len > USERNAME_LEN_MAX)
-               return ESP_ERR_INVALID_ARG;
-
-       if (g_wpa_username) {
-               os_free(g_wpa_username);
-               g_wpa_username = NULL;
-       }
-
-       g_wpa_username = (u8 *)os_zalloc(len);
-       if (g_wpa_username == NULL)
-               return ESP_ERR_NO_MEM;
-
-       os_memcpy(g_wpa_username, username, len);
-       g_wpa_username_len = len;
-
-       return ESP_OK;
-}
-
-void esp_wifi_sta_wpa2_ent_clear_username(void)
-{
-       if (g_wpa_username)
-               os_free(g_wpa_username);
-
-       g_wpa_username = NULL;
-       g_wpa_username_len = 0;
-}
-
-esp_err_t esp_wifi_sta_wpa2_ent_set_password(const unsigned char *password, int len)
-{
-       if (len <= 0)
-               return ESP_ERR_INVALID_ARG;
-
-       if (g_wpa_password) {
-               os_free(g_wpa_password);
-               g_wpa_password = NULL;
-       }
-
-       g_wpa_password = (u8 *)os_zalloc(len);
-       if (g_wpa_password == NULL)
-               return ESP_ERR_NO_MEM;
-
-       os_memcpy(g_wpa_password, password, len);
-       g_wpa_password_len = len;
-
-       return ESP_OK;
-}
-
-void esp_wifi_sta_wpa2_ent_clear_password(void)
-{
-       if (g_wpa_password)
-               os_free(g_wpa_password);
-       g_wpa_password = NULL;
-       g_wpa_password_len = 0;
-}
-
-esp_err_t esp_wifi_sta_wpa2_ent_set_new_password(const unsigned char *new_password, int len)
-{
-       if (len <= 0)
-               return ESP_ERR_INVALID_ARG;
-
-       if (g_wpa_new_password) {
-               os_free(g_wpa_new_password);
-               g_wpa_new_password = NULL;
-       }
-
-       g_wpa_new_password = (u8 *)os_zalloc(len);
-       if (g_wpa_new_password == NULL)
-               return ESP_ERR_NO_MEM;
-
-       os_memcpy(g_wpa_new_password, new_password, len);
-       g_wpa_password_len = len;
-
-       return ESP_OK;
-}
-
-void esp_wifi_sta_wpa2_ent_clear_new_password(void)
-{
-       if (g_wpa_new_password)
-               os_free(g_wpa_new_password);
-       g_wpa_new_password = NULL;
-       g_wpa_new_password_len = 0;
-}
-
-esp_err_t esp_wifi_sta_wpa2_ent_set_disable_time_check(bool disable)
-{
-       gl_disable_time_check = disable;
-       return ESP_OK;
-}
-
-bool wifi_sta_get_enterprise_disable_time_check(void)
-{
-       return gl_disable_time_check;
-}
-
-esp_err_t esp_wifi_sta_wpa2_ent_get_disable_time_check(bool *disable)
-{
-       *disable = wifi_sta_get_enterprise_disable_time_check();
-       return ESP_OK;
-}
-
similarity index 92%
rename from components/wpa_supplicant/include/wpa2/eap_peer/eap.h
rename to components/wpa_supplicant/src/eap_peer/eap.h
index 9e1c3efa94f826993ecb907b03e33d7e90e3a4e8..4e84ea7fc78b6a2215d7a3dcc7aa5253ae76541e 100644 (file)
@@ -9,8 +9,8 @@
 #ifndef EAP_H
 #define EAP_H
 
-#include "wpa/defs.h"
-#include "wpa2/eap_peer/eap_defs.h"
+#include "common/defs.h"
+#include "eap_peer/eap_defs.h"
 
 struct eap_sm;
 
@@ -45,7 +45,7 @@ struct wpabuf * eap_sm_build_nak(struct eap_sm *sm, EapType type, u8 id);
 int eap_peer_blob_init(struct eap_sm *sm);
 void eap_peer_blob_deinit(struct eap_sm *sm);
 int eap_peer_config_init(
-       struct eap_sm *sm, u8 *private_key_passwd,
+       struct eap_sm *sm, const u8 *private_key_passwd,
        int private_key_passwd_len);
 void eap_peer_config_deinit(struct eap_sm *sm);
 void eap_sm_abort(struct eap_sm *sm);
similarity index 97%
rename from components/wpa_supplicant/src/wpa2/eap_peer/eap_common.c
rename to components/wpa_supplicant/src/eap_peer/eap_common.c
index a1748b140f26b9818f99ef502fefd23f553f88fe..e6973fac6e02bbcea411c593655f813bf5f5c641 100644 (file)
@@ -6,11 +6,11 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
-#include "wpa2/eap_peer/eap_defs.h"
-#include "wpa2/eap_peer/eap_common.h"
+#include "utils/common.h"
+#include "eap_peer/eap_defs.h"
+#include "eap_peer/eap_common.h"
 
 /**
  * eap_hdr_len_valid - Validate EAP header length field
similarity index 96%
rename from components/wpa_supplicant/include/wpa2/eap_peer/eap_common.h
rename to components/wpa_supplicant/src/eap_peer/eap_common.h
index 38c57100584ce80f8bbcf05552acfefc0f243dba..b7b8afcc5040c9f5813233bfeac03a25f0704f16 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef EAP_COMMON_H
 #define EAP_COMMON_H
 
-#include "wpa/wpabuf.h"
+#include "utils/wpabuf.h"
 
 int eap_hdr_len_valid(const struct wpabuf *msg, size_t min_payload);
 const u8 * eap_hdr_validate(int vendor, EapType eap_type,
similarity index 99%
rename from components/wpa_supplicant/include/wpa2/eap_peer/eap_config.h
rename to components/wpa_supplicant/src/eap_peer/eap_config.h
index f95dcda3a120d918c8775e745b89e0c742dc78a9..3698e732520c7b1be271f4fff6aafff29d7beab7 100644 (file)
@@ -141,7 +141,7 @@ struct eap_peer_config {
         *
         * If left out, this will be asked through control interface.
         */
-       u8 *private_key_passwd;
+       const u8 *private_key_passwd;
 
        /**
         * Phase 2
similarity index 97%
rename from components/wpa_supplicant/include/wpa2/eap_peer/eap_i.h
rename to components/wpa_supplicant/src/eap_peer/eap_i.h
index 401d3687a9f89a0ac40b8fb6bd552f7ec977c626..a55a8ae38828d61138568e7548ca8fbf06f9d2a4 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef EAP_I_H
 #define EAP_I_H
 
-#include "wpa/wpabuf.h"
+#include "utils/wpabuf.h"
 #include "eap.h"
 #include "eap_common.h"
 #include "eap_config.h"
@@ -134,7 +134,10 @@ struct eap_sm {
        const struct eap_method *m;
 };
 
-wpa2_crypto_funcs_t wpa2_crypto_funcs;
+typedef enum {
+    WPA2_STATE_ENABLED = 0,
+    WPA2_STATE_DISABLED,
+} wpa2_state_t;
 
 const u8 * eap_get_config_identity(struct eap_sm *sm, size_t *len);
 const u8 * eap_get_config_password(struct eap_sm *sm, size_t *len);
similarity index 96%
rename from components/wpa_supplicant/include/wpa2/eap_peer/eap_methods.h
rename to components/wpa_supplicant/src/eap_peer/eap_methods.h
index 7d518dec2ceb1c154da2040a575b941a789bf3eb..80a09677a4e6b445b076393ddf139e30c924f99e 100644 (file)
@@ -27,7 +27,6 @@ int eap_peer_method_register(struct eap_method *method);
 
 void eap_peer_unregister_methods(void);
 
-//int eap_peer_md5_register(void);
 int eap_peer_tls_register(void);
 int eap_peer_peap_register(void);
 int eap_peer_ttls_register(void);
similarity index 95%
rename from components/wpa_supplicant/src/wpa2/eap_peer/eap_mschapv2.c
rename to components/wpa_supplicant/src/eap_peer/eap_mschapv2.c
index b28c1eabc77d6b604b5cb01dbf79d89cb0fbe2ac..dff5aeec5c6dd3f82588f7126fa41a9436a8df4f 100644 (file)
@@ -9,18 +9,18 @@
 
 #ifdef EAP_MSCHAPv2
 
-#include "wpa/wpa.h"
-#include "wpa/includes.h"
-#include "wpa/common.h"
+#include "rsn_supp/wpa.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 #include "crypto/random.h"
 #include "crypto/ms_funcs.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/eap_peer/eap_i.h"
-#include "wpa2/eap_peer/eap_defs.h"
-#include "wpa2/eap_peer/eap_tls_common.h"
-#include "wpa2/eap_peer/eap_config.h"
-#include "wpa2/eap_peer/mschapv2.h"
-#include "wpa2/eap_peer/eap_methods.h"
+#include "tls/tls.h"
+#include "eap_peer/eap_i.h"
+#include "eap_peer/eap_defs.h"
+#include "eap_peer/eap_tls_common.h"
+#include "eap_peer/eap_config.h"
+#include "eap_peer/mschapv2.h"
+#include "eap_peer/eap_methods.h"
 
 #define MSCHAPV2_OP_CHALLENGE          1
 #define MSCHAPV2_OP_RESPONSE           2
@@ -296,7 +296,6 @@ eap_mschapv2_failure_txt(struct eap_sm *sm,
                         struct eap_mschapv2_data *data, char *txt)
 {
        char *pos; 
-       //char *msg = "";
        int retry = 1;
        struct eap_peer_config *config = eap_get_config(sm);
 
@@ -345,23 +344,15 @@ eap_mschapv2_failure_txt(struct eap_sm *sm,
 
        if (pos && os_strncmp(pos, "M=", 2) == 0) {
                pos += 2;
-               //msg = pos;
        }
-       #if 0
-       wpa_printf(MSG_WARNING, "EAP-MSCHAPV2: failure message: '%s' (retry %sallowed, error %d)",
-                 msg, retry == 1? "" : "not ", data->prev_error);
-       #endif
        if (data->prev_error == ERROR_PASSWD_EXPIRED &&
            data->passwd_change_version == 3 && config) {
                if (config->new_password == NULL) {
                        wpa_printf(MSG_DEBUG, "EAP-MSCHAPV2: Password expired - "
                                  "password change reqired\n");
-                       //eap_sm_request_new_password(sm);
                }
        } else if (retry == 1 && config) {
                if (!config->mschapv2_retry)
-                       //eap_sm_request_identity(sm);
-               //eap_sm_request_password(sm);
                config->mschapv2_retry = 1;
        } else if (config) {
                config->mschapv2_retry = 0;
@@ -493,8 +484,6 @@ eap_mschapv2_failure(struct eap_sm *sm,
                if (config && config->new_password)
                        return eap_mschapv2_change_password(sm, data, ret,
                                                            req, id);
-               //if (config && config->pending_req_new_password)
-               //      return NULL;
        } else if (retry && data->prev_error == ERROR_AUTHENTICATION_FAILURE) {
                return NULL;
        }
similarity index 98%
rename from components/wpa_supplicant/src/wpa2/eap_peer/eap_peap.c
rename to components/wpa_supplicant/src/eap_peer/eap_peap.c
index 931e2d2bf94fea05f7883d2f8a4443168236bac8..dad73ae2cb0577b3d6427491d8a9ceb87523b186 100644 (file)
@@ -5,20 +5,18 @@
  * This software may be distributed under the terms of the BSD license.
  * See README for more details.
  */
-#ifdef EAP_PEAP
-
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#ifdef EAP_PEAP
+#include "utils/common.h"
 #include "crypto/sha1.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/eap_peer/eap_tlv_common.h"
-#include "wpa2/eap_peer/eap_peap_common.h"
-#include "wpa2/eap_peer/eap_i.h"
-#include "wpa2/eap_peer/eap_tls_common.h"
-#include "wpa2/eap_peer/eap_config.h"
-#include "wpa2/eap_peer/eap_methods.h"
-//#include "tncc.h"
+#include "tls/tls.h"
+#include "eap_peer/eap_tlv_common.h"
+#include "eap_peer/eap_peap_common.h"
+#include "eap_peer/eap_i.h"
+#include "eap_peer/eap_tls_common.h"
+#include "eap_peer/eap_config.h"
+#include "eap_peer/eap_methods.h"
 
 /* Maximum supported PEAP version
  * 0 = Microsoft's PEAP version 0; draft-kamath-pppext-peapv0-00.txt
@@ -629,7 +627,6 @@ static int eap_peap_phase2_request(struct eap_sm *sm,
        size_t len = be_to_host16(hdr->length);
        u8 *pos;
        struct eap_method_ret iret;
-       //struct eap_peer_config *config = eap_get_config(sm);
 
        if (len <= sizeof(struct eap_hdr)) {
                wpa_printf(MSG_INFO, "EAP-PEAP: too short "
@@ -1111,10 +1108,8 @@ eap_peap_process(struct eap_sm *sm, void *priv,
                         * label by default, but allow it to be configured with
                         * phase1 parameter peaplabel=1. */
                        if (data->peap_version > 1 || data->force_new_label)
-                               //label = "client PEAP encryption";
                                strcpy(label, "client PEAP encryption");
                        else
-                               //label = "client EAP encryption";
                                strcpy(label, "client EAP encryption");
                        wpa_printf(MSG_DEBUG, "EAP-PEAP: using label '%s' in "
                                   "key derivation", label);
similarity index 94%
rename from components/wpa_supplicant/src/wpa2/eap_peer/eap_peap_common.c
rename to components/wpa_supplicant/src/eap_peer/eap_peap_common.c
index 9b7e7cc4b9029f15884acac6886bd500292bc3d0..2cafe719755edb34a5ce60f2fab10b204a6485e7 100644 (file)
@@ -6,13 +6,13 @@
  * See README for more details.
  */
 
-#ifdef EAP_PEAP
+#include "utils/includes.h"
 
-#include "wpa/includes.h"
+#ifdef EAP_PEAP
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/sha1.h"
-#include "wpa2/eap_peer/eap_peap_common.h"
+#include "eap_peer/eap_peap_common.h"
 
 int
 peap_prfplus(int version, const u8 *key, size_t key_len,
similarity index 95%
rename from components/wpa_supplicant/src/wpa2/eap_peer/eap_tls.c
rename to components/wpa_supplicant/src/eap_peer/eap_tls.c
index 00dabfe40a468e698aad65fade0c6d4a888c0830..c6d0bd05985ae6fcc782e62c7b4054a71ebcb80e 100644 (file)
@@ -5,17 +5,16 @@
  * This software may be distributed under the terms of the BSD license.
  * See README for more details.
  */
-#ifdef EAP_TLS
-
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/eap_peer/eap_i.h"
-#include "wpa2/eap_peer/eap_defs.h"
-#include "wpa2/eap_peer/eap_tls_common.h"
-#include "wpa2/eap_peer/eap_config.h"
-#include "wpa2/eap_peer/eap_methods.h"
+#ifdef EAP_TLS
+#include "utils/common.h"
+#include "tls/tls.h"
+#include "eap_peer/eap_i.h"
+#include "eap_peer/eap_defs.h"
+#include "eap_peer/eap_tls_common.h"
+#include "eap_peer/eap_config.h"
+#include "eap_peer/eap_methods.h"
 
 struct eap_tls_data {
        struct eap_ssl_data ssl;
similarity index 96%
rename from components/wpa_supplicant/include/wpa2/eap_peer/eap_tls.h
rename to components/wpa_supplicant/src/eap_peer/eap_tls.h
index a8a386f22c79efe4cb11dbe9a79cf3de4217b599..ca9f55d4ccde176d454a10e13d5334ef3bc0ee48 100644 (file)
@@ -12,7 +12,7 @@
 #include "eap_i.h"
 #include "eap_common.h" 
 #include "eap.h" 
-#include "wpa/wpabuf.h" 
+#include "utils/wpabuf.h" 
 
 void * eap_tls_init(struct eap_sm *sm);
 void eap_tls_deinit(struct eap_sm *sm, void *priv);
similarity index 99%
rename from components/wpa_supplicant/src/wpa2/eap_peer/eap_tls_common.c
rename to components/wpa_supplicant/src/eap_peer/eap_tls_common.c
index 2c97e6c0f01531aff81033c32d8f42fd82d2335e..213cafa13f4afdf479b85d985150d7ec10efddee 100644 (file)
@@ -6,15 +6,15 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/sha1.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/eap_peer/eap_i.h"
-#include "wpa2/eap_peer/eap_tls_common.h"
-#include "wpa2/eap_peer/eap_config.h"
-#include "wpa2/eap_peer/eap_methods.h"
+#include "tls/tls.h"
+#include "eap_peer/eap_i.h"
+#include "eap_peer/eap_tls_common.h"
+#include "eap_peer/eap_config.h"
+#include "eap_peer/eap_methods.h"
 
 static struct wpabuf * eap_tls_msg_alloc(EapType type, size_t payload_len,
                                         u8 code, u8 identifier)
similarity index 71%
rename from components/wpa_supplicant/src/wpa2/eap_peer/eap_ttls.c
rename to components/wpa_supplicant/src/eap_peer/eap_ttls.c
index cc0460d337e8d302c433b1bad56c76d47e903bf1..fb5515913e394f247320582873a061607f03d473 100644 (file)
@@ -6,23 +6,20 @@
  * See README for more details.
  */
 
-#ifdef EAP_TTLS
-
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#ifdef EAP_TTLS
+#include "utils/common.h"
 #include "crypto/ms_funcs.h"
 #include "crypto/sha1.h"
-#include "wpa2/tls/tls.h"
-//#include "eap_common/chap.h"
-#include "wpa2/eap_peer/eap.h"
-#include "wpa2/eap_peer/eap_ttls.h"
-#include "wpa2/eap_peer/mschapv2.h"
-//#include "wpa2/eap_peer/chap.h"
-#include "wpa2/eap_peer/eap_i.h"
-#include "wpa2/eap_peer/eap_tls_common.h"
-#include "wpa2/eap_peer/eap_config.h"
-#include "wpa2/eap_peer/eap_methods.h"
+#include "tls/tls.h"
+#include "eap_peer/eap.h"
+#include "eap_peer/eap_ttls.h"
+#include "eap_peer/mschapv2.h"
+#include "eap_peer/eap_i.h"
+#include "eap_peer/eap_tls_common.h"
+#include "eap_peer/eap_config.h"
+#include "eap_peer/eap_methods.h"
 
 
 #define EAP_TTLS_VERSION 0
@@ -73,7 +70,6 @@ static void * eap_ttls_init(struct eap_sm *sm)
 {
        struct eap_ttls_data *data;
        struct eap_peer_config *config = eap_get_config(sm);
-       //char *selected;
 
        data = (struct eap_ttls_data *)os_zalloc(sizeof(*data));
        if (data == NULL)
@@ -83,7 +79,6 @@ static void * eap_ttls_init(struct eap_sm *sm)
        
 /*     
     selected = "MSCHAPV2";
-       //TODO: Now only support EAP-TTLS/MSCHAPV2
        if (config && config->phase2) {
                if (os_strstr(config->phase2, "autheap=")) {
                        selected = "EAP";
@@ -187,32 +182,6 @@ static u8 * eap_ttls_avp_add(u8 *start, u8 *avphdr, u32 avp_code,
        return pos;
 }
 
-#if 0
-static int eap_ttls_avp_encapsulate(struct wpabuf **resp, u32 avp_code,
-                        int mandatory)
-{
-       struct wpabuf *msg;
-       u8 *avp, *pos;
-
-       msg = wpabuf_alloc(sizeof(struct ttls_avp) + wpabuf_len(*resp) + 4);
-       if (msg == NULL) {
-               wpabuf_free(*resp);
-               *resp = NULL;
-               return -1;
-       }
-
-       avp = wpabuf_mhead(msg);
-       pos = eap_ttls_avp_hdr(avp, avp_code, 0, mandatory, wpabuf_len(*resp));
-       os_memcpy(pos, wpabuf_head(*resp), wpabuf_len(*resp));
-       pos += wpabuf_len(*resp);
-       AVP_PAD(avp, pos);
-       wpabuf_free(*resp);
-       wpabuf_put(msg, pos - avp);
-       *resp = msg;
-       return 0;
-}
-#endif
-
 static int eap_ttls_v0_derive_key(struct eap_sm *sm,
                       struct eap_ttls_data *data)
 {
@@ -244,170 +213,6 @@ static u8 * eap_ttls_implicit_challenge(struct eap_sm *sm,
        return eap_peer_tls_derive_key(sm, &data->ssl, "ttls challenge", len);
 }
 
-#if 0
-static void eap_ttls_phase2_select_eap_method(struct eap_ttls_data *data,
-                                             u8 method)
-{
-       size_t i;
-       for (i = 0; i < data->num_phase2_eap_types; i++) {
-               if (data->phase2_eap_types[i].vendor != EAP_VENDOR_IETF ||
-                   data->phase2_eap_types[i].method != method)
-                       continue;
-
-               data->phase2_eap_type.vendor =
-                       data->phase2_eap_types[i].vendor;
-               data->phase2_eap_type.method =
-                       data->phase2_eap_types[i].method;
-               wpa_printf(MSG_DEBUG, "EAP-TTLS: Selected "
-                         "Phase 2 EAP vendor %d method %d\n",
-                         data->phase2_eap_type.vendor,
-                         data->phase2_eap_type.method);
-               break;
-       }
-}
-
-static int eap_ttls_phase2_eap_process(struct eap_sm *sm,
-                                      struct eap_ttls_data *data,
-                                      struct eap_method_ret *ret,
-                                      struct eap_hdr *hdr, size_t len,
-                                      struct wpabuf **resp)
-{
-       struct wpabuf msg;
-       struct eap_method_ret iret;
-
-       os_memset(&iret, 0, sizeof(iret));
-       wpabuf_set(&msg, hdr, len);
-       *resp = data->phase2_method->process(sm, data->phase2_priv, &iret,
-                                            &msg);
-       if ((iret.methodState == METHOD_DONE ||
-            iret.methodState == METHOD_MAY_CONT) &&
-           (iret.decision == DECISION_UNCOND_SUCC ||
-            iret.decision == DECISION_COND_SUCC ||
-            iret.decision == DECISION_FAIL)) {
-               ret->methodState = iret.methodState;
-               ret->decision = iret.decision;
-       }
-
-       return 0;
-}
-
-
-static int eap_ttls_phase2_request_eap_method(struct eap_sm *sm,
-                                             struct eap_ttls_data *data,
-                                             struct eap_method_ret *ret,
-                                             struct eap_hdr *hdr, size_t len,
-                                             u8 method, struct wpabuf **resp)
-{
-#ifdef EAP_TNC
-       if (data->tnc_started && data->phase2_method &&
-           data->phase2_priv && method == EAP_TYPE_TNC &&
-           data->phase2_eap_type.method == EAP_TYPE_TNC)
-               return eap_ttls_phase2_eap_process(sm, data, ret, hdr, len,
-                                                  resp);
-
-       if (data->ready_for_tnc && !data->tnc_started &&
-           method == EAP_TYPE_TNC) {
-               wpa_printf(MSG_DEBUG, "EAP-TTLS: Start TNC after completed "
-                         "EAP method\n");
-               data->tnc_started = 1;
-       }
-
-       if (data->tnc_started) {
-               if (data->phase2_eap_type.vendor != EAP_VENDOR_IETF ||
-                   data->phase2_eap_type.method == EAP_TYPE_TNC) {
-                       wpa_printf(MSG_ERROR, "EAP-TTLS: Unexpected EAP "
-                                 "type %d for TNC\n", method);
-                       return -1;
-               }
-
-               data->phase2_eap_type.vendor = EAP_VENDOR_IETF;
-               data->phase2_eap_type.method = method;
-               wpa_printf(MSG_DEBUG, "EAP-TTLS: Selected "
-                         "Phase 2 EAP vendor %d method %d (TNC)\n",
-                         data->phase2_eap_type.vendor,
-                          data->phase2_eap_type.method);
-
-               if (data->phase2_type == EAP_TTLS_PHASE2_EAP)
-                       eap_ttls_phase2_eap_deinit(sm, data);
-       }
-#endif /* EAP_TNC */
-
-       if (data->phase2_eap_type.vendor == EAP_VENDOR_IETF &&
-           data->phase2_eap_type.method == EAP_TYPE_NONE)
-               eap_ttls_phase2_select_eap_method(data, method);
-
-       if (method != data->phase2_eap_type.method || method == EAP_TYPE_NONE)
-       {
-               return -1;
-               if (eap_peer_tls_phase2_nak(data->phase2_eap_types,
-                                           data->num_phase2_eap_types,
-                                           hdr, resp))
-                       return -1;
-               return 0;
-
-       }
-
-       if (data->phase2_priv == NULL) {
-               data->phase2_method = eap_peer_get_eap_method(
-                       EAP_VENDOR_IETF, method);
-               if (data->phase2_method) {
-                       sm->init_phase2 = 1;
-                       data->phase2_priv = data->phase2_method->init(sm);
-                       sm->init_phase2 = 0;
-               }
-       }
-       if (data->phase2_priv == NULL || data->phase2_method == NULL) {
-               wpa_printf(MSG_ERROR, "EAP-TTLS: failed to initialize "
-                         "Phase 2 EAP method %d\n", method);
-               return -1;
-       }
-
-       return eap_ttls_phase2_eap_process(sm, data, ret, hdr, len, resp);
-}
-
-#if 0
-static int eap_ttls_phase2_request_eap(struct eap_sm *sm,
-                                      struct eap_ttls_data *data,
-                                      struct eap_method_ret *ret,
-                                      struct eap_hdr *hdr,
-                                      struct wpabuf **resp)
-{
-       size_t len = be_to_host16(hdr->length);
-       u8 *pos;
-       struct eap_peer_config *config = eap_get_config(sm);
-
-       if (len <= sizeof(struct eap_hdr)) {
-               wpa_printf(MSG_ERROR, "EAP-TTLS: too short "
-                         "Phase 2 request (len=%lu)\n", (unsigned long) len);
-               return -1;
-       }
-       pos = (u8 *) (hdr + 1);
-       wpa_printf(MSG_DEBUG, "EAP-TTLS: Phase 2 EAP Request: type=%d\n", *pos);
-       switch (*pos) {
-       case EAP_TYPE_IDENTITY:
-               *resp = eap_sm_build_identity_resp(sm, hdr->identifier, 1);
-               break;
-       default:
-               if (eap_ttls_phase2_request_eap_method(sm, data, ret, hdr, len,
-                                                      *pos, resp) < 0)
-                       return -1;
-               break;
-       }
-
-       if (*resp == NULL &&
-           (config->pending_req_identity || config->pending_req_password ||
-            config->pending_req_otp)) {
-               return 0;
-       }
-
-       if (*resp == NULL)
-               return -1;
-
-       return eap_ttls_avp_encapsulate(resp, RADIUS_ATTR_EAP_MESSAGE, 1);
-}
-#endif
-#endif
-
 static int eap_ttls_phase2_request_mschapv2(struct eap_sm *sm,
                                 struct eap_ttls_data *data,
                                 struct eap_method_ret *ret,
@@ -507,202 +312,6 @@ static int eap_ttls_phase2_request_mschapv2(struct eap_sm *sm,
 #endif /* EAP_MSCHAPv2 */
 }
 
-#if 0
-//only support MSCHAPv2
-static int eap_ttls_phase2_request_mschap(struct eap_sm *sm,
-                                         struct eap_ttls_data *data,
-                                         struct eap_method_ret *ret,
-                                         struct wpabuf **resp)
-{
-       struct wpabuf *msg;
-       u8 *buf, *pos, *challenge;
-       const u8 *identity, *password;
-       size_t identity_len, password_len;
-       int pwhash;
-
-       wpa_printf(MSG_DEBUG, "EAP-TTLS: Phase 2 MSCHAP Request\n");
-
-       identity = eap_get_config_identity(sm, &identity_len);
-       password = eap_get_config_password2(sm, &password_len, &pwhash);
-       if (identity == NULL || password == NULL)
-               return -1;
-
-       msg = wpabuf_alloc(identity_len + 1000);
-       if (msg == NULL) {
-               wpa_printf(MSG_ERROR, "EAP-TTLS/MSCHAP: Failed to allocate memory\n");
-               return -1;
-       }
-       pos = buf = wpabuf_mhead(msg);
-
-       // User-Name
-       pos = eap_ttls_avp_add(buf, pos, RADIUS_ATTR_USER_NAME, 0, 1,
-                              identity, identity_len);
-
-       // MS-CHAP-Challenge
-       challenge = eap_ttls_implicit_challenge(
-               sm, data, EAP_TTLS_MSCHAP_CHALLENGE_LEN + 1);
-       if (challenge == NULL) {
-               wpabuf_free(msg);
-               wpa_printf(MSG_ERROR, "EAP-TTLS/MSCHAP: Failed to derive "
-                         "implicit challenge\n");
-               return -1;
-       }
-
-       pos = eap_ttls_avp_add(buf, pos, RADIUS_ATTR_MS_CHAP_CHALLENGE,
-                              RADIUS_VENDOR_ID_MICROSOFT, 1,
-                              challenge, EAP_TTLS_MSCHAP_CHALLENGE_LEN);
-
-       // MS-CHAP-Response
-       pos = eap_ttls_avp_hdr(pos, RADIUS_ATTR_MS_CHAP_RESPONSE,
-                              RADIUS_VENDOR_ID_MICROSOFT, 1,
-                              EAP_TTLS_MSCHAP_RESPONSE_LEN);
-       data->ident = challenge[EAP_TTLS_MSCHAP_CHALLENGE_LEN];
-       *pos++ = data->ident;
-       *pos++ = 1; // Flags: Use NT style passwords
-       os_memset(pos, 0, 24); // LM-Response
-       pos += 24;
-       if (pwhash) {
-               challenge_response(challenge, password, pos); // NT-Response
-       } else {
-               nt_challenge_response(challenge, password, password_len,
-                                     pos); // NT-Response
-       }
-       pos += 24;
-       os_free(challenge);
-       AVP_PAD(buf, pos);
-
-       wpabuf_put(msg, pos - buf);
-       *resp = msg;
-
-       // EAP-TTLS/MSCHAP does not provide tunneled success
-       // notification, so assume that Phase2 succeeds.
-       ret->methodState = METHOD_DONE;
-       ret->decision = DECISION_COND_SUCC;
-
-       return 0;
-}
-
-
-static int eap_ttls_phase2_request_pap(struct eap_sm *sm,
-                                      struct eap_ttls_data *data,
-                                      struct eap_method_ret *ret,
-                                      struct wpabuf **resp)
-{
-       struct wpabuf *msg;
-       u8 *buf, *pos;
-       size_t pad;
-       const u8 *identity, *password;
-       size_t identity_len, password_len;
-
-       wpa_printf(MSG_DEBUG, "EAP-TTLS: Phase 2 PAP Request\n");
-
-       identity = eap_get_config_identity(sm, &identity_len);
-       password = eap_get_config_password(sm, &password_len);
-       if (identity == NULL || password == NULL)
-               return -1;
-
-       msg = wpabuf_alloc(identity_len + password_len + 100);
-       if (msg == NULL) {
-               wpa_printf(MSG_ERROR, "EAP-TTLS/PAP: Failed to allocate memory\n");
-               return -1;
-       }
-       pos = buf = wpabuf_mhead(msg);
-
-       // User-Name
-       pos = eap_ttls_avp_add(buf, pos, RADIUS_ATTR_USER_NAME, 0, 1,
-                              identity, identity_len);
-
-       // User-Password; in RADIUS, this is encrypted, but EAP-TTLS encrypts
-       // the data, so no separate encryption is used in the AVP itself.
-       // However, the password is padded to obfuscate its length.
-       pad = password_len == 0 ? 16 : (16 - (password_len & 15)) & 15;
-       pos = eap_ttls_avp_hdr(pos, RADIUS_ATTR_USER_PASSWORD, 0, 1,
-                              password_len + pad);
-       os_memcpy(pos, password, password_len);
-       pos += password_len;
-       os_memset(pos, 0, pad);
-       pos += pad;
-       AVP_PAD(buf, pos);
-
-       wpabuf_put(msg, pos - buf);
-       *resp = msg;
-
-       // EAP-TTLS/PAP does not provide tunneled success notification,
-       // so assume that Phase2 succeeds.
-       ret->methodState = METHOD_DONE;
-       ret->decision = DECISION_COND_SUCC;
-
-       return 0;
-}
-
-
-static int eap_ttls_phase2_request_chap(struct eap_sm *sm,
-                                       struct eap_ttls_data *data,
-                                       struct eap_method_ret *ret,
-                                       struct wpabuf **resp)
-{
-       struct wpabuf *msg;
-       u8 *buf, *pos, *challenge;
-       const u8 *identity, *password;
-       size_t identity_len, password_len;
-
-       wpa_printf(MSG_DEBUG, "EAP-TTLS: Phase 2 CHAP Request\n");
-
-       identity = eap_get_config_identity(sm, &identity_len);
-       password = eap_get_config_password(sm, &password_len);
-       if (identity == NULL || password == NULL)
-               return -1;
-
-       msg = wpabuf_alloc(identity_len + 1000);
-       if (msg == NULL) {
-               wpa_printf(MSG_ERROR, "EAP-TTLS/CHAP: Failed to allocate memory\n");
-               return -1;
-       }
-       pos = buf = wpabuf_mhead(msg);
-
-       // User-Name
-       pos = eap_ttls_avp_add(buf, pos, RADIUS_ATTR_USER_NAME, 0, 1,
-                              identity, identity_len);
-
-       // CHAP-Challenge
-       challenge = eap_ttls_implicit_challenge(
-               sm, data, EAP_TTLS_CHAP_CHALLENGE_LEN + 1);
-       if (challenge == NULL) {
-               wpabuf_free(msg);
-               wpa_printf(MSG_ERROR, "EAP-TTLS/CHAP: Failed to derive "
-                         "implicit challenge\n");
-               return -1;
-       }
-
-       pos = eap_ttls_avp_add(buf, pos, RADIUS_ATTR_CHAP_CHALLENGE, 0, 1,
-                              challenge, EAP_TTLS_CHAP_CHALLENGE_LEN);
-
-       // CHAP-Password
-       pos = eap_ttls_avp_hdr(pos, RADIUS_ATTR_CHAP_PASSWORD, 0, 1,
-                              1 + EAP_TTLS_CHAP_PASSWORD_LEN);
-       data->ident = challenge[EAP_TTLS_CHAP_CHALLENGE_LEN];
-       *pos++ = data->ident;
-
-       // MD5(Ident + Password + Challenge)
-       chap_md5(data->ident, password, password_len, challenge,
-                EAP_TTLS_CHAP_CHALLENGE_LEN, pos);
-
-       pos += EAP_TTLS_CHAP_PASSWORD_LEN;
-       os_free(challenge);
-       AVP_PAD(buf, pos);
-
-       wpabuf_put(msg, pos - buf);
-       *resp = msg;
-
-       // EAP-TTLS/CHAP does not provide tunneled success
-       // notification, so assume that Phase2 succeeds.
-       ret->methodState = METHOD_DONE;
-       ret->decision = DECISION_COND_SUCC;
-
-       return 0;
-}
-#endif
-
 static int eap_ttls_phase2_request(struct eap_sm *sm,
                        struct eap_ttls_data *data,
                        struct eap_method_ret *ret,
@@ -745,9 +354,7 @@ static int eap_ttls_phase2_request(struct eap_sm *sm,
            phase2_type == EAP_TTLS_PHASE2_CHAP) {
                if (eap_get_config_identity(sm, &len) == NULL) {
                        wpa_printf(MSG_ERROR, "EAP-TTLS: Identity not configured\n");
-                       //eap_sm_request_identity(sm);
                        if (eap_get_config_password(sm, &len) == NULL);
-                       //      eap_sm_request_password(sm);
             printf("[Debug] Return because no identity  EAP_TTLS_PHASE2_MSCHAPV2 EAP_TTLS_PHASE2_MSCHAP\n");
                        return 0;
                }
@@ -755,7 +362,6 @@ static int eap_ttls_phase2_request(struct eap_sm *sm,
                if (eap_get_config_password(sm, &len) == NULL) {
                        wpa_printf(MSG_ERROR, "EAP-TTLS: Password not configured\n"); 
                        printf("[Debug] Return because no password  EAP_TTLS_PHASE2_MSCHAPV2 EAP_TTLS_PHASE2_MSCHAP\n");
-                       //eap_sm_request_password(sm);
                        return 0;
                }
        }
@@ -992,61 +598,6 @@ static int eap_ttls_encrypt_response(struct eap_sm *sm,
        return 0;
 }
 
-#if 0
-static int eap_ttls_process_phase2_eap(struct eap_sm *sm,
-                                      struct eap_ttls_data *data,
-                                      struct eap_method_ret *ret,
-                                      struct ttls_parse_avp *parse,
-                                      struct wpabuf **resp)
-{
-       struct eap_hdr *hdr;
-       size_t len;
-
-       if (parse->eapdata == NULL) {
-               wpa_printf(MSG_ERROR, "EAP-TTLS: No EAP Message in the "
-                         "packet - dropped\n");
-               return -1;
-       }
-
-       hdr = (struct eap_hdr *) parse->eapdata;
-
-       if (parse->eap_len < sizeof(*hdr)) {
-               wpa_printf(MSG_ERROR, "EAP-TTLS: Too short Phase 2 EAP "
-                         "frame (len=%lu, expected %lu or more) - dropped\n",
-                         (unsigned long) parse->eap_len,
-                         (unsigned long) sizeof(*hdr));
-               return -1;
-       }
-       len = be_to_host16(hdr->length);
-       if (len > parse->eap_len) {
-               wpa_printf(MSG_ERROR, "EAP-TTLS: Length mismatch in Phase 2 "
-                         "EAP frame (EAP hdr len=%lu, EAP data len in "
-                         "AVP=%lu)\n",
-                         (unsigned long) len,
-                         (unsigned long) parse->eap_len);
-               return -1;
-       }
-       wpa_printf(MSG_DEBUG, "EAP-TTLS: received Phase 2: code=%d "
-                 "identifier=%d length=%lu\n",
-                 hdr->code, hdr->identifier, (unsigned long) len);
-       switch (hdr->code) {
-       case EAP_CODE_REQUEST:
-               if (eap_ttls_phase2_request(sm, data, ret, hdr, resp)) {
-                       wpa_printf(MSG_ERROR, "EAP-TTLS: Phase2 Request "
-                                 "processing failed\n");
-                       return -1;
-               }
-               break;
-       default:
-               wpa_printf(MSG_ERROR, "EAP-TTLS: Unexpected code=%d in "
-                         "Phase 2 EAP header\n", hdr->code);
-               return -1;
-       }
-
-       return 0;
-}
-#endif
-
 static int eap_ttls_process_phase2_mschapv2(struct eap_sm *sm,
                                 struct eap_ttls_data *data,
                                 struct eap_method_ret *ret,
@@ -1149,7 +700,6 @@ static int eap_ttls_process_decrypted(struct eap_sm *sm,
                           struct wpabuf **out_data)
 {
        struct wpabuf *resp = NULL;
-       //struct eap_peer_config *config = eap_get_config(sm);
        int res;
        enum phase2_types phase2_type = data->phase2_type;
 
@@ -1242,7 +792,6 @@ static int eap_ttls_implicit_identity_request(struct eap_sm *sm,
                          "processing failed\n");
                retval = -1;
        } else {
-               //struct eap_peer_config *config = eap_get_config(sm);
                if (resp == NULL) {/* &&
                    (config->pending_req_identity ||
                     config->pending_req_password ||
similarity index 96%
rename from components/wpa_supplicant/src/wpa2/eap_peer/mschapv2.c
rename to components/wpa_supplicant/src/eap_peer/mschapv2.c
index 33351989b5d0efc9b8f312912d2fab73295e4c5f..84859111eceffcdd75be2eaee5ecb3721625df69 100644 (file)
@@ -4,10 +4,10 @@
 
 #ifdef EAP_MSCHAPv2
 
-#include "wpa/includes.h"
-#include "wpa/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 #include "crypto/ms_funcs.h"
-#include "wpa2/eap_peer/mschapv2.h"
+#include "eap_peer/mschapv2.h"
 
 const u8 * mschapv2_remove_domain(const u8 *username, size_t *len)
 {
diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_hostap.c b/components/wpa_supplicant/src/esp_supplicant/esp_hostap.c
new file mode 100644 (file)
index 0000000..e1eca8b
--- /dev/null
@@ -0,0 +1,134 @@
+// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "utils/includes.h"
+
+#include "utils/common.h"
+#include "crypto/sha1.h"
+#include "common/ieee802_11_defs.h"
+#include "common/eapol_common.h"
+#include "ap/wpa_auth.h"
+#include "ap/ap_config.h"
+#include "utils/wpa_debug.h"
+#include "ap/hostapd.h"
+#include "ap/wpa_auth_i.h"
+#include "esp_wifi_driver.h"
+#include "esp_wifi_types.h"
+
+void *hostap_init(void)
+{
+    struct wifi_ssid *ssid = esp_wifi_ap_get_prof_ap_ssid_internal();
+    struct hostapd_data *hapd = NULL;
+    struct wpa_auth_config *auth_conf;
+    u8 mac[6];
+
+    hapd = (struct hostapd_data *)os_zalloc(sizeof(struct hostapd_data));
+
+    if (hapd == NULL) {
+        return NULL;
+    }
+
+    hapd->conf = (struct hostapd_bss_config *)os_zalloc(sizeof(struct hostapd_bss_config));
+
+    if (hapd->conf == NULL) {
+        os_free(hapd);
+        return NULL;
+    }
+
+    auth_conf = (struct wpa_auth_config *)os_zalloc(sizeof(struct  wpa_auth_config));
+
+    if (auth_conf == NULL) {
+        os_free(hapd->conf);
+        os_free(hapd);
+        hapd = NULL;
+        return NULL;
+    }
+    if (esp_wifi_ap_get_prof_authmode_internal() == WIFI_AUTH_WPA_PSK) {
+        auth_conf->wpa = WPA_PROTO_WPA;
+    }
+    if (esp_wifi_ap_get_prof_authmode_internal() == WIFI_AUTH_WPA2_PSK) {
+        auth_conf->wpa = WPA_PROTO_RSN;
+    }
+    if (esp_wifi_ap_get_prof_authmode_internal() == WIFI_AUTH_WPA_WPA2_PSK) {
+        auth_conf->wpa = WPA_PROTO_RSN | WPA_PROTO_WPA;
+    }
+
+    auth_conf->wpa_group = WPA_CIPHER_TKIP;
+    auth_conf->wpa_pairwise = WPA_CIPHER_CCMP | WPA_CIPHER_TKIP;
+    auth_conf->rsn_pairwise = WPA_CIPHER_CCMP | WPA_CIPHER_TKIP;
+    auth_conf->wpa_key_mgmt = WPA_KEY_MGMT_PSK;
+    auth_conf->eapol_version = EAPOL_VERSION;
+
+    memcpy(hapd->conf->ssid.ssid, ssid->ssid, ssid->len);
+    hapd->conf->ssid.ssid_len = ssid->len;
+    hapd->conf->ssid.wpa_passphrase = (char *)os_zalloc(64);
+    if (hapd->conf->ssid.wpa_passphrase == NULL) {
+        os_free(auth_conf);
+        os_free(hapd->conf);
+        os_free(hapd);
+        hapd = NULL;
+        return NULL;
+    }
+    memcpy(hapd->conf->ssid.wpa_passphrase, esp_wifi_ap_get_prof_password_internal(), strlen((char *)esp_wifi_ap_get_prof_password_internal()));
+
+    hapd->conf->ap_max_inactivity = 5 * 60;
+    hostapd_setup_wpa_psk(hapd->conf);
+
+    esp_wifi_get_macaddr_internal(WIFI_IF_AP, mac);
+
+    hapd->wpa_auth = wpa_init(mac, auth_conf, NULL);
+    esp_wifi_set_appie_internal(WIFI_APPIE_WPA, hapd->wpa_auth->wpa_ie, (uint16_t)hapd->wpa_auth->wpa_ie_len, 0); //michael ML
+    os_free(auth_conf);
+
+    return (void *)hapd;
+}
+
+bool hostap_deinit(void *data)
+{
+    struct hostapd_data *hapd = (struct hostapd_data *)data;
+
+    if (hapd == NULL) {
+        return true;
+    }
+
+    if (hapd->wpa_auth->wpa_ie != NULL) {
+        os_free(hapd->wpa_auth->wpa_ie);
+    }
+
+    if (hapd->wpa_auth->group != NULL) {
+        os_free(hapd->wpa_auth->group);
+    }
+
+    if (hapd->wpa_auth != NULL) {
+        os_free(hapd->wpa_auth);
+    }
+
+    if (hapd->conf->ssid.wpa_psk != NULL) {
+        os_free(hapd->conf->ssid.wpa_psk);
+    }
+
+    if (hapd->conf->ssid.wpa_passphrase != NULL) {
+        os_free(hapd->conf->ssid.wpa_passphrase);
+    }
+
+    if (hapd->conf != NULL) {
+        os_free(hapd->conf);
+    }
+
+    if (hapd != NULL) {
+        os_free(hapd);
+    }
+
+    return true;
+}
diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_hostap.h b/components/wpa_supplicant/src/esp_supplicant/esp_hostap.h
new file mode 100644 (file)
index 0000000..59a183f
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef ESP_HOSTAP_H
+#define ESP_HOSTAP_H
+
+void *hostap_init(void);
+bool hostap_deinit(void *data);
+
+#endif /* ESP_HOSTAP_H */
diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_wifi_driver.h b/components/wpa_supplicant/src/esp_supplicant/esp_wifi_driver.h
new file mode 100644 (file)
index 0000000..fdef1d3
--- /dev/null
@@ -0,0 +1,220 @@
+// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef _ESP_WIFI_DRIVER_H_
+#define _ESP_WIFI_DRIVER_H_
+
+#include "esp_err.h"
+#include "esp_wifi.h"
+
+#if CONFIG_NEWLIB_NANO_FORMAT
+#define TASK_STACK_SIZE_ADD 0
+#else
+#define TASK_STACK_SIZE_ADD 512
+#endif
+
+#define WPA2_TASK_STACK_SIZE  (6144 + TASK_STACK_SIZE_ADD)
+#define WPS_TASK_STACK_SIZE  (12288 + TASK_STACK_SIZE_ADD)
+
+enum {
+    WIFI_WPA_ALG_NONE = 0,
+    WIFI_WPA_ALG_WEP40 = 1,
+    WIFI_WPA_ALG_TKIP = 2,
+    WIFI_WPA_ALG_CCMP = 3,
+    WIFI_WPA_ALG_WAPI = 4,
+    WIFI_WPA_ALG_WEP104 = 5,
+    WIFI_WPA_ALG_WEP,
+    WIFI_WPA_ALG_IGTK,
+    WIFI_WPA_ALG_PMK,
+    WIFI_WPA_ALG_GCMP
+};
+
+enum {
+    WIFI_APPIE_PROBEREQ = 0,
+    WIFI_APPIE_ASSOC_REQ,
+    WIFI_APPIE_ASSOC_RESP,
+    WIFI_APPIE_WPA,
+    WIFI_APPIE_RSN,
+    WIFI_APPIE_WPS_PR,
+    WIFI_APPIE_WPS_AR,
+    WIFI_APPIE_MESH_QUICK,
+    WIFI_APPIE_FREQ_ERROR,
+    WIFI_APPIE_ESP_MANUFACTOR,
+    WIFI_APPIE_COUNTRY,
+    WIFI_APPIE_MAX,
+};
+
+enum {
+    NONE_AUTH           = 0x01,
+    WPA_AUTH_UNSPEC     = 0x02,
+    WPA_AUTH_PSK        = 0x03,
+    WPA2_AUTH_ENT       = 0x04,
+    WPA2_AUTH_PSK       = 0x05,
+    WPA_AUTH_CCKM       = 0x06,
+    WPA2_AUTH_CCKM      = 0x07,
+    WPA2_AUTH_INVALID   = 0x08,
+};
+
+typedef enum {
+    WPA2_ENT_EAP_STATE_NOT_START,
+    WPA2_ENT_EAP_STATE_IN_PROGRESS,
+    WPA2_ENT_EAP_STATE_SUCCESS,
+    WPA2_ENT_EAP_STATE_FAIL,
+} wpa2_ent_eap_state_t;
+
+struct wifi_appie {
+    uint16_t   ie_len;
+    uint8_t    ie_data[];
+};
+
+struct wifi_ssid {
+    int len;
+    uint8_t ssid[32];
+};
+
+struct wps_scan_ie {
+    uint8_t    *bssid;
+    uint8_t    chan;
+    uint16_t   capinfo;
+    uint8_t    *ssid;
+    uint8_t    *wpa;
+    uint8_t    *rsn;
+    uint8_t    *wps;
+};
+
+typedef struct {
+    int proto;
+    int pairwise_cipher;
+    int group_cipher;
+    int key_mgmt;
+    int capabilities;
+    size_t num_pmkid;
+    const u8 *pmkid;
+    int mgmt_group_cipher;
+} wifi_wpa_ie_t;
+
+struct wpa_funcs {
+    void (*wpa_sta_init)(void);
+    bool (*wpa_sta_deinit)(void);
+    void (*wpa_sta_connect)(uint8_t *bssid);
+    int (*wpa_sta_rx_eapol)(u8 *src_addr, u8 *buf, u32 len);
+    bool (*wpa_sta_in_4way_handshake)(void);
+    void *(*wpa_ap_init)(void);
+    bool (*wpa_ap_deinit)(void *data);
+    bool (*wpa_ap_join)(void **sm, u8 *bssid, u8 *wpa_ie, u8 wpa_ie_len);
+    bool (*wpa_ap_remove)(void *sm);
+    uint8_t *(*wpa_ap_get_wpa_ie)(uint8_t *len);
+    bool (*wpa_ap_rx_eapol)(void *hapd_data, void *sm, u8 *data, size_t data_len);
+    char *(*wpa_config_parse_string)(const char *value, size_t *len);
+    int (*wpa_parse_wpa_ie)(const u8 *wpa_ie, size_t wpa_ie_len, wifi_wpa_ie_t *data);
+    int (*wpa_config_bss)(u8 *bssid);
+    int (*wpa_michael_mic_failure)(u16 is_unicast);
+};
+
+struct wpa2_funcs {
+    int  (*wpa2_sm_rx_eapol)(u8 *src_addr, u8 *buf, u32 len, u8 *bssid);
+    int  (*wpa2_start)(void);
+    u8   (*wpa2_get_state)(void);
+    int  (*wpa2_init)(void);
+    void (*wpa2_deinit)(void);
+};
+
+struct wps_funcs {
+    bool (*wps_parse_scan_result)(struct wps_scan_ie *scan);
+    int  (*wifi_station_wps_start)(void);
+    int  (*wps_sm_rx_eapol)(u8 *src_addr, u8 *buf, u32 len);
+    int  (*wps_start_pending)(void);
+};
+
+typedef esp_err_t (*wifi_wpa2_fn_t)(void *);
+typedef struct {
+    wifi_wpa2_fn_t   fn;
+    void    *param;
+} wifi_wpa2_param_t;
+
+#define IS_WPS_REGISTRAR(type) (((type)>WPS_TYPE_MAX)?(((type)<WPS_TYPE_MAX)?true:false):false)
+#define IS_WPS_ENROLLEE(type)  (((type)>WPS_TYPE_DISABLE)?(((type)<WPS_TYPE_MAX)?true:false):false)
+
+typedef enum wps_status {
+    WPS_STATUS_DISABLE = 0,
+    WPS_STATUS_SCANNING,
+    WPS_STATUS_PENDING,
+    WPS_STATUS_SUCCESS,
+    WPS_STATUS_MAX,
+} WPS_STATUS_t;
+
+#define WIFI_TXCB_EAPOL_ID  3
+typedef void(*wifi_tx_cb_t)(void *);
+typedef int (*wifi_ipc_fn_t)(void *);
+typedef struct {
+    wifi_ipc_fn_t fn;
+    void *arg;
+    uint32_t arg_size;
+} wifi_ipc_config_t;
+
+uint8_t *esp_wifi_ap_get_prof_pmk_internal(void);
+struct wifi_ssid *esp_wifi_ap_get_prof_ap_ssid_internal(void);
+uint8_t esp_wifi_ap_get_prof_authmode_internal(void);
+uint8_t esp_wifi_sta_get_prof_authmode_internal(void);
+uint8_t *esp_wifi_ap_get_prof_password_internal(void);
+uint8_t *esp_wifi_sta_get_prof_pmk_internal(void);
+struct wifi_ssid *esp_wifi_sta_get_prof_ssid_internal(void);
+uint8_t esp_wifi_sta_get_reset_param_internal(void);
+uint8_t esp_wifi_sta_get_pairwise_cipher_internal(void);
+uint8_t esp_wifi_sta_get_group_cipher_internal(void);
+bool esp_wifi_sta_prof_is_wpa_internal(void);
+int esp_wifi_get_macaddr_internal(uint8_t if_index, uint8_t *macaddr);
+int esp_wifi_set_appie_internal(uint8_t type, uint8_t *ie, uint16_t len, uint8_t flag);
+int esp_wifi_unset_appie_internal(uint8_t type);
+struct wifi_appie *esp_wifi_get_appie_internal(uint8_t type);
+void *esp_wifi_get_hostap_private_internal(void); //1
+uint8_t *esp_wifi_sta_get_prof_password_internal(void);
+void esp_wifi_deauthenticate_internal(u8 reason_code);
+bool esp_wifi_sta_is_running_internal(void);
+bool esp_wifi_auth_done_internal(void);
+int esp_wifi_set_ap_key_internal(int alg, const u8 *addr, int idx, u8 *key, size_t key_len);
+int esp_wifi_set_sta_key_internal(int alg, u8 *addr, int key_idx, int set_tx,
+                                  u8 *seq, size_t seq_len, u8 *key, size_t key_len, int key_entry_valid);
+int  esp_wifi_get_sta_key_internal(uint8_t *ifx, int *alg, u8 *addr, int *key_idx,
+                                   u8 *key, size_t key_len, int key_entry_valid);
+bool esp_wifi_wpa_ptk_init_done_internal(uint8_t *mac);
+uint8_t esp_wifi_sta_set_reset_param_internal(uint8_t reset_flag);
+uint8_t esp_wifi_get_sta_gtk_index_internal(void);
+void esp_wifi_set_sta_gtk_index_internal(u8 valid, u8 index);
+int esp_wifi_register_tx_cb_internal(wifi_tx_cb_t fn, u8 id);
+int esp_wifi_register_wpa_cb_internal(struct wpa_funcs *cb);
+int esp_wifi_unregister_wpa_cb_internal(void);
+int esp_wifi_get_assoc_bssid_internal(uint8_t *bssid);
+bool esp_wifi_sta_is_ap_notify_completed_rsne_internal(void);
+int esp_wifi_ap_deauth_internal(uint8_t *mac, uint32_t reason);
+int esp_wifi_ipc_internal(wifi_ipc_config_t *cfg, bool sync);
+int esp_wifi_register_wpa2_cb_internal(struct wpa2_funcs *cb);
+int esp_wifi_unregister_wpa2_cb_internal(void);
+bool esp_wifi_sta_prof_is_wpa2_internal(void);
+esp_err_t esp_wifi_sta_wpa2_ent_disable_internal(wifi_wpa2_param_t *param);
+esp_err_t esp_wifi_sta_wpa2_ent_enable_internal(wifi_wpa2_param_t *param);
+esp_err_t esp_wifi_set_wpa2_ent_state_internal(wpa2_ent_eap_state_t state);
+int esp_wifi_get_wps_type_internal(void);
+int esp_wifi_set_wps_type_internal(uint32_t type);
+int esp_wifi_get_wps_status_internal(void);
+int esp_wifi_set_wps_status_internal(uint32_t status);
+int esp_wifi_disarm_sta_connection_timer_internal(void);
+bool esp_wifi_get_sniffer_internal(void);
+int esp_wifi_set_wps_cb_internal(struct wps_funcs *wps_cb);
+bool esp_wifi_enable_sta_privacy_internal(void);
+uint8_t esp_wifi_get_user_init_flag_internal(void);
+esp_err_t esp_wifi_send_event_internal(system_event_t *evt);
+esp_err_t esp_wifi_internal_supplicant_header_md5_check(const char *md5);
+
+#endif /* _ESP_WIFI_DRIVER_H_ */
diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_wpa2.c b/components/wpa_supplicant/src/esp_supplicant/esp_wpa2.c
new file mode 100644 (file)
index 0000000..a79502a
--- /dev/null
@@ -0,0 +1,1036 @@
+// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <string.h>
+
+#include "freertos/FreeRTOS.h"
+#include "freertos/task.h"
+#include "freertos/queue.h"
+#include "freertos/semphr.h"
+
+#include "esp_err.h"
+
+#include "utils/includes.h"
+#include "utils/common.h"
+#include "utils/wpa_debug.h"
+#include "common/wpa_ctrl.h"
+#include "common/eapol_common.h"
+#include "common/ieee802_11_defs.h"
+#include "utils/state_machine.h"
+#include "rsn_supp/wpa.h"
+
+#include "crypto/crypto.h"
+
+#include "utils/ext_password.h"
+#include "tls/tls.h"
+#include "eap_peer/eap_i.h"
+#include "eap_peer/eap_config.h"
+#include "eap_peer/eap.h"
+#include "eap_peer/eap_tls.h"
+#ifdef EAP_PEER_METHOD
+#include "eap_peer/eap_methods.h"
+#endif
+
+#include "esp_wifi_driver.h"
+#include "esp_private/wifi.h"
+#include "esp_wpa_err.h"
+
+#define WPA2_VERSION    "v2.0"
+
+static struct eap_sm *gEapSm = NULL;
+
+static int eap_peer_sm_init(void);
+static void eap_peer_sm_deinit(void);
+
+static int wpa2_sm_rx_eapol_internal(u8 *src_addr, u8 *buf, u32 len, uint8_t *bssid);
+static int wpa2_start_eapol_internal(void);
+int wpa2_post(uint32_t sig, uint32_t par);
+
+#ifdef USE_WPA2_TASK
+static void *s_wpa2_task_hdl = NULL;
+static void *s_wpa2_queue = NULL;
+static wpa2_state_t s_wpa2_state = WPA2_STATE_DISABLED;
+static void *s_wpa2_api_lock = NULL;
+static void *s_wifi_wpa2_sync_sem = NULL;
+static bool s_disable_time_check = true;
+
+static void wpa2_api_lock(void)
+{
+    if (s_wpa2_api_lock == NULL) {
+        s_wpa2_api_lock = xSemaphoreCreateRecursiveMutex();
+        if (!s_wpa2_api_lock) {
+            wpa_printf(MSG_ERROR, "WPA2: failed to create wpa2 api lock");
+            return;
+        }
+    }
+
+    xSemaphoreTakeRecursive(s_wpa2_api_lock, portMAX_DELAY);
+}
+
+static void wpa2_api_unlock(void)
+{
+    if (s_wpa2_api_lock) {
+        xSemaphoreGiveRecursive(s_wpa2_api_lock);
+    }
+}
+
+static bool inline wpa2_is_enabled(void)
+{
+    return (s_wpa2_state == WPA2_STATE_ENABLED);
+}
+
+static bool inline wpa2_is_disabled(void)
+{
+    return (s_wpa2_state == WPA2_STATE_DISABLED);
+}
+
+static void inline wpa2_set_state(wpa2_state_t state)
+{
+    s_wpa2_state = state;
+}
+
+static void wpa2_set_eap_state(wpa2_ent_eap_state_t state)
+{
+    if (!gEapSm) {
+        return;
+    }
+
+    gEapSm->finish_state = state;
+    esp_wifi_set_wpa2_ent_state_internal(state);
+}
+
+static inline void wpa2_task_delete(void *arg)
+{
+    void *my_task_hdl = xTaskGetCurrentTaskHandle();
+    int ret = ESP_OK;
+
+    if (my_task_hdl == s_wpa2_task_hdl) {
+        wpa_printf(MSG_ERROR, "WPA2: should never call task delete api in wpa2 task context");
+        return;
+    }
+
+    ret = wpa2_post(SIG_WPA2_TASK_DEL, 0);
+
+    if (ESP_OK != ret) {
+        wpa_printf(MSG_ERROR, "WPA2: failed to post task delete event, ret=%d", ret);
+        return;
+    }
+}
+
+#define WPA_ADDR_LEN 6
+struct wpa2_rx_param {
+    uint8_t *bssid;
+    u8 sa[WPA_ADDR_LEN];
+    u8 *buf;
+    int len;
+};
+
+void wpa2_task(void *pvParameters )
+{
+    ETSEvent *e;
+    struct eap_sm *sm = gEapSm;
+    bool task_del = false;
+    uint32_t sig = 0;
+
+    if (!sm) {
+        return;
+    }
+
+    for (;;) {
+        if ( pdPASS == xQueueReceive(s_wpa2_queue, &e, portMAX_DELAY) ) {
+            sig = e->sig;
+            switch (e->sig) {
+            case SIG_WPA2_TASK_DEL:
+                task_del = true;
+                break;
+            case SIG_WPA2_START:
+                sm->wpa2_sig_cnt[e->sig]--;
+                wpa2_start_eapol_internal();
+                break;
+            case SIG_WPA2_RX: {
+                struct wpa2_rx_param *param;
+
+                sm->wpa2_sig_cnt[e->sig]--;
+                param = (struct wpa2_rx_param *)(e->par);
+                if (param) {
+                    wpa2_sm_rx_eapol_internal(param->sa, param->buf, param->len, param->bssid);
+                    os_free(param->buf);
+                    os_free(param);
+                }
+                break;
+            }
+            default:
+                break;
+            }
+            os_free(e);
+        }
+
+        if (task_del) {
+            break;
+        } else {
+            if (s_wifi_wpa2_sync_sem) {
+                wpa_printf(MSG_DEBUG, "WPA2: wifi->wpa2 api completed sig(%d)", sig);
+                xSemaphoreGive(s_wifi_wpa2_sync_sem);
+            } else {
+                wpa_printf(MSG_ERROR, "WPA2: null wifi->wpa2 sync sem");
+            }
+        }
+    }
+
+    wpa_printf(MSG_DEBUG, "WPA2: queue deleted");
+    vQueueDelete(s_wpa2_queue);
+    wpa_printf(MSG_DEBUG, "WPA2: task deleted");
+    s_wpa2_queue = NULL;
+    if (s_wifi_wpa2_sync_sem) {
+        wpa_printf(MSG_DEBUG, "WPA2: wifi->wpa2 api completed sig(%d)", sig);
+        xSemaphoreGive(s_wifi_wpa2_sync_sem);
+    } else {
+        wpa_printf(MSG_ERROR, "WPA2: null wifi->wpa2 sync sem");
+    }
+
+    /* At this point, we completed */
+    vTaskDelete(NULL);
+}
+
+int wpa2_post(uint32_t sig, uint32_t par)
+{
+    struct eap_sm *sm = gEapSm;
+
+    if (!sm) {
+        return ESP_FAIL;
+    }
+
+    if (sm->wpa2_sig_cnt[sig]) {
+        return ESP_OK;
+    } else {
+        ETSEvent *evt = (ETSEvent *)os_malloc(sizeof(ETSEvent));
+        if (evt == NULL) {
+            wpa_printf(MSG_ERROR, "WPA2: E N M\n");
+            return ESP_FAIL;
+        }
+        sm->wpa2_sig_cnt[sig]++;
+        evt->sig = sig;
+        evt->par = par;
+        if ( xQueueSend(s_wpa2_queue, &evt, 10 / portTICK_PERIOD_MS ) != pdPASS) {
+            wpa_printf(MSG_ERROR, "WPA2: Q S E");
+            return ESP_FAIL;
+        } else {
+            if (s_wifi_wpa2_sync_sem) {
+                xSemaphoreTake(s_wifi_wpa2_sync_sem, portMAX_DELAY);
+                wpa_printf(MSG_DEBUG, "WPA2: wpa2 api return, sm->state(%d)", sm->finish_state);
+            } else {
+                wpa_printf(MSG_ERROR, "WPA2: null wifi->wpa2 sync sem");
+            }
+        }
+    }
+    return ESP_OK;
+}
+
+#endif /* USE_WPA2_TASK */
+
+static void wpa2_sendto_wrapper(void *buffer, uint16_t len)
+{
+    esp_wifi_internal_tx(WIFI_IF_STA, buffer, len);
+}
+
+static inline int wpa2_sm_ether_send(struct eap_sm *sm, const u8 *dest, u16 proto,
+                                     const u8 *data, size_t data_len)
+{
+    void *buffer = (void *)(data - sizeof(struct l2_ethhdr));
+    struct l2_ethhdr *eth = NULL;
+
+    if (!buffer) {
+        wpa_printf(MSG_ERROR, "wpa2: invalid data");
+        return ESP_FAIL;
+    } else {
+        eth = (struct l2_ethhdr *)buffer;
+        memcpy(eth->h_dest, dest, ETH_ALEN);
+        memcpy(eth->h_source, sm->ownaddr, ETH_ALEN);
+        eth->h_proto = host_to_be16(proto);
+        wpa2_sendto_wrapper(buffer, sizeof(struct l2_ethhdr) + data_len);
+    }
+
+    return ESP_OK;
+}
+
+u8 *wpa2_sm_alloc_eapol(struct eap_sm *sm, u8 type,
+                        const void *data, u16 data_len,
+                        size_t *msg_len, void **data_pos)
+{
+    void *buffer;
+    struct ieee802_1x_hdr *hdr;
+
+    *msg_len = sizeof(struct ieee802_1x_hdr) + data_len;
+    /* XXX: reserve l2_ethhdr is enough */
+    buffer = os_malloc(*msg_len + sizeof(struct l2_ethhdr));
+
+    if (buffer == NULL) {
+        return NULL;
+    }
+
+    hdr = (struct ieee802_1x_hdr *)((char *)buffer + sizeof(struct l2_ethhdr));
+    hdr->version = 0x01;
+    hdr->type = type;
+    hdr->length = host_to_be16(data_len);
+
+    if (data) {
+        memcpy(hdr + 1, data, data_len);
+    } else {
+        memset(hdr + 1, 0, data_len);
+    }
+
+    if (data_pos) {
+        *data_pos = hdr + 1;
+    }
+
+    return (u8 *) hdr;
+}
+
+
+void wpa2_sm_free_eapol(u8 *buffer)
+{
+    if (buffer != NULL) {
+        buffer = buffer - sizeof(struct l2_ethhdr);
+    }
+    os_free(buffer);
+
+}
+
+int eap_sm_send_eapol(struct eap_sm *sm, struct wpabuf *resp)
+{
+    size_t outlen;
+    int ret;
+    u8 *outbuf = NULL;
+
+    u8 bssid[6];
+    ret = esp_wifi_get_assoc_bssid_internal(bssid);
+
+    if (ret != 0) {
+        wpa_printf(MSG_DEBUG, "bssid is empty \n");
+        return WPA_ERR_INVALID_BSSID;
+    }
+
+    outbuf = wpa2_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAP_PACKET,
+                                 wpabuf_head_u8(resp), wpabuf_len(resp),
+                                 &outlen, NULL);
+    if (!outbuf) {
+        return ESP_ERR_NO_MEM;
+    }
+
+    ret = wpa2_sm_ether_send(sm, bssid, ETH_P_EAPOL, outbuf, outlen);
+    wpa2_sm_free_eapol(outbuf);
+    if (ret) {
+        return ESP_FAIL;
+    }
+
+    return ESP_OK;
+}
+
+int eap_sm_process_request(struct eap_sm *sm, struct wpabuf *reqData)
+{
+    size_t plen;
+    u32 reqVendor, reqVendorMethod;
+    u8 type, *pos;
+    struct eap_hdr *ehdr;
+    const struct eap_method *m = NULL;
+    struct wpabuf *resp = NULL;
+    struct eap_method_ret m_res;
+    int ret = 0;
+
+    if (reqData == NULL || wpabuf_len(reqData) < sizeof(*ehdr)) {
+        return ESP_ERR_INVALID_ARG;
+    }
+
+    ehdr = (struct eap_hdr *)wpabuf_head(reqData);
+    plen = be_to_host16(ehdr->length);
+    if (plen > wpabuf_len(reqData)) {
+        return ESP_FAIL;
+    }
+
+    if (ehdr->identifier == sm->current_identifier) {
+        /*Retransmit*/
+        resp = sm->lastRespData;
+        goto send_resp;
+    }
+
+    sm->current_identifier = ehdr->identifier;
+
+    pos = (u8 *)(ehdr + 1);
+    type = *pos++;
+    if (type == EAP_TYPE_IDENTITY) {
+        resp = (struct wpabuf *)eap_sm_build_identity_resp(sm, ehdr->identifier, 0);
+        goto send_resp;
+    } else if (type == EAP_TYPE_NOTIFICATION) {
+        /*Ignore*/
+        goto out;
+    } else if (type == EAP_TYPE_EXPANDED) {
+        if (plen < sizeof(*ehdr) + 8) {
+            return ESP_FAIL;
+        }
+        reqVendor = WPA_GET_BE24(pos);
+        pos += 3;
+        reqVendorMethod = WPA_GET_BE32(pos);
+    } else {
+        reqVendor = EAP_VENDOR_IETF;
+        reqVendorMethod = type;
+    }
+
+    if (sm->m && sm->m->process && sm->eap_method_priv &&
+            reqVendor == sm->m->vendor &&
+            reqVendorMethod == sm->m->method) {
+        resp = sm->m->process(sm, sm->eap_method_priv,
+                              &m_res, reqData);
+    } else {
+        m = eap_peer_get_eap_method(reqVendor, reqVendorMethod);
+        if (m == NULL) {
+            goto build_nak;
+        }
+        if (sm->m) {
+            eap_deinit_prev_method(sm, "GET_METHOD");
+        }
+        sm->m = m;
+        sm->eap_method_priv = sm->m->init(sm);
+        if (sm->eap_method_priv == NULL) {
+            wpa_printf(MSG_ERROR, "Method private structure allocated failure\n");
+            sm->m = NULL;
+            goto build_nak;
+        }
+
+        if (sm->m->process) {
+            resp = sm->m->process(sm, sm->eap_method_priv, &m_res, reqData);
+        }
+    }
+
+    if (sm->m->isKeyAvailable && sm->m->getKey &&
+            sm->m->isKeyAvailable(sm, sm->eap_method_priv)) {
+        if (sm->eapKeyData) {
+            os_free(sm->eapKeyData);
+        }
+        sm->eapKeyData = sm->m->getKey(sm, sm->eap_method_priv,
+                                       &sm->eapKeyDataLen);
+    }
+    goto send_resp;
+
+build_nak:
+    resp = (struct wpabuf *)eap_sm_build_nak(sm, type, ehdr->identifier);
+    if (resp == NULL) {
+        return ESP_FAIL;
+    }
+    ret = ESP_FAIL;
+
+send_resp:
+    if (resp == NULL) {
+        wpa_printf(MSG_ERROR, "Response build fail, return.");
+        return ESP_FAIL;
+    }
+    ret = eap_sm_send_eapol(sm, resp);
+    if (ret == ESP_OK) {
+        if (resp != sm->lastRespData) {
+            wpabuf_free(sm->lastRespData);
+            sm->lastRespData = resp;
+        }
+    } else {
+        wpabuf_free(sm->lastRespData);
+        sm->lastRespData = NULL;
+        wpabuf_free(resp);
+        resp = NULL;
+
+        if (ret == WPA_ERR_INVALID_BSSID) {
+            ret = WPA2_ENT_EAP_STATE_FAIL;
+            wpa2_set_eap_state(WPA2_ENT_EAP_STATE_FAIL);
+        }
+    }
+out:
+    return ret;
+}
+
+static int wpa2_sm_rx_eapol(u8 *src_addr, u8 *buf, u32 len, uint8_t *bssid)
+{
+    struct eap_sm *sm = gEapSm;
+
+    if (!sm) {
+        return ESP_FAIL;
+    }
+#ifdef USE_WPA2_TASK
+    {
+        struct wpa2_rx_param *param = (struct wpa2_rx_param *)os_zalloc(sizeof(struct wpa2_rx_param));   /* free in task */
+
+        if (!param) {
+            return ESP_ERR_NO_MEM;
+        }
+
+        param->buf = (u8 *)os_zalloc(len);   /* free in task */
+        if (!param->buf) {
+            os_free(param);
+            return ESP_ERR_NO_MEM;
+        }
+        param->bssid = bssid;
+        memcpy(param->buf, buf, len);
+        param->len = len;
+        memcpy(param->sa, src_addr, WPA_ADDR_LEN);
+
+        return wpa2_post(SIG_WPA2_RX, (uint32_t)param);
+    }
+#else
+
+    return wpa2_sm_rx_eapol_internal(src_addr, buf, len, bssid);
+#endif
+}
+
+
+static int wpa2_sm_rx_eapol_internal(u8 *src_addr, u8 *buf, u32 len, uint8_t *bssid)
+{
+    struct eap_sm *sm = gEapSm;
+    u32 plen, data_len;
+    struct ieee802_1x_hdr *hdr;
+    struct eap_hdr *ehdr;
+    struct wpabuf *req = NULL;
+    u8 *tmp;
+    int ret = ESP_FAIL;
+
+    if (!sm) {
+        return ESP_FAIL;
+    }
+
+    if (len < sizeof(*hdr) + sizeof(*ehdr)) {
+#ifdef DEBUG_PRINT
+        wpa_printf(MSG_DEBUG, "WPA: EAPOL frame too short to be a WPA "
+                   "EAPOL-Key (len %lu, expecting at least %lu)",
+                   (unsigned long) len,
+                   (unsigned long) sizeof(*hdr) + sizeof(*ehdr));
+#endif
+        return ESP_FAIL;
+    }
+
+    tmp = buf;
+
+    hdr = (struct ieee802_1x_hdr *) tmp;
+    ehdr = (struct eap_hdr *) (hdr + 1);
+    plen = be_to_host16(hdr->length);
+    data_len = plen + sizeof(*hdr);
+
+#ifdef DEBUG_PRINT
+    wpa_printf(MSG_DEBUG, "IEEE 802.1X RX: version=%d type=%d length=%d\n",
+               hdr->version, hdr->type, plen);
+#endif
+    if (hdr->version < EAPOL_VERSION) {
+        /* TODO: backwards compatibility */
+    }
+    if (hdr->type != IEEE802_1X_TYPE_EAP_PACKET) {
+#ifdef DEBUG_PRINT
+        wpa_printf(MSG_DEBUG, "WPA2: EAP frame (type %u) discarded, "
+                   "not a EAP PACKET frame", hdr->type);
+#endif
+        ret = -2;
+        goto _out;
+    }
+    if (plen > len - sizeof(*hdr) || plen < sizeof(*ehdr)) {
+#ifdef DEBUG_PRINT
+        wpa_printf(MSG_DEBUG, "WPA2: EAPOL frame payload size %lu "
+                   "invalid (frame size %lu)",
+                   (unsigned long) plen, (unsigned long) len);
+#endif
+        ret = -2;
+        goto _out;
+    }
+
+    wpa_hexdump(MSG_MSGDUMP, "WPA2: RX EAPOL-EAP PACKET", tmp, len);
+
+    if (data_len < len) {
+#ifdef DEBUG_PRINT
+        wpa_printf(MSG_DEBUG, "WPA: ignoring %lu bytes after the IEEE "
+                   "802.1X data\n", (unsigned long) len - data_len);
+#endif
+    }
+
+#ifdef EAP_PEER_METHOD
+    switch (ehdr->code) {
+    case EAP_CODE_REQUEST:
+        req = wpabuf_alloc_copy((u8 *)ehdr, len - sizeof(*hdr));
+        ret = eap_sm_process_request(sm, req);
+        break;
+    case EAP_CODE_RESPONSE:
+        /*Ignore*/
+        break;
+    case EAP_CODE_SUCCESS:
+        if (sm->eapKeyData) {
+            wpa_set_pmk(sm->eapKeyData);
+            os_free(sm->eapKeyData);
+            sm->eapKeyData = NULL;
+            wpa_printf(MSG_INFO, ">>>>>wpa2 FINISH\n");
+            ret = WPA2_ENT_EAP_STATE_SUCCESS;
+            wpa2_set_eap_state(WPA2_ENT_EAP_STATE_SUCCESS);
+        } else {
+            wpa_printf(MSG_INFO, ">>>>>wpa2 FAILED, receive EAP_SUCCESS but pmk is empty, potential attack!\n");
+            ret = WPA2_ENT_EAP_STATE_FAIL;
+            wpa2_set_eap_state(WPA2_ENT_EAP_STATE_FAIL);
+        }
+        break;
+    case EAP_CODE_FAILURE:
+        wpa_printf(MSG_INFO, ">>>>>wpa2 FAILED\n");
+        ret = WPA2_ENT_EAP_STATE_FAIL;
+        wpa2_set_eap_state(WPA2_ENT_EAP_STATE_FAIL);
+        break;
+    }
+_out:
+    wpabuf_free(req);
+#endif
+    return ret;
+}
+
+static int wpa2_start_eapol(void)
+{
+#ifdef USE_WPA2_TASK
+    return wpa2_post(SIG_WPA2_START, 0);
+#else
+    return wpa2_start_eapol_internal();
+#endif
+}
+
+static int wpa2_start_eapol_internal(void)
+{
+    struct eap_sm *sm = gEapSm;
+    int ret = 0;
+    u8 bssid[6];
+    u8 *buf;
+    size_t len;
+
+    if (!sm) {
+        return ESP_FAIL;
+    }
+
+    ret = esp_wifi_get_assoc_bssid_internal(bssid);
+    if (ret != 0) {
+        wpa_printf(MSG_ERROR, "bssid is empty!");
+        return WPA_ERR_INVALID_BSSID;
+    }
+
+    buf = wpa2_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAPOL_START, (u8 *)"", 0, &len, NULL);
+    if (!buf) {
+        return ESP_FAIL;
+    }
+
+    wpa2_set_eap_state(WPA2_ENT_EAP_STATE_IN_PROGRESS);
+    wpa2_sm_ether_send(sm, bssid, ETH_P_EAPOL, buf, len);
+    wpa2_sm_free_eapol(buf);
+    return ESP_OK;
+}
+
+/**
+ * eap_peer_sm_init - Allocate and initialize EAP peer state machine
+ * @eapol_ctx: Context data to be used with eapol_cb calls
+ * @eapol_cb: Pointer to EAPOL callback functions
+ * @msg_ctx: Context data for wpa_msg() calls
+ * @conf: EAP configuration
+ * Returns: Pointer to the allocated EAP state machine or %NULL on failure
+ *
+ * This function allocates and initializes an EAP state machine. In addition,
+ * this initializes TLS library for the new EAP state machine. eapol_cb pointer
+ * will be in use until eap_peer_sm_deinit() is used to deinitialize this EAP
+ * state machine. Consequently, the caller must make sure that this data
+ * structure remains alive while the EAP state machine is active.
+ */
+static int eap_peer_sm_init(void)
+{
+    int ret = 0;
+    struct eap_sm *sm;
+
+    if (gEapSm) {
+        wpa_printf(MSG_ERROR, "WPA2: wpa2 sm not null, deinit it");
+        eap_peer_sm_deinit();
+    }
+
+    sm = (struct eap_sm *)os_zalloc(sizeof(*sm));
+    if (sm == NULL) {
+        return ESP_ERR_NO_MEM;
+    }
+
+    wpa2_set_eap_state(WPA2_ENT_EAP_STATE_NOT_START);
+    sm->current_identifier = 0xff;
+    esp_wifi_get_macaddr_internal(WIFI_IF_STA, sm->ownaddr);
+    ret = eap_peer_blob_init(sm);
+    if (ret) {
+        wpa_printf(MSG_ERROR, "eap_peer_blob_init failed\n");
+        os_free(sm);
+        return ESP_FAIL;
+    }
+
+    ret = eap_peer_config_init(sm, g_wpa_private_key_passwd, g_wpa_private_key_passwd_len);
+    if (ret) {
+        wpa_printf(MSG_ERROR, "eap_peer_config_init failed\n");
+        eap_peer_blob_deinit(sm);
+        os_free(sm);
+        return ESP_FAIL;
+    }
+
+    sm->ssl_ctx = tls_init();
+    if (sm->ssl_ctx == NULL) {
+        wpa_printf(MSG_WARNING, "SSL: Failed to initialize TLS "
+                   "context.");
+        eap_peer_blob_deinit(sm);
+        eap_peer_config_deinit(sm);
+        os_free(sm);
+        return ESP_FAIL;
+    }
+
+
+    gEapSm = sm;
+#ifdef USE_WPA2_TASK
+    s_wpa2_queue = xQueueCreate(SIG_WPA2_MAX, sizeof( void * ) );
+    xTaskCreate(wpa2_task, "wpa2T", WPA2_TASK_STACK_SIZE, NULL, 2, s_wpa2_task_hdl);
+    s_wifi_wpa2_sync_sem = xSemaphoreCreateCounting(1, 0);
+    if (!s_wifi_wpa2_sync_sem) {
+        wpa_printf(MSG_ERROR, "WPA2: failed create wifi wpa2 task sync sem");
+        return ESP_FAIL;
+    }
+
+    wpa_printf(MSG_INFO, "wpa2_task prio:%d, stack:%d\n", 2, WPA2_TASK_STACK_SIZE);
+
+#endif
+    return ESP_OK;
+}
+
+/**
+ * eap_peer_sm_deinit - Deinitialize and free an EAP peer state machine
+ * @sm: Pointer to EAP state machine allocated with eap_peer_sm_init()
+ *
+ * This function deinitializes EAP state machine and frees all allocated
+ * resources.
+ */
+static void eap_peer_sm_deinit(void)
+{
+    struct eap_sm *sm = gEapSm;
+
+    if (sm == NULL) {
+        return;
+    }
+
+    eap_peer_config_deinit(sm);
+    eap_peer_blob_deinit(sm);
+    eap_deinit_prev_method(sm, "EAP deinit");
+    eap_sm_abort(sm);
+    tls_deinit(sm->ssl_ctx);
+#ifdef USE_WPA2_TASK
+    wpa2_task_delete(0);
+#endif
+    if (s_wifi_wpa2_sync_sem) {
+        vSemaphoreDelete(s_wifi_wpa2_sync_sem);
+    }
+    s_wifi_wpa2_sync_sem = NULL;
+
+    os_free(sm);
+    gEapSm = NULL;
+}
+
+uint8_t wpa2_machine_start = 0;
+
+esp_err_t esp_wifi_sta_wpa2_ent_enable_fn(void *arg)
+{
+    struct wpa2_funcs *wpa2_cb;
+
+    wpa_printf(MSG_INFO, "WPA2 ENTERPRISE VERSION: [%s] enable\n",
+               WPA2_VERSION);
+
+    wpa2_cb = (struct wpa2_funcs *)os_zalloc(sizeof(struct wpa2_funcs));
+    if (wpa2_cb == NULL) {
+        wpa_printf(MSG_ERROR, "WPA2: no mem for wpa2 cb\n");
+        return ESP_ERR_NO_MEM;
+    }
+
+    wpa2_cb->wpa2_sm_rx_eapol = wpa2_sm_rx_eapol;
+    wpa2_cb->wpa2_start = wpa2_start_eapol;
+    wpa2_cb->wpa2_init = eap_peer_sm_init;
+    wpa2_cb->wpa2_deinit = eap_peer_sm_deinit;
+
+    esp_wifi_register_wpa2_cb_internal(wpa2_cb);
+
+    wpa_printf(MSG_DEBUG, "WPA2 ENTERPRISE CRYPTO INIT.\r\n");
+
+#ifdef EAP_PEER_METHOD
+    if (eap_peer_register_methods()) {
+        wpa_printf(MSG_ERROR, "Register EAP Peer methods Failure\n");
+    }
+#endif
+    wpa2_machine_start = 1;
+    return ESP_OK;
+}
+
+esp_err_t esp_wifi_sta_wpa2_ent_enable(void)
+{
+    wifi_wpa2_param_t param;
+    esp_err_t ret;
+
+    wpa2_api_lock();
+
+    if (wpa2_is_enabled()) {
+        wpa_printf(MSG_INFO, "WPA2: already enabled");
+        wpa2_api_unlock();
+        return ESP_OK;
+    }
+
+    param.fn = (wifi_wpa2_fn_t)esp_wifi_sta_wpa2_ent_enable_fn;
+    param.param = NULL;
+
+    ret = esp_wifi_sta_wpa2_ent_enable_internal(&param);
+
+    if (ESP_OK == ret) {
+        wpa2_set_state(WPA2_STATE_ENABLED);
+    } else {
+        wpa_printf(MSG_ERROR, "failed to enable wpa2 ret=%d", ret);
+    }
+
+    wpa2_api_unlock();
+
+    return ret;
+}
+
+esp_err_t esp_wifi_sta_wpa2_ent_disable_fn(void *param)
+{
+    wpa_printf(MSG_INFO, "WPA2 ENTERPRISE VERSION: [%s] disable\n", WPA2_VERSION);
+    esp_wifi_unregister_wpa2_cb_internal();
+
+    if (gEapSm) {
+        eap_peer_sm_deinit();
+    }
+
+#ifdef USE_WPA2_TASK
+#endif
+
+#ifdef EAP_PEER_METHOD
+    eap_peer_unregister_methods();
+#endif
+
+    wpa2_machine_start = 0;
+    return ESP_OK;
+}
+
+esp_err_t esp_wifi_sta_wpa2_ent_disable(void)
+{
+    wifi_wpa2_param_t param;
+    esp_err_t ret;
+
+    wpa2_api_lock();
+
+    if (wpa2_is_disabled()) {
+        wpa_printf(MSG_INFO, "WPA2: already disabled");
+        wpa2_api_unlock();
+        return ESP_OK;
+    }
+
+    param.fn = (wifi_wpa2_fn_t)esp_wifi_sta_wpa2_ent_disable_fn;
+    param.param = 0;
+    ret = esp_wifi_sta_wpa2_ent_disable_internal(&param);
+
+    if (ESP_OK == ret) {
+        wpa2_set_state(WPA2_STATE_DISABLED);
+    } else {
+        wpa_printf(MSG_ERROR, "failed to disable wpa2 ret=%d", ret);
+    }
+
+    wpa2_api_unlock();
+
+    return ret;
+}
+
+esp_err_t esp_wifi_sta_wpa2_ent_set_cert_key(const unsigned char *client_cert, int client_cert_len, const unsigned char *private_key, int private_key_len, const unsigned char *private_key_passwd, int private_key_passwd_len)
+{
+    if (client_cert && client_cert_len > 0) {
+        g_wpa_client_cert = client_cert;
+        g_wpa_client_cert_len = client_cert_len;
+    }
+    if (private_key && private_key_len > 0) {
+        g_wpa_private_key = private_key;
+        g_wpa_private_key_len = private_key_len;
+    }
+    if (private_key_passwd && private_key_passwd_len > 0) {
+        g_wpa_private_key_passwd = private_key_passwd;
+        g_wpa_private_key_passwd_len = private_key_passwd_len;
+    }
+
+    return ESP_OK;
+}
+
+void esp_wifi_sta_wpa2_ent_clear_cert_key(void)
+{
+    esp_wifi_unregister_wpa2_cb_internal();
+
+    g_wpa_client_cert = NULL;
+    g_wpa_client_cert_len = 0;
+    g_wpa_private_key = NULL;
+    g_wpa_private_key_len = 0;
+    g_wpa_private_key_passwd = NULL;
+    g_wpa_private_key_passwd_len = 0;
+}
+
+esp_err_t esp_wifi_sta_wpa2_ent_set_ca_cert(const unsigned char *ca_cert, int ca_cert_len)
+{
+    if (ca_cert && ca_cert_len > 0) {
+        g_wpa_ca_cert = ca_cert;
+        g_wpa_ca_cert_len = ca_cert_len;
+    }
+
+    return ESP_OK;
+}
+
+void esp_wifi_sta_wpa2_ent_clear_ca_cert(void)
+{
+    g_wpa_ca_cert = NULL;
+    g_wpa_ca_cert_len = 0;
+}
+
+#define ANONYMOUS_ID_LEN_MAX 128
+esp_err_t esp_wifi_sta_wpa2_ent_set_identity(const unsigned char *identity, int len)
+{
+    if (len <= 0 || len > ANONYMOUS_ID_LEN_MAX) {
+        return ESP_ERR_INVALID_ARG;
+    }
+
+    if (g_wpa_anonymous_identity) {
+        os_free(g_wpa_anonymous_identity);
+        g_wpa_anonymous_identity = NULL;
+    }
+
+    g_wpa_anonymous_identity = (u8 *)os_zalloc(len);
+    if (g_wpa_anonymous_identity == NULL) {
+        return ESP_ERR_NO_MEM;
+    }
+
+    os_memcpy(g_wpa_anonymous_identity, identity, len);
+    g_wpa_anonymous_identity_len = len;
+
+    return ESP_OK;
+}
+
+void esp_wifi_sta_wpa2_ent_clear_identity(void)
+{
+    if (g_wpa_anonymous_identity) {
+        os_free(g_wpa_anonymous_identity);
+    }
+
+    g_wpa_anonymous_identity = NULL;
+    g_wpa_anonymous_identity_len = 0;
+}
+
+#define USERNAME_LEN_MAX 128
+esp_err_t esp_wifi_sta_wpa2_ent_set_username(const unsigned char *username, int len)
+{
+    if (len <= 0 || len > USERNAME_LEN_MAX) {
+        return ESP_ERR_INVALID_ARG;
+    }
+
+    if (g_wpa_username) {
+        os_free(g_wpa_username);
+        g_wpa_username = NULL;
+    }
+
+    g_wpa_username = (u8 *)os_zalloc(len);
+    if (g_wpa_username == NULL) {
+        return ESP_ERR_NO_MEM;
+    }
+
+    os_memcpy(g_wpa_username, username, len);
+    g_wpa_username_len = len;
+
+    return ESP_OK;
+}
+
+void esp_wifi_sta_wpa2_ent_clear_username(void)
+{
+    if (g_wpa_username) {
+        os_free(g_wpa_username);
+    }
+
+    g_wpa_username = NULL;
+    g_wpa_username_len = 0;
+}
+
+esp_err_t esp_wifi_sta_wpa2_ent_set_password(const unsigned char *password, int len)
+{
+    if (len <= 0) {
+        return ESP_ERR_INVALID_ARG;
+    }
+
+    if (g_wpa_password) {
+        os_free(g_wpa_password);
+        g_wpa_password = NULL;
+    }
+
+    g_wpa_password = (u8 *)os_zalloc(len);
+    if (g_wpa_password == NULL) {
+        return ESP_ERR_NO_MEM;
+    }
+
+    os_memcpy(g_wpa_password, password, len);
+    g_wpa_password_len = len;
+
+    return ESP_OK;
+}
+
+void esp_wifi_sta_wpa2_ent_clear_password(void)
+{
+    if (g_wpa_password) {
+        os_free(g_wpa_password);
+    }
+    g_wpa_password = NULL;
+    g_wpa_password_len = 0;
+}
+
+esp_err_t esp_wifi_sta_wpa2_ent_set_new_password(const unsigned char *new_password, int len)
+{
+    if (len <= 0) {
+        return ESP_ERR_INVALID_ARG;
+    }
+
+    if (g_wpa_new_password) {
+        os_free(g_wpa_new_password);
+        g_wpa_new_password = NULL;
+    }
+
+    g_wpa_new_password = (u8 *)os_zalloc(len);
+    if (g_wpa_new_password == NULL) {
+        return ESP_ERR_NO_MEM;
+    }
+
+    os_memcpy(g_wpa_new_password, new_password, len);
+    g_wpa_password_len = len;
+
+    return ESP_OK;
+}
+
+void esp_wifi_sta_wpa2_ent_clear_new_password(void)
+{
+    if (g_wpa_new_password) {
+        os_free(g_wpa_new_password);
+    }
+    g_wpa_new_password = NULL;
+    g_wpa_new_password_len = 0;
+}
+
+esp_err_t esp_wifi_sta_wpa2_ent_set_disable_time_check(bool disable)
+{
+    s_disable_time_check = disable;
+    return ESP_OK;
+}
+
+bool wifi_sta_get_enterprise_disable_time_check(void)
+{
+    return s_disable_time_check;
+}
+
+esp_err_t esp_wifi_sta_wpa2_ent_get_disable_time_check(bool *disable)
+{
+    *disable = wifi_sta_get_enterprise_disable_time_check();
+    return ESP_OK;
+}
+
diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_wpa_err.h b/components/wpa_supplicant/src/esp_supplicant/esp_wpa_err.h
new file mode 100644 (file)
index 0000000..9704c7f
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+/*
+ * This file define the ESP supplicant internal error code
+ */
+
+#define WPA_ERR_INVALID_BSSID -2
diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_wpa_main.c b/components/wpa_supplicant/src/esp_supplicant/esp_wpa_main.c
new file mode 100644 (file)
index 0000000..d565cd1
--- /dev/null
@@ -0,0 +1,239 @@
+// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "utils/includes.h"
+#include "utils/common.h"
+#include "rsn_supp/wpa.h"
+#include "rsn_supp/wpa_i.h"
+#include "common/eapol_common.h"
+#include "common/ieee802_11_defs.h"
+#include "rsn_supp/wpa_ie.h"
+#include "ap/wpa_auth.h"
+#include "ap/wpa_auth_i.h"
+#include "ap/ap_config.h"
+#include "ap/hostapd.h"
+#include "esp_wpas_glue.h"
+#include "esp_hostap.h"
+
+#include "crypto/crypto.h"
+#include "crypto/sha1.h"
+#include "crypto/aes_wrap.h"
+#include "crypto/wepkey.h"
+
+#include "esp_wifi_driver.h"
+#include "esp_private/wifi.h"
+
+void  wpa_install_key(enum wpa_alg alg, u8 *addr, int key_idx, int set_tx,
+                      u8 *seq, size_t seq_len, u8 *key, size_t key_len, int key_entry_valid)
+{
+    esp_wifi_set_sta_key_internal(alg, addr, key_idx, set_tx, seq, seq_len, key, key_len, key_entry_valid);
+}
+
+int  wpa_get_key(uint8_t *ifx, int *alg, u8 *addr, int *key_idx,
+                 u8 *key, size_t key_len, int key_entry_valid)
+{
+    return esp_wifi_get_sta_key_internal(ifx, alg, addr, key_idx, key, key_len, key_entry_valid);
+}
+
+/**
+ * eapol_sm_notify_eap_success - Notification of external EAP success trigger
+ * @sm: Pointer to EAPOL state machine allocated with eapol_sm_init()
+ * @success: %TRUE = set success, %FALSE = clear success
+ *
+ * Notify the EAPOL state machine that external event has forced EAP state to
+ * success (success = %TRUE). This can be cleared by setting success = %FALSE.
+ *
+ * This function is called to update EAP state when WPA-PSK key handshake has
+ * been completed successfully since WPA-PSK does not use EAP state machine.
+ */
+
+/* fix buf for tx for now */
+#define WPA_TX_MSG_BUFF_MAXLEN 200
+
+void  wpa_sendto_wrapper(void *buffer, u16 len)
+{
+    esp_wifi_internal_tx(0, buffer, len);
+}
+
+void  wpa_deauthenticate(u8 reason_code)
+{
+    esp_wifi_deauthenticate_internal(reason_code);
+}
+
+void  wpa_config_profile()
+{
+    if (esp_wifi_sta_prof_is_wpa_internal()) {
+        wpa_set_profile(WPA_PROTO_WPA, esp_wifi_sta_get_prof_authmode_internal());
+    } else if (esp_wifi_sta_prof_is_wpa2_internal()) {
+        wpa_set_profile(WPA_PROTO_RSN, esp_wifi_sta_get_prof_authmode_internal());
+    } else {
+        WPA_ASSERT(0);
+    }
+}
+
+int wpa_config_bss(uint8_t *bssid)
+{
+    struct wifi_ssid *ssid = esp_wifi_sta_get_prof_ssid_internal();
+    u8 mac[6];
+
+    esp_wifi_get_macaddr_internal(0, mac);
+    wpa_set_bss((char *)mac, (char *)bssid, esp_wifi_sta_get_pairwise_cipher_internal(), esp_wifi_sta_get_group_cipher_internal(),
+                (char *)esp_wifi_sta_get_prof_password_internal(), ssid->ssid, ssid->len);
+    return ESP_OK;
+}
+
+void  wpa_config_assoc_ie(u8 proto, u8 *assoc_buf, u32 assoc_wpa_ie_len)
+{
+    if (proto == BIT(0)) {
+        esp_wifi_set_appie_internal(WIFI_APPIE_WPA, assoc_buf, assoc_wpa_ie_len, 1);
+    } else {
+        esp_wifi_set_appie_internal(WIFI_APPIE_RSN, assoc_buf, assoc_wpa_ie_len, 1);
+    }
+}
+
+void  wpa_neg_complete()
+{
+    esp_wifi_auth_done_internal();
+}
+
+void  wpa_attach(void)
+{
+#ifndef IOT_SIP_MODE
+    wpa_register(NULL, wpa_sendto_wrapper,
+                 wpa_config_assoc_ie, wpa_install_key, wpa_get_key, wpa_deauthenticate, wpa_neg_complete);
+#else
+    u8 *payload = (u8 *)os_malloc(WPA_TX_MSG_BUFF_MAXLEN);
+    wpa_register(payload, wpa_sendto_wrapper,
+                 wpa_config_assoc_ie, wpa_install_key, wpa_get_key, wpa_deauthenticate, wpa_neg_complete);
+#endif
+
+    esp_wifi_register_tx_cb_internal(eapol_txcb, WIFI_TXCB_EAPOL_ID);
+}
+
+uint8_t  *wpa_ap_get_wpa_ie(uint8_t *ie_len)
+{
+    struct hostapd_data *hapd = (struct hostapd_data *)esp_wifi_get_hostap_private_internal();
+
+    if (!hapd || !hapd->wpa_auth || !hapd->wpa_auth->wpa_ie) {
+        return NULL;
+    }
+
+    *ie_len = hapd->wpa_auth->wpa_ie_len;
+    return hapd->wpa_auth->wpa_ie;
+}
+
+bool  wpa_ap_rx_eapol(void *hapd_data, void *sm_data, u8 *data, size_t data_len)
+{
+    struct hostapd_data *hapd = (struct hostapd_data *)hapd_data;
+    struct wpa_state_machine *sm = (struct wpa_state_machine *)sm_data;
+
+    if (!hapd || !sm) {
+        return false;
+    }
+
+    wpa_receive(hapd->wpa_auth, sm, data, data_len);
+
+    return true;
+}
+
+bool  wpa_deattach(void)
+{
+    return true;
+}
+
+void  wpa_sta_connect(uint8_t *bssid)
+{
+    wpa_config_profile();
+    wpa_config_bss(bssid);
+}
+
+int cipher_type_map(int wpa_cipher)
+{
+    switch (wpa_cipher) {
+    case WPA_CIPHER_NONE:
+        return WIFI_CIPHER_TYPE_NONE;
+
+    case WPA_CIPHER_WEP40:
+        return WIFI_CIPHER_TYPE_WEP40;
+
+    case WPA_CIPHER_WEP104:
+        return WIFI_CIPHER_TYPE_WEP104;
+
+    case WPA_CIPHER_TKIP:
+        return WIFI_CIPHER_TYPE_TKIP;
+
+    case WPA_CIPHER_CCMP:
+        return WIFI_CIPHER_TYPE_CCMP;
+
+    case WPA_CIPHER_CCMP|WPA_CIPHER_TKIP:
+        return WIFI_CIPHER_TYPE_TKIP_CCMP;
+
+    default:
+        return WIFI_CIPHER_TYPE_UNKNOWN;
+    }
+}
+
+int wpa_parse_wpa_ie_wrapper(const u8 *wpa_ie, size_t wpa_ie_len, wifi_wpa_ie_t *data)
+{
+    struct wpa_ie_data ie;
+    int ret = 0;
+
+    ret = wpa_parse_wpa_ie(wpa_ie, wpa_ie_len, &ie);
+    data->proto = ie.proto;
+    data->pairwise_cipher = cipher_type_map(ie.pairwise_cipher);
+    data->group_cipher = cipher_type_map(ie.group_cipher);
+    data->key_mgmt = ie.key_mgmt;
+    data->capabilities = ie.capabilities;
+    data->pmkid = ie.pmkid;
+    data->mgmt_group_cipher = cipher_type_map(ie.mgmt_group_cipher);
+
+    return ret;
+}
+
+int esp_supplicant_init(void)
+{
+    struct wpa_funcs *wpa_cb;
+
+    wpa_cb = (struct wpa_funcs *)os_malloc(sizeof(struct wpa_funcs));
+    if (!wpa_cb) {
+        return ESP_ERR_NO_MEM;
+    }
+
+    wpa_cb->wpa_sta_init       = wpa_attach;
+    wpa_cb->wpa_sta_deinit     = wpa_deattach;
+    wpa_cb->wpa_sta_rx_eapol   = wpa_sm_rx_eapol;
+    wpa_cb->wpa_sta_connect    = wpa_sta_connect;
+    wpa_cb->wpa_sta_in_4way_handshake = wpa_sta_in_4way_handshake;
+
+    wpa_cb->wpa_ap_join       = wpa_ap_join;
+    wpa_cb->wpa_ap_remove     = wpa_ap_remove;
+    wpa_cb->wpa_ap_get_wpa_ie = wpa_ap_get_wpa_ie;
+    wpa_cb->wpa_ap_rx_eapol   = wpa_ap_rx_eapol;
+    wpa_cb->wpa_ap_init       = hostap_init;
+    wpa_cb->wpa_ap_deinit     = hostap_deinit;
+
+    wpa_cb->wpa_config_parse_string  = wpa_config_parse_string;
+    wpa_cb->wpa_parse_wpa_ie  = wpa_parse_wpa_ie_wrapper;
+    wpa_cb->wpa_config_bss = wpa_config_bss;
+    wpa_cb->wpa_michael_mic_failure = wpa_michael_mic_failure;
+
+    esp_wifi_register_wpa_cb_internal(wpa_cb);
+
+    return ESP_OK;
+}
+
+bool  wpa_hook_deinit(void)
+{
+    return esp_wifi_unregister_wpa_cb_internal();
+}
diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_wpas_glue.c b/components/wpa_supplicant/src/esp_supplicant/esp_wpas_glue.c
new file mode 100644 (file)
index 0000000..89c901f
--- /dev/null
@@ -0,0 +1,114 @@
+// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifdef ESP_SUPPLICANT
+
+#include "utils/includes.h"
+#include "utils/common.h"
+#include "common/eapol_common.h"
+#include "rsn_supp/wpa.h"
+
+u8   *wpa_sm_alloc_eapol(struct wpa_sm *sm, u8 type,
+                         const void *data, u16 data_len,
+                         size_t *msg_len, void **data_pos)
+{
+    void *buffer;
+    struct ieee802_1x_hdr *hdr;
+
+    *msg_len = sizeof(struct ieee802_1x_hdr) + data_len;
+
+    buffer = os_malloc(*msg_len + sizeof(struct l2_ethhdr));
+
+    if (buffer == NULL) {
+        return NULL;
+    }
+
+    /* XXX: reserve l2_ethhdr is enough */
+    hdr = (struct ieee802_1x_hdr *)((char *)buffer + sizeof(struct l2_ethhdr));
+
+    hdr->version = sm->eapol_version;
+    hdr->type = type;
+    hdr->length = host_to_be16(data_len);
+
+    if (data) {
+        memcpy(hdr + 1, data, data_len);
+    } else {
+        memset(hdr + 1, 0, data_len);
+    }
+
+    if (data_pos) {
+        *data_pos = hdr + 1;
+    }
+
+    return (u8 *) hdr;
+}
+
+void  wpa_sm_free_eapol(u8 *buffer)
+{
+    buffer = buffer - sizeof(struct l2_ethhdr);
+    os_free(buffer);
+}
+
+void  wpa_sm_deauthenticate(struct wpa_sm *sm, u8 reason_code)
+{
+
+    /*only need send deauth frame when associated*/
+    if (WPA_SM_STATE(sm) >= WPA_ASSOCIATED) {
+        sm->wpa_deauthenticate(reason_code);
+    }
+}
+
+/**
+ * mlme_setprotection - MLME-SETPROTECTION.request primitive
+ * @priv: Private driver interface data
+ * @addr: Address of the station for which to set protection (may be
+ * %NULL for group keys)
+ * @protect_type: MLME_SETPROTECTION_PROTECT_TYPE_*
+ * @key_type: MLME_SETPROTECTION_KEY_TYPE_*
+ * Returns: 0 on success, -1 on failure
+ *
+ * This is an optional function that can be used to set the driver to
+ * require protection for Tx and/or Rx frames. This uses the layer
+ * interface defined in IEEE 802.11i-2004 clause 10.3.22.1
+ * (MLME-SETPROTECTION.request). Many drivers do not use explicit
+ * set protection operation; instead, they set protection implicitly
+ * based on configured keys.
+ */
+int  wpa_sm_mlme_setprotection(struct wpa_sm *sm, const u8 *addr,
+                               int protect_type, int key_type)
+{
+    return 0;
+}
+
+/*
+ *use above two functions to get wpa_ie and rsn_ie, then don't need wpa_sm_get_beacon_ie function
+*/
+int  wpa_sm_get_beacon_ie(struct wpa_sm *sm)
+{
+    return 0;
+}
+
+/**
+ * wpa_supplicant_disassociate - Disassociate the current connection
+ * @wpa_s: Pointer to wpa_supplicant data
+ * @reason_code: IEEE 802.11 reason code for the disassociate frame
+ *
+ * This function is used to request %wpa_supplicant to disassociate with the
+ * current AP.
+ */
+void  wpa_sm_disassociate(struct wpa_sm *sm, int reason_code)
+{
+    /*check if need clear internal state and data value*/
+}
+#endif
diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_wpas_glue.h b/components/wpa_supplicant/src/esp_supplicant/esp_wpas_glue.h
new file mode 100644 (file)
index 0000000..4d86796
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef WPAS_GLUE_H
+#define WPAS_GLUE_H
+
+u8 *wpa_sm_alloc_eapol(struct wpa_sm *sm, u8 type,
+                       const void *data, u16 data_len,
+                       size_t *msg_len, void **data_pos);
+
+int wpa_sm_mlme_setprotection(struct wpa_sm *sm, const u8 *addr,
+                              int protect_type, int key_type);
+
+void wpa_sm_deauthenticate(struct wpa_sm *sm, u8 reason_code);
+
+void wpa_sm_disassociate(struct wpa_sm *sm, int reason_code);
+
+int wpa_sm_get_beacon_ie(struct wpa_sm *sm);
+
+void wpa_sm_free_eapol(u8 *buffer);
+
+#endif /* WPAS_GLUE_H */
diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_wps.c b/components/wpa_supplicant/src/esp_supplicant/esp_wps.c
new file mode 100644 (file)
index 0000000..03ed6e8
--- /dev/null
@@ -0,0 +1,2138 @@
+// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <string.h>
+
+#include "utils/includes.h"
+#include "rsn_supp/wpa.h"
+#include "utils/common.h"
+#include "common/eapol_common.h"
+#include "utils/wpa_debug.h"
+#include "common/ieee802_11_defs.h"
+#include "crypto/dh_group5.h"
+#include "wps/wps_i.h"
+#include "wps/wps_dev_attr.h"
+#include "eap_peer/eap_defs.h"
+#include "eap_peer/eap_common.h"
+#include "esp_wifi_driver.h"
+#include "esp_event.h"
+#include "esp_wifi.h"
+#include "esp_err.h"
+#include "esp_private/wifi.h"
+
+#define API_MUTEX_TAKE() do {\
+    if (!s_wps_api_lock) {\
+        s_wps_api_lock = xSemaphoreCreateRecursiveMutex();\
+        if (!s_wps_api_lock) {\
+            wpa_printf(MSG_ERROR, "wps api lock create failed");\
+            return ESP_ERR_NO_MEM;\
+        }\
+    }\
+    xSemaphoreTakeRecursive(s_wps_api_lock, portMAX_DELAY);\
+} while(0)
+
+#define API_MUTEX_GIVE() xSemaphoreGiveRecursive(s_wps_api_lock)
+#define DATA_MUTEX_TAKE() xSemaphoreTakeRecursive(s_wps_data_lock, portMAX_DELAY)
+#define DATA_MUTEX_GIVE() xSemaphoreGiveRecursive(s_wps_data_lock)
+
+#define WPS_ADDR_LEN 6
+#ifdef USE_WPS_TASK
+struct wps_rx_param {
+    u8 sa[WPS_ADDR_LEN];
+    u8 *buf;
+    int len;
+};
+
+typedef struct {
+    void *arg;
+    int ret; /* return value */
+} wps_ioctl_param_t;
+
+static void *s_wps_task_hdl = NULL;
+static void *s_wps_queue = NULL;
+static void *s_wps_api_lock = NULL;  /* Used in WPS public API only, never be freed */
+static void *s_wps_api_sem = NULL;   /* Sync semaphore used between WPS publi API caller task and WPS task */
+static void *s_wps_data_lock = NULL;
+static void *s_wps_task_create_sem = NULL;
+static bool s_wps_enabled = false;
+static uint8_t s_wps_sig_cnt[SIG_WPS_NUM] = {0};
+
+#endif
+
+void wifi_wps_scan_done(void *arg, STATUS status);
+void wifi_wps_scan(void);
+int wifi_station_wps_start(void);
+int wps_sm_rx_eapol_internal(u8 *src_addr, u8 *buf, u32 len);
+void wifi_wps_start_internal(void);
+int wifi_wps_enable_internal(const esp_wps_config_t *config);
+int wifi_wps_disable_internal(void);
+void wifi_station_wps_timeout_internal(void);
+void wifi_station_wps_msg_timeout_internal(void);
+void wifi_station_wps_success_internal(void);
+void wifi_wps_scan_internal(void);
+void wifi_station_wps_eapol_start_handle_internal(void);
+
+struct wps_sm *gWpsSm = NULL;
+static wps_factory_information_t *s_factory_info = NULL;
+
+#ifdef CONFIG_WPS_TESTING
+int wps_version_number = 0x20;
+int wps_testing_dummy_cred = 0;
+#endif /* CONFIG_WPS_TESTING */
+
+int wps_get_type(void)
+{
+    return esp_wifi_get_wps_type_internal();
+}
+
+int wps_set_type(uint32_t type)
+{
+    return esp_wifi_set_wps_type_internal(type);
+}
+
+int wps_get_status(void)
+{
+    return esp_wifi_get_wps_status_internal();
+}
+
+int wps_set_status(uint32_t status)
+{
+    return esp_wifi_set_wps_status_internal(status);
+}
+
+#ifdef USE_WPS_TASK
+void wps_task(void *pvParameters )
+{
+    ETSEvent *e;
+    wps_ioctl_param_t *param;
+    bool del_task = false;
+
+    xSemaphoreGive(s_wps_task_create_sem);
+
+    wpa_printf(MSG_DEBUG, "wps_Task enter");
+    for (;;) {
+        if ( pdPASS == xQueueReceive(s_wps_queue, &e, portMAX_DELAY) ) {
+
+            if ( (e->sig >= SIG_WPS_ENABLE) && (e->sig < SIG_WPS_NUM) ) {
+                DATA_MUTEX_TAKE();
+                if (s_wps_sig_cnt[e->sig]) {
+                    s_wps_sig_cnt[e->sig]--;
+                } else {
+                    wpa_printf(MSG_ERROR, "wpsT: invalid sig cnt, sig=%d cnt=%d", e->sig, s_wps_sig_cnt[e->sig]);
+                }
+                DATA_MUTEX_GIVE();
+            }
+
+            wpa_printf(MSG_DEBUG, "wpsT: rx sig=%d", e->sig);
+
+            switch (e->sig) {
+            case SIG_WPS_ENABLE:
+            case SIG_WPS_DISABLE:
+            case SIG_WPS_START:
+                param = (wps_ioctl_param_t *)e->par;
+                if (!param) {
+                    wpa_printf(MSG_ERROR, "wpsT: invalid param sig=%d", e->sig);
+                    xSemaphoreGive(s_wps_api_sem);
+                    break;
+                }
+
+                if (e->sig == SIG_WPS_ENABLE) {
+                    param->ret = wifi_wps_enable_internal((esp_wps_config_t *)(param->arg));
+                } else if (e->sig == SIG_WPS_DISABLE) {
+                    param->ret = wifi_wps_disable_internal();
+                    del_task = true;
+                    s_wps_task_hdl = NULL;
+                } else {
+                    param->ret = wifi_station_wps_start();
+                }
+
+                xSemaphoreGive(s_wps_api_sem);
+                break;
+
+            case SIG_WPS_RX: {
+                struct wps_rx_param *param;
+
+                param = (struct wps_rx_param *)(e->par);
+                if (param) {
+                    wps_sm_rx_eapol_internal(param->sa, param->buf, param->len);
+                    os_free(param->buf);
+                    os_free(param);
+                }
+                break;
+            }
+
+            case SIG_WPS_TIMER_TIMEOUT:
+                wifi_station_wps_timeout_internal();
+                break;
+
+            case SIG_WPS_TIMER_MSG_TIMEOUT:
+                wifi_station_wps_msg_timeout_internal();
+                break;
+
+            case SIG_WPS_TIMER_SUCCESS_CB:
+                wifi_station_wps_success_internal();
+                break;
+
+            case SIG_WPS_TIMER_SCAN:
+                wifi_wps_scan_internal();
+                break;
+
+            case SIG_WPS_TIMER_EAPOL_START:
+                wifi_station_wps_eapol_start_handle_internal();
+                break;
+
+            default:
+                wpa_printf(MSG_ERROR, "wpsT: invalid sig=%d", e->sig);
+                break;
+            }
+            os_free(e);
+
+            if (del_task) {
+                wpa_printf(MSG_DEBUG, "wpsT: delete task");
+                break;
+            }
+        }
+    }
+    vTaskDelete(NULL);
+}
+
+/* wps_post() is thread-safe
+ *
+ */
+int wps_post(uint32_t sig, uint32_t par)
+{
+    wpa_printf(MSG_DEBUG, "wps post: sig=%d cnt=%d", sig, s_wps_sig_cnt[sig]);
+
+    DATA_MUTEX_TAKE();
+    if (s_wps_sig_cnt[sig]) {
+        wpa_printf(MSG_DEBUG, "wps post: sig=%d processing", sig);
+        DATA_MUTEX_GIVE();
+        return ESP_OK;
+    } else {
+        ETSEvent *evt = (ETSEvent *)os_malloc(sizeof(ETSEvent));
+
+        if (evt == NULL) {
+            wpa_printf(MSG_ERROR, "WPS: E N M");
+            DATA_MUTEX_GIVE();
+            return ESP_FAIL;
+        }
+
+        s_wps_sig_cnt[sig]++;
+        evt->sig = sig;
+        evt->par = par;
+        DATA_MUTEX_GIVE();
+
+        if ( xQueueSend(s_wps_queue, &evt, 10 / portTICK_PERIOD_MS) != pdPASS) {
+            wpa_printf(MSG_ERROR, "WPS: Q S E");
+            DATA_MUTEX_TAKE();
+            s_wps_sig_cnt[sig]--;
+            DATA_MUTEX_GIVE();
+            return ESP_FAIL;
+        }
+    }
+    return ESP_OK;
+}
+#endif
+
+static void wps_sendto_wrapper(void *buffer, uint16_t len)
+{
+    esp_wifi_internal_tx(WIFI_IF_STA, buffer, len);
+}
+
+/*
+* wps_sm_ether_send - Send Ethernet frame
+* @wpa_s: Pointer to wpa_supplicant data
+* @dest: Destination MAC address
+* @proto: Ethertype in host byte order
+* @buf: Frame payload starting from IEEE 802.1X header
+* @len: Frame payload length
+* Returns: >=0 on success, <0 on failure
+*/
+static inline int wps_sm_ether_send(struct wps_sm *sm, const u8 *dest, u16 proto,
+                                    const u8 *data, size_t data_len)
+{
+    void *buffer = (void *)(data - sizeof(struct l2_ethhdr));
+    struct l2_ethhdr *eth = (struct l2_ethhdr *)buffer;
+
+    memcpy(eth->h_dest, dest, ETH_ALEN);
+    memcpy(eth->h_source, sm->ownaddr, ETH_ALEN);
+    eth->h_proto = host_to_be16(proto);
+
+    wps_sendto_wrapper(buffer, sizeof(struct l2_ethhdr) + data_len);
+
+    return ESP_OK;
+}
+
+
+u8 *wps_sm_alloc_eapol(struct wps_sm *sm, u8 type,
+                       const void *data, u16 data_len,
+                       size_t *msg_len, void **data_pos)
+{
+    void *buffer;
+    struct ieee802_1x_hdr *hdr;
+
+    *msg_len = sizeof(struct ieee802_1x_hdr) + data_len;
+    /* XXX: reserve l2_ethhdr is enough */
+    buffer = os_malloc(*msg_len + sizeof(struct l2_ethhdr));
+
+    if (buffer == NULL) {
+        return NULL;
+    }
+    hdr = (struct ieee802_1x_hdr *)((char *)buffer + sizeof(struct l2_ethhdr));
+
+    hdr->version = sm->eapol_version;
+    hdr->type = type;
+    hdr->length = host_to_be16(data_len);
+
+    if (data) {
+        memcpy(hdr + 1, data, data_len);
+    } else {
+        memset(hdr + 1, 0, data_len);
+    }
+
+    if (data_pos) {
+        *data_pos = hdr + 1;
+    }
+
+    return (u8 *) hdr;
+}
+
+
+void wps_sm_free_eapol(u8 *buffer)
+{
+    buffer = buffer - sizeof(struct l2_ethhdr);
+    os_free(buffer);
+
+}
+
+
+/**
+ * wps_init - Initialize WPS Registration protocol data
+ * @cfg: WPS configuration
+ * Returns: Pointer to allocated data or %NULL on failure
+ *
+ * This function is used to initialize WPS data for a registration protocol
+ * instance (i.e., each run of registration protocol as a Registrar of
+ * Enrollee. The caller is responsible for freeing this data after the
+ * registration run has been completed by calling wps_deinit().
+ */
+struct wps_data *wps_init(void)
+{
+    struct wps_sm *sm = gWpsSm;
+    struct wps_data *data = (struct wps_data *)os_zalloc(sizeof(*data));
+    const char *all_zero_pin = "00000000";
+
+    if (data == NULL) {
+        return NULL;
+    }
+
+    data->wps = sm->wps_ctx;
+
+    if (IS_WPS_REGISTRAR(wps_get_type())) {
+        data->registrar = 1;
+    } else {
+        data->registrar = 0;
+    }
+
+    data->registrar = 0; /* currently, we force to support enrollee only */
+
+    if (data->registrar) {
+        memcpy(data->uuid_r, sm->uuid, WPS_UUID_LEN);
+    } else {
+        memcpy(data->mac_addr_e, sm->dev->mac_addr, ETH_ALEN);
+        memcpy(data->uuid_e, sm->uuid, WPS_UUID_LEN);
+    }
+
+    if (wps_get_type() == WPS_TYPE_PIN) {
+        u32 spin = 0;
+        data->dev_pw_id = DEV_PW_DEFAULT;
+        data->dev_password_len = 8;
+        data->dev_password = (u8 *) os_zalloc(data->dev_password_len + 1);
+        if (data->dev_password == NULL) {
+            os_free(data);
+            return NULL;
+        }
+
+        spin = wps_generate_pin();
+        sprintf((char *)data->dev_password, "%08d", spin);
+        wpa_hexdump_key(MSG_DEBUG, "WPS: AP PIN dev_password",
+                        data->dev_password, data->dev_password_len);
+        do {
+            char tmpp[9];
+            os_bzero(tmpp, 9);
+            memcpy(tmpp, data->dev_password, 8);
+            wpa_printf(MSG_DEBUG, "WPS PIN [%s]", tmpp);
+            system_event_t evt;
+            evt.event_id = SYSTEM_EVENT_STA_WPS_ER_PIN;
+            memcpy(evt.event_info.sta_er_pin.pin_code, data->dev_password, 8);
+            esp_wifi_send_event_internal(&evt);
+        } while (0);
+    } else if (wps_get_type() == WPS_TYPE_PBC) {
+        data->pbc = 1;
+        /* Use special PIN '00000000' for PBC */
+        data->dev_pw_id = DEV_PW_PUSHBUTTON;
+        if (data->dev_password) {
+            os_free(data->dev_password);
+        }
+        data->dev_password = (u8 *) os_zalloc(9);
+        if (data->dev_password == NULL) {
+            os_free(data);
+            return NULL;
+        } else {
+            strncpy((char *)data->dev_password, all_zero_pin, 9);
+        }
+        data->dev_password_len = 8;
+    }
+
+#ifdef CONFIG_WPS_NFC
+    if (cfg->wps->ap && !cfg->registrar && cfg->wps->ap_nfc_dev_pw_id) {
+        data->dev_pw_id = cfg->wps->ap_nfc_dev_pw_id;
+        os_free(data->dev_password);
+        data->dev_password =
+            os_malloc(wpabuf_len(cfg->wps->ap_nfc_dev_pw));
+        if (data->dev_password == NULL) {
+            os_free(data);
+            return NULL;
+        }
+        memcpy(data->dev_password,
+               wpabuf_head(cfg->wps->ap_nfc_dev_pw),
+               wpabuf_len(cfg->wps->ap_nfc_dev_pw));
+        data->dev_password_len = wpabuf_len(cfg->wps->ap_nfc_dev_pw);
+    }
+#endif /* CONFIG_WPS_NFC */
+    data->wps->config_methods = WPS_CONFIG_PUSHBUTTON | WPS_CONFIG_DISPLAY;
+#ifdef CONFIG_WPS2
+    data->wps->config_methods |= (WPS_CONFIG_VIRT_PUSHBUTTON | WPS_CONFIG_PHY_DISPLAY);
+#endif
+
+    data->state = data->registrar ? RECV_M1 : SEND_M1;
+
+    return data;
+}
+
+
+/**
+ * wps_deinit - Deinitialize WPS Registration protocol data
+ * @data: WPS Registration protocol data from wps_init()
+ */
+void wps_deinit(void)
+{
+    struct wps_data *data = gWpsSm->wps;
+
+#ifdef CONFIG_WPS_NFC
+    if (data->registrar && data->nfc_pw_token)
+        wps_registrar_remove_nfc_pw_token(data->wps->registrar,
+                                          data->nfc_pw_token);
+#endif /* CONFIG_WPS_NFC */
+
+    if (data->wps_pin_revealed) {
+        wpa_printf(MSG_DEBUG,  "WPS: Full PIN information revealed and "
+                   "negotiation failed");
+    } else if (data->registrar)
+        wpa_printf(MSG_DEBUG,  "WPS: register information revealed and "
+                   "negotiation failed");
+    wpabuf_free(data->dh_privkey);
+
+#ifdef DESP32_WORKAROUND
+    /*
+     * due to the public key calculated when wps start, it will not calculate anymore even when we build M1 message, also calculate the key need take a long time
+     * which would cause WPS fail, so we clean the key after WPS finished .
+     */
+    data->dh_privkey = NULL;
+#endif //DESP32_WORKAROUND
+
+    wpabuf_free(data->dh_pubkey_e);
+    wpabuf_free(data->dh_pubkey_r);
+    wpabuf_free(data->last_msg);
+    os_free(data->dev_password);
+    dh5_free(data->dh_ctx);
+    wps_dev_deinit(&data->peer_dev);
+#ifdef CONFIG_WPS_NFC
+    os_free(data->nfc_pw_token);
+#endif
+    os_free(data);
+}
+
+static void
+wps_build_ic_appie_wps_pr(void)
+{
+    struct wpabuf *extra_ie = NULL;
+    struct wpabuf *wps_ie;
+    struct wps_sm *sm = gWpsSm;
+
+    wpa_printf(MSG_DEBUG, "wps build: wps pr");
+
+    if (wps_get_type() == WPS_TYPE_PBC) {
+        wps_ie = (struct wpabuf *)wps_build_probe_req_ie(DEV_PW_PUSHBUTTON,
+                 sm->dev,
+                 sm->uuid, WPS_REQ_ENROLLEE,
+                 0, NULL);
+    } else {
+        wps_ie = (struct wpabuf *)wps_build_probe_req_ie(DEV_PW_DEFAULT,
+                 sm->dev,
+                 sm->uuid, WPS_REQ_ENROLLEE,
+                 0, NULL);
+    }
+
+    if (wps_ie) {
+        if (wpabuf_resize(&extra_ie, wpabuf_len(wps_ie)) == 0) {
+            wpabuf_put_buf(extra_ie, wps_ie);
+        } else {
+            wpabuf_free(wps_ie);
+            return;
+        }
+        wpabuf_free(wps_ie);
+    }
+
+    esp_wifi_set_appie_internal(WIFI_APPIE_WPS_PR, (uint8_t *)wpabuf_head(extra_ie), extra_ie->used, 0);
+    wpabuf_free(extra_ie);
+}
+
+static void
+wps_build_ic_appie_wps_ar(void)
+{
+    struct wpabuf *buf = (struct wpabuf *)wps_build_assoc_req_ie(WPS_REQ_ENROLLEE);
+
+    wpa_printf(MSG_DEBUG, "wps build: wps ar");
+
+    if (buf) {
+        esp_wifi_set_appie_internal(WIFI_APPIE_WPS_AR, (uint8_t *)wpabuf_head(buf), buf->used, 0);
+        wpabuf_free(buf);
+    }
+}
+
+static bool
+wps_parse_scan_result(struct wps_scan_ie *scan)
+{
+    struct wps_sm *sm = gWpsSm;
+    wifi_mode_t op_mode = 0;
+#ifdef WPS_DEBUG
+    char tmp[32];
+
+    os_bzero(tmp, 32);
+    strncpy(tmp, (char *)&scan->ssid[2], (int)scan->ssid[1]);
+    wpa_printf(MSG_DEBUG, "wps parse scan: %s", tmp);
+#endif
+
+    if (wps_get_type() == WPS_TYPE_DISABLE
+            || (wps_get_status() != WPS_STATUS_DISABLE
+                && wps_get_status() != WPS_STATUS_SCANNING)
+       ) {
+        return false;
+    }
+
+    esp_wifi_get_mode(&op_mode);
+    if ((op_mode == WIFI_MODE_STA || op_mode == WIFI_MODE_APSTA) && scan->wps) {
+        struct wpabuf *buf = wpabuf_alloc_copy(scan->wps + 6, scan->wps[1] - 4);
+
+        if (wps_is_selected_pbc_registrar(buf, scan->bssid)
+                || wps_is_selected_pin_registrar(buf, scan->bssid)) {
+            wpabuf_free(buf);
+
+            if (sm->is_wps_scan == false) {
+                return false;
+            }
+            if (memcmp(sm->config.bssid, scan->bssid, ETH_ALEN) != 0 ) {
+                sm->discover_ssid_cnt++;
+            }
+
+            if (!scan->rsn && !scan->wpa && (scan->capinfo & WIFI_CAPINFO_PRIVACY)) {
+                wpa_printf(MSG_ERROR, "WEP not suppported in WPS");
+
+                return false;
+            }
+
+            esp_wifi_enable_sta_privacy_internal();
+            os_bzero(sm->ssid, sizeof(sm->ssid));
+            strncpy((char *)sm->ssid, (char *)&scan->ssid[2], (int)scan->ssid[1]);
+            sm->ssid_len = scan->ssid[1];
+            if (scan->bssid) {
+                memcpy(gWpsSm->bssid, scan->bssid, ETH_ALEN);
+                memcpy(sm->config.bssid, scan->bssid, ETH_ALEN);
+                sm->config.bssid_set = 1;
+            } else {
+            }
+            wpa_printf(MSG_DEBUG, "wps discover [%s]", sm->ssid);
+            sm->scan_cnt = 0;
+
+            memcpy(sm->config.ssid, sm->ssid, sm->ssid_len);
+            sm->channel = scan->chan;
+
+            return true;
+        }
+        wpabuf_free(buf);
+    }
+
+    return false;
+}
+
+int wps_send_eap_identity_rsp(u8 id)
+{
+    struct wps_sm *sm = gWpsSm;
+    struct wpabuf *eap_buf = NULL;
+    u8 bssid[6];
+    u8 *buf = NULL;
+    int len;
+    int ret = ESP_OK;
+
+    wpa_printf(MSG_DEBUG, "wps send eapol id rsp");
+    eap_buf = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_IDENTITY, sm->identity_len,
+                            EAP_CODE_RESPONSE, id);
+    if (!eap_buf) {
+        ret = ESP_FAIL;
+        goto _err;
+    }
+
+    ret = esp_wifi_get_assoc_bssid_internal(bssid);
+    if (ret != 0) {
+        wpa_printf(MSG_ERROR, "bssid is empty!");
+        return ESP_FAIL;
+    }
+
+    wpabuf_put_data(eap_buf, sm->identity, sm->identity_len);
+
+    buf = wps_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAP_PACKET, wpabuf_head_u8(eap_buf), wpabuf_len(eap_buf), (size_t *)&len, NULL);
+    if (!buf) {
+        ret = ESP_ERR_NO_MEM;
+        goto _err;
+    }
+
+    ret = wps_sm_ether_send(sm, bssid, ETH_P_EAPOL, buf, len);
+    if (ret) {
+        ret = ESP_FAIL;
+        goto _err;
+    }
+
+_err:
+    wps_sm_free_eapol(buf);
+    wpabuf_free(eap_buf);
+    return ret;
+}
+
+int wps_send_frag_ack(u8 id)
+{
+    struct wps_sm *sm = gWpsSm;
+    struct wpabuf *eap_buf = NULL;
+    u8 bssid[6];
+    u8 *buf;
+    int len;
+    int ret = 0;
+    enum wsc_op_code opcode = WSC_FRAG_ACK;
+
+    wpa_printf(MSG_DEBUG, "send frag ack id:%d", id);
+
+    if (!sm) {
+        return ESP_FAIL;
+    }
+
+    ret = esp_wifi_get_assoc_bssid_internal(bssid);
+    if (ret != 0) {
+        wpa_printf(MSG_ERROR, "bssid is empty!");
+        return ret;
+    }
+
+    eap_buf = eap_msg_alloc(EAP_VENDOR_WFA, 0x00000001, 2, EAP_CODE_RESPONSE, id);
+    if (!eap_buf) {
+        ret = ESP_ERR_NO_MEM;
+        goto _err;
+    }
+
+    wpabuf_put_u8(eap_buf, opcode);
+    wpabuf_put_u8(eap_buf, 0x00); /* flags */
+
+    buf = wps_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAP_PACKET, wpabuf_head_u8(eap_buf), wpabuf_len(eap_buf), (size_t *)&len, NULL);
+    if (!buf) {
+        ret = ESP_ERR_NO_MEM;
+        goto _err;
+    }
+
+    ret = wps_sm_ether_send(sm, bssid, ETH_P_EAPOL, buf, len);
+    if (ret) {
+        ret = ESP_ERR_NO_MEM;
+        goto _err;
+    }
+
+_err:
+    wpabuf_free(eap_buf);
+    return ret;
+}
+
+int wps_enrollee_process_msg_frag(struct wpabuf **buf, int tot_len, u8 *frag_data, int frag_len, u8 flag)
+{
+    struct wps_sm *sm = gWpsSm;
+    u8 identifier;
+
+    if (!sm) {
+        return ESP_FAIL;
+    }
+
+    identifier = sm->current_identifier;
+
+    if (buf == NULL || frag_data == NULL) {
+        wpa_printf(MSG_ERROR, "fun:%s. line:%d, frag buf or frag data is null", __FUNCTION__, __LINE__);
+        return ESP_FAIL;
+    }
+
+    if (*buf == NULL) {
+        if (0 == (flag & WPS_MSG_FLAG_LEN) || tot_len < frag_len) {
+            wpa_printf(MSG_ERROR, "fun:%s. line:%d, flag error:%02x", __FUNCTION__, __LINE__, flag);
+            return ESP_FAIL;
+        }
+
+        *buf = wpabuf_alloc(tot_len);
+        if (*buf == NULL) {
+            return ESP_ERR_NO_MEM;
+        }
+
+        wpabuf_put_data(*buf, frag_data, frag_len);
+        return wps_send_frag_ack(identifier);
+    }
+
+    if (flag & WPS_MSG_FLAG_LEN) {
+        wpa_printf(MSG_ERROR, "fun:%s. line:%d, flag error:%02x", __FUNCTION__, __LINE__, flag);
+        return ESP_FAIL;
+    }
+
+    wpabuf_put_data(*buf, frag_data, frag_len);
+
+    if (flag & WPS_MSG_FLAG_MORE) {
+        return wps_send_frag_ack(identifier);
+    }
+
+    return ESP_OK;
+}
+
+int wps_process_wps_mX_req(u8 *ubuf, int len, enum wps_process_res *res)
+{
+    struct wps_sm *sm = gWpsSm;
+    static struct wpabuf *wps_buf = NULL;
+    struct eap_expand *expd;
+    int tlen = 0;
+    u8 *tbuf;
+    u8 flag;
+    int frag_len;
+    u16 be_tot_len = 0;
+
+    if (!sm) {
+        return ESP_FAIL;
+    }
+
+    expd = (struct eap_expand *) ubuf;
+    wpa_printf(MSG_DEBUG, "wps process mX req: len %d, tlen %d", len, tlen);
+
+    flag = *(u8 *)(ubuf + sizeof(struct eap_expand));
+    if (flag & WPS_MSG_FLAG_LEN) {
+        tbuf = ubuf + sizeof(struct eap_expand) + 1 + 2;//two bytes total length
+        frag_len = len - (sizeof(struct eap_expand) + 1 + 2);
+        be_tot_len = *(u16 *)(ubuf + sizeof(struct eap_expand) + 1);
+        tlen = ((be_tot_len & 0xff) << 8) | ((be_tot_len >> 8) & 0xff);
+    } else {
+        tbuf = ubuf + sizeof(struct eap_expand) + 1;
+        frag_len = len - (sizeof(struct eap_expand) + 1);
+        tlen = frag_len;
+    }
+
+    if ((flag & WPS_MSG_FLAG_MORE) || wps_buf != NULL) {//frag msg
+        wpa_printf(MSG_DEBUG, "rx frag msg id:%d, flag:%d, frag_len: %d, tot_len: %d, be_tot_len:%d", sm->current_identifier, flag, frag_len, tlen, be_tot_len);
+        if (ESP_OK != wps_enrollee_process_msg_frag(&wps_buf, tlen, tbuf, frag_len, flag)) {
+            if (wps_buf) {
+                wpabuf_free(wps_buf);
+                wps_buf = NULL;
+            }
+            return ESP_FAIL;
+        }
+        if (flag & WPS_MSG_FLAG_MORE) {
+            if (res) {
+                *res = WPS_FRAGMENT;
+            }
+            return ESP_OK;
+        }
+    } else { //not frag msg
+        if (wps_buf) {//if something wrong, frag msg buf is not freed, free first
+            wpa_printf(MSG_ERROR, "something is wrong, frag buf is not freed");
+            wpabuf_free(wps_buf);
+            wps_buf = NULL;
+        }
+        wps_buf = wpabuf_alloc_copy(tbuf, tlen);
+    }
+
+    if (!wps_buf) {
+        return ESP_FAIL;
+    }
+
+    ets_timer_disarm(&sm->wps_msg_timeout_timer);
+
+    if (res) {
+        *res = wps_enrollee_process_msg(sm->wps, expd->opcode, wps_buf);
+    } else {
+        wps_enrollee_process_msg(sm->wps, expd->opcode, wps_buf);
+    }
+
+    if (wps_buf) {
+        wpabuf_free(wps_buf);
+        wps_buf = NULL;
+    }
+    return ESP_OK;
+}
+
+int wps_send_wps_mX_rsp(u8 id)
+{
+    struct wps_sm *sm = gWpsSm;
+    struct wpabuf *eap_buf = NULL;
+    struct wpabuf *wps_buf = NULL;
+    u8 bssid[6];
+    u8 *buf;
+    int len;
+    int ret = 0;
+    enum wsc_op_code opcode;
+
+    wpa_printf(MSG_DEBUG, "wps send wps mX rsp");
+
+    if (!sm) {
+        return ESP_FAIL;
+    }
+
+    ret = esp_wifi_get_assoc_bssid_internal(bssid);
+    if (ret != 0) {
+        wpa_printf(MSG_ERROR, "bssid is empty!");
+        return ret;
+    }
+
+    wps_buf = (struct wpabuf *)wps_enrollee_get_msg(sm->wps, &opcode);
+    if (!wps_buf) {
+        ret = ESP_FAIL;
+        goto _err;
+    }
+
+    eap_buf = eap_msg_alloc(EAP_VENDOR_WFA, 0x00000001, wpabuf_len(wps_buf) + 2, EAP_CODE_RESPONSE, id);
+    if (!eap_buf) {
+        ret = ESP_FAIL;
+        goto _err;
+    }
+
+    wpabuf_put_u8(eap_buf, opcode);
+    wpabuf_put_u8(eap_buf, 0x00); /* flags */
+    wpabuf_put_data(eap_buf, wpabuf_head_u8(wps_buf), wpabuf_len(wps_buf));
+
+
+    wpabuf_free(wps_buf);
+
+    buf = wps_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAP_PACKET, wpabuf_head_u8(eap_buf), wpabuf_len(eap_buf), (size_t *)&len, NULL);
+    if (!buf) {
+        ret = ESP_FAIL;
+        goto _err;
+    }
+
+    ret = wps_sm_ether_send(sm, bssid, ETH_P_EAPOL, buf, len);
+    if (ret) {
+        ret = ESP_FAIL;
+        goto _err;
+    }
+
+_err:
+    wpabuf_free(eap_buf);
+    return ret;
+}
+
+
+
+int wps_tx_start(void)
+{
+    struct wps_sm *sm = gWpsSm;
+    u8 bssid[6];
+    u8 *buf;
+    int len;
+    int ret = 0;
+
+    ret = esp_wifi_get_assoc_bssid_internal(bssid);
+    if (ret != 0) {
+        wpa_printf(MSG_ERROR, "bssid is empty!");
+        return ret;
+    }
+
+    if (!sm) {
+        return ESP_FAIL;
+    }
+
+    wpa_printf(MSG_DEBUG,  "WPS: Send EAPOL START.");
+    buf = wps_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAPOL_START, (u8 *)"", 0, (size_t *)&len, NULL);
+    if (!buf) {
+        return ESP_ERR_NO_MEM;
+    }
+
+    wps_sm_ether_send(sm, bssid, ETH_P_EAPOL, buf, len);
+    wps_sm_free_eapol(buf);
+
+    ets_timer_arm(&sm->wps_eapol_start_timer, 3000, 0);
+
+    return ESP_OK;
+}
+
+int wps_start_pending(void)
+{
+    if (!gWpsSm) {
+        return ESP_FAIL;
+    }
+
+    wpa_printf(MSG_DEBUG, "wps start pending");
+    return wps_tx_start();
+}
+
+int wps_stop_process(system_event_sta_wps_fail_reason_t reason_code)
+{
+    struct wps_sm *sm = gWpsSm;
+
+    if (!gWpsSm) {
+        return ESP_FAIL;
+    }
+
+    wps_set_status(WPS_STATUS_DISABLE);
+    sm->scan_cnt = 0;
+    sm->discover_ssid_cnt = 0;
+    sm->wps->state = SEND_M1;
+    os_bzero(sm->bssid, ETH_ALEN);
+    os_bzero(sm->ssid, 32);
+    sm->ssid_len = 0;
+    os_bzero((u8 *)&sm->config, sizeof(wifi_sta_config_t));
+
+    esp_wifi_disarm_sta_connection_timer_internal();
+    ets_timer_disarm(&sm->wps_msg_timeout_timer);
+    ets_timer_disarm(&sm->wps_success_cb_timer);
+
+    esp_wifi_disconnect();
+
+    wpa_printf(MSG_DEBUG, "Write wps_fail_information");
+    system_event_t evt;
+    evt.event_id = SYSTEM_EVENT_STA_WPS_ER_FAILED;
+    evt.event_info.sta_er_fail_reason = reason_code;
+    esp_wifi_send_event_internal(&evt);
+
+    return ESP_OK;
+}
+
+int wps_finish(void)
+{
+    struct wps_sm *sm = gWpsSm;
+    int ret = ESP_FAIL;
+
+    if (!gWpsSm) {
+        return ESP_FAIL;
+    }
+
+    if (sm->wps->state == WPS_FINISHED) {
+        wifi_config_t *config = (wifi_config_t *)os_zalloc(sizeof(wifi_config_t));
+
+        if (config == NULL) {
+            system_event_t evt;
+            evt.event_id = SYSTEM_EVENT_STA_WPS_ER_FAILED;
+            esp_wifi_send_event_internal(&evt);
+            return ESP_FAIL;
+        }
+
+        wpa_printf(MSG_DEBUG, "wps finished------>");
+        wps_set_status(WPS_STATUS_SUCCESS);
+        esp_wifi_disarm_sta_connection_timer_internal();
+        ets_timer_disarm(&sm->wps_timeout_timer);
+        ets_timer_disarm(&sm->wps_msg_timeout_timer);
+
+        memset(config, 0x00, sizeof(wifi_sta_config_t));
+        memcpy(config->sta.ssid, sm->ssid, sm->ssid_len);
+        memcpy(config->sta.password, sm->key, sm->key_len);
+        memcpy(config->sta.bssid, sm->bssid, ETH_ALEN);
+        config->sta.bssid_set = 0;
+        esp_wifi_set_config(0, config);
+        os_free(config);
+        config = NULL;
+
+        ets_timer_disarm(&sm->wps_success_cb_timer);
+        ets_timer_arm(&sm->wps_success_cb_timer, 1000, 0);
+
+        ret = 0;
+    } else {
+        wpa_printf(MSG_ERROR, "wps failed----->");
+
+        ret = wps_stop_process(WPS_FAIL_REASON_NORMAL);
+    }
+
+    return ret;
+}
+
+/* Add current ap to discard ap list */
+void wps_add_discard_ap(u8 *bssid)
+{
+    struct wps_sm *sm = gWpsSm;
+    u8 cnt = sm->discard_ap_cnt;
+
+    if (!gWpsSm || !bssid) {
+        return;
+    }
+
+    if (sm->discard_ap_cnt < WPS_MAX_DIS_AP_NUM) {
+        sm->discard_ap_cnt++;
+    } else {
+        for (cnt = 0; cnt < WPS_MAX_DIS_AP_NUM - 2; cnt++) {
+            memcpy(sm->dis_ap_list[cnt].bssid, sm->dis_ap_list[cnt + 1].bssid, 6);
+        }
+        sm->discard_ap_cnt = WPS_MAX_DIS_AP_NUM;
+    }
+    memcpy(sm->dis_ap_list[cnt].bssid, bssid, 6);
+}
+
+int wps_start_msg_timer(void)
+{
+    struct wps_sm *sm = gWpsSm;
+    uint32_t msg_timeout;
+    int ret = ESP_FAIL;
+
+    if (!gWpsSm) {
+        return ESP_FAIL;
+    }
+
+    if (sm->wps->state == WPS_FINISHED) {
+        msg_timeout = 100;
+        wpa_printf(MSG_DEBUG, "start msg timer WPS_FINISHED %d ms", msg_timeout);
+        ets_timer_disarm(&sm->wps_msg_timeout_timer);
+        ets_timer_arm(&sm->wps_msg_timeout_timer, msg_timeout, 0);
+        ret = 0;
+    } else if (sm->wps->state == RECV_M2) {
+        msg_timeout = 5000;
+        wpa_printf(MSG_DEBUG, "start msg timer RECV_M2 %d ms", msg_timeout);
+        ets_timer_disarm(&sm->wps_msg_timeout_timer);
+        ets_timer_arm(&sm->wps_msg_timeout_timer, msg_timeout, 0);
+        ret = 0;
+    }
+    return ret;
+}
+
+/**
+ * wps_sm_rx_eapol - Process received WPA EAPOL frames
+ * @sm: Pointer to WPA state machine data from wpa_sm_init()
+ * @src_addr: Source MAC address of the EAPOL packet
+ * @buf: Pointer to the beginning of the EAPOL data (EAPOL header)
+ * @len: Length of the EAPOL frame
+ * Returns: 1 = WPA EAPOL-Key processed, ESP_OK = not a WPA EAPOL-Key, ESP_FAIL failure
+ *
+ * This function is called for each received EAPOL frame. Other than EAPOL-Key
+ * frames can be skipped if filtering is done elsewhere. wpa_sm_rx_eapol() is
+ * only processing WPA and WPA2 EAPOL-Key frames.
+ *
+ * The received EAPOL-Key packets are validated and valid packets are replied
+ * to. In addition, key material (PTK, GTK) is configured at the end of a
+ * successful key handshake.
+ * buf begin from version, so remove mac header ,snap header and ether_type
+ */
+int wps_sm_rx_eapol(u8 *src_addr, u8 *buf, u32 len)
+{
+    if (!gWpsSm) {
+        return ESP_FAIL;
+    }
+
+#ifdef USE_WPS_TASK
+    {
+        struct wps_rx_param *param = (struct wps_rx_param *)os_zalloc(sizeof(struct wps_rx_param));   /* free in task */
+
+        if (!param) {
+            return ESP_ERR_NO_MEM;
+        }
+
+        param->buf = (u8 *)os_zalloc(len);   /* free in task */
+        if (!param->buf) {
+            os_free(param);
+            return ESP_ERR_NO_MEM;
+        }
+        memcpy(param->buf, buf, len);
+        param->len = len;
+        memcpy(param->sa, src_addr, WPS_ADDR_LEN);
+
+        return wps_post(SIG_WPS_RX, (uint32_t)param);
+    }
+#else
+    return wps_sm_rx_eapol_internal(src_addr, buf, len);
+#endif
+}
+
+int wps_sm_rx_eapol_internal(u8 *src_addr, u8 *buf, u32 len)
+{
+    struct wps_sm *sm = gWpsSm;
+    u32 plen, data_len, eap_len;
+    struct ieee802_1x_hdr *hdr;
+    struct eap_hdr *ehdr;
+    u8 *tmp;
+    u8 eap_code;
+    u8 eap_type;
+    int ret = ESP_FAIL;
+    enum wps_process_res res = WPS_DONE;
+
+    if (!gWpsSm) {
+        return ESP_FAIL;
+    }
+
+    if (len < sizeof(*hdr) + sizeof(*ehdr)) {
+#ifdef DEBUG_PRINT
+        wpa_printf(MSG_DEBUG,  "WPA: EAPOL frame too short to be a WPA "
+                   "EAPOL-Key (len %lu, expecting at least %lu)",
+                   (unsigned long) len,
+                   (unsigned long) sizeof(*hdr) + sizeof(*ehdr));
+#endif
+        return ESP_OK;
+    }
+
+    tmp = buf;
+
+    hdr = (struct ieee802_1x_hdr *) tmp;
+    ehdr = (struct eap_hdr *) (hdr + 1);
+    plen = be_to_host16(hdr->length);
+    data_len = plen + sizeof(*hdr);
+    eap_len = be_to_host16(ehdr->length);
+
+#ifdef DEBUG_PRINT
+    wpa_printf(MSG_DEBUG, "IEEE 802.1X RX: version=%d type=%d length=%d",
+               hdr->version, hdr->type, plen);
+#endif
+
+    if (hdr->version < EAPOL_VERSION) {
+        /* TODO: backwards compatibility */
+    }
+    if (hdr->type != IEEE802_1X_TYPE_EAP_PACKET) {
+#ifdef DEBUG_PRINT
+        wpa_printf(MSG_DEBUG, "WPS: EAP frame (type %u) discarded, "
+                   "not a EAP PACKET frame", hdr->type);
+#endif
+        ret = 0;
+        goto out;
+    }
+    if (plen > len - sizeof(*hdr) || plen < sizeof(*ehdr)) {
+#ifdef DEBUG_PRINT
+        wpa_printf(MSG_DEBUG, "WPA: EAPOL frame payload size %lu "
+                   "invalid (frame size %lu)",
+                   (unsigned long) plen, (unsigned long) len);
+#endif
+        ret = 0;
+        goto out;
+    }
+
+    wpa_hexdump(MSG_MSGDUMP, "WPA: RX EAPOL-EAP PACKET", tmp, len);
+
+    if (data_len < len) {
+#ifdef DEBUG_PRINT
+        wpa_printf(MSG_DEBUG, "WPA: ignoring %lu bytes after the IEEE "
+                   "802.1X data", (unsigned long) len - data_len);
+#endif
+    }
+
+    if (eap_len != plen) {
+#ifdef DEBUG_PRINT
+        wpa_printf(MSG_DEBUG, "WPA: EAPOL length %lu "
+                   "invalid (eapol length %lu)",
+                   (unsigned long) eap_len, (unsigned long) plen);
+#endif
+        ret = 0;
+        goto out;
+    }
+
+    eap_code = ehdr->code;
+    switch (eap_code) {
+    case EAP_CODE_SUCCESS:
+        wpa_printf(MSG_DEBUG, "error: receive eapol success frame!");
+        ret = 0;
+        break;
+    case EAP_CODE_FAILURE:
+        wpa_printf(MSG_DEBUG, "receive eap code failure!");
+        ret = wps_finish();
+        break;
+    case EAP_CODE_RESPONSE:
+        wpa_printf(MSG_DEBUG, "error: receive eapol response frame!");
+        ret = 0;
+        break;
+    case EAP_CODE_REQUEST: {
+        eap_type = ((u8 *)ehdr)[sizeof(*ehdr)];
+        switch (eap_type) {
+        case EAP_TYPE_IDENTITY:
+            wpa_printf(MSG_DEBUG, "=========identity===========");
+            sm->current_identifier = ehdr->identifier;
+            ets_timer_disarm(&sm->wps_eapol_start_timer);
+            wpa_printf(MSG_DEBUG,  "WPS: Build EAP Identity.");
+            ret = wps_send_eap_identity_rsp(ehdr->identifier);
+            ets_timer_arm(&sm->wps_eapol_start_timer, 3000, 0);
+            break;
+        case EAP_TYPE_EXPANDED:
+            wpa_printf(MSG_DEBUG, "=========expanded plen[%d], %d===========", plen, sizeof(*ehdr));
+            if (ehdr->identifier == sm->current_identifier) {
+                ret = 0;
+                wpa_printf(MSG_DEBUG, "wps: ignore overlap identifier");
+                goto out;
+            }
+            sm->current_identifier = ehdr->identifier;
+
+            tmp = (u8 *)(ehdr + 1) + 1;
+            ret = wps_process_wps_mX_req(tmp, plen - sizeof(*ehdr) - 1, &res);
+            if (ret == 0 && res != WPS_FAILURE && res != WPS_IGNORE && res != WPS_FRAGMENT) {
+                ret = wps_send_wps_mX_rsp(ehdr->identifier);
+                if (ret == 0) {
+                    wpa_printf(MSG_DEBUG, "sm->wps->state = %d", sm->wps->state);
+                    wps_start_msg_timer();
+                }
+            } else if (ret == 0 && res == WPS_FRAGMENT) {
+                wpa_printf(MSG_DEBUG, "wps frag, continue...");
+                ret = ESP_OK;
+            } else if (res == WPS_IGNORE) {
+                wpa_printf(MSG_DEBUG, "IGNORE overlap Mx");
+                ret = ESP_OK; /* IGNORE the overlap */
+            } else {
+                ret = ESP_FAIL;
+            }
+            break;
+        default:
+            break;
+        }
+        break;
+    }
+    default:
+        break;
+    }
+out:
+    if (ret != 0 || res == WPS_FAILURE) {
+        wpa_printf(MSG_DEBUG, "wpa rx eapol internal: fail ret=%d", ret);
+        wps_set_status(WPS_STATUS_DISABLE);
+        esp_wifi_disarm_sta_connection_timer_internal();
+        ets_timer_disarm(&sm->wps_timeout_timer);
+
+        system_event_t evt;
+        evt.event_id = SYSTEM_EVENT_STA_WPS_ER_FAILED;
+        esp_wifi_send_event_internal(&evt);
+
+        return ret;
+    }
+
+    return ret;
+}
+
+int wps_set_default_factory(void)
+{
+    if (!s_factory_info) {
+        s_factory_info = os_zalloc(sizeof(wps_factory_information_t));
+        if (!s_factory_info) {
+            wpa_printf(MSG_ERROR, "wps factory info malloc failed");
+            return ESP_ERR_NO_MEM;
+        }
+    }
+
+    sprintf(s_factory_info->manufacturer, "ESPRESSIF");
+    sprintf(s_factory_info->model_name, "ESPRESSIF IOT");
+    sprintf(s_factory_info->model_number, "ESP32");
+    sprintf(s_factory_info->device_name, "ESP32 STATION");
+
+    return ESP_OK;
+}
+
+int wps_set_factory_info(const esp_wps_config_t *config)
+{
+    int ret;
+
+    ret = wps_set_default_factory();
+    if (ret != 0) {
+        return ret;
+    }
+
+    if (config->factory_info.manufacturer[0] != 0) {
+        memcpy(s_factory_info->manufacturer, config->factory_info.manufacturer, WPS_MAX_MANUFACTURER_LEN - 1);
+    }
+
+    if (config->factory_info.model_number[0] != 0) {
+        memcpy(s_factory_info->model_number, config->factory_info.model_number, WPS_MAX_MODEL_NUMBER_LEN - 1);
+    }
+
+    if (config->factory_info.model_name[0] != 0) {
+        memcpy(s_factory_info->model_name, config->factory_info.model_name, WPS_MAX_MODEL_NAME_LEN - 1);
+    }
+
+    if (config->factory_info.device_name[0] != 0) {
+        memcpy(s_factory_info->device_name, config->factory_info.device_name, WPS_MAX_DEVICE_NAME_LEN - 1);
+    }
+
+    wpa_printf(MSG_INFO, "manufacturer: %s, model number: %s, model name: %s, device name: %s", s_factory_info->manufacturer,
+               s_factory_info->model_number, s_factory_info->model_name, s_factory_info->device_name);
+
+    return ESP_OK;
+}
+
+
+int wps_dev_init(void)
+{
+    int ret = 0;
+    struct wps_sm *sm = gWpsSm;
+    struct wps_device_data *dev = NULL;
+
+    if (!sm) {
+        ret = ESP_FAIL;
+        goto _out;
+    }
+
+    dev = &sm->wps_ctx->dev;
+    sm->dev = dev;
+
+    if (!dev) {
+        ret = ESP_FAIL;
+        goto _out;
+    }
+    dev->config_methods = WPS_CONFIG_VIRT_PUSHBUTTON | WPS_CONFIG_PHY_DISPLAY;
+    dev->rf_bands = WPS_RF_24GHZ;
+
+    WPA_PUT_BE16(dev->pri_dev_type, WPS_DEV_COMPUTER);
+    WPA_PUT_BE32(dev->pri_dev_type + 2, WPS_DEV_OUI_WFA);
+    WPA_PUT_BE16(dev->pri_dev_type + 6, WPS_DEV_COMPUTER_PC);
+
+    if (!s_factory_info) {
+        ret = wps_set_default_factory();
+        if (ret != 0) {
+            goto _out;
+        }
+    }
+
+    dev->manufacturer = (char *)os_zalloc(WPS_MAX_MANUFACTURER_LEN);
+    if (!dev->manufacturer) {
+        ret = ESP_FAIL;
+        goto _out;
+    }
+    sprintf(dev->manufacturer, s_factory_info->manufacturer);
+
+    dev->model_name = (char *)os_zalloc(WPS_MAX_MODEL_NAME_LEN);
+    if (!dev->model_name) {
+        ret = ESP_FAIL;
+        goto _out;
+    }
+    sprintf(dev->model_name, s_factory_info->model_name);
+
+    dev->model_number = (char *)os_zalloc(WPS_MAX_MODEL_NAME_LEN);
+    if (!dev->model_number) {
+        ret = ESP_FAIL;
+        goto _out;
+    }
+    sprintf(dev->model_number, s_factory_info->model_number);
+
+    dev->device_name = (char *)os_zalloc(WPS_MAX_DEVICE_NAME_LEN);
+    if (!dev->device_name) {
+        ret = ESP_FAIL;
+        goto _out;
+    }
+    sprintf(dev->device_name, s_factory_info->device_name);
+
+    dev->serial_number = (char *)os_zalloc(16);
+    if (!dev->serial_number) {
+        ret = ESP_FAIL;
+        goto _out;
+    }
+    sprintf(dev->serial_number, "%02x%02x%02x%02x%02x%02x",
+            sm->ownaddr[0], sm->ownaddr[1], sm->ownaddr[2],
+            sm->ownaddr[3], sm->ownaddr[4], sm->ownaddr[5]);
+
+    uuid_gen_mac_addr(sm->ownaddr, sm->uuid);
+    memcpy(dev->mac_addr, sm->ownaddr, ETH_ALEN);
+
+    return ESP_OK;
+
+_out:
+    if (dev->manufacturer) {
+        os_free(dev->manufacturer);
+    }
+    if (dev->model_name) {
+        os_free(dev->model_name);
+    }
+    if (dev->model_number) {
+        os_free(dev->model_number);
+    }
+    if (dev->device_name) {
+        os_free(dev->device_name);
+    }
+    if (dev->serial_number) {
+        os_free(dev->serial_number);
+    }
+
+    if (s_factory_info) {
+        os_free(s_factory_info);
+        s_factory_info = NULL;
+    }
+
+    return ret;
+}
+
+
+int wps_dev_deinit(struct wps_device_data *dev)
+{
+    int ret = 0;
+
+    if (!dev) {
+        return ESP_FAIL;
+    }
+
+    if (dev->manufacturer) {
+        os_free(dev->manufacturer);
+    }
+    if (dev->model_name) {
+        os_free(dev->model_name);
+    }
+    if (dev->model_number) {
+        os_free(dev->model_number);
+    }
+    if (dev->device_name) {
+        os_free(dev->device_name);
+    }
+    if (dev->serial_number) {
+        os_free(dev->serial_number);
+    }
+
+    if (s_factory_info) {
+        os_free(s_factory_info);
+        s_factory_info = NULL;
+    }
+
+    return ret;
+}
+
+void
+wifi_station_wps_timeout_internal(void)
+{
+    struct wps_sm *sm = gWpsSm;
+
+    if (!sm) {
+        return;
+    }
+
+    esp_wifi_disarm_sta_connection_timer_internal();
+
+    wps_set_status(WPS_STATUS_DISABLE);
+
+    system_event_t evt;
+    evt.event_id = SYSTEM_EVENT_STA_WPS_ER_TIMEOUT;
+    esp_wifi_send_event_internal(&evt);
+}
+
+void wifi_station_wps_timeout(void)
+{
+#ifdef USE_WPS_TASK
+    wps_post(SIG_WPS_TIMER_TIMEOUT, 0);
+    return;
+#else
+    wifi_station_wps_timeout_internal();
+#endif
+}
+
+void
+wifi_station_wps_msg_timeout_internal(void)
+{
+    struct wps_sm *sm = gWpsSm;
+
+    if (!sm) {
+        return;
+    }
+
+    if (sm->wps->state == WPS_FINISHED) {
+        wpa_printf(MSG_DEBUG, "wps msg timeout WPS_FINISHED");
+        wps_finish();
+    } else if (sm->wps->state == RECV_M2) {
+        wpa_printf(MSG_DEBUG, "wps msg timeout RECV_M2");
+        wpa_printf(MSG_DEBUG, "wps recev m2/m2d timeout------>");
+        wps_add_discard_ap(sm->config.bssid);
+        wps_stop_process(WPS_FAIL_REASON_RECV_M2D);
+    }
+}
+
+void wifi_station_wps_msg_timeout(void)
+{
+#ifdef USE_WPS_TASK
+    wps_post(SIG_WPS_TIMER_MSG_TIMEOUT, 0);
+    return;
+#else
+    wifi_station_wps_msg_timeout_internal();
+#endif
+}
+
+void wifi_station_wps_success_internal(void)
+{
+    system_event_t evt;
+    evt.event_id = SYSTEM_EVENT_STA_WPS_ER_SUCCESS;
+    esp_wifi_send_event_internal(&evt);
+}
+
+void wifi_station_wps_success(void)
+{
+#ifdef USE_WPS_TASK
+    wps_post(SIG_WPS_TIMER_SUCCESS_CB, 0);
+    return;
+#else
+    wifi_station_wps_success_internal();
+#endif
+}
+
+void wifi_station_wps_eapol_start_handle_internal(void)
+{
+    wpa_printf(MSG_DEBUG, "Resend EAPOL-Start.");
+    wps_tx_start();
+}
+
+void wifi_station_wps_eapol_start_handle(void)
+{
+#ifdef USE_WPS_TASK
+    wps_post(SIG_WPS_TIMER_EAPOL_START, 0);
+    return;
+#else
+    wifi_station_wps_eapol_start_handle_internal();
+#endif
+}
+
+int
+wifi_station_wps_init(void)
+{
+    struct wps_funcs *wps_cb;
+    struct wps_sm *sm = NULL;
+    uint8_t mac[6];
+
+    if (gWpsSm) {
+        goto _out;
+    }
+
+    wpa_printf(MSG_DEBUG, "wifi sta wps init");
+
+    gWpsSm = (struct wps_sm *)os_zalloc(sizeof(struct wps_sm));   /* alloc Wps_sm */
+    if (!gWpsSm) {
+        goto _err;
+    }
+
+    sm = gWpsSm;
+    memset(sm, 0x00, sizeof(struct wps_sm));
+
+    esp_wifi_get_macaddr_internal(WIFI_IF_STA, mac);
+    memcpy(sm->ownaddr, mac, ETH_ALEN);
+
+    sm->discover_ssid_cnt = 0;
+    sm->ignore_sel_reg = false;
+    sm->discard_ap_cnt = 0;
+    memset(&sm->dis_ap_list, 0, WPS_MAX_DIS_AP_NUM * sizeof(struct discard_ap_list_t));
+    memset(&sm->config, 0x00, sizeof(wifi_sta_config_t));
+    sm->eapol_version = 0x1;
+    sm->identity_len = 29;
+    memcpy(sm->identity, WPS_EAP_EXT_VENDOR_TYPE, sm->identity_len);
+
+    sm->is_wps_scan = false;
+
+    sm->wps_ctx = (struct wps_context *)os_zalloc(sizeof(struct wps_context)); /* alloc wps_ctx */
+    if (!sm->wps_ctx) {
+        goto _err;
+    }
+
+    if (wps_dev_init() != 0) {
+        goto _err;
+    }
+
+    if ((sm->wps = wps_init()) == NULL) {         /* alloc wps_data */
+        goto _err;
+    }
+
+    /**************80211 reference***************/
+
+    if (esp_wifi_get_appie_internal(WIFI_APPIE_WPS_PR) == NULL) {            /* alloc probe req wps ie */
+        wps_build_ic_appie_wps_pr();
+    }
+
+    if (esp_wifi_get_appie_internal(WIFI_APPIE_WPS_AR) == NULL) {           /* alloc assoc req wps ie */
+        wps_build_ic_appie_wps_ar();
+    }
+
+    ets_timer_disarm(&sm->wps_timeout_timer);
+    ets_timer_setfn(&sm->wps_timeout_timer, (ETSTimerFunc *)wifi_station_wps_timeout, NULL);
+    ets_timer_disarm(&sm->wps_msg_timeout_timer);
+    ets_timer_setfn(&sm->wps_msg_timeout_timer, (ETSTimerFunc *)wifi_station_wps_msg_timeout, NULL);
+    ets_timer_disarm(&sm->wps_success_cb_timer);
+    ets_timer_setfn(&sm->wps_success_cb_timer, (ETSTimerFunc *)wifi_station_wps_success, NULL);
+    ets_timer_disarm(&sm->wps_scan_timer);
+    ets_timer_setfn(&sm->wps_scan_timer, (ETSTimerFunc *)wifi_wps_scan, NULL);
+    ets_timer_disarm(&sm->wps_eapol_start_timer);
+    ets_timer_setfn(&sm->wps_eapol_start_timer, (ETSTimerFunc *)wifi_station_wps_eapol_start_handle, NULL);
+
+    sm->scan_cnt = 0;
+
+    wps_cb = os_malloc(sizeof(struct wps_funcs));
+    if (wps_cb == NULL) {
+        goto _err;
+    } else {
+        wps_cb->wps_parse_scan_result = wps_parse_scan_result;
+        wps_cb->wifi_station_wps_start = wifi_station_wps_start;
+        wps_cb->wps_sm_rx_eapol = wps_sm_rx_eapol;
+        wps_cb->wps_start_pending = wps_start_pending;
+        esp_wifi_set_wps_cb_internal(wps_cb);
+    }
+
+    return ESP_OK;
+
+_err:
+    esp_wifi_unset_appie_internal(WIFI_APPIE_WPS_PR);
+    esp_wifi_unset_appie_internal(WIFI_APPIE_WPS_AR);
+
+    if (sm->dev) {
+        wps_dev_deinit(sm->dev);
+        sm->dev = NULL;
+    }
+    if (sm->wps_ctx) {
+        os_free(sm->wps_ctx);
+        sm->wps_ctx = NULL;
+    }
+    if (sm->wps) {
+        wps_deinit();
+        sm->wps = NULL;
+    }
+    if (sm) {
+        os_free(gWpsSm);
+        gWpsSm = NULL;
+    }
+    return ESP_FAIL;
+_out:
+    return ESP_FAIL;
+}
+
+int wps_delete_timer(void)
+{
+    struct wps_sm *sm = gWpsSm;
+
+    if (!sm) {
+        return ESP_OK;
+    }
+
+    ets_timer_disarm(&sm->wps_success_cb_timer);
+    ets_timer_disarm(&sm->wps_timeout_timer);
+    ets_timer_disarm(&sm->wps_msg_timeout_timer);
+    ets_timer_disarm(&sm->wps_scan_timer);
+    ets_timer_disarm(&sm->wps_eapol_start_timer);
+    ets_timer_done(&sm->wps_success_cb_timer);
+    ets_timer_done(&sm->wps_timeout_timer);
+    ets_timer_done(&sm->wps_msg_timeout_timer);
+    ets_timer_done(&sm->wps_scan_timer);
+    ets_timer_done(&sm->wps_eapol_start_timer);
+    esp_wifi_disarm_sta_connection_timer_internal();
+    return ESP_OK;
+}
+
+int
+wifi_station_wps_deinit(void)
+{
+    struct wps_sm *sm = gWpsSm;
+
+    if (gWpsSm == NULL) {
+        return ESP_FAIL;
+    }
+
+    esp_wifi_unset_appie_internal(WIFI_APPIE_WPS_PR);
+    esp_wifi_unset_appie_internal(WIFI_APPIE_WPS_AR);
+    esp_wifi_set_wps_cb_internal(NULL);
+
+    if (sm->dev) {
+        wps_dev_deinit(sm->dev);
+        sm->dev = NULL;
+    }
+    if (sm->wps_ctx) {
+        os_free(sm->wps_ctx);
+        sm->wps_ctx = NULL;
+    }
+    if (sm->wps) {
+        wps_deinit();
+        sm->wps = NULL;
+    }
+    if (sm) {
+        os_free(gWpsSm);
+        gWpsSm = NULL;
+    }
+
+    return ESP_OK;
+}
+
+int
+wps_station_wps_register_cb(wps_st_cb_t cb)
+{
+    if (!gWpsSm) {
+        return ESP_FAIL;
+    }
+
+    gWpsSm->st_cb = cb;
+    return ESP_OK;
+}
+
+struct wps_sm *
+wps_sm_get(void)
+{
+    return gWpsSm;
+}
+
+int
+wps_ssid_save(u8 *ssid, u8 ssid_len)
+{
+    u8 *tmpssid;
+
+    if (!ssid || !gWpsSm) {
+        return ESP_FAIL;
+    }
+
+    memset(gWpsSm->ssid, 0x00, sizeof(gWpsSm->ssid));
+    memcpy(gWpsSm->ssid, ssid, ssid_len);
+    gWpsSm->ssid_len = ssid_len;
+
+    tmpssid = (u8 *)os_zalloc(ssid_len + 1);
+    if (tmpssid) {
+        memcpy(tmpssid, ssid, ssid_len);
+        wpa_printf(MSG_DEBUG, "WPS: ssid[%s]", tmpssid);
+        os_free(tmpssid);
+    }
+    return ESP_OK;
+}
+
+int
+wps_key_save(char *key, u8 key_len)
+{
+    u8 *tmpkey;
+
+    if (!key || !gWpsSm) {
+        return ESP_FAIL;
+    }
+
+    memset(gWpsSm->key, 0x00, sizeof(gWpsSm->key));
+    memcpy(gWpsSm->key, key, key_len);
+    gWpsSm->key_len = key_len;
+
+    tmpkey = (u8 *)os_zalloc(key_len + 1);
+    if (tmpkey) {
+        memcpy(tmpkey, key, key_len);
+        wpa_printf(MSG_DEBUG, "WPS: key[%s]", tmpkey);
+        os_free(tmpkey);
+    }
+    return ESP_OK;
+}
+
+void
+wifi_wps_scan_done(void *arg, STATUS status)
+{
+    struct wps_sm *sm = gWpsSm;
+    wifi_config_t wifi_config;
+
+    if (wps_get_type() == WPS_TYPE_DISABLE) {
+        return;
+    }
+
+    if (!sm) {
+        return;
+    }
+
+    if (sm->discover_ssid_cnt == 1) {
+        wps_set_status(WPS_STATUS_PENDING);
+    } else if (sm->discover_ssid_cnt == 0)  {
+        wps_set_status(WPS_STATUS_SCANNING);
+    } else {
+        wpa_printf(MSG_INFO, "PBC session overlap!");
+        wps_set_status(WPS_STATUS_DISABLE);
+
+        system_event_t evt;
+        evt.event_id = SYSTEM_EVENT_STA_WPS_ER_PBC_OVERLAP;
+        esp_wifi_send_event_internal(&evt);
+    }
+
+    wpa_printf(MSG_DEBUG, "wps scan_done discover_ssid_cnt = %d", sm->discover_ssid_cnt);
+
+    sm->discover_ssid_cnt = 0;
+
+    if (wps_get_status() == WPS_STATUS_PENDING) {
+        esp_wifi_disconnect();
+
+        memcpy(&wifi_config.sta, &sm->config, sizeof(wifi_sta_config_t));
+        esp_wifi_set_config(0, &wifi_config);
+
+        wpa_printf(MSG_DEBUG, "WPS: neg start");
+        esp_wifi_connect();
+    } else if (wps_get_status() == WPS_STATUS_SCANNING) {
+        if (sm->scan_cnt < WPS_IGNORE_SEL_REG_MAX_CNT) {
+            sm->ignore_sel_reg = true;
+        }
+        ets_timer_arm(&sm->wps_scan_timer, 100, 0);
+    } else {
+        return;
+    }
+}
+
+void
+wifi_wps_scan_internal(void)
+{
+    struct wps_sm *sm = gWpsSm;
+
+    sm->scan_cnt++;
+    wpa_printf(MSG_DEBUG, "wifi_wps_scan : %d", sm->scan_cnt);
+
+    typedef void (* scan_done_cb_t)(void *arg, STATUS status);
+    extern int esp_wifi_promiscuous_scan_start(wifi_scan_config_t *config, scan_done_cb_t cb);
+    esp_wifi_promiscuous_scan_start(NULL, wifi_wps_scan_done);
+}
+
+void wifi_wps_scan(void)
+{
+#ifdef USE_WPS_TASK
+    wps_post(SIG_WPS_TIMER_SCAN, 0);
+    return;
+#else
+    wifi_wps_scan_internal();
+#endif
+}
+
+uint8_t wps_start = 0;
+int wifi_station_wps_start(void)
+{
+    struct wps_sm *sm = wps_sm_get();
+
+    if (!sm) {
+        wpa_printf(MSG_ERROR, "WPS: wps not initial");
+        return ESP_FAIL;
+    }
+
+    ets_timer_arm(&sm->wps_timeout_timer, 120000, 0); /* 120s total */
+
+    switch (wps_get_status()) {
+    case WPS_STATUS_DISABLE: {
+        sm->is_wps_scan = true;
+
+        wps_build_public_key(sm->wps, NULL, WPS_CALC_KEY_PRE_CALC);
+
+        wifi_wps_scan();
+
+
+        break;
+    }
+    case WPS_STATUS_SCANNING:
+        sm->scan_cnt = 0;
+        ets_timer_disarm(&sm->wps_timeout_timer);
+        ets_timer_arm(&sm->wps_timeout_timer, 120000, 0); /* 120s total */
+        break;
+    default:
+        break;
+    }
+    wps_start = 1;
+
+    return ESP_OK;
+}
+
+int wps_task_deinit(void)
+{
+    wpa_printf(MSG_DEBUG, "wps task deinit");
+
+    if (s_wps_data_lock) {
+        vSemaphoreDelete(s_wps_data_lock);
+        s_wps_data_lock = NULL;
+        wpa_printf(MSG_DEBUG, "wps task deinit: free data lock");
+    }
+
+    if (s_wps_api_sem) {
+        vSemaphoreDelete(s_wps_api_sem);
+        s_wps_api_sem = NULL;
+        wpa_printf(MSG_DEBUG, "wps task deinit: free api sem");
+    }
+
+    if (s_wps_task_create_sem) {
+        vSemaphoreDelete(s_wps_task_create_sem);
+        s_wps_task_create_sem = NULL;
+        wpa_printf(MSG_DEBUG, "wps task deinit: free task create sem");
+    }
+
+    if (s_wps_queue) {
+        vQueueDelete(s_wps_queue);
+        s_wps_queue = NULL;
+        wpa_printf(MSG_DEBUG, "wps task deinit: free queue");
+    }
+
+    if (s_wps_task_hdl) {
+        vTaskDelete(s_wps_task_hdl);
+        s_wps_task_hdl = NULL;
+        wpa_printf(MSG_DEBUG, "wps task deinit: free task");
+    }
+
+    return ESP_OK;
+}
+
+int wps_task_init(void)
+{
+    int ret = 0;
+
+    /* Call wps_task_deinit() first in case esp_wifi_wps_disable() fails
+     */
+    wps_task_deinit();
+
+    s_wps_data_lock = xSemaphoreCreateRecursiveMutex();
+    if (!s_wps_data_lock) {
+        wpa_printf(MSG_ERROR, "wps task init: failed to alloc data lock");
+        goto _wps_no_mem;
+    }
+
+    s_wps_api_sem = xSemaphoreCreateCounting(1, 0);
+    if (!s_wps_api_sem) {
+        wpa_printf(MSG_ERROR, "wps task init: failed to create api sem");
+        goto _wps_no_mem;
+    }
+
+    s_wps_task_create_sem = xSemaphoreCreateCounting(1, 0);
+    if (!s_wps_task_create_sem) {
+        wpa_printf(MSG_ERROR, "wps task init: failed to create task sem");
+        goto _wps_no_mem;
+    }
+
+    os_bzero(s_wps_sig_cnt, SIG_WPS_NUM);
+    s_wps_queue = xQueueCreate(SIG_WPS_NUM, sizeof( void * ) );
+    if (!s_wps_queue) {
+        wpa_printf(MSG_ERROR, "wps task init: failed to alloc queue");
+        goto _wps_no_mem;
+    }
+
+    ret = xTaskCreate(wps_task, "wpsT", WPS_TASK_STACK_SIZE, NULL, 2, &s_wps_task_hdl);
+    if (pdPASS != ret) {
+        wpa_printf(MSG_ERROR, "wps enable: failed to create task");
+        goto _wps_no_mem;
+    }
+
+    xSemaphoreTake(s_wps_task_create_sem, portMAX_DELAY);
+    vSemaphoreDelete(s_wps_task_create_sem);
+    s_wps_task_create_sem = NULL;
+
+    wpa_printf(MSG_DEBUG, "wifi wps enable: task prio:%d, stack:%d", 2, WPS_TASK_STACK_SIZE);
+    return ESP_OK;
+
+_wps_no_mem:
+    wps_task_deinit();
+    return ESP_ERR_NO_MEM;
+}
+
+int wps_post_block(uint32_t sig, void *arg)
+{
+    wps_ioctl_param_t param;
+
+    param.ret = ESP_FAIL;
+    param.arg = arg;
+
+    if (ESP_OK != wps_post(sig, (uint32_t)&param)) {
+        return ESP_FAIL;
+    }
+
+    if (pdPASS == xSemaphoreTake(s_wps_api_sem, portMAX_DELAY)) {
+        return param.ret;
+    } else {
+        return ESP_FAIL;
+    }
+}
+
+int wps_check_wifi_mode(void)
+{
+    bool sniffer = false;
+    wifi_mode_t mode;
+    int ret;
+
+    ret = esp_wifi_get_mode(&mode);
+    if (ESP_OK != ret) {
+        wpa_printf(MSG_ERROR, "wps check wifi mode: failed to get wifi mode ret=%d", ret);
+        return ESP_FAIL;
+    }
+
+    ret = esp_wifi_get_promiscuous(&sniffer);
+    if (ESP_OK != ret) {
+        wpa_printf(MSG_ERROR, "wps check wifi mode: failed to get sniffer mode ret=%d", ret);
+        return ESP_FAIL;
+    }
+
+    if (mode == WIFI_MODE_AP || mode == WIFI_MODE_NULL || sniffer == true) {
+        wpa_printf(MSG_ERROR, "wps check wifi mode: wrong wifi mode=%d sniffer=%d", mode, sniffer);
+        return ESP_ERR_WIFI_MODE;
+    }
+
+    return ESP_OK;
+}
+
+int esp_wifi_wps_enable(const esp_wps_config_t *config)
+{
+    int ret;
+
+    if (ESP_OK != wps_check_wifi_mode()) {
+        return ESP_ERR_WIFI_MODE;
+    }
+
+    API_MUTEX_TAKE();
+    if (s_wps_enabled) {
+        API_MUTEX_GIVE();
+        wpa_printf(MSG_DEBUG, "wps enable: already enabled");
+        return ESP_OK;
+    }
+
+#ifdef USE_WPS_TASK
+    ret = wps_task_init();
+    if (ESP_OK != ret) {
+        API_MUTEX_GIVE();
+        return ret;
+    }
+
+    ret = wps_post_block(SIG_WPS_ENABLE, (esp_wps_config_t *)config);
+    if (ESP_OK != ret) {
+        wps_task_deinit();
+        API_MUTEX_GIVE();
+        return ret;
+    }
+
+    s_wps_enabled = true;
+    wpa_printf(MSG_DEBUG, "wifi wps task: prio:%d, stack:%d\n", 2, WPS_TASK_STACK_SIZE);
+    API_MUTEX_GIVE();
+    return ret;
+#else
+    ret = wifi_wps_enable_internal(config);
+    API_MUTEX_GIVE();
+    return ret;
+#endif
+}
+
+int wifi_wps_enable_internal(const esp_wps_config_t *config)
+{
+    int ret = 0;
+
+    wpa_printf(MSG_DEBUG, "ESP WPS crypto initialize!");
+    if (config->wps_type == WPS_TYPE_DISABLE) {
+        wpa_printf(MSG_ERROR, "wps enable: invalid wps type");
+        return ESP_ERR_WIFI_WPS_TYPE;
+    }
+
+    /* currently , we don't support REGISTRAR */
+    if (IS_WPS_REGISTRAR(config->wps_type)) {
+        wpa_printf(MSG_ERROR, "wps enable: not support registrar");
+        return ESP_ERR_WIFI_WPS_TYPE;
+    }
+
+    wpa_printf(MSG_DEBUG, "Set factory information.");
+    ret = wps_set_factory_info(config);
+    if (ret != 0) {
+        return ret;
+    }
+
+    wpa_printf(MSG_INFO, "wifi_wps_enable\n");
+
+    wps_set_type(config->wps_type);
+    wps_set_status(WPS_STATUS_DISABLE);
+
+    ret = wifi_station_wps_init();
+
+    if (ret != 0) {
+        wps_set_type(WPS_STATUS_DISABLE);
+        wps_set_status(WPS_STATUS_DISABLE);
+        return ESP_FAIL;
+    }
+
+    return ESP_OK;
+}
+
+int wifi_wps_disable_internal(void)
+{
+    wps_set_status(WPS_STATUS_DISABLE);
+    wifi_station_wps_deinit();
+    return ESP_OK;
+}
+
+int esp_wifi_wps_disable(void)
+{
+    int ret = 0;
+
+    if (ESP_OK != wps_check_wifi_mode()) {
+        return ESP_ERR_WIFI_MODE;
+    }
+
+    API_MUTEX_TAKE();
+
+    if (!s_wps_enabled) {
+        wpa_printf(MSG_DEBUG, "wps disable: already disabled");
+        API_MUTEX_GIVE();
+        return ESP_OK;
+    }
+
+    wpa_printf(MSG_INFO, "wifi_wps_disable\n");
+    wps_set_type(WPS_TYPE_DISABLE); /* Notify WiFi task */
+
+    /* Call wps_delete_timer to delete all WPS timer, no timer will call wps_post()
+     * to post message to wps_task once this function returns.
+     */
+    wps_delete_timer();
+
+#ifdef USE_WPS_TASK
+    ret = wps_post_block(SIG_WPS_DISABLE, 0);
+#else
+    ret = wifi_wps_disable_internal();
+#endif
+
+    if (ESP_OK != ret) {
+        wpa_printf(MSG_ERROR, "wps disable: failed to disable wps, ret=%d", ret);
+    }
+
+    esp_wifi_disconnect();
+    wps_start = 0;
+    wps_task_deinit();
+    s_wps_enabled = false;
+    API_MUTEX_GIVE();
+    return ESP_OK;
+}
+
+int esp_wifi_wps_start(int timeout_ms)
+{
+    if (ESP_OK != wps_check_wifi_mode()) {
+        return ESP_ERR_WIFI_MODE;
+    }
+
+    API_MUTEX_TAKE();
+
+    if (!s_wps_enabled) {
+        wpa_printf(MSG_ERROR, "wps start: wps not enabled");
+        API_MUTEX_GIVE();
+        return ESP_ERR_WIFI_WPS_SM;
+    }
+
+    if (wps_get_type() == WPS_TYPE_DISABLE || (wps_get_status() != WPS_STATUS_DISABLE && wps_get_status() != WPS_STATUS_SCANNING)) {
+        API_MUTEX_GIVE();
+        return ESP_ERR_WIFI_WPS_TYPE;
+    }
+
+    if (esp_wifi_get_user_init_flag_internal() == 0) {
+        API_MUTEX_GIVE();
+        return ESP_ERR_WIFI_STATE;
+    }
+
+    wpa_printf(MSG_DEBUG, "wps scan");
+
+#ifdef USE_WPS_TASK
+    wps_post_block(SIG_WPS_START, 0);
+#else
+    ic_pp_post(SIG_PP_WPS, 0);
+#endif
+
+    API_MUTEX_GIVE();
+    return ESP_OK;
+}
+
+bool
+wifi_set_wps_cb(wps_st_cb_t cb)
+{
+    wifi_mode_t mode;
+
+    esp_wifi_get_mode(&mode);
+    if (mode == WIFI_MODE_AP || mode == WIFI_MODE_NULL) {
+        return false;
+    }
+
+    if (wps_station_wps_register_cb(cb) == 0) {
+        return true;
+    }
+
+    return false;
+}
+
index 5c362fa225dd45e430322f00bc4357ba9d5055a7..feccba9e4223b2a8ced109d2211405dc3ae2071f 100644 (file)
@@ -3,8 +3,8 @@
 // Licensed under the Apache License, Version 2.0 (the "License");
 
 
-#include "crypto/includes.h"
-#include "crypto/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 #include "crypto/aes.h"
 #include "crypto/aes_wrap.h"
 #include "mbedtls/aes.h"
index fd4a49ff438b820bade296b5f9148c6902bf8004..b4b940314708d3d31832d550c8d8bc9b02a4ff3e 100644 (file)
@@ -12,8 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "crypto/includes.h"
-#include "crypto/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 #include "mbedtls/aes.h"
 
 /**
index 3b9eec1c1649e702ab82abe2c8e5eaf5e15b4cd4..ea15d8bc2842953b10bcacdc592f95d39cffa6ea 100644 (file)
@@ -12,9 +12,9 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/aes.h"
 #include "crypto/aes_wrap.h"
 #include "mbedtls/aes.h"
index 826d365e8c86d72200f68d739a8effb25e09d6ac..667a886d13ec7825b9a5d1b72bd21510f3af485e 100644 (file)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-//#include "wpa/includes.h"
+//#include "utils/includes.h"
 
-//#include "wpa/common.h"
-#include "crypto/common.h"
+//#include "utils/common.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 #include "crypto/aes.h"
 #if defined(CONFIG_DES) || defined(CONFIG_DES3)
@@ -39,7 +39,7 @@ struct fast_crypto_cipher {
 #ifdef CONFIG_DES3
         struct {
             struct des3_key_s key;
-           uint8_t cbc[8];
+            uint8_t cbc[8];
         } des3;
 #endif
 #ifdef CONFIG_DES
index 66d4aa2de654a70a01aaea2789b5901074b559ed..2c869ce78076e77155253525bb05fa13fde7782e 100644 (file)
@@ -12,9 +12,9 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 #include "mbedtls/bignum.h"
 
index a0f7da83aeed65b6f6af01faeac010b605d1cab0..cb5e988cbc3402b1a20367abcecef59b7d3d5caa 100644 (file)
@@ -8,18 +8,14 @@
  * See README for more details.
  */
 
-#include "crypto/includes.h"
-#include "crypto/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 #include "crypto/sha1_i.h"
 #include "crypto/md5_i.h"
 #include "mbedtls/sha256.h"
 
 
-#ifdef MEMLEAK_DEBUG
-static const char mem_debug_file[] ICACHE_RODATA_ATTR = __FILE__;
-#endif
-
 struct fast_crypto_hash {
        enum crypto_hash_alg alg;
        union {
index 7650cb87ed8e96242538a61b609e25f31a931474..cdbd072106fbd58a2f8233d866b5d2012656219f 100644 (file)
@@ -12,8 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "crypto/includes.h"
-#include "crypto/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 #include "mbedtls/sha256.h"
 
 /**
index b0fb03e4f818608678fceb0c66f7a24d95963bc0..0f0a785b1a9ae46861b06b142bdeaf9254cf1ffe 100644 (file)
@@ -14,9 +14,9 @@
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
+#include "utils/includes.h"
 
-#include "crypto/common.h"
+#include "utils/common.h"
 #include "crypto/sha256.h"
 #include "crypto/crypto.h"
 
diff --git a/components/wpa_supplicant/src/rsn_supp/wpa.c b/components/wpa_supplicant/src/rsn_supp/wpa.c
new file mode 100644 (file)
index 0000000..c5b5c86
--- /dev/null
@@ -0,0 +1,1975 @@
+
+/*
+ * WPA Supplicant - WPA state machine and EAPOL-Key processing
+ * Copyright (c) 2003-2010, Jouni Malinen <j@w1.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+#include "utils/includes.h"
+
+#include "utils/common.h"
+#include "rsn_supp/wpa.h"
+#include "rsn_supp/wpa_i.h"
+#include "common/eapol_common.h"
+#include "common/ieee802_11_defs.h"
+#include "rsn_supp/wpa_ie.h"
+#include "esp_supplicant/esp_wpas_glue.h"
+#include "esp_supplicant/esp_wifi_driver.h"
+
+#include "crypto/crypto.h"
+#include "crypto/sha1.h"
+#include "crypto/aes_wrap.h"
+#include "crypto/wepkey.h"
+
+/**
+ * eapol_sm_notify_eap_success - Notification of external EAP success trigger
+ * @sm: Pointer to EAPOL state machine allocated with eapol_sm_init()
+ * @success: %TRUE = set success, %FALSE = clear success
+ *
+ * Notify the EAPOL state machine that external event has forced EAP state to
+ * success (success = %TRUE). This can be cleared by setting success = %FALSE.
+ *
+ * This function is called to update EAP state when WPA-PSK key handshake has
+ * been completed successfully since WPA-PSK does not use EAP state machine.
+ */
+
+#define WPA_4_4_HANDSHAKE_BIT   (1<<13)
+#define WPA_GROUP_HANDSHAKE_BIT (1<<14)
+  struct wpa_sm gWpaSm;
+/* fix buf for tx for now */
+#define WPA_TX_MSG_BUFF_MAXLEN 200
+
+#define ASSOC_IE_LEN 24
+u8 assoc_ie_buf[ASSOC_IE_LEN+2]; 
+
+void set_assoc_ie(u8 * assoc_buf);
+
+int wpa_sm_set_key(struct install_key *sm, enum wpa_alg alg,
+        u8 *addr, int key_idx, int set_tx,
+        u8 *seq, size_t seq_len,
+        u8 *key, size_t key_len,
+        int  key_entry_valid);
+
+int wpa_sm_get_key(uint8_t *ifx, int *alg, u8 *addr, int *key_idx, u8 *key, size_t key_len, int key_entry_valid);
+
+void wpa_set_passphrase(char * passphrase, u8 *ssid, size_t ssid_len);
+
+static inline enum wpa_states   wpa_sm_get_state(struct wpa_sm *sm)
+{
+    return sm->wpa_state;;
+}
+
+static inline void   wpa_sm_cancel_auth_timeout(struct wpa_sm *sm)
+{
+
+}
+
+void   eapol_sm_notify_eap_success(Boolean success)
+{
+
+}
+/**
+ * get_bssid - Get the current BSSID
+ * @priv: private driver interface data
+ * @bssid: buffer for BSSID (ETH_ALEN = 6 bytes)
+ *
+ * Returns: 0 on success, -1 on failure
+ *
+ * Query kernel driver for the current BSSID and copy it to bssid.
+ * Setting bssid to 00:00:00:00:00:00 is recommended if the STA is not
+ * associated.
+ */
+static inline int   wpa_sm_get_bssid(struct wpa_sm *sm, u8 *bssid)
+{
+    memcpy(bssid, sm->bssid, ETH_ALEN);
+    return 0;
+}
+
+ /*
+ * wpa_ether_send - Send Ethernet frame
+ * @wpa_s: Pointer to wpa_supplicant data
+ * @dest: Destination MAC address
+ * @proto: Ethertype in host byte order
+ * @buf: Frame payload starting from IEEE 802.1X header
+ * @len: Frame payload length
+ * Returns: >=0 on success, <0 on failure
+ */
+static inline int   wpa_sm_ether_send( struct wpa_sm *sm, const u8 *dest, u16 proto,
+        const u8 *data, size_t data_len)
+{
+    void *buffer = (void *)(data - sizeof(struct l2_ethhdr));
+    struct l2_ethhdr *eth = (struct l2_ethhdr *)buffer;
+
+    memcpy(eth->h_dest, dest, ETH_ALEN);
+    memcpy(eth->h_source, sm->own_addr, ETH_ALEN);
+    eth->h_proto = host_to_be16(proto);
+    sm->sendto(buffer, sizeof(struct l2_ethhdr) + data_len);
+
+    return 0;
+}
+
+/**
+ * wpa_eapol_key_send - Send WPA/RSN EAPOL-Key message
+ * @sm: Pointer to WPA state machine data from wpa_sm_init()
+ * @kck: Key Confirmation Key (KCK, part of PTK)
+ * @ver: Version field from Key Info
+ * @dest: Destination address for the frame
+ * @proto: Ethertype (usually ETH_P_EAPOL)
+ * @msg: EAPOL-Key message
+ * @msg_len: Length of message
+ * @key_mic: Pointer to the buffer to which the EAPOL-Key MIC is written
+ */
+void   wpa_eapol_key_send(struct wpa_sm *sm, const u8 *kck,
+            int ver, const u8 *dest, u16 proto,
+            u8 *msg, size_t msg_len, u8 *key_mic)
+{
+    if (is_zero_ether_addr(dest) && is_zero_ether_addr(sm->bssid)) {
+        /*
+         * Association event was not yet received; try to fetch
+         * BSSID from the driver.
+         */
+        if (wpa_sm_get_bssid(sm, sm->bssid) < 0) {
+           #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: Failed to read BSSID for "
+                   "EAPOL-Key destination address");
+           #endif
+        } else {
+            dest = sm->bssid;
+              #ifdef DEBUG_PRINT          
+            wpa_printf(MSG_DEBUG, "WPA: Use BSSID (" MACSTR
+                   ") as the destination for EAPOL-Key",
+                   MAC2STR(dest));
+           #endif
+        }
+    }
+    if (key_mic &&
+        wpa_eapol_key_mic(kck, ver, msg, msg_len, key_mic)) {
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: Failed to generate EAPOL-Key "
+               "version %d MIC", ver);
+         #endif    
+        goto out;
+    }
+    wpa_hexdump(MSG_MSGDUMP, "WPA: TX EAPOL-Key", msg, msg_len);
+    wpa_sm_ether_send(sm, dest, proto, msg, msg_len);
+out:
+    return;
+}
+
+/**
+ * wpa_sm_key_request - Send EAPOL-Key Request
+ * @sm: Pointer to WPA state machine data from wpa_sm_init()
+ * @error: Indicate whether this is an Michael MIC error report
+ * @pairwise: 1 = error report for pairwise packet, 0 = for group packet
+ *
+ * Send an EAPOL-Key Request to the current authenticator. This function is
+ * used to request rekeying and it is usually called when a local Michael MIC
+ * failure is detected.
+ */
+void   wpa_sm_key_request(struct wpa_sm *sm, int error, int pairwise)
+{
+    size_t rlen;
+    struct wpa_eapol_key *reply;
+    int key_info, ver;
+    u8 bssid[ETH_ALEN], *rbuf;
+
+    if (wpa_key_mgmt_ft(sm->key_mgmt) || wpa_key_mgmt_sha256(sm->key_mgmt))
+        ver = WPA_KEY_INFO_TYPE_AES_128_CMAC;
+    else if (sm->pairwise_cipher == WPA_CIPHER_CCMP)
+        ver = WPA_KEY_INFO_TYPE_HMAC_SHA1_AES;
+    else
+        ver = WPA_KEY_INFO_TYPE_HMAC_MD5_RC4;
+
+    if (wpa_sm_get_bssid(sm, bssid) < 0) {
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "Failed to read BSSID for EAPOL-Key "
+               "request");
+        #endif    
+        return;
+    }
+
+    rbuf = wpa_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAPOL_KEY, NULL,
+                  sizeof(*reply), &rlen, (void *) &reply);
+    if (rbuf == NULL)
+        return;
+
+    reply->type = sm->proto == WPA_PROTO_RSN ?
+        EAPOL_KEY_TYPE_RSN : EAPOL_KEY_TYPE_WPA;
+    key_info = WPA_KEY_INFO_REQUEST | ver;
+    if (sm->ptk_set)
+        key_info |= WPA_KEY_INFO_MIC;
+    if (error)
+        key_info |= WPA_KEY_INFO_ERROR|WPA_KEY_INFO_SECURE;
+    if (pairwise)
+        key_info |= WPA_KEY_INFO_KEY_TYPE;
+    WPA_PUT_BE16(reply->key_info, key_info);
+    WPA_PUT_BE16(reply->key_length, 0);
+    memcpy(reply->replay_counter, sm->request_counter,
+          WPA_REPLAY_COUNTER_LEN);
+    inc_byte_array(sm->request_counter, WPA_REPLAY_COUNTER_LEN);
+
+    WPA_PUT_BE16(reply->key_data_length, 0);
+
+   #ifdef DEBUG_PRINT    
+    wpa_printf(MSG_DEBUG, "WPA: Sending EAPOL-Key Request (error=%d "
+           "pairwise=%d ptk_set=%d len=%lu)",
+           error, pairwise, sm->ptk_set, (unsigned long) rlen);
+   #endif
+    wpa_eapol_key_send(sm, sm->ptk.kck, ver, bssid, ETH_P_EAPOL,
+               rbuf, rlen, key_info & WPA_KEY_INFO_MIC ?
+               reply->key_mic : NULL);
+    wpa_sm_free_eapol(rbuf);
+}
+
+int   wpa_supplicant_get_pmk(struct wpa_sm *sm)
+{   
+       if(sm->pmk_len >0) {
+        return 0;
+       } else {
+           return 1;
+    }     
+}
+
+/**
+ * wpa_supplicant_send_2_of_4 - Send message 2 of WPA/RSN 4-Way Handshake
+ * @sm: Pointer to WPA state machine data from wpa_sm_init()
+ * @dst: Destination address for the frame
+ * @key: Pointer to the EAPOL-Key frame header
+ * @ver: Version bits from EAPOL-Key Key Info
+ * @nonce: Nonce value for the EAPOL-Key frame
+ * @wpa_ie: WPA/RSN IE
+ * @wpa_ie_len: Length of the WPA/RSN IE
+ * @ptk: PTK to use for keyed hash and encryption
+ * Returns: 0 on success, -1 on failure
+ */
+int   wpa_supplicant_send_2_of_4(struct wpa_sm *sm, const unsigned char *dst,
+                   const struct wpa_eapol_key *key,
+                   int ver, const u8 *nonce,
+                   const u8 *wpa_ie, size_t wpa_ie_len,
+                   struct wpa_ptk *ptk)
+{
+    size_t rlen;
+    struct wpa_eapol_key *reply;
+    u8 *rbuf;
+
+    if (wpa_ie == NULL) {
+       #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_ERROR, "WPA: No wpa_ie set - cannot "
+               "generate msg 2/4");
+       #endif
+        return -1;
+    }
+
+    wpa_hexdump(MSG_MSGDUMP, "WPA: WPA IE for msg 2/4\n", wpa_ie, wpa_ie_len);
+
+    rbuf = wpa_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAPOL_KEY,
+                  NULL, sizeof(*reply) + wpa_ie_len,
+                  &rlen, (void *) &reply);
+    if (rbuf == NULL) {
+        return -1;
+    }
+
+    reply->type = sm->proto == WPA_PROTO_RSN ?
+        EAPOL_KEY_TYPE_RSN : EAPOL_KEY_TYPE_WPA;
+    WPA_PUT_BE16(reply->key_info,
+             ver | WPA_KEY_INFO_KEY_TYPE | WPA_KEY_INFO_MIC);
+    if (sm->proto == WPA_PROTO_RSN)
+        WPA_PUT_BE16(reply->key_length, 0);
+    else
+        memcpy(reply->key_length, key->key_length, 2);
+
+    memcpy(reply->replay_counter, key->replay_counter,
+          WPA_REPLAY_COUNTER_LEN);
+
+    WPA_PUT_BE16(reply->key_data_length, wpa_ie_len);
+    memcpy(reply + 1, wpa_ie, wpa_ie_len);
+
+    memcpy(reply->key_nonce, nonce, WPA_NONCE_LEN);
+    
+    wpa_printf(MSG_DEBUG, "WPA Send EAPOL-Key 2/4\n");
+    
+    wpa_eapol_key_send(sm, ptk->kck, ver, dst, ETH_P_EAPOL,
+               rbuf, rlen, reply->key_mic);
+    wpa_sm_free_eapol(rbuf);
+
+    return 0;
+}
+
+int   wpa_derive_ptk(struct wpa_sm *sm, const unsigned char *src_addr,
+              const struct wpa_eapol_key *key,
+              struct wpa_ptk *ptk)
+{
+    size_t ptk_len = sm->pairwise_cipher == WPA_CIPHER_CCMP ? 48 : 64;
+
+    wpa_pmk_to_ptk(sm->pmk, sm->pmk_len, "Pairwise key expansion",
+               sm->own_addr, sm->bssid, sm->snonce, key->key_nonce,
+               (u8 *) ptk, ptk_len,
+               wpa_key_mgmt_sha256(sm->key_mgmt));
+    return 0;
+}
+
+void   wpa_supplicant_process_1_of_4(struct wpa_sm *sm,
+                      const unsigned char *src_addr,
+                      const struct wpa_eapol_key *key,
+                      u16 ver)
+{
+    struct wpa_eapol_ie_parse ie;
+    struct wpa_ptk *ptk;
+    int res;
+
+    wpa_sm_set_state(WPA_FIRST_HALF_4WAY_HANDSHAKE);
+
+    wpa_printf(MSG_DEBUG, "WPA 1/4-Way Handshake\n");
+
+    memset(&ie, 0, sizeof(ie));
+
+#ifndef CONFIG_NO_WPA2
+    if (sm->proto == WPA_PROTO_RSN) {
+        /* RSN: msg 1/4 should contain PMKID for the selected PMK */
+        const u8 *_buf = (const u8 *) (key + 1);
+        size_t len = WPA_GET_BE16(key->key_data_length);    
+        wpa_hexdump(MSG_MSGDUMP, "RSN: msg 1/4 key data", _buf, len);
+        wpa_supplicant_parse_ies(_buf, len, &ie);
+        if (ie.pmkid) {
+            wpa_hexdump(MSG_DEBUG, "RSN: PMKID from "
+                    "Authenticator", ie.pmkid, PMKID_LEN);
+        }
+    }
+#endif /* CONFIG_NO_WPA2 */
+
+       res = wpa_supplicant_get_pmk(sm);
+       if (res == -2) {
+          #ifdef DEBUG_PRINT    
+         wpa_printf(MSG_DEBUG, "RSN: Do not reply to msg 1/4 - "
+               "requesting full EAP authentication");
+          #endif     
+        return;
+    }
+    if (res)
+        goto failed;
+
+    if (sm->renew_snonce) {
+        if (os_get_random(sm->snonce, WPA_NONCE_LEN)) {
+         #ifdef DEBUG_PRINT            
+            wpa_printf(MSG_DEBUG, "WPA: Failed to get random data for SNonce");
+         #endif     
+            goto failed;
+        }
+         
+        sm->renew_snonce = 0;
+        wpa_hexdump(MSG_DEBUG, "WPA: Renewed SNonce",
+                sm->snonce, WPA_NONCE_LEN);
+    }
+
+    /* Calculate PTK which will be stored as a temporary PTK until it has
+     * been verified when processing message 3/4. */
+    ptk = &sm->tptk;
+    wpa_derive_ptk(sm, src_addr, key, ptk);
+    /* Supplicant: swap tx/rx Mic keys */
+    sm->tptk_set = 1;
+    sm->ptk_set = 0;
+    sm->key_install = true;
+
+    if (wpa_supplicant_send_2_of_4(sm, sm->bssid, key, ver, sm->snonce,
+                       sm->assoc_wpa_ie, sm->assoc_wpa_ie_len,
+                       ptk))
+        goto failed;
+
+    memcpy(sm->anonce, key->key_nonce, WPA_NONCE_LEN);
+    return;
+
+failed:
+    wpa_sm_deauthenticate(sm, WLAN_REASON_UNSPECIFIED);
+}
+
+  void   wpa_sm_rekey_ptk(void *eloop_ctx, void *timeout_ctx)
+{
+    struct wpa_sm *sm = eloop_ctx;
+
+   #ifdef DEBUG_PRINT    
+    wpa_printf(MSG_DEBUG, "WPA: Request PTK rekeying");
+   #endif
+    wpa_sm_key_request(sm, 0, 1);
+}
+
+
+int   wpa_supplicant_install_ptk(struct wpa_sm *sm)
+{
+    int keylen;
+    enum wpa_alg alg;
+
+   #ifdef DEBUG_PRINT    
+    wpa_printf(MSG_DEBUG, "WPA: Installing PTK to the driver.\n");
+   #endif
+   
+    switch (sm->pairwise_cipher) {
+    case WPA_CIPHER_CCMP:
+        alg = WPA_ALG_CCMP;
+        keylen = 16;
+        break;
+    case WPA_CIPHER_TKIP:
+        alg = WPA_ALG_TKIP;
+        keylen = 32;
+        break;
+    case WPA_CIPHER_NONE:
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: Pairwise Cipher Suite: "
+               "NONE - do not use pairwise keys");
+        #endif    
+        return 0;
+    default:
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: Unsupported pairwise cipher %d",
+               sm->pairwise_cipher);
+           #endif
+        return -1;
+    }
+
+    //now only use keyentry 0 for pairwise key
+    sm->key_entry_valid = 5;
+
+    if (wpa_sm_set_key(&(sm->install_ptk), alg, sm->bssid, 0, 1, (sm->install_ptk).seq, WPA_KEY_RSC_LEN,
+               (u8 *) sm->ptk.tk1, keylen,sm->key_entry_valid) < 0) {
+        #ifdef DEBUG_PRINT           
+        wpa_printf(MSG_DEBUG, "WPA: Failed to set PTK to the "
+               "driver (alg=%d keylen=%d bssid=" MACSTR ")",
+               alg, keylen, MAC2STR(sm->bssid));
+        #endif    
+        return -1;
+    }
+       
+    if (sm->wpa_ptk_rekey) {
+        eloop_cancel_timeout(wpa_sm_rekey_ptk, sm, NULL);
+        eloop_register_timeout(sm->wpa_ptk_rekey, 0, wpa_sm_rekey_ptk,
+                       sm, NULL);
+    }
+
+    return 0;
+}
+
+int   wpa_supplicant_check_group_cipher(int group_cipher,
+                         int keylen, int maxkeylen,
+                         int *key_rsc_len,
+                         enum wpa_alg *alg)
+{
+    int ret = 0;
+
+    switch (group_cipher) {
+    case WPA_CIPHER_CCMP:
+        if (keylen != 16 || maxkeylen < 16) {
+            ret = -1;
+            break;
+        }
+        *key_rsc_len = 6;
+        *alg = WPA_ALG_CCMP;
+        break;
+    case WPA_CIPHER_TKIP:
+        if (keylen != 32 || maxkeylen < 32) {
+            ret = -1;
+            break;
+        }
+        *key_rsc_len = 6;
+        *alg = WPA_ALG_TKIP;
+        break;
+    case WPA_CIPHER_WEP104:
+        if (keylen != 13 || maxkeylen < 13) {
+            ret = -1;
+            break;
+        }
+        *key_rsc_len = 0;
+        *alg = WPA_ALG_WEP104;
+        break;
+    case WPA_CIPHER_WEP40:
+        if (keylen != 5 || maxkeylen < 5) {
+            ret = -1;
+            break;
+        }
+        *key_rsc_len = 0;
+        *alg = WPA_ALG_WEP40;
+        break;
+    default:
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: Unsupported Group Cipher %d",
+               group_cipher);
+        #endif
+        return -1;
+    }
+
+    if (ret < 0 ) {
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: Unsupported %s Group Cipher key "
+               "length %d (%d).",
+               wpa_cipher_txt(group_cipher), keylen, maxkeylen);
+        #endif    
+    }
+
+    return ret;
+}
+
+void   wpa_supplicant_key_neg_complete(struct wpa_sm *sm,
+                        const u8 *addr, int secure)
+{
+#ifdef DEBUG_PRINT
+    wpa_printf(MSG_DEBUG, "WPA: Key negotiation completed with "
+          MACSTR " [PTK=%s GTK=%s]\n", MAC2STR(addr),
+          wpa_cipher_txt(sm->pairwise_cipher),
+          wpa_cipher_txt(sm->group_cipher));
+#endif     
+    wpa_sm_cancel_auth_timeout(sm);
+    wpa_sm_set_state(WPA_COMPLETED);
+
+    sm->wpa_neg_complete();
+
+    if (secure) {
+        wpa_sm_mlme_setprotection(
+            sm, addr, MLME_SETPROTECTION_PROTECT_TYPE_RX_TX,
+            MLME_SETPROTECTION_KEY_TYPE_PAIRWISE);
+
+        if (wpa_key_mgmt_wpa_psk(sm->key_mgmt))
+            eapol_sm_notify_eap_success(TRUE);
+        /*
+         * Start preauthentication after a short wait to avoid a
+         * possible race condition between the data receive and key
+         * configuration after the 4-Way Handshake. This increases the
+         * likelyhood of the first preauth EAPOL-Start frame getting to
+         * the target AP.
+         */ 
+    }
+
+}
+
+
+int   wpa_supplicant_install_gtk(struct wpa_sm *sm,
+                      struct wpa_gtk_data *gd)
+{
+    u8 *_gtk = gd->gtk;
+    u8 gtk_buf[32];
+       u8 *key_rsc=(sm->install_gtk).seq;
+       
+    wpa_hexdump(MSG_DEBUG, "WPA: Group Key", gd->gtk, gd->gtk_len);
+
+    #ifdef DEBUG_PRINT    
+    wpa_printf(MSG_DEBUG, "WPA: Installing GTK to the driver "
+           "(keyidx=%d tx=%d len=%d).\n", gd->keyidx, gd->tx,
+           gd->gtk_len);
+    #endif    
+    wpa_hexdump(MSG_DEBUG, "WPA: RSC", key_rsc, gd->key_rsc_len);
+    if (sm->group_cipher == WPA_CIPHER_TKIP) {
+        /* Swap Tx/Rx keys for Michael MIC */
+        memcpy(gtk_buf, gd->gtk, 16);
+        memcpy(gtk_buf + 16, gd->gtk + 16, 8);
+        memcpy(gtk_buf + 24, gd->gtk + 24, 8);
+        _gtk = gtk_buf;
+    }
+    //now only use keycache entry1 for group key
+    sm->key_entry_valid = gd->keyidx;
+    if (sm->pairwise_cipher == WPA_CIPHER_NONE) {
+        if (wpa_sm_set_key(&(sm->install_gtk), gd->alg,
+                   sm->bssid, //(u8 *) "\xff\xff\xff\xff\xff\xff",
+                   gd->keyidx, 1, key_rsc, gd->key_rsc_len,
+                   _gtk, gd->gtk_len,sm->key_entry_valid) < 0) {
+            #ifdef DEBUG_PRINT           
+            wpa_printf(MSG_DEBUG, "WPA: Failed to set "
+                   "GTK to the driver (Group only).");
+            #endif    
+            return -1;
+        }
+    } else if (wpa_sm_set_key(&(sm->install_gtk), gd->alg,
+                  sm->bssid, //(u8 *) "\xff\xff\xff\xff\xff\xff",
+                  gd->keyidx, gd->tx, key_rsc, gd->key_rsc_len,
+                  _gtk, gd->gtk_len, sm->key_entry_valid) < 0) {
+        #ifdef DEBUG_PRINT          
+        wpa_printf(MSG_DEBUG, "WPA: Failed to set GTK to "
+               "the driver (alg=%d keylen=%d keyidx=%d)",
+               gd->alg, gd->gtk_len, gd->keyidx);
+        #endif    
+        return -1;
+    }
+
+    return 0;
+}
+
+bool wpa_supplicant_gtk_in_use(struct wpa_sm *sm, struct wpa_gtk_data *gd)
+{
+    u8 *_gtk = gd->gtk;
+    u8 gtk_buf[32];
+    u8 gtk_get[32] = {0};
+    u8 ifx;
+    int alg;
+    u8 bssid[6];
+    int keyidx;
+
+    wpa_hexdump(MSG_DEBUG, "WPA: Group Key", gd->gtk, gd->gtk_len);
+
+    #ifdef DEBUG_PRINT
+    wpa_printf(MSG_DEBUG, "WPA: Judge GTK: (keyidx=%d len=%d).", gd->keyidx, gd->gtk_len);
+    #endif
+
+    if (sm->group_cipher == WPA_CIPHER_TKIP) {
+        /* Swap Tx/Rx keys for Michael MIC */
+        memcpy(gtk_buf, gd->gtk, 16);
+        memcpy(gtk_buf + 16, gd->gtk + 16, 8);
+        memcpy(gtk_buf + 24, gd->gtk + 24, 8);
+        _gtk = gtk_buf;
+    }
+
+    //check if gtk is in use.
+    if (wpa_sm_get_key(&ifx, &alg, bssid, &keyidx, gtk_get, gd->gtk_len, gd->keyidx) == 0) {
+        if (ifx == 0 && alg == gd->alg && memcmp(bssid, sm->bssid, ETH_ALEN) == 0 &&
+                       memcmp(_gtk, gtk_get, gd->gtk_len) == 0) {
+            wpa_printf(MSG_DEBUG, "GTK %d is already in use in entry %d, it may be an attack, ignor it.", gd->keyidx, gd->keyidx + 2);
+            return true;
+        }
+    }
+
+    if (wpa_sm_get_key(&ifx, &alg, bssid, &keyidx, gtk_get, gd->gtk_len, (gd->keyidx+1)%2) == 0) {
+       if (ifx == 0 && alg == gd->alg && memcmp(bssid, sm->bssid, ETH_ALEN) == 0 &&
+                       memcmp(_gtk, gtk_get, gd->gtk_len) == 0) {
+            wpa_printf(MSG_DEBUG, "GTK %d is already in use in entry %d, it may be an attack, ignor it.", gd->keyidx, (gd->keyidx+1)%2 + 2);
+            return true;
+        }
+    }
+
+    return false;
+}
+
+int wpa_supplicant_gtk_tx_bit_workaround(const struct wpa_sm *sm,
+                        int tx)
+{
+    if (tx && sm->pairwise_cipher != WPA_CIPHER_NONE) {
+        /* Ignore Tx bit for GTK if a pairwise key is used. One AP
+         * seemed to set this bit (incorrectly, since Tx is only when
+         * doing Group Key only APs) and without this workaround, the
+         * data connection does not work because wpa_supplicant
+         * configured non-zero keyidx to be used for unicast. */
+        #ifdef DEBUG_PRINT     
+        wpa_printf(MSG_DEBUG, "WPA: Tx bit set for GTK, but pairwise "
+               "keys are used - ignore Tx bit");
+        #endif    
+        return 0;
+    }
+    return tx;
+}
+
+int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
+                       const u8 *gtk, size_t gtk_len,
+                       int key_info)
+{
+#ifndef CONFIG_NO_WPA2
+    struct wpa_gtk_data *gd=&(sm->gd);
+
+    /*
+     * IEEE Std 802.11i-2004 - 8.5.2 EAPOL-Key frames - Figure 43x
+     * GTK KDE format:
+     * KeyID[bits 0-1], Tx [bit 2], Reserved [bits 3-7]
+     * Reserved [bits 0-7]
+     * GTK
+     */
+
+    memset(gd, 0, sizeof(struct wpa_gtk_data));
+    wpa_hexdump(MSG_DEBUG, "RSN: received GTK in pairwise handshake",
+            gtk, gtk_len);
+
+    if (gtk_len < 2 || gtk_len - 2 > sizeof(gd->gtk))
+        return -1;
+
+    gd->keyidx = gtk[0] & 0x3;
+    gd->tx = wpa_supplicant_gtk_tx_bit_workaround(sm,
+                             !!(gtk[0] & BIT(2)));
+    gtk += 2;
+    gtk_len -= 2;
+
+    memcpy(gd->gtk, gtk, gtk_len);
+    gd->gtk_len = gtk_len;
+
+    if (wpa_supplicant_check_group_cipher(sm->group_cipher,
+                          gtk_len, gtk_len,
+                          &(gd->key_rsc_len), &(gd->alg))) {
+            #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "RSN: Failed to install GTK");
+        #endif        
+        return -1;
+    }
+    return 0;
+#else /* CONFIG_NO_WPA2 */
+    return -1;
+#endif /* CONFIG_NO_WPA2 */
+}
+
+#ifdef DEBUG_PRINT
+void wpa_report_ie_mismatch(struct wpa_sm *sm,
+                   const char *reason, const u8 *src_addr,
+                   const u8 *wpa_ie, size_t wpa_ie_len,
+                   const u8 *rsn_ie, size_t rsn_ie_len)
+#else
+void wpa_report_ie_mismatch(struct wpa_sm *sm, const u8 *src_addr,
+                   const u8 *wpa_ie, size_t wpa_ie_len,
+                   const u8 *rsn_ie, size_t rsn_ie_len)
+#endif
+{
+    #ifdef DEBUG_PRINT    
+    wpa_printf(MSG_DEBUG, "WPA: %s (src=" MACSTR ")",
+        reason, MAC2STR(src_addr));
+    #endif
+    if (sm->ap_wpa_ie) {
+        wpa_hexdump(MSG_INFO, "WPA: WPA IE in Beacon/ProbeResp",
+                sm->ap_wpa_ie, sm->ap_wpa_ie_len);
+    }
+    if (wpa_ie) {
+        if (!sm->ap_wpa_ie) {
+            #ifdef DEBUG_PRINT
+            wpa_printf(MSG_DEBUG, "WPA: No WPA IE in "
+                   "Beacon/ProbeResp");
+            #endif    
+        }
+        wpa_hexdump(MSG_INFO, "WPA: WPA IE in 3/4 msg",
+                wpa_ie, wpa_ie_len);
+    }
+
+    if (sm->ap_rsn_ie) {
+        wpa_hexdump(MSG_INFO, "WPA: RSN IE in Beacon/ProbeResp",
+                sm->ap_rsn_ie, sm->ap_rsn_ie_len);
+    }
+    if (rsn_ie) {
+        if (!sm->ap_rsn_ie) {
+            #ifdef DEBUG_PRINT
+            wpa_printf(MSG_DEBUG, "WPA: No RSN IE in "
+                   "Beacon/ProbeResp");
+            #endif    
+        }
+        wpa_hexdump(MSG_INFO, "WPA: RSN IE in 3/4 msg",
+                rsn_ie, rsn_ie_len);
+    }
+
+    wpa_sm_disassociate(sm, WLAN_REASON_IE_IN_4WAY_DIFFERS);
+}
+
+int   ieee80211w_set_keys(struct wpa_sm *sm,
+                   struct wpa_eapol_ie_parse *ie)
+{
+     return 0;
+}
+
+  int   wpa_supplicant_validate_ie(struct wpa_sm *sm,
+                      const unsigned char *src_addr,
+                      struct wpa_eapol_ie_parse *ie)
+{
+    if (sm->ap_wpa_ie == NULL && sm->ap_rsn_ie == NULL) {
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: No WPA/RSN IE for this AP known. "
+               "Trying to get from scan results\n");
+        #endif    
+        if (wpa_sm_get_beacon_ie(sm) < 0) {
+            #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: Could not find AP from "
+                   "the scan results");
+            #endif    
+        } else {
+            #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: Found the current AP from "
+                   "updated scan results\n");
+            #endif    
+        }
+    }
+
+    if (ie->wpa_ie == NULL && ie->rsn_ie == NULL &&
+        (sm->ap_wpa_ie || sm->ap_rsn_ie)) {
+#ifdef DEBUG_PRINT
+        wpa_report_ie_mismatch(sm, "IE in 3/4 msg does not match "
+                       "with IE in Beacon/ProbeResp (no IE?)",
+                       src_addr, ie->wpa_ie, ie->wpa_ie_len,
+                       ie->rsn_ie, ie->rsn_ie_len);
+#else
+        wpa_report_ie_mismatch(sm,
+                       src_addr, ie->wpa_ie, ie->wpa_ie_len,
+                       ie->rsn_ie, ie->rsn_ie_len);
+#endif
+        return -1;
+    }
+
+    if ((ie->wpa_ie && sm->ap_wpa_ie &&
+         (ie->wpa_ie_len != sm->ap_wpa_ie_len ||
+         memcmp(ie->wpa_ie, sm->ap_wpa_ie, ie->wpa_ie_len) != 0)) ||
+        (ie->rsn_ie && sm->ap_rsn_ie &&
+         wpa_compare_rsn_ie(wpa_key_mgmt_ft(sm->key_mgmt),
+                sm->ap_rsn_ie, sm->ap_rsn_ie_len,
+                ie->rsn_ie, ie->rsn_ie_len))) {
+#ifdef DEBUG_PRINT
+        wpa_report_ie_mismatch(sm, "IE in 3/4 msg does not match "
+                       "with IE in Beacon/ProbeResp",
+                       src_addr, ie->wpa_ie, ie->wpa_ie_len,
+                       ie->rsn_ie, ie->rsn_ie_len);
+#else
+        wpa_report_ie_mismatch(sm,
+                       src_addr, ie->wpa_ie, ie->wpa_ie_len,
+                       ie->rsn_ie, ie->rsn_ie_len);
+#endif
+        return -1;
+    }
+
+    if (sm->proto == WPA_PROTO_WPA &&
+        ie->rsn_ie && sm->ap_rsn_ie == NULL && sm->rsn_enabled) {
+#ifdef DEBUG_PRINT
+        wpa_report_ie_mismatch(sm, "Possible downgrade attack "
+                       "detected - RSN was enabled and RSN IE "
+                       "was in msg 3/4, but not in "
+                       "Beacon/ProbeResp",
+                       src_addr, ie->wpa_ie, ie->wpa_ie_len,
+                       ie->rsn_ie, ie->rsn_ie_len);
+#else
+        wpa_report_ie_mismatch(sm,
+                               src_addr, ie->wpa_ie, ie->wpa_ie_len,
+                               ie->rsn_ie, ie->rsn_ie_len);
+#endif
+        return -1;
+    }
+
+    return 0;
+}
+
+/**
+ * wpa_supplicant_send_4_of_4 - Send message 4 of WPA/RSN 4-Way Handshake
+ * @sm: Pointer to WPA state machine data from wpa_sm_init()
+ * @dst: Destination address for the frame
+ * @key: Pointer to the EAPOL-Key frame header
+ * @ver: Version bits from EAPOL-Key Key Info
+ * @key_info: Key Info
+ * @kde: KDEs to include the EAPOL-Key frame
+ * @kde_len: Length of KDEs
+ * @ptk: PTK to use for keyed hash and encryption
+ * Returns: 0 on success, -1 on failure
+ */
+  int   wpa_supplicant_send_4_of_4(struct wpa_sm *sm, const unsigned char *dst,
+                   const struct wpa_eapol_key *key,
+                   u16 ver, u16 key_info,
+                   const u8 *kde, size_t kde_len,
+                   struct wpa_ptk *ptk)
+{
+    size_t rlen;
+    struct wpa_eapol_key *reply;
+    u8 *rbuf;
+
+    if (kde)
+        wpa_hexdump(MSG_DEBUG, "WPA: KDE for msg 4/4", kde, kde_len);
+
+    rbuf = wpa_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAPOL_KEY, NULL,
+                  sizeof(*reply) + kde_len,
+                  &rlen, (void *) &reply);
+    if (rbuf == NULL)
+        return -1;
+
+    sm->txcb_flags |= WPA_4_4_HANDSHAKE_BIT;
+    wpa_printf(MSG_DEBUG, "tx 4/4 txcb_flags=%d\n", sm->txcb_flags);
+
+    reply->type = sm->proto == WPA_PROTO_RSN ?
+        EAPOL_KEY_TYPE_RSN : EAPOL_KEY_TYPE_WPA;
+    key_info &= WPA_KEY_INFO_SECURE;
+    key_info |= ver | WPA_KEY_INFO_KEY_TYPE | WPA_KEY_INFO_MIC;
+    WPA_PUT_BE16(reply->key_info, key_info);
+    if (sm->proto == WPA_PROTO_RSN)
+        WPA_PUT_BE16(reply->key_length, 0);
+    else
+        memcpy(reply->key_length, key->key_length, 2);
+    memcpy(reply->replay_counter, key->replay_counter,
+          WPA_REPLAY_COUNTER_LEN);
+
+    WPA_PUT_BE16(reply->key_data_length, kde_len);
+    if (kde)
+        memcpy(reply + 1, kde, kde_len);
+
+    wpa_printf(MSG_DEBUG, "WPA Send EAPOL-Key 4/4\n");
+    wpa_eapol_key_send(sm, ptk->kck, ver, dst, ETH_P_EAPOL,
+               rbuf, rlen, reply->key_mic);
+    wpa_sm_free_eapol(rbuf);
+
+    return 0;
+}
+
+  void   wpa_sm_set_seq(struct wpa_sm *sm, struct wpa_eapol_key *key, u8 isptk)
+{    
+    u8 *key_rsc, *seq;
+    u8 null_rsc[WPA_KEY_RSC_LEN];
+    
+    os_bzero(null_rsc, WPA_KEY_RSC_LEN);
+
+    if (sm->proto == WPA_PROTO_RSN) {
+        key_rsc = null_rsc;
+    } else {
+        key_rsc = key->key_rsc;
+        wpa_hexdump(MSG_DEBUG, "WPA: RSC", key_rsc, WPA_KEY_RSC_LEN);
+    }
+
+    seq=(isptk) ? (sm->install_ptk).seq : (sm->install_gtk).seq;  
+    memcpy(seq, key_rsc, WPA_KEY_RSC_LEN);
+}
+
+  void   wpa_supplicant_process_3_of_4(struct wpa_sm *sm,
+                      struct wpa_eapol_key *key,
+                      u16 ver)
+{
+    u16 key_info, keylen, len;
+    const u8 *pos;
+    struct wpa_eapol_ie_parse ie;
+
+    wpa_sm_set_state(WPA_LAST_HALF_4WAY_HANDSHAKE);
+    wpa_printf(MSG_DEBUG, "WPA 3/4-Way Handshake\n");
+
+    key_info = WPA_GET_BE16(key->key_info);
+
+    pos = (const u8 *) (key + 1);
+    len = WPA_GET_BE16(key->key_data_length);
+    wpa_hexdump(MSG_DEBUG, "WPA: IE KeyData", pos, len);
+    wpa_supplicant_parse_ies(pos, len, &ie);
+    if (ie.gtk && !(key_info & WPA_KEY_INFO_ENCR_KEY_DATA)) {
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: GTK IE in unencrypted key data");
+        #endif    
+        goto failed;
+    }
+
+    if (wpa_supplicant_validate_ie(sm, sm->bssid, &ie) < 0)
+        goto failed;
+
+    if (memcmp(sm->anonce, key->key_nonce, WPA_NONCE_LEN) != 0) {
+       #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: ANonce from message 1 of 4-Way "
+               "Handshake differs from 3 of 4-Way Handshake - drop"
+               " packet (src=" MACSTR ")", MAC2STR(sm->bssid));
+     #endif  
+        goto failed;
+    }
+
+    keylen = WPA_GET_BE16(key->key_length);
+    switch (sm->pairwise_cipher) {
+    case WPA_CIPHER_CCMP:
+        if (keylen != 16) {
+            #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: Invalid CCMP key length "
+                   "%d (src=" MACSTR ")",
+                   keylen, MAC2STR(sm->bssid));
+            #endif    
+            goto failed;
+        }
+        break;
+    case WPA_CIPHER_TKIP:
+        if (keylen != 32) {
+            #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: Invalid TKIP key length "
+                   "%d (src=" MACSTR ")",
+                   keylen, MAC2STR(sm->bssid));
+            #endif    
+            goto failed;
+        }
+        break;
+    }
+
+    
+    /* SNonce was successfully used in msg 3/4, so mark it to be renewed
+     * for the next 4-Way Handshake. If msg 3 is received again, the old
+     * SNonce will still be used to avoid changing PTK. */
+    sm->renew_snonce = 1;
+
+    /*ready for txcallback , set seq and set txcallback param*/
+    wpa_sm_set_seq(sm, key, 1);
+    sm->key_info=key_info;
+    (sm->gd).gtk_len=0; //used as flag if gtk is installed in callback
+    if (ie.gtk) {
+        wpa_sm_set_seq(sm, key, 0);
+           if (wpa_supplicant_pairwise_gtk(sm, 
+                    ie.gtk, ie.gtk_len, key_info) < 0) {
+        #ifdef DEBUG_PRINT            
+        wpa_printf(MSG_DEBUG, "RSN: Failed to configure GTK");
+        #endif    
+        goto failed;
+        }
+    }
+    
+    if (ieee80211w_set_keys(sm, &ie) < 0) {
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "RSN: Failed to configure IGTK");
+        #endif    
+        goto failed;
+    }
+
+    /*after txover, callback will continue run remain task*/
+    if (wpa_supplicant_send_4_of_4(sm, sm->bssid, key, ver, key_info,
+                       NULL, 0, &sm->ptk)) {
+        goto failed;
+    }
+
+    return;
+
+failed:
+    wpa_sm_deauthenticate(sm, WLAN_REASON_UNSPECIFIED);
+}
+
+
+  int   wpa_supplicant_send_4_of_4_txcallback(struct wpa_sm *sm)
+{
+       u16 key_info=sm->key_info;
+
+    if (sm->key_install && key_info & WPA_KEY_INFO_INSTALL) {
+        if (wpa_supplicant_install_ptk(sm))
+            goto failed;
+    }
+    else if (sm->key_install == false) {
+        wpa_printf(MSG_DEBUG, "PTK has been installed, it may be an attack, ignor it.");
+    }
+
+    wpa_sm_set_state(WPA_GROUP_HANDSHAKE);
+    
+    if((sm->gd).gtk_len) {
+       if (sm->key_install) {
+          if (wpa_supplicant_install_gtk(sm, &(sm->gd))) 
+            goto failed;
+       }
+       else {
+           wpa_printf(MSG_DEBUG, "GTK has been installed, it may be an attack, ignor it.");
+       }
+        wpa_supplicant_key_neg_complete(sm, sm->bssid,
+                    key_info & WPA_KEY_INFO_SECURE);
+    }
+
+
+    if (key_info & WPA_KEY_INFO_SECURE) {
+        wpa_sm_mlme_setprotection(
+            sm, sm->bssid, MLME_SETPROTECTION_PROTECT_TYPE_RX,
+            MLME_SETPROTECTION_KEY_TYPE_PAIRWISE);
+    }
+
+    sm->key_install = false;
+
+    return 0;
+
+failed:
+       return WLAN_REASON_UNSPECIFIED; 
+}
+
+
+  int   wpa_supplicant_process_1_of_2_rsn(struct wpa_sm *sm,
+                         const u8 *keydata,
+                         size_t keydatalen,
+                         u16 key_info,
+                         struct wpa_gtk_data *gd)
+{
+    int maxkeylen;
+    struct wpa_eapol_ie_parse ie;
+
+    wpa_hexdump(MSG_DEBUG, "RSN: msg 1/2 key data", keydata, keydatalen);
+    wpa_supplicant_parse_ies(keydata, keydatalen, &ie);
+    if (ie.gtk && !(key_info & WPA_KEY_INFO_ENCR_KEY_DATA)) {
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: GTK IE in unencrypted key data");
+      #endif    
+        return -1;
+    }
+    if (ie.gtk == NULL) {
+         #ifdef DEBUG_PRINT        
+        wpa_printf(MSG_DEBUG, "WPA: No GTK IE in Group Key msg 1/2");
+       #endif     
+        return -1;
+    }
+    maxkeylen = gd->gtk_len = ie.gtk_len - 2;
+
+    if (wpa_supplicant_check_group_cipher(sm->group_cipher,
+                          gd->gtk_len, maxkeylen,
+                          &gd->key_rsc_len, &gd->alg))
+        return -1;
+
+    wpa_hexdump(MSG_DEBUG, "RSN: received GTK in group key handshake",
+            ie.gtk, ie.gtk_len);
+    gd->keyidx = ie.gtk[0] & 0x3;
+    gd->tx = wpa_supplicant_gtk_tx_bit_workaround(sm,
+                              !!(ie.gtk[0] & BIT(2)));
+    if (ie.gtk_len - 2 > sizeof(gd->gtk)) {
+         #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "RSN: Too long GTK in GTK IE "
+               "(len=%lu)", (unsigned long) ie.gtk_len - 2);
+      #endif     
+        return -1;
+    }
+    memcpy(gd->gtk, ie.gtk + 2, ie.gtk_len - 2);
+
+    if (ieee80211w_set_keys(sm, &ie) < 0)
+    {   
+        #ifdef DEBUG_PRINT
+        wpa_printf(MSG_DEBUG, "RSN: Failed to configure IGTK");
+            #endif
+    }       
+    return 0;
+}
+
+  int   wpa_supplicant_process_1_of_2_wpa(struct wpa_sm *sm,
+                         const struct wpa_eapol_key *key,
+                         size_t keydatalen, int key_info,
+                         size_t extra_len, u16 ver,
+                         struct wpa_gtk_data *gd)
+{
+    size_t maxkeylen;
+    u8 ek[32];
+
+    gd->gtk_len = WPA_GET_BE16(key->key_length);
+    maxkeylen = keydatalen;
+    if (keydatalen > extra_len) {
+         #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: Truncated EAPOL-Key packet:"
+               " key_data_length=%lu > extra_len=%lu",
+               (unsigned long) keydatalen,
+               (unsigned long) extra_len);
+      #endif     
+        return -1;
+    }
+    if (ver == WPA_KEY_INFO_TYPE_HMAC_SHA1_AES) {
+        if (maxkeylen < 8) {
+              #ifdef DEBUG_PRINT            
+            wpa_printf(MSG_DEBUG, "WPA: Too short maxkeylen (%lu)",
+                   (unsigned long) maxkeylen);
+        #endif      
+            return -1;
+        }
+        maxkeylen -= 8;
+    }
+
+    if (wpa_supplicant_check_group_cipher(sm->group_cipher,
+                          gd->gtk_len, maxkeylen,
+                          &gd->key_rsc_len, &gd->alg))
+        return -1;
+
+    gd->keyidx = (key_info & WPA_KEY_INFO_KEY_INDEX_MASK) >>
+        WPA_KEY_INFO_KEY_INDEX_SHIFT;
+    if (ver == WPA_KEY_INFO_TYPE_HMAC_MD5_RC4) {
+        memcpy(ek, key->key_iv, 16);
+        memcpy(ek + 16, sm->ptk.kek, 16);
+        if (keydatalen > sizeof(gd->gtk)) {
+            #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: RC4 key data "
+                   "too long (%lu)",
+                   (unsigned long) keydatalen);
+            #endif    
+            return -1;
+        }
+        memcpy(gd->gtk, key + 1, keydatalen);
+        if (rc4_skip(ek, 32, 256, gd->gtk, keydatalen)) {
+            #ifdef DEBUG_PRINT
+            wpa_printf(MSG_DEBUG, "WPA: RC4 failed");
+            #endif
+            return -1;
+        }
+    } else if (ver == WPA_KEY_INFO_TYPE_HMAC_SHA1_AES) {
+        if (keydatalen % 8) {
+            #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: Unsupported AES-WRAP "
+                   "len %lu", (unsigned long) keydatalen);
+             #endif    
+            return -1;
+        }
+        if (maxkeylen > sizeof(gd->gtk)) {
+                 #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: AES-WRAP key data "
+                   "too long (keydatalen=%lu maxkeylen=%lu)",
+                   (unsigned long) keydatalen,
+                   (unsigned long) maxkeylen);
+            #endif      
+            return -1;
+        }
+        if (fast_aes_unwrap(sm->ptk.kek, maxkeylen / 8,
+                                           (const u8 *) (key + 1), gd->gtk)) {
+            #ifdef DEBUG_PRINT                       
+               wpa_printf(MSG_DEBUG, "WPA: AES unwrap "
+                "failed - could not decrypt GTK");
+            #endif
+               return -1;
+        }
+    } else {
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: Unsupported key_info type %d",
+               ver);
+         #endif    
+        return -1;
+    }
+    gd->tx = wpa_supplicant_gtk_tx_bit_workaround(
+        sm, !!(key_info & WPA_KEY_INFO_TXRX));
+    return 0;
+}
+
+  int   wpa_supplicant_send_2_of_2(struct wpa_sm *sm,
+                      const struct wpa_eapol_key *key,
+                      int ver, u16 key_info)
+{
+    size_t rlen;
+    struct wpa_eapol_key *reply;
+    u8 *rbuf;
+
+    rbuf = wpa_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAPOL_KEY, NULL,
+                  sizeof(*reply), &rlen, (void *) &reply);
+    if (rbuf == NULL)
+        return -1;
+
+    sm->txcb_flags |= WPA_GROUP_HANDSHAKE_BIT;
+    wpa_printf(MSG_DEBUG, "2/2 txcb_flags=%d\n", sm->txcb_flags);
+
+    reply->type = sm->proto == WPA_PROTO_RSN ?
+        EAPOL_KEY_TYPE_RSN : EAPOL_KEY_TYPE_WPA;
+    key_info &= WPA_KEY_INFO_KEY_INDEX_MASK;
+    key_info |= ver | WPA_KEY_INFO_MIC | WPA_KEY_INFO_SECURE;
+    WPA_PUT_BE16(reply->key_info, key_info);
+    if (sm->proto == WPA_PROTO_RSN)
+        WPA_PUT_BE16(reply->key_length, 0);
+    else
+        memcpy(reply->key_length, key->key_length, 2);
+    memcpy(reply->replay_counter, key->replay_counter,
+          WPA_REPLAY_COUNTER_LEN);
+
+    WPA_PUT_BE16(reply->key_data_length, 0);
+    
+    wpa_printf(MSG_DEBUG, "WPA Send 2/2 Group key\n");
+
+    wpa_eapol_key_send(sm, sm->ptk.kck, ver, sm->bssid, ETH_P_EAPOL,
+               rbuf, rlen, reply->key_mic);
+    wpa_sm_free_eapol(rbuf);
+
+    return 0;
+}
+
+  void   wpa_supplicant_process_1_of_2(struct wpa_sm *sm,
+                      const unsigned char *src_addr,
+                      struct wpa_eapol_key *key,
+                      int extra_len, u16 ver)
+{
+    u16 key_info, keydatalen;
+    int  ret;
+    struct wpa_gtk_data *gd=&(sm->gd);
+
+    memset(gd, 0, sizeof(struct wpa_gtk_data));
+
+    wpa_printf(MSG_DEBUG, "WPA 1/2 Group Key Handshake\n");
+    
+    key_info = WPA_GET_BE16(key->key_info);
+    keydatalen = WPA_GET_BE16(key->key_data_length);
+
+    if (sm->proto == WPA_PROTO_RSN) {
+        ret = wpa_supplicant_process_1_of_2_rsn(sm,
+                            (const u8 *) (key + 1),
+                            keydatalen, key_info,
+                            gd);
+    } else {
+        ret = wpa_supplicant_process_1_of_2_wpa(sm, key, keydatalen,
+                            key_info, extra_len,
+                            ver, gd);
+    }
+
+    wpa_sm_set_state(WPA_GROUP_HANDSHAKE);
+
+    if (ret)
+        goto failed;
+
+    /*before callback, set seq for add param difficult in callback*/ 
+    wpa_sm_set_seq(sm, key, 0);
+    sm->key_info=key_info;
+
+    if (wpa_supplicant_send_2_of_2(sm, key, ver, key_info))
+        goto failed;
+
+    return;
+
+failed:
+    wpa_sm_deauthenticate(sm, WLAN_REASON_UNSPECIFIED);
+}
+
+  int   wpa_supplicant_send_2_of_2_txcallback(struct wpa_sm *sm)
+{
+    u16 key_info=sm->key_info;
+    u16 rekey= (WPA_SM_STATE(sm) == WPA_COMPLETED);
+
+    if((sm->gd).gtk_len) {
+       if (wpa_supplicant_gtk_in_use(sm, &(sm->gd)) == false) {
+            if (wpa_supplicant_install_gtk(sm, &(sm->gd)))
+                goto failed;
+       }
+    } else {
+        goto failed;
+    }
+
+    if (rekey) {
+#ifdef MSG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: Group rekeying "
+            "completed with " MACSTR " [GTK=%s]",
+            MAC2STR(sm->bssid), wpa_cipher_txt(sm->group_cipher));
+#endif    
+        wpa_sm_cancel_auth_timeout(sm);
+        wpa_sm_set_state(WPA_COMPLETED);
+    } else 
+        wpa_supplicant_key_neg_complete(sm, sm->bssid,
+                        key_info &WPA_KEY_INFO_SECURE);
+    return 0;
+
+failed:
+    return WLAN_REASON_UNSPECIFIED;
+}
+
+   int   wpa_supplicant_verify_eapol_key_mic(struct wpa_sm *sm,
+                           struct wpa_eapol_key *key,
+                           u16 ver,
+                           const u8 *buf, size_t len)
+{
+    u8 mic[16];
+    int ok = 0;
+
+    memcpy(mic, key->key_mic, 16);
+    if (sm->tptk_set) {
+        memset(key->key_mic, 0, 16);
+        wpa_eapol_key_mic(sm->tptk.kck, ver, buf, len,
+                  key->key_mic);
+        if (memcmp(mic, key->key_mic, 16) != 0) {
+           #ifdef DEBUG_PRINT        
+            wpa_printf(MSG_DEBUG, "WPA: Invalid EAPOL-Key MIC "
+                   "when using TPTK - ignoring TPTK");
+           #endif
+        } else {
+            ok = 1;
+            sm->tptk_set = 0;
+            sm->ptk_set = 1;
+            memcpy(&sm->ptk, &sm->tptk, sizeof(sm->ptk));
+        }
+    }
+
+    if (!ok && sm->ptk_set) {
+        memset(key->key_mic, 0, 16);
+        wpa_eapol_key_mic(sm->ptk.kck, ver, buf, len,
+                  key->key_mic);
+        if (memcmp(mic, key->key_mic, 16) != 0) {
+            #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: Invalid EAPOL-Key MIC "
+                   "- dropping packet");
+             #endif    
+            return -1;
+        }
+        ok = 1;
+    }
+
+    if (!ok) {
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: Could not verify EAPOL-Key MIC "
+               "- dropping packet");
+         #endif    
+        return -1;
+    }
+
+    memcpy(sm->rx_replay_counter, key->replay_counter,
+          WPA_REPLAY_COUNTER_LEN);
+    sm->rx_replay_counter_set = 1;
+    /*update request_counter for mic failure report*/
+    memcpy(sm->request_counter, key->replay_counter,
+          WPA_REPLAY_COUNTER_LEN);    
+    return 0;
+}
+
+
+/* Decrypt RSN EAPOL-Key key data (RC4 or AES-WRAP) */
+  int   wpa_supplicant_decrypt_key_data(struct wpa_sm *sm,
+                       struct wpa_eapol_key *key, u16 ver)
+{
+    u16 keydatalen = WPA_GET_BE16(key->key_data_length);
+
+    wpa_hexdump(MSG_DEBUG, "RSN: encrypted key data",
+            (u8 *) (key + 1), keydatalen);
+    if (!sm->ptk_set) {
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: PTK not available, "
+               "cannot decrypt EAPOL-Key key data.");
+        #endif    
+        return -1;
+    }
+
+    /* Decrypt key data here so that this operation does not need
+     * to be implemented separately for each message type. */
+    if (ver == WPA_KEY_INFO_TYPE_HMAC_MD5_RC4) {
+        u8 ek[32];
+        memcpy(ek, key->key_iv, 16);
+        memcpy(ek + 16, sm->ptk.kek, 16);
+        if (rc4_skip(ek, 32, 256, (u8 *) (key + 1), keydatalen)) {
+            #ifdef DEBUG_PRINT
+            wpa_printf(MSG_DEBUG, "WPA: RC4 failed");
+            #endif
+            return -1;
+        }
+    } else if (ver == WPA_KEY_INFO_TYPE_HMAC_SHA1_AES ||
+           ver == WPA_KEY_INFO_TYPE_AES_128_CMAC) {
+        u8 *buf;
+        if (keydatalen % 8) {
+            #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: Unsupported "
+                   "AES-WRAP len %d", keydatalen);
+            #endif    
+            return -1;
+        }
+        keydatalen -= 8; /* AES-WRAP adds 8 bytes */
+        
+        /*replaced by xxx to remove malloc*/
+        buf = ((u8 *) (key+1))+ 8;
+             /*
+        buf = os_wifi_malloc(keydatalen);
+        if (buf == NULL) {
+            #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: No memory for "
+                   "AES-UNWRAP buffer");
+             #endif    
+            return -1;
+        }
+        */
+        if (fast_aes_unwrap(sm->ptk.kek, keydatalen / 8,
+                                           (u8 *) (key + 1), buf)) {
+            #ifdef DEBUG_PRINT    
+               wpa_printf(MSG_DEBUG, "WPA: AES unwrap failed - "
+                               "could not decrypt EAPOL-Key key data");
+            #endif    
+               return -1;
+        }
+        memcpy(key + 1, buf, keydatalen);
+        WPA_PUT_BE16(key->key_data_length, keydatalen);
+    } else {
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: Unsupported key_info type %d",
+               ver);
+         #endif    
+        return -1;
+    }
+    wpa_hexdump(MSG_DEBUG, "WPA: decrypted EAPOL-Key key data",
+            (u8 *) (key + 1), keydatalen);
+    return 0;
+}
+
+
+  void   wpa_eapol_key_dump(int level, const struct wpa_eapol_key *key)
+{
+#ifdef DEBUG_PRINT
+    if (level < MSG_MSGDUMP)
+        return;
+
+    u16 key_info = WPA_GET_BE16(key->key_info);
+
+    wpa_printf(MSG_DEBUG, "  EAPOL-Key type=%d\n", key->type);
+    wpa_printf(MSG_DEBUG, "  key_info 0x%x (ver=%d keyidx=%d rsvd=%d %s"
+           "%s%s%s%s%s%s%s)\n",
+           key_info, (u32)(key_info & WPA_KEY_INFO_TYPE_MASK),
+           (u32)((key_info & WPA_KEY_INFO_KEY_INDEX_MASK) >>
+           WPA_KEY_INFO_KEY_INDEX_SHIFT),
+           (u32)((key_info & (BIT(13) | BIT(14) | BIT(15))) >> 13),
+           key_info & WPA_KEY_INFO_KEY_TYPE ? "Pairwise" : "Group",
+           key_info & WPA_KEY_INFO_INSTALL ? " Install" : "",
+           key_info & WPA_KEY_INFO_ACK ? " Ack" : "",
+           key_info & WPA_KEY_INFO_MIC ? " MIC" : "",
+           key_info & WPA_KEY_INFO_SECURE ? " Secure" : "",
+           key_info & WPA_KEY_INFO_ERROR ? " Error" : "",
+           key_info & WPA_KEY_INFO_REQUEST ? " Request" : "",
+           key_info & WPA_KEY_INFO_ENCR_KEY_DATA ? " Encr" : "");
+    wpa_printf(MSG_DEBUG, "  key_length=%u key_data_length=%u\n",
+           WPA_GET_BE16(key->key_length),
+           WPA_GET_BE16(key->key_data_length));
+#endif    
+}
+
+/**
+ * wpa_sm_rx_eapol - Process received WPA EAPOL frames
+ * @sm: Pointer to WPA state machine data from wpa_sm_init()
+ * @src_addr: Source MAC address of the EAPOL packet
+ * @buf: Pointer to the beginning of the EAPOL data (EAPOL header)
+ * @len: Length of the EAPOL frame
+ * Returns: 1 = WPA EAPOL-Key processed, 0 = not a WPA EAPOL-Key, -1 failure
+ *
+ * This function is called for each received EAPOL frame. Other than EAPOL-Key
+ * frames can be skipped if filtering is done elsewhere. wpa_sm_rx_eapol() is
+ * only processing WPA and WPA2 EAPOL-Key frames.
+ *
+ * The received EAPOL-Key packets are validated and valid packets are replied
+ * to. In addition, key material (PTK, GTK) is configured at the end of a
+ * successful key handshake.
+ * buf begin from version, so remove mac header ,snap header and ether_type 
+ */
+int   wpa_sm_rx_eapol(u8 *src_addr, u8 *buf, u32 len)
+{
+    struct wpa_sm *sm = &gWpaSm;
+    u32 plen, data_len, extra_len;
+    struct ieee802_1x_hdr *hdr;
+    struct wpa_eapol_key *key;
+    u16 key_info, ver;
+    u8 *tmp;
+    int ret = -1;
+
+    if (len < sizeof(*hdr) + sizeof(*key)) {       
+#ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: EAPOL frame too short to be a WPA "
+               "EAPOL-Key (len %lu, expecting at least %lu)",
+               (unsigned long) len,
+               (unsigned long) sizeof(*hdr) + sizeof(*key));
+#endif
+        return 0;
+    }
+    
+       tmp = buf;
+    
+    hdr = (struct ieee802_1x_hdr *) tmp;
+    key = (struct wpa_eapol_key *) (hdr + 1);
+    plen = be_to_host16(hdr->length);
+    data_len = plen + sizeof(*hdr);
+
+#ifdef DEBUG_PRINT    
+    wpa_printf(MSG_DEBUG, "IEEE 802.1X RX: version=%d type=%d length=%d\n",
+           hdr->version, hdr->type, plen);
+#endif
+    
+    if (hdr->version < EAPOL_VERSION) {
+        /* TODO: backwards compatibility */
+    }
+    if (hdr->type != IEEE802_1X_TYPE_EAPOL_KEY) {
+#ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: EAPOL frame (type %u) discarded, "
+            "not a Key frame", hdr->type);
+#endif
+        ret = 0;
+        goto out;
+    }
+    if (plen > len - sizeof(*hdr) || plen < sizeof(*key)) {
+#ifdef DEBUG_PRINT        
+        wpa_printf(MSG_DEBUG, "WPA: EAPOL frame payload size %lu "
+               "invalid (frame size %lu)",
+               (unsigned long) plen, (unsigned long) len);
+#endif    
+        ret = 0;
+        goto out;
+    }
+
+    if (key->type != EAPOL_KEY_TYPE_WPA && key->type != EAPOL_KEY_TYPE_RSN)
+    {
+#ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: EAPOL-Key type (%d) unknown, "
+               "discarded", key->type);
+#endif
+        ret = 0;
+        goto out;
+    }
+
+    wpa_eapol_key_dump(MSG_MSGDUMP, key);
+
+    wpa_hexdump(MSG_MSGDUMP, "WPA: RX EAPOL-Key", tmp, len);
+    
+    if (data_len < len) {
+#ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: ignoring %lu bytes after the IEEE "
+               "802.1X data\n", (unsigned long) len - data_len);
+#endif    
+    }
+    key_info = WPA_GET_BE16(key->key_info);
+    ver = key_info & WPA_KEY_INFO_TYPE_MASK;
+    if (ver != WPA_KEY_INFO_TYPE_HMAC_MD5_RC4 &&
+        ver != WPA_KEY_INFO_TYPE_HMAC_SHA1_AES) {
+#ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: Unsupported EAPOL-Key descriptor "
+               "version %d.", ver);
+#endif        
+        goto out;
+    }
+
+    if (sm->pairwise_cipher == WPA_CIPHER_CCMP &&
+        ver != WPA_KEY_INFO_TYPE_HMAC_SHA1_AES) {
+#ifdef DEBUG_PRINT    
+           wpa_printf(MSG_DEBUG, "WPA: CCMP is used, but EAPOL-Key "
+               "descriptor version (%d) is not 2.", ver);
+#endif    
+        if (sm->group_cipher != WPA_CIPHER_CCMP &&
+            !(key_info & WPA_KEY_INFO_KEY_TYPE)) {
+            /* Earlier versions of IEEE 802.11i did not explicitly
+             * require version 2 descriptor for all EAPOL-Key
+             * packets, so allow group keys to use version 1 if
+             * CCMP is not used for them. */
+            #ifdef DEBUG_PRINT         
+              wpa_printf(MSG_DEBUG, "WPA: Backwards compatibility: "
+                   "allow invalid version for non-CCMP group "
+                   "keys");
+            #endif    
+        } else
+            goto out;
+    }
+
+
+    if ( sm->rx_replay_counter_set &&
+       memcmp(key->replay_counter, sm->rx_replay_counter,
+              WPA_REPLAY_COUNTER_LEN) <= 0) {
+        #ifdef DEBUG_PRINT              
+        wpa_printf(MSG_DEBUG, "WPA: EAPOL-Key Replay Counter did not"
+               " increase - dropping packet");
+        #endif    
+        goto out;
+    }
+
+    if (!(key_info & (WPA_KEY_INFO_ACK | WPA_KEY_INFO_SMK_MESSAGE))) {
+        #ifdef DEBUG_PRINT    
+        wpa_printf(MSG_DEBUG, "WPA: No Ack bit in key_info");
+         #endif    
+        goto out;
+    }
+
+    if (key_info & WPA_KEY_INFO_REQUEST) {
+        #ifdef DEBUG_PRINT        
+        wpa_printf(MSG_DEBUG, "WPA: EAPOL-Key with Request bit - dropped");
+        #endif    
+        goto out;
+    }
+
+    if ((key_info & WPA_KEY_INFO_MIC) && 
+        wpa_supplicant_verify_eapol_key_mic(sm, key, ver, tmp, data_len)) 
+        goto out;
+    
+    extra_len = data_len - sizeof(*hdr) - sizeof(*key);
+
+    if (WPA_GET_BE16(key->key_data_length) > extra_len) {
+            #ifdef DEBUG_PRINT        
+        wpa_printf(MSG_DEBUG, "WPA: Invalid EAPOL-Key "
+            "frame - key_data overflow (%d > %lu)",
+            WPA_GET_BE16(key->key_data_length),
+            (unsigned long) extra_len);
+        #endif        
+        goto out;
+    }
+    extra_len = WPA_GET_BE16(key->key_data_length);
+
+    if (sm->proto == WPA_PROTO_RSN &&
+        (key_info & WPA_KEY_INFO_ENCR_KEY_DATA)) {
+        if (wpa_supplicant_decrypt_key_data(sm, key, ver))
+            goto out;
+        extra_len = WPA_GET_BE16(key->key_data_length);
+    }
+
+    if (key_info & WPA_KEY_INFO_KEY_TYPE) {
+        if (key_info & WPA_KEY_INFO_KEY_INDEX_MASK) {
+             #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: Ignored EAPOL-Key "
+                   "(Pairwise) with non-zero key index");
+          #endif  
+            goto out;
+        }
+
+        if (key_info & WPA_KEY_INFO_MIC) {
+            /* 3/4 4-Way Handshake */
+            wpa_supplicant_process_3_of_4(sm, key, ver);
+        } else {
+            /* 1/4 4-Way Handshake */
+            wpa_supplicant_process_1_of_4(sm, src_addr, key,
+                              ver);
+        }
+    } else {
+        if (key_info & WPA_KEY_INFO_MIC) {
+            /* 1/2 Group Key Handshake */
+            wpa_supplicant_process_1_of_2(sm, src_addr, key,
+                              extra_len, ver);
+        } else {
+         #ifdef DEBUG_PRINT    
+            wpa_printf(MSG_DEBUG, "WPA: EAPOL-Key (Group) "
+                   "without Mic bit - dropped");
+         #endif    
+        }
+    }
+
+    ret = 1;
+
+out:
+
+    return ret;
+}
+
+/**
+ * wpa_supplicant_set_state - Set current connection state
+ * @wpa_s: Pointer to wpa_supplicant data
+ * @state: The new connection state
+ *
+ * This function is called whenever the connection state changes, e.g.,
+ * association is completed for WPA/WPA2 4-Way Handshake is started.
+ */
+void wpa_sm_set_state(enum wpa_states state)
+{
+       struct wpa_sm *sm = &gWpaSm;
+    if(WPA_MIC_FAILURE==WPA_SM_STATE(sm))
+        ets_timer_disarm(&(sm->cm_timer));
+    sm->wpa_state= state;
+}
+
+#ifdef ESP_SUPPLICANT
+void   wpa_register(char * payload, WPA_SEND_FUNC snd_func,
+                   WPA_SET_ASSOC_IE set_assoc_ie_func, WPA_INSTALL_KEY ppinstallkey, WPA_GET_KEY ppgetkey, WPA_DEAUTH_FUNC wpa_deauth,
+                   WPA_NEG_COMPLETE wpa_neg_complete)
+{
+    struct wpa_sm *sm = &gWpaSm;
+
+    sm->eapol_version = 0x1;   /* DEFAULT_EAPOL_VERSION */    
+    sm->sendto = snd_func;
+    sm->config_assoc_ie = set_assoc_ie_func;
+    sm->install_ppkey = ppinstallkey;
+    sm->get_ppkey = ppgetkey;
+    sm->wpa_deauthenticate = wpa_deauth;
+    sm->wpa_neg_complete = wpa_neg_complete;
+    sm->key_entry_valid = 0;
+    sm->key_install = false;
+    wpa_sm_set_state(WPA_INACTIVE);
+}
+
+void wpa_set_profile(u32 wpa_proto, u8 auth_mode)
+{
+    struct wpa_sm *sm = &gWpaSm;
+
+    sm->proto = wpa_proto;
+    if (auth_mode == WPA2_AUTH_ENT)
+        sm->key_mgmt = WPA_KEY_MGMT_IEEE8021X; /* for wpa2 enterprise */
+    else
+        sm->key_mgmt = WPA_KEY_MGMT_PSK;  /* fixed to PSK for now */
+}
+
+void wpa_set_pmk(uint8_t *pmk)
+{
+    struct wpa_sm *sm = &gWpaSm;
+    
+    memcpy(sm->pmk, pmk, PMK_LEN);
+    sm->pmk_len = PMK_LEN;
+}
+
+void  
+wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher, char *passphrase, u8 *ssid, size_t ssid_len)
+{
+    struct wpa_sm *sm = &gWpaSm;
+    
+    sm->pairwise_cipher = BIT(pairwise_cipher);
+    sm->group_cipher = BIT(group_cipher);
+    sm->rx_replay_counter_set = 0;  //init state not intall replay counter value
+    memset(sm->rx_replay_counter, 0, WPA_REPLAY_COUNTER_LEN);
+    sm->wpa_ptk_rekey = 0;
+    sm->renew_snonce = 1;
+    memcpy(sm->own_addr, macddr, ETH_ALEN);
+    memcpy(sm->bssid, bssid, ETH_ALEN);
+    sm->ap_notify_completed_rsne = esp_wifi_sta_is_ap_notify_completed_rsne_internal();
+    
+    set_assoc_ie(assoc_ie_buf); /* use static buffer */
+    wpa_gen_wpa_ie(sm, sm->assoc_wpa_ie, sm->assoc_wpa_ie_len); //TODO: NEED TO DEBUG!!
+    wpa_set_passphrase(passphrase, ssid, ssid_len);
+}
+
+/*
+ *  Call after set ssid since we calc pmk inside this routine directly
+ */
+  void  
+wpa_set_passphrase(char * passphrase, u8 *ssid, size_t ssid_len)
+{
+    struct wifi_ssid *sta_ssid = esp_wifi_sta_get_prof_ssid_internal();
+    struct wpa_sm *sm = &gWpaSm;
+   
+    if (passphrase == NULL) return;
+    
+    /*
+     *  Here only handle passphrase string.  Need extra step to handle 32B, 64Hex raw
+     *    PMK.
+     */
+
+    /* This is really SLOW, so just re cacl while reset param */
+    if (esp_wifi_sta_get_reset_param_internal() != 0) {
+        // check it's psk
+        if (strlen((char *)esp_wifi_sta_get_prof_password_internal()) == 64) {
+            hexstr2bin((char *)esp_wifi_sta_get_prof_password_internal(), esp_wifi_sta_get_prof_pmk_internal(), PMK_LEN);
+        } else {
+        pbkdf2_sha1((char *)esp_wifi_sta_get_prof_password_internal(), (char *)sta_ssid->ssid, (size_t)sta_ssid->len,
+            4096, esp_wifi_sta_get_prof_pmk_internal(), PMK_LEN);
+        }
+        esp_wifi_sta_set_reset_param_internal(0);
+    }
+
+    if (sm->key_mgmt == WPA_KEY_MGMT_IEEE8021X) {
+    /* TODO nothing */
+    } else {
+        memcpy(sm->pmk, esp_wifi_sta_get_prof_pmk_internal(), PMK_LEN);
+    }
+    sm->pmk_len = PMK_LEN;
+}
+
+  void  
+set_assoc_ie(u8 * assoc_buf)
+{
+    struct wpa_sm *sm = &gWpaSm;
+    
+    sm->assoc_wpa_ie = assoc_buf + 2;
+    //wpa_ie insert OUI 4 byte before ver, but RSN have 2 bytes of RSN capability,
+    // so wpa_ie have two more bytes than rsn_ie
+    if ( sm->proto == WPA_PROTO_WPA) 
+         sm->assoc_wpa_ie_len = ASSOC_IE_LEN;
+    else 
+         sm->assoc_wpa_ie_len = ASSOC_IE_LEN - 2;    
+    
+    sm->config_assoc_ie(sm->proto, assoc_buf, sm->assoc_wpa_ie_len);    
+}
+
+  int  
+wpa_sm_set_key(struct install_key *key_sm, enum wpa_alg alg,
+        u8 *addr, int key_idx, int set_tx,
+        u8 *seq, size_t seq_len,
+        u8 *key, size_t key_len,
+        int  key_entry_valid)
+{
+    struct wpa_sm *sm = &gWpaSm;
+
+    /*gtk or ptk both need check countermeasures*/
+    if (alg == WPA_ALG_TKIP && key_len == 32) {
+        /* Clear the MIC error counter when setting a new PTK. */
+        key_sm->mic_errors_seen = 0;
+    }
+
+    key_sm->keys_cleared = 0;
+    key_sm->alg = alg;
+    memcpy(key_sm->addr, addr, ETH_ALEN);
+    key_sm->key_idx = key_idx;
+    key_sm->set_tx = set_tx; 
+    memcpy(key_sm->key, key, key_len);
+    
+    sm->install_ppkey(alg, addr, key_idx, set_tx, seq, seq_len, key, key_len, key_entry_valid);
+    return 0;
+}
+
+  int  
+wpa_sm_get_key(uint8_t *ifx, int *alg, u8 *addr, int *key_idx, u8 *key, size_t key_len, int key_entry_valid)
+{
+    struct wpa_sm *sm = &gWpaSm;
+    return sm->get_ppkey(ifx, alg, addr, key_idx, key, key_len, key_entry_valid);
+}
+
+void wpa_supplicant_clr_countermeasures(u16 *pisunicast)
+{
+       struct wpa_sm *sm = &gWpaSm;
+       (sm->install_ptk).mic_errors_seen=0;
+    (sm->install_gtk).mic_errors_seen=0;
+    ets_timer_done(&(sm->cm_timer));
+    wpa_printf(MSG_DEBUG, "WPA: TKIP countermeasures clean\n");
+}
+
+/*recovery from countermeasures state, countermeasures state is period that stop connection with ap
+  also used in wpa_init after connecting with ap 
+*/
+void wpa_supplicant_stop_countermeasures(u16 *pisunicast)
+{
+       struct wpa_sm *sm = &gWpaSm;
+
+       ets_timer_done(&(sm->cm_timer));
+    if (sm->countermeasures) {
+        sm->countermeasures = 0;
+              wpa_supplicant_clr_countermeasures(NULL);
+
+        wpa_printf(MSG_DEBUG, "WPA: TKIP countermeasures stopped\n");
+              /*renew scan preocess, this isn't done now*/
+    }
+       wpa_sm_set_state(WPA_DISCONNECTED);
+}
+
+int wpa_michael_mic_failure(u16 isunicast)
+{
+       struct wpa_sm *sm = &gWpaSm;
+       int32_t *pmic_errors_seen=(isunicast)? &((sm->install_ptk).mic_errors_seen) : &((sm->install_gtk).mic_errors_seen);
+    
+    wpa_printf(MSG_DEBUG, "\nTKIP MIC failure occur\n");
+    
+       /*both unicast and multicast mic_errors_seen need statistics*/
+    if ((sm->install_ptk).mic_errors_seen + (sm->install_gtk).mic_errors_seen) {
+        /* Send the new MIC error report immediately since we are going
+         * to start countermeasures and AP better do the same.
+         */
+        wpa_sm_set_state(WPA_TKIP_COUNTERMEASURES);
+        wpa_sm_key_request(sm, 1, 0);
+
+        /* initialize countermeasures */
+        sm->countermeasures = 1;
+        wpa_printf(MSG_DEBUG, "TKIP countermeasures started\n");
+
+        /*
+         * Need to wait for completion of request frame. We do not get
+         * any callback for the message completion, so just wait a
+         * short while and hope for the best. */
+         ets_delay_us(10000);
+
+        /*deauthenticate AP*/ 
+        
+        /*stop monitor next mic_failure timer,disconnect for 60sec, then stop contermeasures*/ 
+        ets_timer_disarm(&(sm->cm_timer));
+        ets_timer_done(&(sm->cm_timer));
+        ets_timer_setfn(&(sm->cm_timer), (ETSTimerFunc *)wpa_supplicant_stop_countermeasures, NULL);
+        ets_timer_arm(&(sm->cm_timer), 60*1000, false);
+        
+        /* TODO: mark the AP rejected for 60 second. STA is
+         * allowed to associate with another AP.. */
+    } else {
+        *pmic_errors_seen=(*pmic_errors_seen)+1;
+        wpa_sm_set_state(WPA_MIC_FAILURE);
+        wpa_sm_key_request(sm, 1, 0);
+        /*start 60sec counter to monitor whether next mic_failure occur in this period, or clear mic_errors_seen*/
+        ets_timer_disarm(&(sm->cm_timer));
+        ets_timer_done(&(sm->cm_timer));
+        ets_timer_setfn(&(sm->cm_timer), (ETSTimerFunc *)wpa_supplicant_clr_countermeasures, NULL);
+        ets_timer_arm(&(sm->cm_timer), 60*1000, false);
+    }
+
+    return 0;
+}
+
+/*
+   eapol tx callback function to make sure new key 
+    install after 4-way handoff
+*/
+void eapol_txcb(void *eb)
+{    
+    struct wpa_sm *sm = &gWpaSm;
+    u8 isdeauth = 0;  //no_zero value is the reason for deauth
+
+    if (false == esp_wifi_sta_is_running_internal()){
+        return;
+    }
+
+    switch(WPA_SM_STATE(sm)) {      
+        case WPA_FIRST_HALF_4WAY_HANDSHAKE: 
+            break;
+        case WPA_LAST_HALF_4WAY_HANDSHAKE:
+            if (sm->txcb_flags & WPA_4_4_HANDSHAKE_BIT) {
+                sm->txcb_flags &= ~WPA_4_4_HANDSHAKE_BIT;
+                isdeauth = wpa_supplicant_send_4_of_4_txcallback(sm);
+            } else {
+                wpa_printf(MSG_DEBUG, "4/4 txcb, flags=%d\n", sm->txcb_flags);
+            }
+            break;
+        case WPA_GROUP_HANDSHAKE:
+            if (sm->txcb_flags & WPA_GROUP_HANDSHAKE_BIT) {
+                sm->txcb_flags &= ~WPA_GROUP_HANDSHAKE_BIT;
+                isdeauth = wpa_supplicant_send_2_of_2_txcallback(sm);
+            } else {
+                wpa_printf(MSG_DEBUG, "2/2 txcb, flags=%d\n", sm->txcb_flags);
+            }
+            break;
+        case WPA_TKIP_COUNTERMEASURES: isdeauth=WLAN_REASON_MICHAEL_MIC_FAILURE;
+            break;           
+        default: break;    
+    }
+
+    if(isdeauth) {
+        wpa_sm_deauthenticate(sm, isdeauth);    
+    }
+}
+
+bool wpa_sta_in_4way_handshake(void)
+{
+    struct wpa_sm *sm = &gWpaSm;
+    if ( WPA_SM_STATE(sm) == WPA_MIC_FAILURE || WPA_SM_STATE(sm) == WPA_FIRST_HALF_4WAY_HANDSHAKE
+        || WPA_SM_STATE(sm) == WPA_LAST_HALF_4WAY_HANDSHAKE) {
+       return true;
+    }
+    return false;
+}
+
+#endif // ESP_SUPPLICANT
+
similarity index 60%
rename from components/wpa_supplicant/include/wpa/wpa_i.h
rename to components/wpa_supplicant/src/rsn_supp/wpa.h
index a43c33d332bfb422054fff51067fd99512fd62a4..c3475eafeeed8b3de36bc3e3c5b937710090f548 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Internal WPA/RSN supplicant state machine definitions
- * Copyright (c) 2004-2010, Jouni Malinen <j@w1.fi>
+ * wpa_supplicant - WPA definitions
+ * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * See README and COPYING for more details.
  */
 
-#ifndef WPA_I_H
-#define WPA_I_H
+#ifndef WPA_H
+#define WPA_H
+
+#include "esp32/rom/ets_sys.h"
+#include "utils/common.h"
+#include "common/defs.h"
+#include "common/wpa_common.h"
+#include "esp_wifi_crypto_types.h"
+#include "wpa_i.h"
+
+
+#define WPA_SM_STATE(_sm) ((_sm)->wpa_state)
+
+struct wpa_sm;
+
+int wpa_sm_rx_eapol(u8 *src_addr, u8 *buf, u32 len);
+bool wpa_sta_in_4way_handshake(void);
+
+#define WPA_ASSERT  assert
+
+struct l2_ethhdr {
+    u8 h_dest[ETH_ALEN];
+    u8 h_source[ETH_ALEN];
+    be16 h_proto;
+} STRUCT_PACKED;
 
 /**
  * set_key - Configure encryption key
  * example on how this can be done.
  */
 
-typedef void (* WPA_SEND_FUNC)(struct pbuf *pb);
 
-typedef void (* WPA_SET_ASSOC_IE)(uint8 proto, u8 *assoc_buf, u32 assoc_wpa_ie_len);
+/**
+ * send_eapol - Optional function for sending EAPOL packets
+ * @priv: private driver interface data
+ * @dest: Destination MAC address
+ * @proto: Ethertype
+ * @data: EAPOL packet starting with IEEE 802.1X header
+ * @data_len: Size of the EAPOL packet
+ *
+ * Returns: 0 on success, -1 on failure
+ *
+ * This optional function can be used to override l2_packet operations
+ * with driver specific functionality. If this function pointer is set,
+ * l2_packet module is not used at all and the driver interface code is
+ * responsible for receiving and sending all EAPOL packets. The
+ * received EAPOL packets are sent to core code with EVENT_EAPOL_RX
+ * event. The driver interface is required to implement get_mac_addr()
+ * handler if send_eapol() is used.
+ */
 
-typedef void (*WPA_INSTALL_KEY) (enum wpa_alg alg, uint8 *addr, int key_idx, int set_tx,
-               uint8 *seq, size_t seq_len, uint8 *key, size_t key_len, int key_entry_valid);
+#define KEYENTRY_TABLE_MAP(key_entry_valid)  ((key_entry_valid)%5) 
 
-typedef void (*WPA_DEAUTH)(uint8 reason_code);
+void pp_michael_mic_failure(u16 isunicast);
 
-typedef void (*WPA_NEG_COMPLETE)();
+void wpa_sm_set_state(enum wpa_states state);
 
-void wpa_register(char * payload, WPA_SEND_FUNC snd_func, \
-                                                      WPA_SET_ASSOC_IE set_assoc_ie_func, \
-                                                      WPA_INSTALL_KEY ppinstallkey, \
-                                                      WPA_DEAUTH wpa_deauth, \
-                                                      WPA_NEG_COMPLETE wpa_neg_complete);
+char * dup_binstr(const void *src, size_t len);
 
-#include "pp/esf_buf.h"
-void eapol_txcb(esf_buf_t *eb);
+void wpa_set_pmk(uint8_t *pmk);
 
-void wpa_set_profile(uint32 wpa_proto);
+int wpa_hook_init(void);
 
-void wpa_set_bss(char *macddr, char * bssid, uint8 pairwise_cipher, uint8 group_cipher, char *passphrase, u8 *ssid, size_t ssid_len);
+bool wpa_hook_deinit(void);
 
-int wpa_sm_rx_eapol(u8 *src_addr, u8 *buf, u32 len);
-#endif /* WPA_I_H */
+char * dup_binstr(const void *src, size_t len);
+
+int wpa_michael_mic_failure(u16 isunicast);
+
+#endif /* WPA_H */
 
similarity index 72%
rename from components/wpa_supplicant/include/wpa/wpa.h
rename to components/wpa_supplicant/src/rsn_supp/wpa_i.h
index 14ed2175af624e2839eb8f2345ab3f4358f5f3f3..3a09eff1d23ba86b93e6e2e973cb3dd1e4d0589d 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * wpa_supplicant - WPA definitions
- * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
+ * Internal WPA/RSN supplicant state machine definitions
+ * Copyright (c) 2004-2010, Jouni Malinen <j@w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * See README and COPYING for more details.
  */
 
-#ifndef WPA_H
-#define WPA_H
-
-#include "esp32/rom/ets_sys.h"
-#include "common.h"
-#include "wpa/defs.h"
-#include "wpa/wpa_common.h"
-
-
-#define WPA_SM_STATE(_sm) ((_sm)->wpa_state)
-
-struct wpa_sm;
-
-int wpa_sm_rx_eapol(u8 *src_addr, u8 *buf, u32 len);
-
-#define WPA_ASSERT  ASSERT
+#ifndef WPA_I_H
+#define WPA_I_H
 
 struct install_key {
     int mic_errors_seen; /* Michael MIC errors with the current PTK */
@@ -82,28 +68,26 @@ struct wpa_sm {
     u8 *ap_wpa_ie, *ap_rsn_ie;
     size_t ap_wpa_ie_len, ap_rsn_ie_len;
 
+    bool key_install;
+
     struct install_key install_ptk;
     struct install_key install_gtk;
     int  key_entry_valid;   //present current avaliable entry for bssid, for pairkey:0,5,10,15,20, gtk: pairkey_no+i (i:1~4)
 
-    struct pbuf *pb;
-
-    void (* sendto) (struct pbuf *pb);
+    void (* sendto) (void *buffer, uint16_t len);
     void (*config_assoc_ie) (u8 proto, u8 *assoc_buf, u32 assoc_wpa_ie_len);
     void (*install_ppkey) (enum wpa_alg alg, u8 *addr, int key_idx, int set_tx,
                u8 *seq, unsigned int seq_len, u8 *key, unsigned int key_len, int key_entry_valid);
+    int (*get_ppkey) (uint8_t *ifx, int *alg, uint8_t *addr, int *key_idx,
+               uint8_t *key, size_t key_len, int key_entry_valid);
     void (*wpa_deauthenticate)(u8 reason_code);
     void (*wpa_neg_complete)();
     struct wpa_gtk_data gd; //used for calllback save param
-    u16 key_info;      //used for txcallback param    
+    u16 key_info;       //used for txcallback param
+    u16 txcb_flags;
+    bool   ap_notify_completed_rsne;
 };
 
-struct l2_ethhdr {
-    u8 h_dest[ETH_ALEN];
-    u8 h_source[ETH_ALEN];
-    be16 h_proto;
-} STRUCT_PACKED;
-
 /**
  * set_key - Configure encryption key
  * @ifname: Interface name (for multi-SSID/VLAN support)
@@ -150,30 +134,32 @@ struct l2_ethhdr {
  */
 
 
-/**
- * send_eapol - Optional function for sending EAPOL packets
- * @priv: private driver interface data
- * @dest: Destination MAC address
- * @proto: Ethertype
- * @data: EAPOL packet starting with IEEE 802.1X header
- * @data_len: Size of the EAPOL packet
- *
- * Returns: 0 on success, -1 on failure
- *
- * This optional function can be used to override l2_packet operations
- * with driver specific functionality. If this function pointer is set,
- * l2_packet module is not used at all and the driver interface code is
- * responsible for receiving and sending all EAPOL packets. The
- * received EAPOL packets are sent to core code with EVENT_EAPOL_RX
- * event. The driver interface is required to implement get_mac_addr()
- * handler if send_eapol() is used.
- */
+typedef void (* WPA_SEND_FUNC)(void *buffer, u16 len);
+
+typedef void (* WPA_SET_ASSOC_IE)(u8 proto, u8 *assoc_buf, u32 assoc_wpa_ie_len);
+
+typedef void (*WPA_INSTALL_KEY) (enum wpa_alg alg, u8 *addr, int key_idx, int set_tx,
+               u8 *seq, size_t seq_len, u8 *key, size_t key_len, int key_entry_valid);
 
-#define KEYENTRY_TABLE_MAP(key_entry_valid)  ((key_entry_valid)%5) 
+typedef int (*WPA_GET_KEY) (u8 *ifx, int *alg, u8 *addt, int *keyidx, u8 *key, size_t key_len, int key_entry_valid);
 
-void wpa_sm_set_state(enum wpa_states state);
+typedef void (*WPA_DEAUTH_FUNC)(u8 reason_code);
 
-char * dup_binstr(const void *src, size_t len);
+typedef void (*WPA_NEG_COMPLETE)();
 
-#endif /* WPA_H */
+void wpa_register(char * payload, WPA_SEND_FUNC snd_func, \
+                                                      WPA_SET_ASSOC_IE set_assoc_ie_func, \
+                                                      WPA_INSTALL_KEY ppinstallkey, \
+                                                      WPA_GET_KEY ppgetkey, \
+                                                      WPA_DEAUTH_FUNC wpa_deauth, \
+                                                      WPA_NEG_COMPLETE wpa_neg_complete);
+
+void eapol_txcb(void *eb);
+
+void wpa_set_profile(u32 wpa_proto, u8 auth_mode);
+
+void wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher, char *passphrase, u8 *ssid, size_t ssid_len);
+
+int wpa_sm_rx_eapol(u8 *src_addr, u8 *buf, u32 len);
+#endif /* WPA_I_H */
 
diff --git a/components/wpa_supplicant/src/rsn_supp/wpa_ie.c b/components/wpa_supplicant/src/rsn_supp/wpa_ie.c
new file mode 100644 (file)
index 0000000..ce85191
--- /dev/null
@@ -0,0 +1,371 @@
+/*
+ * wpa_supplicant - WPA/RSN IE and KDE processing
+ * Copyright (c) 2003-2008, Jouni Malinen <j@w1.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+ #ifdef ESP_SUPPLICANT
+
+#include "utils/includes.h"
+
+#include "utils/common.h"
+#include "rsn_supp/wpa.h"
+#include "common/ieee802_11_defs.h"
+#include "rsn_supp/wpa_ie.h"
+
+/**
+ * wpa_parse_wpa_ie - Parse WPA/RSN IE
+ * @wpa_ie: Pointer to WPA or RSN IE
+ * @wpa_ie_len: Length of the WPA/RSN IE
+ * @data: Pointer to data area for parsing results
+ * Returns: 0 on success, -1 on failure
+ *
+ * Parse the contents of WPA or RSN IE and write the parsed data into data.
+ */
+int  wpa_parse_wpa_ie(const u8 *wpa_ie, size_t wpa_ie_len,
+                    struct wpa_ie_data *data)
+{
+       if (wpa_ie_len >= 1 && wpa_ie[0] == WLAN_EID_RSN)
+               return wpa_parse_wpa_ie_rsn(wpa_ie, wpa_ie_len, data);
+       else
+               return wpa_parse_wpa_ie_wpa(wpa_ie, wpa_ie_len, data);
+}
+
+/**
+ * wpa_parse_generic - Parse EAPOL-Key Key Data Generic IEs
+ * @pos: Pointer to the IE header
+ * @end: Pointer to the end of the Key Data buffer
+ * @ie: Pointer to parsed IE data
+ * Returns: 0 on success, 1 if end mark is found, -1 on failure
+ */
+static int  wpa_parse_generic(const u8 *pos, const u8 *end,
+                            struct wpa_eapol_ie_parse *ie)
+{
+       if (pos[1] == 0)
+               return 1;
+
+       if (pos[1] >= 6 &&
+           RSN_SELECTOR_GET(pos + 2) == WPA_OUI_TYPE &&
+           pos[2 + WPA_SELECTOR_LEN] == 1 &&
+           pos[2 + WPA_SELECTOR_LEN + 1] == 0) {
+               ie->wpa_ie = pos;
+               ie->wpa_ie_len = pos[1] + 2;
+               wpa_hexdump(MSG_DEBUG, "WPA: WPA IE in EAPOL-Key",
+                           ie->wpa_ie, ie->wpa_ie_len);
+               return 0;
+       }
+
+       if (pos + 1 + RSN_SELECTOR_LEN < end &&
+           pos[1] >= RSN_SELECTOR_LEN + PMKID_LEN &&
+           RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_PMKID) {
+               ie->pmkid = pos + 2 + RSN_SELECTOR_LEN;
+               wpa_hexdump(MSG_DEBUG, "WPA: PMKID in EAPOL-Key",
+                           pos, pos[1] + 2);
+               return 0;
+       }
+
+       if (pos[1] > RSN_SELECTOR_LEN + 2 &&
+           RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_GROUPKEY) {
+               ie->gtk = pos + 2 + RSN_SELECTOR_LEN;
+               ie->gtk_len = pos[1] - RSN_SELECTOR_LEN;
+               wpa_hexdump(MSG_DEBUG, "WPA: GTK in EAPOL-Key",
+                               pos, pos[1] + 2);
+               return 0;
+       }
+
+       if (pos[1] > RSN_SELECTOR_LEN + 2 &&
+           RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_MAC_ADDR) {
+               ie->mac_addr = pos + 2 + RSN_SELECTOR_LEN;
+               ie->mac_addr_len = pos[1] - RSN_SELECTOR_LEN;
+               wpa_hexdump(MSG_DEBUG, "WPA: MAC Address in EAPOL-Key",
+                           pos, pos[1] + 2);
+               return 0;
+       }
+       return 0;
+}
+
+
+/**
+ * wpa_supplicant_parse_ies - Parse EAPOL-Key Key Data IEs
+ * @buf: Pointer to the Key Data buffer
+ * @len: Key Data Length
+ * @ie: Pointer to parsed IE data
+ * Returns: 0 on success, -1 on failure
+ */
+int  wpa_supplicant_parse_ies(const u8 *buf, size_t len,
+                            struct wpa_eapol_ie_parse *ie)
+{
+       const u8 *pos, *end;
+       int ret = 0;
+
+       memset(ie, 0, sizeof(*ie));
+       for (pos = buf, end = pos + len; pos + 1 < end; pos += 2 + pos[1]) {
+               if (pos[0] == 0xdd &&
+                   ((pos == buf + len - 1) || pos[1] == 0)) {
+                       /* Ignore padding */
+                       break;
+               }
+               if (pos + 2 + pos[1] > end) {
+                   #ifdef DEBUG_PRINT  
+                       wpa_printf(MSG_DEBUG, "WPA: EAPOL-Key Key Data "
+                                  "underflow (ie=%d len=%d pos=%d)",
+                                  pos[0], pos[1], (int) (pos - buf));
+                   #endif      
+                       wpa_hexdump(MSG_DEBUG, "WPA: Key Data",
+                                       buf, len);
+                       ret = -1;
+                       break;
+               }
+               if (*pos == WLAN_EID_RSN) {
+                       ie->rsn_ie = pos;
+                       ie->rsn_ie_len = pos[1] + 2;
+                       wpa_hexdump(MSG_DEBUG, "WPA: RSN IE in EAPOL-Key",
+                                   ie->rsn_ie, ie->rsn_ie_len);
+               } else if (*pos == WLAN_EID_VENDOR_SPECIFIC) {
+                       ret = wpa_parse_generic(pos, end, ie);
+                       if (ret < 0)
+                               break;
+                       if (ret > 0) {
+                               ret = 0;
+                               break;
+                       }
+               } else {
+                       wpa_hexdump(MSG_DEBUG, "WPA: Unrecognized EAPOL-Key "
+                                   "Key Data IE", pos, 2 + pos[1]);
+               }
+       }
+
+       return ret;
+}
+
+
+static int  wpa_gen_wpa_ie_wpa(u8 *wpa_ie, size_t wpa_ie_len,
+                  int pairwise_cipher, int group_cipher,
+                  int key_mgmt)
+{
+    u8 *pos;
+    struct wpa_ie_hdr *hdr;
+
+    if (wpa_ie_len < sizeof(*hdr) + WPA_SELECTOR_LEN +
+        2 + WPA_SELECTOR_LEN + 2 + WPA_SELECTOR_LEN)
+        return -1;
+
+    hdr = (struct wpa_ie_hdr *) wpa_ie;
+    hdr->elem_id = WLAN_EID_VENDOR_SPECIFIC;
+    RSN_SELECTOR_PUT(hdr->oui, WPA_OUI_TYPE);
+    WPA_PUT_LE16(hdr->version, WPA_VERSION);
+    pos = (u8 *) (hdr + 1);
+
+    if (group_cipher == WPA_CIPHER_CCMP) {
+        RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_CCMP);
+    } else if (group_cipher == WPA_CIPHER_TKIP) {
+        RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_TKIP);
+    } else if (group_cipher == WPA_CIPHER_WEP104) {
+        RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_WEP104);
+    } else if (group_cipher == WPA_CIPHER_WEP40) {
+        RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_WEP40);
+    } else {
+        wpa_printf(MSG_DEBUG, "Invalid group cipher (%d).",
+               group_cipher);
+        return -1;
+    }
+    pos += WPA_SELECTOR_LEN;
+
+    *pos++ = 1;
+    *pos++ = 0;
+    if (pairwise_cipher == WPA_CIPHER_CCMP) {
+        RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_CCMP);
+    } else if (pairwise_cipher == WPA_CIPHER_TKIP) {
+        RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_TKIP);
+    } else if (pairwise_cipher == WPA_CIPHER_NONE) {
+        RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_NONE);
+    } else {
+        wpa_printf(MSG_DEBUG, "Invalid pairwise cipher (%d).",
+               pairwise_cipher);
+        return -1;
+    }
+    pos += WPA_SELECTOR_LEN;
+
+    *pos++ = 1;
+    *pos++ = 0;
+    if (key_mgmt == WPA_KEY_MGMT_IEEE8021X) {
+        RSN_SELECTOR_PUT(pos, WPA_AUTH_KEY_MGMT_UNSPEC_802_1X);
+    } else if (key_mgmt == WPA_KEY_MGMT_PSK) {
+        RSN_SELECTOR_PUT(pos, WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X);
+    } else if (key_mgmt == WPA_KEY_MGMT_WPA_NONE) {
+        RSN_SELECTOR_PUT(pos, WPA_AUTH_KEY_MGMT_NONE);
+    } else {
+        wpa_printf(MSG_DEBUG, "Invalid key management type (%d).",
+               key_mgmt);
+        return -1;
+    }
+    pos += WPA_SELECTOR_LEN;
+
+    /* WPA Capabilities; use defaults, so no need to include it */
+
+    hdr->len = (pos - wpa_ie) - 2;
+
+    WPA_ASSERT((size_t) (pos - wpa_ie) <= wpa_ie_len);
+
+    return pos - wpa_ie;
+}
+
+
+static int  wpa_gen_wpa_ie_rsn(u8 *rsn_ie, size_t rsn_ie_len,
+                  int pairwise_cipher, int group_cipher,
+                  int key_mgmt, int mgmt_group_cipher,
+                  struct wpa_sm *sm)
+{
+#ifndef CONFIG_NO_WPA2
+    u8 *pos;
+    struct rsn_ie_hdr *hdr;
+    u16 capab;
+    u8 min_len = 0;
+
+
+    /* For WPA2-PSK, if the RSNE in AP beacon/probe response doesn't specify the 
+     * pairwise cipher or AKM suite, the RSNE IE in association request
+     * should only contain group cihpher suite, otherwise the WPA2 improvements 
+     * certification will fail.
+     */
+    if ( (sm->ap_notify_completed_rsne == true) || (key_mgmt == WPA_KEY_MGMT_IEEE8021X) ) {
+        min_len = sizeof(*hdr) + RSN_SELECTOR_LEN + 2 + RSN_SELECTOR_LEN + 2 + RSN_SELECTOR_LEN + 2;
+    } else {
+        min_len = sizeof(*hdr) + RSN_SELECTOR_LEN;
+    }
+
+    if (rsn_ie_len < min_len) {
+        wpa_printf(MSG_DEBUG, "RSN: Too short IE buffer (%lu bytes)", (unsigned long) rsn_ie_len);
+    }
+
+    hdr = (struct rsn_ie_hdr *) rsn_ie;
+    hdr->elem_id = WLAN_EID_RSN;
+    WPA_PUT_LE16(hdr->version, RSN_VERSION);
+    pos = (u8 *) (hdr + 1);
+
+    if (group_cipher == WPA_CIPHER_CCMP) {
+        RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_CCMP);
+    } else if (group_cipher == WPA_CIPHER_TKIP) {
+        RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_TKIP);
+    } else if (group_cipher == WPA_CIPHER_WEP104) {
+        RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_WEP104);
+    } else if (group_cipher == WPA_CIPHER_WEP40) {
+        RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_WEP40);
+    } else {
+        wpa_printf(MSG_DEBUG, "Invalid group cipher (%d).",
+               group_cipher);
+        return -1;
+    }
+    pos += RSN_SELECTOR_LEN;
+
+    if ( (sm->ap_notify_completed_rsne == false) && (key_mgmt != WPA_KEY_MGMT_IEEE8021X) ) {
+        hdr->len = (pos - rsn_ie) - 2;
+        return (pos - rsn_ie);
+    }
+
+    *pos++ = 1;
+    *pos++ = 0;
+    if (pairwise_cipher == WPA_CIPHER_CCMP) {
+        RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_CCMP);
+    } else if (pairwise_cipher == WPA_CIPHER_TKIP) {
+        RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_TKIP);
+    } else if (pairwise_cipher == WPA_CIPHER_NONE) {
+        RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_NONE);
+    } else {
+        wpa_printf(MSG_DEBUG, "Invalid pairwise cipher (%d).",
+               pairwise_cipher);
+        return -1;
+    }
+    pos += RSN_SELECTOR_LEN;
+
+    *pos++ = 1;
+    *pos++ = 0;
+    if (key_mgmt == WPA_KEY_MGMT_IEEE8021X) {
+        RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_UNSPEC_802_1X);
+    } else if (key_mgmt == WPA_KEY_MGMT_PSK) {
+        RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X);
+#ifdef CONFIG_IEEE80211R
+    } else if (key_mgmt == WPA_KEY_MGMT_FT_IEEE8021X) {
+        RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_FT_802_1X);
+    } else if (key_mgmt == WPA_KEY_MGMT_FT_PSK) {
+        RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_FT_PSK);
+#endif /* CONFIG_IEEE80211R */
+#ifdef CONFIG_IEEE80211W
+    } else if (key_mgmt == WPA_KEY_MGMT_IEEE8021X_SHA256) {
+        RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_802_1X_SHA256);
+    } else if (key_mgmt == WPA_KEY_MGMT_PSK_SHA256) {
+        RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_PSK_SHA256);
+#endif /* CONFIG_IEEE80211W */
+    } else {
+        wpa_printf(MSG_DEBUG, "Invalid key management type (%d).",
+               key_mgmt);
+        return -1;
+    }
+    pos += RSN_SELECTOR_LEN;
+
+    /* RSN Capabilities */
+    capab = 0;
+#ifdef CONFIG_IEEE80211W
+    if (sm->mfp)
+        capab |= WPA_CAPABILITY_MFPC;
+    if (sm->mfp == 2)
+        capab |= WPA_CAPABILITY_MFPR;
+#endif /* CONFIG_IEEE80211W */
+    WPA_PUT_LE16(pos, capab);
+    pos += 2;
+
+#ifdef CONFIG_IEEE80211W
+    if (mgmt_group_cipher == WPA_CIPHER_AES_128_CMAC) {
+        if (!sm->cur_pmksa) {
+            /* PMKID Count */
+            WPA_PUT_LE16(pos, 0);
+            pos += 2;
+        }
+
+        /* Management Group Cipher Suite */
+        RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_AES_128_CMAC);
+        pos += RSN_SELECTOR_LEN;
+    }
+#endif /* CONFIG_IEEE80211W */
+
+    hdr->len = (pos - rsn_ie) - 2;
+
+    WPA_ASSERT((size_t) (pos - rsn_ie) <= rsn_ie_len);
+
+    return pos - rsn_ie;
+#else /* CONFIG_NO_WPA2 */
+    return -1;
+#endif /* CONFIG_NO_WPA2 */
+}
+
+
+/**
+ * wpa_gen_wpa_ie - Generate WPA/RSN IE based on current security policy
+ * @sm: Pointer to WPA state machine data from wpa_sm_init()
+ * @wpa_ie: Pointer to memory area for the generated WPA/RSN IE
+ * @wpa_ie_len: Maximum length of the generated WPA/RSN IE
+ * Returns: Length of the generated WPA/RSN IE or -1 on failure
+ */
+int  wpa_gen_wpa_ie(struct wpa_sm *sm, u8 *wpa_ie, size_t wpa_ie_len)
+{
+    if (sm->proto == WPA_PROTO_RSN)
+        return wpa_gen_wpa_ie_rsn(wpa_ie, wpa_ie_len,
+                      sm->pairwise_cipher,
+                      sm->group_cipher,
+                      sm->key_mgmt, sm->mgmt_group_cipher,
+                      sm);
+    else
+        return wpa_gen_wpa_ie_wpa(wpa_ie, wpa_ie_len,
+                      sm->pairwise_cipher,
+                      sm->group_cipher,
+                      sm->key_mgmt);
+}
+#endif // ESP_SUPPLICANT
+
similarity index 93%
rename from components/wpa_supplicant/include/wpa/wpa_ie.h
rename to components/wpa_supplicant/src/rsn_supp/wpa_ie.h
index 94518d84578722e449a20b9ac8c69587c8a174a1..c71a926f2bb60fda11aebb3fa21716e17ade34b1 100644 (file)
@@ -53,4 +53,7 @@ int wpa_supplicant_parse_ies(const u8 *buf, size_t len,
                             struct wpa_eapol_ie_parse *ie);
 int wpa_gen_wpa_ie(struct wpa_sm *sm, u8 *wpa_ie, size_t wpa_ie_len);
 
+int wpa_parse_wpa_ie(const u8 *wpa_ie, size_t wpa_ie_len,
+             struct wpa_ie_data *data);
+
 #endif /* WPA_IE_H */
similarity index 98%
rename from components/wpa_supplicant/src/wpa2/tls/asn1.c
rename to components/wpa_supplicant/src/tls/asn1.c
index ced80184647c5c36081756fc16d634ab3eb5af10..5023ec1db4a6313c7cb3ff0f80ba76d297df6fde 100644 (file)
@@ -6,10 +6,10 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
-#include "wpa2/tls/asn1.h"
+#include "utils/common.h"
+#include "tls/asn1.h"
 
 int asn1_get_next(const u8 *buf, size_t len, struct asn1_hdr *hdr)
 {
similarity index 97%
rename from components/wpa_supplicant/src/wpa2/tls/bignum.c
rename to components/wpa_supplicant/src/tls/bignum.c
index aef8f953b34ab58b2f5729a2b10e52a465bdc997..2e1ea8e2829d51969d9725da210bae1b320251cc 100644 (file)
  * See README and COPYING for more details.
  */
 
-#include "crypto/includes.h"
-#include "crypto/common.h"
-#include "wpa/wpabuf.h"
-#include "wpa/wpa_debug.h"
-#include "wpa2/tls/bignum.h"
+#include "utils/includes.h"
+#include "utils/common.h"
+#include "utils/wpabuf.h"
+#include "utils/wpa_debug.h"
+#include "tls/bignum.h"
 
 #define CONFIG_INTERNAL_LIBTOMMATH
 #ifdef CONFIG_INTERNAL_LIBTOMMATH
-#include "wpa2/tls/libtommath.h"
+#include "tls/libtommath.h"
 #else /* CONFIG_INTERNAL_LIBTOMMATH */
 #include <tommath.h>
 #endif /* CONFIG_INTERNAL_LIBTOMMATH */
similarity index 99%
rename from components/wpa_supplicant/include/wpa2/tls/libtommath.h
rename to components/wpa_supplicant/src/tls/libtommath.h
index 9be311e86a66671ac6ff43181cfeb4d7acbd5916..07574de7fc3dea8fbfe65a973cc340255ca278f5 100644 (file)
 #include "os.h"
 #include "stdarg.h"
 
-#ifdef MEMLEAK_DEBUG
-static const char mem_debug_file[] ICACHE_RODATA_ATTR = __FILE__;
-#endif
-
 #ifndef CHAR_BIT
 #define CHAR_BIT 8
 #endif
similarity index 97%
rename from components/wpa_supplicant/src/wpa2/tls/pkcs1.c
rename to components/wpa_supplicant/src/tls/pkcs1.c
index 6266806bc18cd5de2640ad7db613754f9d772d21..51f5f0312d64f40302dcead0d3f19ded1fc7afc9 100644 (file)
@@ -6,11 +6,11 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
-#include "wpa2/tls/rsa.h"
-#include "wpa2/tls/pkcs1.h"
+#include "utils/common.h"
+#include "tls/rsa.h"
+#include "tls/pkcs1.h"
 
 
 static int pkcs1_generate_encryption_block(u8 block_type, size_t modlen,
similarity index 79%
rename from components/wpa_supplicant/src/wpa2/tls/pkcs5.c
rename to components/wpa_supplicant/src/tls/pkcs5.c
index 0a0ac9e3f6ee1348b8f8e2cf2342159ed6efd833..734a03368136dbc54802646295e28a16826beca0 100644 (file)
@@ -6,15 +6,15 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 #include "crypto/md5.h"
-#include "wpa2/tls/asn1.h"
-#include "wpa2/tls/pkcs5.h"
+#include "tls/asn1.h"
+#include "tls/pkcs5.h"
 
-#include "wpa2/eap_peer/eap_i.h"
+#include "eap_peer/eap_i.h"
 
 struct pkcs5_params {
        enum pkcs5_alg {
@@ -165,12 +165,8 @@ static struct crypto_cipher * pkcs5_crypto_init(struct pkcs5_params *params,
        wpa_hexdump_key(MSG_DEBUG, "PKCS #5: DES key", hash, 8);
        wpa_hexdump_key(MSG_DEBUG, "PKCS #5: DES IV", hash + 8, 8);
 
-       if (wpa2_crypto_funcs.crypto_cipher_init) {
-               return wpa2_crypto_funcs.crypto_cipher_init(CRYPTO_CIPHER_ALG_DES, hash + 8, hash, 8);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register crypto_cipher_init function! \r\n", __FUNCTION__);
-               return NULL;
-       }
+       return fast_crypto_cipher_init(CRYPTO_CIPHER_ALG_DES, hash + 8, hash, 8);
+       
 }
 
 u8 * pkcs5_decrypt(const u8 *enc_alg, size_t enc_alg_len,
@@ -198,46 +194,24 @@ u8 * pkcs5_decrypt(const u8 *enc_alg, size_t enc_alg_len,
        if (enc_data_len < 16 || enc_data_len % 8) {
                wpa_printf(MSG_INFO, "PKCS #5: invalid length of ciphertext "
                           "%d", (int) enc_data_len);
-               if (wpa2_crypto_funcs.crypto_cipher_deinit) {
-                       wpa2_crypto_funcs.crypto_cipher_deinit(ctx);
-               } else {
-                       wpa_printf(MSG_ERROR, "Fail to register crypto cipher deinit function!\r\n");
-                       return NULL;
-               }
+               fast_crypto_cipher_deinit(ctx);
                return NULL;
        }
 
        eb = os_malloc(enc_data_len);
        if (eb == NULL) {
-               if (wpa2_crypto_funcs.crypto_cipher_deinit) {
-                       wpa2_crypto_funcs.crypto_cipher_deinit(ctx);
-               } else {
-                       wpa_printf(MSG_ERROR, "Fail to register crypto cipher deinit function!\r\n");
-                       return NULL;
-               }
+               fast_crypto_cipher_deinit(ctx);
                return NULL;
        }
 
-       if (wpa2_crypto_funcs.crypto_cipher_decrypt) {
-               if ((int)wpa2_crypto_funcs.crypto_cipher_decrypt(ctx, enc_data, eb, enc_data_len) < 0) {
-                       wpa_printf(MSG_DEBUG, "PKCS #5: Failed to decrypt EB");
-                       wpa2_crypto_funcs.crypto_cipher_deinit(ctx);
-                       os_free(eb);
-                       return NULL;
-               }
-       } else {
-               wpa_printf(MSG_ERROR, "Fail to register crypto cipher decrypt function.\r\n");
-               wpa2_crypto_funcs.crypto_cipher_deinit(ctx);
+       if ((int)fast_crypto_cipher_decrypt(ctx, enc_data, eb, enc_data_len) < 0) {
+               wpa_printf(MSG_DEBUG, "PKCS #5: Failed to decrypt EB");
+               fast_crypto_cipher_deinit(ctx);
                os_free(eb);
                return NULL;
        }
 
-       if (wpa2_crypto_funcs.crypto_cipher_deinit) {
-               wpa2_crypto_funcs.crypto_cipher_deinit(ctx);
-       } else {
-               wpa_printf(MSG_ERROR, "Fail to register crypto cipher deinit function!\r\n");
-               return NULL;
-       }
+       fast_crypto_cipher_deinit(ctx);
 
        pad = eb[enc_data_len - 1];
        if (pad > 8) {
similarity index 96%
rename from components/wpa_supplicant/src/wpa2/tls/pkcs8.c
rename to components/wpa_supplicant/src/tls/pkcs8.c
index 0f39c4558eda6fbb5d2e4fec269f7c11afc7aa58..6e012437b11ff30c593781aef7792aaa3e1d4555 100644 (file)
@@ -6,14 +6,14 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
-
-#include "wpa/common.h"
-#include "wpa2/tls/asn1.h"
-#include "wpa2/tls/bignum.h"
-#include "wpa2/tls/rsa.h"
-#include "wpa2/tls/pkcs5.h"
-#include "wpa2/tls/pkcs8.h"
+#include "utils/includes.h"
+
+#include "utils/common.h"
+#include "tls/asn1.h"
+#include "tls/bignum.h"
+#include "tls/rsa.h"
+#include "tls/pkcs5.h"
+#include "tls/pkcs8.h"
 
 struct crypto_private_key * pkcs8_key_import(const u8 *buf, size_t len)
 {
similarity index 98%
rename from components/wpa_supplicant/src/wpa2/tls/rsa.c
rename to components/wpa_supplicant/src/tls/rsa.c
index 2afc8769f203f7cb21125c9e7f10511cff6f6866..e1eff7f097cad040fd7256dcf4769523b37c676c 100644 (file)
@@ -6,12 +6,12 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
-#include "wpa2/tls/asn1.h"
-#include "wpa2/tls/bignum.h"
-#include "wpa2/tls/rsa.h"
+#include "utils/common.h"
+#include "tls/asn1.h"
+#include "tls/bignum.h"
+#include "tls/rsa.h"
 
 struct crypto_rsa_key {
        int private_key; /* whether private key is set */
similarity index 98%
rename from components/wpa_supplicant/src/wpa2/tls/tls_internal.c
rename to components/wpa_supplicant/src/tls/tls_internal.c
index 682d457c585bb606ca845f6226d8b0f4a0c01972..65e08b8fa9e5f5acc6986a5f49e4d5d72940a1f4 100644 (file)
@@ -9,14 +9,14 @@
  * integrated TLSv1 implementation.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/sha1.h"
 #include "crypto/md5.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/tls/tlsv1_client.h"
-#include "wpa2/tls/tlsv1_server.h"
+#include "tls/tls.h"
+#include "tls/tlsv1_client.h"
+#include "tls/tlsv1_server.h"
 
 #ifndef CONFIG_TLS_INTERNAL_CLIENT
 #define CONFIG_TLS_INTERNAL_CLIENT
@@ -204,7 +204,6 @@ int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
 
        tlsv1_client_set_time_checks(
                conn->client, !(params->flags & TLS_CONN_DISABLE_TIME_CHECKS));
-               //conn->client, !(TLS_CONN_DISABLE_TIME_CHECKS)); //snake
 
        return 0;
 #else /* CONFIG_TLS_INTERNAL_CLIENT */
similarity index 99%
rename from components/wpa_supplicant/src/wpa2/tls/tlsv1_client.c
rename to components/wpa_supplicant/src/tls/tlsv1_client.c
index 62753b3b5e3adc2c0db681fc7a900da20835a311..6780f54dc13060ac832c46e43196fbd116b9b6a1 100644 (file)
@@ -6,15 +6,15 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/sha1.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/tls/tlsv1_common.h"
-#include "wpa2/tls/tlsv1_record.h"
-#include "wpa2/tls/tlsv1_client.h"
-#include "wpa2/tls/tlsv1_client_i.h"
+#include "tls/tls.h"
+#include "tls/tlsv1_common.h"
+#include "tls/tlsv1_record.h"
+#include "tls/tlsv1_client.h"
+#include "tls/tlsv1_client_i.h"
 
 /* TODO:
  * Support for a message fragmented across several records (RFC 2246, 6.2.1)
@@ -465,7 +465,7 @@ struct tlsv1_client * tlsv1_client_init(void)
        suites[count++] = TLS_RSA_WITH_AES_128_CBC_SHA;
 #ifdef CONFIG_DES3
        suites[count++] = TLS_RSA_WITH_3DES_EDE_CBC_SHA;
-#endif
+#endif //CONFIG_DES3
        suites[count++] = TLS_RSA_WITH_RC4_128_SHA;
        suites[count++] = TLS_RSA_WITH_RC4_128_MD5;
        conn->num_cipher_suites = count;
similarity index 97%
rename from components/wpa_supplicant/src/wpa2/tls/tlsv1_client_read.c
rename to components/wpa_supplicant/src/tls/tlsv1_client_read.c
index 13330bdbf1de7019f8b52f23daa721938811ec17..89b25e149b2b1ef2a7c9b1f00e5bfa738a21b73b 100644 (file)
@@ -6,19 +6,19 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/md5.h"
 #include "crypto/sha1.h"
 #include "crypto/sha256.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/tls/x509v3.h"
-#include "wpa2/tls/tlsv1_common.h"
-#include "wpa2/tls/tlsv1_record.h"
-#include "wpa2/tls/tlsv1_client.h"
-#include "wpa2/tls/tlsv1_client_i.h"
-#include "wpa2/eap_peer/eap_i.h"
+#include "tls/tls.h"
+#include "tls/x509v3.h"
+#include "tls/tlsv1_common.h"
+#include "tls/tlsv1_record.h"
+#include "tls/tlsv1_client.h"
+#include "tls/tlsv1_client_i.h"
+#include "eap_peer/eap_i.h"
 
 static int tls_process_server_key_exchange(struct tlsv1_client *conn, u8 ct,
                                           const u8 *in_data, size_t *in_len);
@@ -815,15 +815,8 @@ static int tls_process_server_finished(struct tlsv1_client *conn, u8 ct,
 #ifdef CONFIG_TLSV12
        if (conn->rl.tls_version >= TLS_VERSION_1_2) {
                hlen = SHA256_MAC_LEN;
-               if (wpa2_crypto_funcs.crypto_hash_finish) {
-                       if (conn->verify.sha256_server == NULL ||
-                           wpa_crypto_funcs.crypto_hash_finish(conn->verify.sha256_server, hash, &hlen) < 0) {
-                               tls_alert(conn, TLS_ALERT_LEVEL_FATAL, TLS_ALERT_INTERNAL_ERROR);
-                               conn->verify.sha256_server = NULL;
-                               return -1;
-                       }
-               } else {
-                       wpa_printf(MSG_ERROR, "In function %s, fail to register crypto_hash_finish function!\r\n", __FUNCTION__);
+           if (conn->verify.sha256_server == NULL ||
+                       fast_crypto_hash_finish(conn->verify.sha256_server, hash, &hlen) < 0) {
                        tls_alert(conn, TLS_ALERT_LEVEL_FATAL, TLS_ALERT_INTERNAL_ERROR);
                        conn->verify.sha256_server = NULL;
                        return -1;
similarity index 89%
rename from components/wpa_supplicant/src/wpa2/tls/tlsv1_client_write.c
rename to components/wpa_supplicant/src/tls/tlsv1_client_write.c
index 55644a046ce4de2db1cb1e8c77115c56f63c3331..6f4f887528f4a288984a7bc959244dde3bb02361 100644 (file)
@@ -6,21 +6,21 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/md5.h"
 #include "crypto/sha1.h"
 #include "crypto/sha256.h"
 #include "crypto/random.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/tls/x509v3.h"
-#include "wpa2/tls/tlsv1_common.h"
-#include "wpa2/tls/tlsv1_record.h"
-#include "wpa2/tls/tlsv1_client.h"
-#include "wpa2/tls/tlsv1_client_i.h"
+#include "tls/tls.h"
+#include "tls/x509v3.h"
+#include "tls/tlsv1_common.h"
+#include "tls/tlsv1_record.h"
+#include "tls/tlsv1_client.h"
+#include "tls/tlsv1_client_i.h"
 
-#include "wpa2/eap_peer/eap_i.h"
+#include "eap_peer/eap_i.h"
 
 static size_t tls_client_cert_chain_der_len(struct tlsv1_client *conn)
 {
@@ -252,23 +252,14 @@ static int tlsv1_key_x_anon_dh(struct tlsv1_client *conn, u8 **pos, u8 *end)
                os_free(csecret);
                return -1;
        }
-       if (wpa2_crypto_funcs.crypto_mod_exp) {
-               if(wpa2_crypto_funcs.crypto_mod_exp(conn->dh_g, conn->dh_g_len,
-                                                        csecret_start, csecret_len,
-                                                        conn->dh_p, conn->dh_p_len,
-                                                        dh_yc, &dh_yc_len)) {
-                       tls_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                 TLS_ALERT_INTERNAL_ERROR);
-                       os_free(csecret);
-                       os_free(dh_yc);
-                       return -1;
-               }
-       } else {
-               tls_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                         TLS_ALERT_INTERNAL_ERROR);
+       if(crypto_mod_exp(conn->dh_g, conn->dh_g_len,
+                                                   csecret_start, csecret_len,
+                                                   conn->dh_p, conn->dh_p_len,
+                                                   dh_yc, &dh_yc_len)) {
+        tls_alert(conn, TLS_ALERT_LEVEL_FATAL,
+                       TLS_ALERT_INTERNAL_ERROR);
                os_free(csecret);
                os_free(dh_yc);
-               wpa_printf(MSG_ERROR, "Fail to register crypto_mod_exp function!\r\n");
                return -1;
        }
 
@@ -302,23 +293,14 @@ static int tlsv1_key_x_anon_dh(struct tlsv1_client *conn, u8 **pos, u8 *end)
        }
 
        /* shared = Ys^csecret mod p */
-       if (wpa2_crypto_funcs.crypto_mod_exp) {
-               if(wpa2_crypto_funcs.crypto_mod_exp(conn->dh_ys, conn->dh_ys_len,
-                                                             csecret_start, csecret_len,
-                                                             conn->dh_p, conn->dh_p_len,
-                                                             shared, &shared_len)) {
-                       tls_alert(conn, TLS_ALERT_LEVEL_FATAL,
+       if(crypto_mod_exp(conn->dh_ys, conn->dh_ys_len,
+                                                   csecret_start, csecret_len,
+                                                   conn->dh_p, conn->dh_p_len,
+                                                   shared, &shared_len)) {
+           tls_alert(conn, TLS_ALERT_LEVEL_FATAL,
                                  TLS_ALERT_INTERNAL_ERROR);
-                       os_free(csecret);
-                       os_free(shared);
-                       return -1;
-               }
-       } else {
-               tls_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                             TLS_ALERT_INTERNAL_ERROR);
                os_free(csecret);
                os_free(shared);
-               wpa_printf(MSG_ERROR, "Fail to register crypto_mod_exp function!\r\n");
                return -1;
        }
        wpa_hexdump_key(MSG_DEBUG, "TLSv1: Shared secret from DH key exchange",
@@ -493,20 +475,12 @@ static int tls_write_client_certificate_verify(struct tlsv1_client *conn,
 #ifdef CONFIG_TLSV12
        if (conn->rl.tls_version == TLS_VERSION_1_2) {
                hlen = SHA256_MAC_LEN;
-               if (wpa2_crypto_funcs.crypto_hash_finish) {
-                   if (conn->verify.sha256_cert == NULL ||
-                       wpa2_crypto_funcs.crypto_hash_finish(conn->verify.sha256_cert, hpos, &hlen) <
-                       0) {
-                           conn->verify.sha256_cert = NULL;
-                           tls_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                         TLS_ALERT_INTERNAL_ERROR);
-                           return -1;
-                   }
-               } else {
+               if (conn->verify.sha256_cert == NULL ||
+                   fast_crypto_hash_finish(conn->verify.sha256_cert, hpos, &hlen) <
+                   0) {
                        conn->verify.sha256_cert = NULL;
                        tls_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                         TLS_ALERT_INTERNAL_ERROR);
-                       wpa_printf(MSG_ERROR, "In function %s, fail to register crypto_hash_finish function!\r\n", __FUNCTION__);
+                                   TLS_ALERT_INTERNAL_ERROR);
                        return -1;
                }
                conn->verify.sha256_cert = NULL;
@@ -679,20 +653,12 @@ static int tls_write_client_finished(struct tlsv1_client *conn,
 #ifdef CONFIG_TLSV12
        if (conn->rl.tls_version >= TLS_VERSION_1_2) {
                hlen = SHA256_MAC_LEN;
-               if (wpa2_crypto_funcs.crypto_hash_finish) {
-                   if (conn->verify.sha256_client == NULL ||
-                       wpa2_crypto_funcs.crypto_hash_finish(conn->verify.sha256_client, hash, &hlen)
-                       < 0) {
-                           tls_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                         TLS_ALERT_INTERNAL_ERROR);
-                           conn->verify.sha256_client = NULL;
-                           return -1;
-                   }
-               } else {
+               if (conn->verify.sha256_client == NULL ||
+                   fast_crypto_hash_finish(conn->verify.sha256_client, hash, &hlen)
+                   < 0) {
                        tls_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                         TLS_ALERT_INTERNAL_ERROR);
+                                   TLS_ALERT_INTERNAL_ERROR);
                        conn->verify.sha256_client = NULL;
-                       wpa_printf(MSG_ERROR, "In function %s, fail to register crypto_hash_finish function!\r\n", __FUNCTION__);
                        return -1;
                }
                conn->verify.sha256_client = NULL;
similarity index 84%
rename from components/wpa_supplicant/src/wpa2/tls/tlsv1_common.c
rename to components/wpa_supplicant/src/tls/tlsv1_common.c
index 38d0b694d2019c3c65f2310b20aa0c6f6565891f..5380df87698ec1498d1fee95e0df93ad2c039ec1 100644 (file)
@@ -6,15 +6,15 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/sha1.h"
 #include "crypto/sha256.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/tls/x509v3.h"
-#include "wpa2/tls/tlsv1_common.h"
-#include "wpa2/eap_peer/eap_i.h"
+#include "tls/tls.h"
+#include "tls/x509v3.h"
+#include "tls/tlsv1_common.h"
+#include "eap_peer/eap_i.h"
 
 
 /*
@@ -221,14 +221,10 @@ int tls_verify_hash_init(struct tls_verify_hash *verify)
                return -1;
        }
 #ifdef CONFIG_TLSV12
-       if (wpa2_crypto_funcs.crypto_hash_init) {
-               verify->sha256_client = wpa2_crypto_funcs.crypto_hash_init(CRYPTO_HASH_ALG_SHA256, NULL, 0);
-               verify->sha256_server = wpa2_crypto_funcs.crypto_hash_init(CRYPTO_HASH_ALG_SHA256, NULL, 0);
-               verify->sha256_cert = wpa2_crypto_funcs.crypto_hash_init(CRYPTO_HASH_ALG_SHA256, NULL, 0);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register crypto hash init function!\r\n", __FUNCTION__);
-               return -1;
-       }
+  verify->sha256_client = fast_crypto_hash_init(CRYPTO_HASH_ALG_SHA256, NULL, 0);
+  verify->sha256_server = fast_crypto_hash_init(CRYPTO_HASH_ALG_SHA256, NULL, 0);
+  verify->sha256_cert = fast_crypto_hash_init(CRYPTO_HASH_ALG_SHA256, NULL, 0);
+       
        if (verify->sha256_client == NULL ||
                verify->sha256_server == NULL ||
            verify->sha256_cert == NULL) {
@@ -256,17 +252,12 @@ void tls_verify_hash_add(struct tls_verify_hash *verify, const u8 *buf,
                crypto_hash_update(verify->sha1_cert, buf, len);
        }
 #ifdef CONFIG_TLSV12
-       if (wpa2_crypto_funcs.crypto_hash_update) {
-               if (verify->sha256_client)
-                       wpa2_crypto_funcs.crypto_hash_update(verify->sha256_client, buf, len);
-               if (verify->sha256_server)
-                       wpa2_crypto_funcs.crypto_hash_update(verify->sha256_server, buf, len);
-               if (verify->sha256_cert)
-                       wpa2_crypto_funcs.crypto_hash_update(verify->sha256_cert, buf, len);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register crypto hash update function!\r\n", __FUNCTION__);
-               return;
-       }
+       if (verify->sha256_client)
+         fast_crypto_hash_update(verify->sha256_client, buf, len);
+       if (verify->sha256_server)
+               fast_crypto_hash_update(verify->sha256_server, buf, len);
+       if (verify->sha256_cert)
+               fast_crypto_hash_update(verify->sha256_cert, buf, len);
 #endif /* CONFIG_TLSV12 */
 }
 
@@ -286,17 +277,12 @@ void tls_verify_hash_free(struct tls_verify_hash *verify)
        verify->sha1_server = NULL;
        verify->sha1_cert = NULL;
 #ifdef CONFIG_TLSV12
-       if (wpa2_crypto_funcs.crypto_hash_finish) {
-               wpa2_crypto_funcs.crypto_hash_finish(verify->sha256_client, NULL, NULL);
-               wpa2_crypto_funcs.crypto_hash_finish(verify->sha256_server, NULL, NULL);
-               wpa2_crypto_funcs.crypto_hash_finish(verify->sha256_cert, NULL, NULL);
-               verify->sha256_client = NULL;
-               verify->sha256_server = NULL;
-               verify->sha256_cert = NULL;
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register crypto hash finish function!\r\n", __FUNCTION__);
-               return;
-       }
+       fast_crypto_hash_finish(verify->sha256_client, NULL, NULL);
+       fast_crypto_hash_finish(verify->sha256_server, NULL, NULL);
+       fast_crypto_hash_finish(verify->sha256_cert, NULL, NULL);
+       verify->sha256_client = NULL;
+       verify->sha256_server = NULL;
+       verify->sha256_cert = NULL;
 #endif /* CONFIG_TLSV12 */
 }
 
similarity index 97%
rename from components/wpa_supplicant/src/wpa2/tls/tlsv1_cred.c
rename to components/wpa_supplicant/src/tls/tlsv1_cred.c
index fd359a2cc5efc925e2c21fd88e2e3ccbf8544c0b..ed7577617a8624e70333479f5c50be595b4e43d8 100644 (file)
@@ -6,13 +6,13 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
-#include "wpa2/utils/base64.h"
+#include "utils/common.h"
+#include "utils/base64.h"
 #include "crypto/crypto.h"
-#include "wpa2/tls/x509v3.h"
-#include "wpa2/tls/tlsv1_cred.h"
+#include "tls/x509v3.h"
+#include "tls/tlsv1_cred.h"
 
 struct tlsv1_credentials * tlsv1_cred_alloc(void)
 {
@@ -160,7 +160,6 @@ static int tlsv1_set_cert_chain(struct x509_certificate **chain,
                size_t len;
                int ret;
 
-               //buf = (u8 *) os_readfile(cert, &len);
                if (buf == NULL) {
                        wpa_printf(MSG_INFO, "TLSv1: Failed to read '%s'",
                                   cert);
@@ -332,7 +331,6 @@ int tlsv1_set_private_key(struct tlsv1_credentials *cred,
                size_t len;
                int ret;
 
-               //buf = (u8 *) os_readfile(private_key, &len);
                if (buf == NULL) {
                        wpa_printf(MSG_INFO, "TLSv1: Failed to read '%s'",
                                   private_key);
@@ -489,7 +487,6 @@ int tlsv1_set_dhparams(struct tlsv1_credentials *cred, const char *dh_file,
                size_t len;
                int ret;
 
-               //buf = (u8 *) os_readfile(dh_file, &len);
                if (buf == NULL) {
                        wpa_printf(MSG_INFO, "TLSv1: Failed to read '%s'",
                                   dh_file);
similarity index 73%
rename from components/wpa_supplicant/src/wpa2/tls/tlsv1_record.c
rename to components/wpa_supplicant/src/tls/tlsv1_record.c
index 879d9f5454dd962c459d637864ba1f959e0a587d..12b14e79b84de591128f6e39d2e3ad3268490256 100644 (file)
@@ -6,16 +6,16 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/md5.h"
 #include "crypto/sha1.h"
 #include "crypto/sha256.h"
-#include "wpa2/tls/tlsv1_common.h"
-#include "wpa2/tls/tlsv1_record.h"
+#include "tls/tlsv1_common.h"
+#include "tls/tlsv1_record.h"
 
-#include "wpa2/eap_peer/eap_i.h"
+#include "eap_peer/eap_i.h"
 
 /**
  * tlsv1_record_set_cipher_suite - TLS record layer: Set cipher suite
@@ -81,23 +81,14 @@ int tlsv1_record_change_write_cipher(struct tlsv1_record_layer *rl)
        os_memset(rl->write_seq_num, 0, TLS_SEQ_NUM_LEN);
 
        if (rl->write_cbc) {
-               if (wpa2_crypto_funcs.crypto_cipher_deinit) {
-                       wpa2_crypto_funcs.crypto_cipher_deinit(rl->write_cbc);
-                       rl->write_cbc = NULL;
-               } else {
-                       wpa_printf(MSG_ERROR, "Fail to register crypto cipher deinit function!\r\n");
-                       return -1;
-               }
+               fast_crypto_cipher_deinit(rl->write_cbc);
+               rl->write_cbc = NULL;
+               
        }
        if (rl->cipher_alg != CRYPTO_CIPHER_NULL) {
-               if (wpa2_crypto_funcs.crypto_cipher_init) {
-                       rl->write_cbc = wpa2_crypto_funcs.crypto_cipher_init(rl->cipher_alg,
-                                                                            rl->write_iv, rl->write_key,
-                                                                            rl->key_material_len);
-               } else {
-                       wpa_printf(MSG_ERROR, "Fail to register crypto_cipher_init function!\r\n");
-                       return -1;
-               }
+               rl->write_cbc = fast_crypto_cipher_init(rl->cipher_alg,
+                                                                       rl->write_iv, rl->write_key,
+                                                                       rl->key_material_len);
 
                if (rl->write_cbc == NULL) {
                        wpa_printf(MSG_DEBUG, "TLSv1: Failed to initialize "
@@ -126,24 +117,14 @@ int tlsv1_record_change_read_cipher(struct tlsv1_record_layer *rl)
        os_memset(rl->read_seq_num, 0, TLS_SEQ_NUM_LEN);
 
        if (rl->read_cbc) {
-               if (wpa2_crypto_funcs.crypto_cipher_deinit) {
-                       wpa2_crypto_funcs.crypto_cipher_deinit(rl->read_cbc);
-                       rl->read_cbc =  NULL;
-               } else {
-                       wpa_printf(MSG_ERROR, "Fail to register crypto cipher deinit function!\r\n");
-                       return -1;
-               }
+               fast_crypto_cipher_deinit(rl->read_cbc);
+               rl->read_cbc =  NULL;
        }
 
        if (rl->cipher_alg != CRYPTO_CIPHER_NULL) {
-               if(wpa2_crypto_funcs.crypto_cipher_init) {
-                       rl->read_cbc = wpa2_crypto_funcs.crypto_cipher_init(rl->cipher_alg,
-                                                                           rl->read_iv, rl->read_key,
-                                                                           rl->key_material_len);
-               } else {
-                       wpa_printf(MSG_ERROR, "Fail to register crypto_cipher_init function!\r\n");
-                       return -1;
-               }
+               rl->read_cbc = fast_crypto_cipher_init(rl->cipher_alg,
+                                                                       rl->read_iv, rl->read_key,
+                                                                       rl->key_material_len);
                if (rl->read_cbc == NULL) {
                        wpa_printf(MSG_DEBUG, "TLSv1: Failed to initialize "
                                   "cipher");
@@ -227,49 +208,30 @@ int tlsv1_record_send(struct tlsv1_record_layer *rl, u8 content_type, u8 *buf,
                 * TLSCompressed.version + TLSCompressed.length +
                 * TLSCompressed.fragment
                 */
-               if (wpa2_crypto_funcs.crypto_hash_init) {
-                       hmac = wpa2_crypto_funcs.crypto_hash_init(rl->hash_alg, rl->write_mac_secret, rl->hash_size);
-               } else {
-                       wpa_printf(MSG_ERROR, "In function %s, fail to register crypto hash init!\r\n", __FUNCTION__);
-                       return -1;
-               }
+               hmac = fast_crypto_hash_init(rl->hash_alg, rl->write_mac_secret, rl->hash_size);
                if (hmac == NULL) {
                        wpa_printf(MSG_DEBUG, "TLSv1: Record Layer - Failed "
                                   "to initialize HMAC");
                        return -1;
                }
-               if (wpa2_crypto_funcs.crypto_hash_update) {
-                       wpa2_crypto_funcs.crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN);
-                       /* type + version + length + fragment */
-                       wpa2_crypto_funcs.crypto_hash_update(hmac, ct_start, TLS_RECORD_HEADER_LEN);
-                       wpa2_crypto_funcs.crypto_hash_update(hmac, payload, payload_len);
-               } else {
-                       wpa_printf(MSG_ERROR, "In function %s, fail to register crypto hash update!\r\n", __FUNCTION__);
-                       return -1;
-               }
+               fast_crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN);
+               /* type + version + length + fragment */
+               fast_crypto_hash_update(hmac, ct_start, TLS_RECORD_HEADER_LEN);
+               fast_crypto_hash_update(hmac, payload, payload_len);
                clen = buf + buf_size - pos;
                if (clen < rl->hash_size) {
                        wpa_printf(MSG_DEBUG, "TLSv1: Record Layer - Not "
                                   "enough room for MAC");
-                       if (wpa2_crypto_funcs.crypto_hash_finish) {
-                               wpa2_crypto_funcs.crypto_hash_finish(hmac, NULL, NULL);
-                       } else {
-                               wpa_printf(MSG_ERROR, "In function %s, fail to register crypto hash finish function!\r\n", __FUNCTION__);
-                               return -1;
-                       }
-
+                       fast_crypto_hash_finish(hmac, NULL, NULL);
+                       
                        return -1;
                }
 
-               if (wpa2_crypto_funcs.crypto_hash_finish) {
-                       if ((int)wpa2_crypto_funcs.crypto_hash_finish(hmac, pos, (int *)&clen) < 0) {
-                               wpa_printf(MSG_DEBUG, "TLSv1: Record Layer - Failed to calculate HMAC");
-                               return -1;
-                       }
-               } else {
-                       wpa_printf(MSG_ERROR, "In function %s, fail to register crypto_hash_finish function!\r\n",__FUNCTION__);
+               if ((int)fast_crypto_hash_finish(hmac, pos, &clen) < 0) {
+                       wpa_printf(MSG_DEBUG, "TLSv1: Record Layer - Failed to calculate HMAC");
                        return -1;
                }
+               
                wpa_hexdump(MSG_MSGDUMP, "TLSv1: Record Layer - Write HMAC",
                            pos, clen);
                pos += clen;
@@ -288,14 +250,9 @@ int tlsv1_record_send(struct tlsv1_record_layer *rl, u8 content_type, u8 *buf,
                        pos += pad + 1;
                }
 
-               if (wpa2_crypto_funcs.crypto_cipher_encrypt) {
-                       if ((int)wpa2_crypto_funcs.crypto_cipher_encrypt(rl->write_cbc, cpayload,
-                                                                 cpayload, pos - cpayload) < 0)
-                               return -1;
-               } else {
-                       wpa_printf(MSG_ERROR, "Fail to register crypto_cipher_encrypt function!\r\n");
-                       return -1;
-               }
+               if ((int)fast_crypto_cipher_encrypt(rl->write_cbc, cpayload,
+                                                       cpayload, pos - cpayload) < 0)
+                       return -1;
        }
 
        WPA_PUT_BE16(length, pos - length - 2);
@@ -401,17 +358,12 @@ int tlsv1_record_receive(struct tlsv1_record_layer *rl,
 
        if (rl->read_cipher_suite != TLS_NULL_WITH_NULL_NULL) {
                size_t plen;
-               if (wpa2_crypto_funcs.crypto_cipher_decrypt) {
-                       if ((int)wpa2_crypto_funcs.crypto_cipher_decrypt(rl->read_cbc, in_data,
-                                                                   out_data, in_len) < 0) {
-                               *alert = TLS_ALERT_DECRYPTION_FAILED;
-                               return -1;
-                       }
-               } else {
-                       wpa_printf(MSG_ERROR, "Fail to register crypto cipher decrypt function. \r\n");
-                       *alert = TLS_ALERT_DECRYPTION_FAILED;
-                       return -1;
+               if ((int)fast_crypto_cipher_decrypt(rl->read_cbc, in_data,
+                                                               out_data, in_len) < 0) {
+                       *alert = TLS_ALERT_DECRYPTION_FAILED;
+                       return -1;
                }
+               
                plen = in_len;
                wpa_hexdump_key(MSG_MSGDUMP, "TLSv1: Record Layer - Decrypted "
                                "data", out_data, plen);
@@ -486,12 +438,7 @@ int tlsv1_record_receive(struct tlsv1_record_layer *rl,
 
                plen -= rl->hash_size;
 
-               if (wpa2_crypto_funcs.crypto_hash_init) {
-                       hmac = wpa2_crypto_funcs.crypto_hash_init(rl->hash_alg, rl->read_mac_secret, rl->hash_size);
-               } else {
-                       wpa_printf(MSG_ERROR, "In function %s, fail to register crypto_hash_init function!\r\n", __FUNCTION__);
-                       return -1;
-               }
+               hmac = fast_crypto_hash_init(rl->hash_alg, rl->read_mac_secret, rl->hash_size);         
 
                if (hmac == NULL) {
                        wpa_printf(MSG_DEBUG, "TLSv1: Record Layer - Failed "
@@ -500,29 +447,20 @@ int tlsv1_record_receive(struct tlsv1_record_layer *rl,
                        return -1;
                }
 
-               if (wpa2_crypto_funcs.crypto_hash_update) {
-                       wpa2_crypto_funcs.crypto_hash_update(hmac, rl->read_seq_num, TLS_SEQ_NUM_LEN);
-                       /* type + version + length + fragment */
-                       wpa2_crypto_funcs.crypto_hash_update(hmac, in_data - TLS_RECORD_HEADER_LEN, 3);
-                       WPA_PUT_BE16(len, plen);
-                       wpa2_crypto_funcs.crypto_hash_update(hmac, len, 2);
-                       wpa2_crypto_funcs.crypto_hash_update(hmac, out_data, plen);
-               } else {
-                       wpa_printf(MSG_ERROR, "In function %s, fail to register crypto hash update function!\r\n", __FUNCTION__);
-                       return -1;
-               }
+               fast_crypto_hash_update(hmac, rl->read_seq_num, TLS_SEQ_NUM_LEN);
+               /* type + version + length + fragment */
+               fast_crypto_hash_update(hmac, in_data - TLS_RECORD_HEADER_LEN, 3);
+               WPA_PUT_BE16(len, plen);
+               fast_crypto_hash_update(hmac, len, 2);
+               fast_crypto_hash_update(hmac, out_data, plen);
+               
                hlen = sizeof(hash);
-               if (wpa2_crypto_funcs.crypto_hash_finish) {
-                       if ((int)wpa2_crypto_funcs.crypto_hash_finish(hmac, hash, (int *)&hlen) < 0) {
-                               wpa_printf(MSG_DEBUG, "TLSv1: Record Layer - Failed to calculate HMAC");
-                               *alert = TLS_ALERT_INTERNAL_ERROR;
-                               return -1;
-                       }
-               } else {
-                       wpa_printf(MSG_ERROR, "In function %s, fail to register crypto_hash_finish function!\r\n", __FUNCTION__);
+               if ((int)fast_crypto_hash_finish(hmac, hash, &hlen) < 0) {
+                       wpa_printf(MSG_DEBUG, "TLSv1: Record Layer - Failed to calculate HMAC");
                        *alert = TLS_ALERT_INTERNAL_ERROR;
                        return -1;
                }
+               
                if (hlen != rl->hash_size ||
                    os_memcmp(hash, out_data + plen, hlen) != 0 ||
                    force_mac_error) {
similarity index 98%
rename from components/wpa_supplicant/src/wpa2/tls/tlsv1_server.c
rename to components/wpa_supplicant/src/tls/tlsv1_server.c
index 95118aa052491649c0ec1a4a6b336ff022d5465e..4628af8c50183ab4869491b2f35f2692b883ee40 100644 (file)
@@ -6,15 +6,15 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/sha1.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/tls/tlsv1_common.h"
-#include "wpa2/tls/tlsv1_record.h"
-#include "wpa2/tls/tlsv1_server.h"
-#include "wpa2/tls/tlsv1_server_i.h"
+#include "tls/tls.h"
+#include "tls/tlsv1_common.h"
+#include "tls/tlsv1_record.h"
+#include "tls/tlsv1_server.h"
+#include "tls/tlsv1_server_i.h"
 
 /* TODO:
  * Support for a message fragmented across several records (RFC 2246, 6.2.1)
similarity index 94%
rename from components/wpa_supplicant/src/wpa2/tls/tlsv1_server_read.c
rename to components/wpa_supplicant/src/tls/tlsv1_server_read.c
index ee477c98a092984d613ff0e226f16daff735b93e..28d1e27295b500e1aecac81ab483401979ebfb4d 100644 (file)
@@ -6,20 +6,20 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/md5.h"
 #include "crypto/sha1.h"
 #include "crypto/sha256.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/tls/x509v3.h"
-#include "wpa2/tls/tlsv1_common.h"
-#include "wpa2/tls/tlsv1_record.h"
-#include "wpa2/tls/tlsv1_server.h"
-#include "wpa2/tls/tlsv1_server_i.h"
+#include "tls/tls.h"
+#include "tls/x509v3.h"
+#include "tls/tlsv1_common.h"
+#include "tls/tlsv1_record.h"
+#include "tls/tlsv1_server.h"
+#include "tls/tlsv1_server_i.h"
 
-#include "wpa2/eap_peer/eap_i.h"
+#include "eap_peer/eap_i.h"
 
 static int tls_process_client_key_exchange(struct tlsv1_server *conn, u8 ct,
                                           const u8 *in_data, size_t *in_len);
@@ -652,21 +652,13 @@ static int tls_process_client_key_exchange_dh_anon(
        }
 
        /* shared = Yc^secret mod p */
-       if (wpa2_crypto_funcs.crypto_mod_exp) {
-               if (wpa2_crypto_funcs.crypto_mod_exp(dh_yc, dh_yc_len, conn->dh_secret,
-                                                    conn->dh_secret_len,
-                                                    conn->cred->dh_p, conn->cred->dh_p_len,
-                                                    shared, &shared_len)) {
-                       os_free(shared);
-                       tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                               TLS_ALERT_INTERNAL_ERROR);
-                       return -1;
-               }
-       } else {
-               wpa_printf(MSG_ERROR, "Fail to register crypto_mod_exp function!\r\n");
+       if (crypto_mod_exp(dh_yc, dh_yc_len, conn->dh_secret,
+                                               conn->dh_secret_len,
+                                               conn->cred->dh_p, conn->cred->dh_p_len,
+                                               shared, &shared_len)) {
                os_free(shared);
                tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                               TLS_ALERT_INTERNAL_ERROR);
+                       TLS_ALERT_INTERNAL_ERROR);
                return -1;
        }
 
@@ -878,20 +870,12 @@ static int tls_process_certificate_verify(struct tlsv1_server *conn, u8 ct,
                pos += 2;
 
                hlen = SHA256_MAC_LEN;
-               if (wpa2_crypto_funcs.crypto_hash_finish) {
-                       if (conn->verify.sha256_cert == NULL ||
-                               wpa2_crypto_funcs.crypto_hash_finish(conn->verify.sha256_cert, hpos, &hlen) <
-                               0) {
-                               conn->verify.sha256_cert = NULL;
-                               tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                                                  TLS_ALERT_INTERNAL_ERROR);
-                               return -1;
-                       }
-               } else {
+               if (conn->verify.sha256_cert == NULL ||
+                       fast_crypto_hash_finish(conn->verify.sha256_cert, hpos, &hlen) <
+                       0) {
                        conn->verify.sha256_cert = NULL;
                        tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                                          TLS_ALERT_INTERNAL_ERROR);
-                       wpa_printf(MSG_ERROR, "In function %s, fail to register crypto_hash_finish function!\r\n", __FUNCTION__);
+                                                               TLS_ALERT_INTERNAL_ERROR);
                        return -1;
                }
                conn->verify.sha256_cert = NULL;
@@ -1140,20 +1124,12 @@ static int tls_process_client_finished(struct tlsv1_server *conn, u8 ct,
 #ifdef CONFIG_TLSV12
        if (conn->rl.tls_version >= TLS_VERSION_1_2) {
                hlen = SHA256_MAC_LEN;
-               if (wpa2_crypto_funcs.crypto_hash_finish) {
-                       if (conn->verify.sha256_client == NULL ||
-                               crypto_hash_finish(conn->verify.sha256_client, hash, &hlen)
-                               < 0) {
-                               tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                                                  TLS_ALERT_INTERNAL_ERROR);
-                               conn->verify.sha256_client = NULL;
-                               return -1;
-               }
-               } else {
+               if (conn->verify.sha256_client == NULL ||
+                       crypto_hash_finish(conn->verify.sha256_client, hash, &hlen)
+                       < 0) {
                        tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                                          TLS_ALERT_INTERNAL_ERROR);
+                                                               TLS_ALERT_INTERNAL_ERROR);
                        conn->verify.sha256_client = NULL;
-                       wpa_printf(MSG_ERROR, "In function %s, fail to register crypto_hash_finish function!\r\n", __FUNCTION__);
                        return -1;
                }
                conn->verify.sha256_client = NULL;
similarity index 93%
rename from components/wpa_supplicant/src/wpa2/tls/tlsv1_server_write.c
rename to components/wpa_supplicant/src/tls/tlsv1_server_write.c
index 55eff1af6fcc6f31f6bd41814966e9f37a124e7c..39413e8347135cd91700f42acf3e22c3f447cca8 100644 (file)
@@ -6,21 +6,21 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/md5.h"
 #include "crypto/sha1.h"
 #include "crypto/sha256.h"
 #include "crypto/random.h"
-#include "wpa2/tls/tls.h"
-#include "wpa2/tls/x509v3.h"
-#include "wpa2/tls/tlsv1_common.h"
-#include "wpa2/tls/tlsv1_record.h"
-#include "wpa2/tls/tlsv1_server.h"
-#include "wpa2/tls/tlsv1_server_i.h"
+#include "tls/tls.h"
+#include "tls/x509v3.h"
+#include "tls/tlsv1_common.h"
+#include "tls/tlsv1_record.h"
+#include "tls/tlsv1_server.h"
+#include "tls/tlsv1_server_i.h"
 
-#include "wpa2/eap_peer/eap_i.h"
+#include "eap_peer/eap_i.h"
 
 static size_t tls_server_cert_chain_der_len(struct tlsv1_server *conn)
 {
@@ -321,21 +321,13 @@ static int tls_write_server_key_exchange(struct tlsv1_server *conn,
                                   TLS_ALERT_INTERNAL_ERROR);
                return -1;
        }
-       if(wpa2_crypto_funcs.crypto_mod_exp) {
-               if (wpa2_crypto_funcs.crypto_mod_exp(conn->cred->dh_g, conn->cred->dh_g_len,
-                                                    conn->dh_secret, conn->dh_secret_len,
-                                                    conn->cred->dh_p, conn->cred->dh_p_len,
-                                                    dh_ys, &dh_ys_len)) {
-                       tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                          TLS_ALERT_INTERNAL_ERROR);
-                       os_free(dh_ys);
-                       return -1;
-               }
-       } else {
+       if (crypto_mod_exp(conn->cred->dh_g, conn->cred->dh_g_len,
+                                               conn->dh_secret, conn->dh_secret_len,
+                                               conn->cred->dh_p, conn->cred->dh_p_len,
+                                               dh_ys, &dh_ys_len)) {
                tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                  TLS_ALERT_INTERNAL_ERROR);
+                                       TLS_ALERT_INTERNAL_ERROR);
                os_free(dh_ys);
-               wpa_printf(MSG_ERROR, "Fail to register crypto_mod_exp function!\r\n");
                return -1;
        }
 
@@ -595,20 +587,12 @@ static int tls_write_server_finished(struct tlsv1_server *conn,
 #ifdef CONFIG_TLSV12
        if (conn->rl.tls_version >= TLS_VERSION_1_2) {
                hlen = SHA256_MAC_LEN;
-               if (wpa2_crypto_funcs.crypto_hash_finish) {
-                       if (conn->verify.sha256_server == NULL ||
-                               wpa2_crypto_funcs.crypto_hash_finish(conn->verify.sha256_server, hash, &hlen)
-                               < 0) {
-                               conn->verify.sha256_server = NULL;
-                               tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                                  TLS_ALERT_INTERNAL_ERROR);
-                               return -1;
-                       }
-               } else {
+               if (conn->verify.sha256_server == NULL ||
+                       fast_crypto_hash_finish(conn->verify.sha256_server, hash, &hlen)
+                       < 0) {
                        conn->verify.sha256_server = NULL;
                        tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL,
-                                          TLS_ALERT_INTERNAL_ERROR);
-                       wpa_printf(MSG_ERROR, "In function %s, fail to register crypto_hash_finish function!\r\n", __FUNCTION__);
+                                               TLS_ALERT_INTERNAL_ERROR);
                        return -1;
                }
                conn->verify.sha256_server = NULL;
similarity index 94%
rename from components/wpa_supplicant/src/wpa2/tls/x509v3.c
rename to components/wpa_supplicant/src/tls/x509v3.c
index ba331cdecbc489ca0c5c15897962553eef88ff94..d4f4652ff0dc3ab70bb44b29c6b773a3f8dad78c 100644 (file)
@@ -6,14 +6,14 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
-#include "wpa/wpa.h"
-#include "wpa/common.h"
+#include "utils/includes.h"
+#include "rsn_supp/wpa.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
-#include "wpa2/tls/asn1.h"
-#include "wpa2/tls/x509v3.h"
+#include "tls/asn1.h"
+#include "tls/x509v3.h"
 
-#include "wpa2/eap_peer/eap_i.h"
+#include "eap_peer/eap_i.h"
 
 static void x509_free_name(struct x509_name *name)
 {
@@ -574,110 +574,6 @@ done:
 static int x509_parse_time(const u8 *buf, size_t len, u8 asn1_tag,
                           os_time_t *val)
 {
-#if 0
-       const char *pos;
-       int year, month, day, hour, min, sec;
-
-       /*
-        * Time ::= CHOICE {
-        *     utcTime        UTCTime,
-        *     generalTime    GeneralizedTime
-        * }
-        *
-        * UTCTime: YYMMDDHHMMSSZ
-        * GeneralizedTime: YYYYMMDDHHMMSSZ
-        */
-
-       pos = (const char *) buf;
-
-       switch (asn1_tag) {
-       case ASN1_TAG_UTCTIME:
-               if (len != 13 || buf[12] != 'Z') {
-                       wpa_hexdump_ascii(MSG_DEBUG, "X509: Unrecognized "
-                                         "UTCTime format", buf, len);
-                       return -1;
-               }
-               if (sscanf(pos, "%02d", &year) != 1) {
-                       wpa_hexdump_ascii(MSG_DEBUG, "X509: Failed to parse "
-                                         "UTCTime year", buf, len);
-                       return -1;
-               }
-               if (year < 50)
-                       year += 2000;
-               else
-                       year += 1900;
-               pos += 2;
-               break;
-       case ASN1_TAG_GENERALIZEDTIME:
-               if (len != 15 || buf[14] != 'Z') {
-                       wpa_hexdump_ascii(MSG_DEBUG, "X509: Unrecognized "
-                                         "GeneralizedTime format", buf, len);
-                       return -1;
-               }
-               if (sscanf(pos, "%04d", &year) != 1) {
-                       wpa_hexdump_ascii(MSG_DEBUG, "X509: Failed to parse "
-                                         "GeneralizedTime year", buf, len);
-                       return -1;
-               }
-               pos += 4;
-               break;
-       default:
-               wpa_printf(MSG_DEBUG, "X509: Expected UTCTime or "
-                          "GeneralizedTime - found tag 0x%x", asn1_tag);
-               return -1;
-       }
-
-       if (sscanf(pos, "%02d", &month) != 1) {
-               wpa_hexdump_ascii(MSG_DEBUG, "X509: Failed to parse Time "
-                                 "(month)", buf, len);
-               return -1;
-       }
-       pos += 2;
-
-       if (sscanf(pos, "%02d", &day) != 1) {
-               wpa_hexdump_ascii(MSG_DEBUG, "X509: Failed to parse Time "
-                                 "(day)", buf, len);
-               return -1;
-       }
-       pos += 2;
-
-       if (sscanf(pos, "%02d", &hour) != 1) {
-               wpa_hexdump_ascii(MSG_DEBUG, "X509: Failed to parse Time "
-                                 "(hour)", buf, len);
-               return -1;
-       }
-       pos += 2;
-
-       if (sscanf(pos, "%02d", &min) != 1) {
-               wpa_hexdump_ascii(MSG_DEBUG, "X509: Failed to parse Time "
-                                 "(min)", buf, len);
-               return -1;
-       }
-       pos += 2;
-
-       if (sscanf(pos, "%02d", &sec) != 1) {
-               wpa_hexdump_ascii(MSG_DEBUG, "X509: Failed to parse Time "
-                                 "(sec)", buf, len);
-               return -1;
-       }
-
-       if (os_mktime(year, month, day, hour, min, sec, val) < 0) {
-               wpa_hexdump_ascii(MSG_DEBUG, "X509: Failed to convert Time",
-                                 buf, len);
-               if (year < 1970) {
-                       /*
-                        * At least some test certificates have been configured
-                        * to use dates prior to 1970. Set the date to
-                        * beginning of 1970 to handle these case.
-                        */
-                       wpa_printf(MSG_DEBUG, "X509: Year=%d before epoch - "
-                                  "assume epoch as the time", year);
-                       *val = 0;
-                       return 0;
-               }
-               return -1;
-       }
-#endif
        return 0;
 }
 
@@ -1792,13 +1688,8 @@ skip_digest_oid:
                            hash, hash_len);
                break;
        case 11: /* sha256WithRSAEncryption */
-               if (wpa2_crypto_funcs.sha256_vector) {
-                       wpa2_crypto_funcs.sha256_vector(1, &cert->tbs_cert_start, (int *)&cert->tbs_cert_len,
-                                                       hash);
-               } else {
-                       wpa_printf(MSG_ERROR, "Fail to register sha256 vector function!\r\n");
-                       return -1;
-               }
+               fast_sha256_vector(1, &cert->tbs_cert_start, &cert->tbs_cert_len,
+                                                   hash);
                hash_len = 32;
                wpa_hexdump(MSG_MSGDUMP, "X509: Certificate hash (SHA256)",
                            hash, hash_len);
similarity index 98%
rename from components/wpa_supplicant/src/wpa2/utils/base64.c
rename to components/wpa_supplicant/src/utils/base64.c
index 0340c390e7b451b6ff5be57de1dc0b170ebbd793..bf17e6f7d4b04adcffa0dc0d747386109fd5558c 100644 (file)
@@ -6,10 +6,10 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
 #include "os.h"
-#include "wpa2/utils/base64.h"
+#include "base64.h"
 
 static const unsigned char base64_table[65] =
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
diff --git a/components/wpa_supplicant/src/utils/common.c b/components/wpa_supplicant/src/utils/common.c
new file mode 100644 (file)
index 0000000..7e5ef1b
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+ * wpa_supplicant/hostapd / common helper functions, etc.
+ * Copyright (c) 2002-2007, Jouni Malinen <j@w1.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+
+#include "utils/includes.h"
+
+#include "utils/common.h"
+
+/**
+ * inc_byte_array - Increment arbitrary length byte array by one
+ * @counter: Pointer to byte array
+ * @len: Length of the counter in bytes
+ *
+ * This function increments the last byte of the counter by one and continues
+ * rolling over to more significant bytes if the byte was incremented from
+ * 0xff to 0x00.
+ */
+void inc_byte_array(u8 *counter, size_t len)
+{
+       int pos = len - 1;
+       while (pos >= 0) {
+               counter[pos]++;
+               if (counter[pos] != 0)
+                       break;
+               pos--;
+       }
+}
+
+static int hex2num(char c)
+{
+       if (c >= '0' && c <= '9')
+               return c - '0';
+       if (c >= 'a' && c <= 'f')
+               return c - 'a' + 10;
+       if (c >= 'A' && c <= 'F')
+               return c - 'A' + 10;
+       return -1;
+}
+
+
+int hex2byte(const char *hex)
+{
+       int a, b;
+       a = hex2num(*hex++);
+       if (a < 0)
+               return -1;
+       b = hex2num(*hex++);
+       if (b < 0)
+               return -1;
+       return (a << 4) | b;
+}
+
+
+/**
+ * hexstr2bin - Convert ASCII hex string into binary data
+ * @hex: ASCII hex string (e.g., "01ab")
+ * @buf: Buffer for the binary data
+ * @len: Length of the text to convert in bytes (of buf); hex will be double
+ * this size
+ * Returns: 0 on success, -1 on failure (invalid hex string)
+ */
+int hexstr2bin(const char *hex, u8 *buf, size_t len)
+{
+       size_t i;
+       int a;
+       const char *ipos = hex;
+       u8 *opos = buf;
+
+       for (i = 0; i < len; i++) {
+               a = hex2byte(ipos);
+               if (a < 0)
+                       return -1;
+               *opos++ = a;
+               ipos += 2;
+       }
+       return 0;
+}
+
+void wpa_get_ntp_timestamp(u8 *buf)
+{
+       struct os_time now;
+       u32 sec, usec;
+       be32 tmp;
+
+       /* 64-bit NTP timestamp (time from 1900-01-01 00:00:00) */
+       os_get_time(&now);
+       sec = now.sec + 2208988800U; /* Epoch to 1900 */
+       /* Estimate 2^32/10^6 = 4295 - 1/32 - 1/512 */
+       usec = now.usec;
+       usec = 4295 * usec - (usec >> 5) - (usec >> 9);
+       tmp = host_to_be32(sec);
+       memcpy(buf, (u8 *) &tmp, 4);
+       tmp = host_to_be32(usec);
+       memcpy(buf + 4, (u8 *) &tmp, 4);
+}
+
+char * wpa_config_parse_string(const char *value, size_t *len)
+{
+       if (*value == '"' && (strlen(value) == 7 || strlen(value) == 15)) {
+               const char *pos;
+               char *str;
+               value++;
+               pos = (char *)strrchr(value, '"');
+               if (pos == NULL)
+                       return NULL;
+               *len = pos - value;
+               str = (char *)os_malloc(*len + 1);
+               if (str == NULL)
+                       return NULL;
+               memcpy(str, value, *len);
+               str[*len] = '\0';
+               return str;
+       } else {
+               u8 *str;
+               size_t tlen, hlen = strlen(value);
+               if (hlen == 5 || hlen == 13) {
+                       *len = hlen;
+                       str = (u8 *)os_malloc(*len + 1);
+                       if (str == NULL) {
+                               return NULL;
+                       }
+                       memcpy(str, value, *len);
+                       str[*len] = '\0';
+               } else if (hlen == 10 || hlen == 26) {
+                       tlen = hlen / 2;
+                       str = (u8 *)os_malloc(tlen + 1);
+                       if (str == NULL)
+                               return NULL;
+                       if (hexstr2bin(value, str, tlen)) {
+                               os_free(str);
+                               return NULL;
+                       }
+                       str[tlen] = '\0';
+                       *len = tlen;
+               } else {
+                       return NULL;
+               }
+               return (char *) str;
+       }
+}
+
+char * dup_binstr(const void *src, size_t len)
+{
+        char *res;
+
+        if (src == NULL)
+                return NULL;
+        res = os_malloc(len + 1);
+        if (res == NULL)
+                return NULL;
+        memcpy(res, src, len);
+        res[len] = '\0';
+
+        return res;
+}
+
similarity index 96%
rename from components/wpa_supplicant/src/wpa2/utils/ext_password.c
rename to components/wpa_supplicant/src/utils/ext_password.c
index 3989f949b1e267fdd2f1b156f441c284ef64a841..96e67058dbf848df2007f37e29914bfe633ff49c 100644 (file)
@@ -6,10 +6,10 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
-#include "wpa2/utils/ext_password_i.h"
+#include "utils/common.h"
+#include "ext_password_i.h"
 
 #ifdef CONFIG_EXT_PASSWORD_TEST
 extern struct ext_password_backend ext_password_test;
similarity index 91%
rename from components/wpa_supplicant/include/crypto/includes.h
rename to components/wpa_supplicant/src/utils/includes.h
index 26307898188a3b5e0c531b37aa20ca6d575663b7..b7a3ce9597386f208a9722fbd50bf24da04b9057 100644 (file)
@@ -19,8 +19,9 @@
 #ifndef INCLUDES_H
 #define INCLUDES_H
 
+#include "supplicant_opt.h"
+
 /* Include possible build time configuration before including anything else */
-//#include "build_config.h"  //don't need anymore
 #ifndef __ets__
 #include <stdlib.h>
 #include <stdio.h>
 
 #ifndef CONFIG_NATIVE_WINDOWS
 #ifndef CONFIG_TI_COMPILER
-//#include <sys/socket.h>
-//#include <netinet/in.h>
-//#include <arpa/inet.h>
 #ifndef __vxworks
 #ifndef __SYMBIAN32__
-//#include <sys/uio.h>
 #endif /* __SYMBIAN32__ */
 #include <sys/time.h>
 #endif /* __vxworks */
similarity index 96%
rename from components/wpa_supplicant/include/wpa/state_machine.h
rename to components/wpa_supplicant/src/utils/state_machine.h
index ce8c51e77007ee95ce42196d95f0b6f790cc48f1..c75d06dca6072391bb14ac4b9be2f53b354ce1fd 100644 (file)
@@ -30,7 +30,7 @@
  * entered by calling SM_ENTER or SM_ENTER_GLOBAL.
  */
 #define SM_STATE(machine, state) \
-static void ICACHE_FLASH_ATTR sm_ ## machine ## _ ## state ## _Enter(STATE_MACHINE_DATA *sm, \
+static void sm_ ## machine ## _ ## state ## _Enter(STATE_MACHINE_DATA *sm, \
        int global)
 
 /**
@@ -124,7 +124,7 @@ sm_ ## machine ## _ ## state ## _Enter(sm, 1)
  * SM_ENTER and SM_ENTER_GLOBAL macros to enter new state.
  */
 #define SM_STEP(machine) \
-static void ICACHE_FLASH_ATTR sm_ ## machine ## _Step(STATE_MACHINE_DATA *sm)
+static void sm_ ## machine ## _Step(STATE_MACHINE_DATA *sm)
 
 /**
  * SM_STEP_RUN - Call the state machine step function
similarity index 93%
rename from components/wpa_supplicant/src/wps/uuid.c
rename to components/wpa_supplicant/src/utils/uuid.c
index 9f46824ee8e7342ffb645c2511b6cea237b071ff..71568aca5d6f708478a6b087da004aded56731a5 100644 (file)
@@ -6,10 +6,10 @@
  * See README for more details.
  */
 
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
-#include "wps/utils/uuid.h"
+#include "utils/common.h"
+#include "utils/uuid.h"
 
 int uuid_str2bin(const char *str, u8 *bin)
 {
@@ -68,4 +68,4 @@ int is_nil_uuid(const u8 *uuid)
                if (uuid[i])
                        return 0;
        return 1;
-}
\ No newline at end of file
+}
diff --git a/components/wpa_supplicant/src/utils/wpa_debug.c b/components/wpa_supplicant/src/utils/wpa_debug.c
new file mode 100644 (file)
index 0000000..aed2666
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * wpa_supplicant/hostapd / Debug prints
+ * Copyright (c) 2002-2007, Jouni Malinen <j@w1.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+#ifdef ESP_SUPPLICANT
+#include "utils/includes.h"
+#include "utils/common.h"
+#include "utils/wpa_debug.h"
+
+static inline int  _wpa_snprintf_hex(char *buf, size_t buf_size, const u8 *data, size_t len, int uppercase)
+{
+    size_t i;
+    char *pos = buf, *end = buf + buf_size;
+    int ret;
+
+    if (buf_size == 0)
+        return 0;
+
+    for (i = 0; i < len; i++) {
+        ret = snprintf(pos, end - pos, uppercase? "%02X":"%02x", data[i]);
+        if (ret < 0 || ret >= end - pos) {
+            end[-1] = '\0';
+            return pos - buf;
+        }
+        pos += ret;
+    }
+    end[-1]='\0';
+    return pos - buf;
+}
+
+int  wpa_snprintf_hex_uppercase(char *buf, size_t buf_size, const u8 *data, size_t len)
+{
+       return _wpa_snprintf_hex(buf, buf_size, data, len, 1);
+}
+
+int  wpa_snprintf_hex(char *buf, size_t buf_size, const u8 *data, size_t len)
+{
+       return _wpa_snprintf_hex(buf, buf_size, data, len, 0);
+}
+
+#ifdef DEBUG_PRINT
+void  wpa_dump_mem(char* desc, uint8_t *addr, uint16_t len)
+{
+    wpa_printf(MSG_DEBUG, "%s\n", desc);
+    if (addr){
+        uint16_t i=0;
+        for (i=0; i<len; i++){
+            if (i%16==0) wpa_printf(MSG_DEBUG, "\n");
+            wpa_printf(MSG_DEBUG, "%02x ", addr[i]);
+        }
+        wpa_printf(MSG_DEBUG, "\n");
+    }
+}
+
+void  wpa_debug_print_timestamp(void)
+{
+#ifdef DEBUG_PRINT
+    struct os_time tv;
+    os_get_time(&tv);
+    wpa_printf(MSG_DEBUG, "%ld.%06u: ", (long) tv.sec, (unsigned int) tv.usec);
+#endif 
+}
+
+void  wpa_hexdump(int level, const char *title, const u8 *buf, size_t len)
+{
+#ifdef DEBUG_PRINT 
+       size_t i;
+
+       if (level < MSG_MSGDUMP)
+               return;
+
+       wpa_printf(MSG_DEBUG, "%s - hexdump(len=%lu):\n", title, (unsigned long) len);
+       if (buf == NULL) {
+               wpa_printf(MSG_DEBUG, " [NULL]\n");
+       } else {
+               for (i = 0; i < len; i++) {
+                       wpa_printf(MSG_DEBUG, " %02x", buf[i]);
+            if((i+1) % 16 == 0)
+                wpa_printf(MSG_DEBUG, "\n");
+        }
+       } 
+       wpa_printf(MSG_DEBUG, "\n");
+#endif 
+}
+
+void  wpa_hexdump_key(int level, const char *title, const u8 *buf, size_t len)
+{
+     wpa_hexdump(level, title, buf, len);
+}
+#endif
+
+int  eloop_cancel_timeout(eloop_timeout_handler handler,
+                        void *eloop_data, void *user_data)
+{
+    return 0;  
+}
+
+int  eloop_register_timeout(unsigned int secs, unsigned int usecs,
+                          eloop_timeout_handler handler,
+                          void *eloop_data, void *user_data)
+{
+    return 0;
+}
+#endif // ESP_SUPPLICANT
+
diff --git a/components/wpa_supplicant/src/utils/wpabuf.c b/components/wpa_supplicant/src/utils/wpabuf.c
new file mode 100644 (file)
index 0000000..d3ede56
--- /dev/null
@@ -0,0 +1,300 @@
+/*
+ * Dynamic data buffer
+ * Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+
+#include "utils/includes.h"
+
+#include "utils/common.h"
+#include "utils/wpabuf.h"
+#include "stdio.h"
+#include "stdarg.h"
+
+#ifdef WPA_TRACE
+#define WPABUF_MAGIC 0x51a974e3
+
+struct wpabuf_trace {
+       unsigned int magic;
+};
+
+static struct wpabuf_trace * wpabuf_get_trace(const struct wpabuf *buf)
+{
+       return (struct wpabuf_trace *)
+               ((const u8 *) buf - sizeof(struct wpabuf_trace));
+}
+#endif /* WPA_TRACE */
+
+
+static void wpabuf_overflow(const struct wpabuf *buf, size_t len)
+{
+#ifdef WPA_TRACE
+       struct wpabuf_trace *trace = wpabuf_get_trace(buf);
+       if (trace->magic != WPABUF_MAGIC) {
+               wpa_printf( MSG_ERROR,  "wpabuf: invalid magic %x",
+                          trace->magic);
+       }
+#endif /* WPA_TRACE */
+       wpa_printf( MSG_ERROR, "wpabuf %p (size=%lu used=%lu) overflow len=%lu",
+                  buf, (unsigned long) buf->size, (unsigned long) buf->used,
+                  (unsigned long) len);
+}
+
+
+int wpabuf_resize(struct wpabuf **_buf, size_t add_len)
+{
+       struct wpabuf *buf = *_buf;
+#ifdef WPA_TRACE
+       struct wpabuf_trace *trace;
+#endif /* WPA_TRACE */
+
+       if (buf == NULL) {
+               *_buf = wpabuf_alloc(add_len);
+               return *_buf == NULL ? -1 : 0;
+       }
+
+#ifdef WPA_TRACE
+       trace = wpabuf_get_trace(buf);
+       if (trace->magic != WPABUF_MAGIC) {
+               wpa_printf( MSG_ERROR,  "wpabuf: invalid magic %x",
+                          trace->magic);
+               abort();
+       }
+#endif /* WPA_TRACE */
+
+       if (buf->used + add_len > buf->size) {
+               unsigned char *nbuf;
+               if (buf->ext_data) {
+                       nbuf = (unsigned char*)os_realloc(buf->ext_data, buf->used + add_len);
+                       if (nbuf == NULL)
+                               return -1;
+                       memset(nbuf + buf->used, 0, add_len);
+                       buf->ext_data = nbuf;
+               } else {
+#ifdef WPA_TRACE
+                       nbuf = os_realloc(trace, sizeof(struct wpabuf_trace) +
+                                         sizeof(struct wpabuf) +
+                                         buf->used + add_len);
+                       if (nbuf == NULL)
+                               return -1;
+                       trace = (struct wpabuf_trace *) nbuf;
+                       buf = (struct wpabuf *) (trace + 1);
+                       memset(nbuf + sizeof(struct wpabuf_trace) +
+                                 sizeof(struct wpabuf) + buf->used, 0,
+                                 add_len);
+#else /* WPA_TRACE */
+                       nbuf = (unsigned char*)os_realloc(buf, sizeof(struct wpabuf) +
+                                         buf->used + add_len);
+                       if (nbuf == NULL)
+                               return -1;
+                       buf = (struct wpabuf *) nbuf;
+                       memset(nbuf + sizeof(struct wpabuf) + buf->used, 0,
+                                 add_len);
+#endif /* WPA_TRACE */
+                       *_buf = buf;
+               }
+               buf->size = buf->used + add_len;
+       }
+
+       return 0;
+}
+
+
+/**
+ * wpabuf_alloc - Allocate a wpabuf of the given size
+ * @len: Length for the allocated buffer
+ * Returns: Buffer to the allocated wpabuf or %NULL on failure
+ */
+struct wpabuf * wpabuf_alloc(size_t len)
+{
+#ifdef WPA_TRACE
+       struct wpabuf_trace *trace = os_zalloc(sizeof(struct wpabuf_trace) +
+                                              sizeof(struct wpabuf) + len);
+       struct wpabuf *buf;
+       if (trace == NULL)
+               return NULL;
+       trace->magic = WPABUF_MAGIC;
+       buf = (struct wpabuf *) (trace + 1);
+#else /* WPA_TRACE */
+       struct wpabuf *buf = (struct wpabuf *)os_zalloc(sizeof(struct wpabuf) + len);
+       if (buf == NULL)
+               return NULL;
+#endif /* WPA_TRACE */
+
+       buf->size = len;
+       return buf;
+}
+
+
+struct wpabuf * wpabuf_alloc_ext_data(u8 *data, size_t len)
+{
+#ifdef WPA_TRACE
+       struct wpabuf_trace *trace = os_zalloc(sizeof(struct wpabuf_trace) +
+                                              sizeof(struct wpabuf));
+       struct wpabuf *buf;
+       if (trace == NULL)
+               return NULL;
+       trace->magic = WPABUF_MAGIC;
+       buf = (struct wpabuf *) (trace + 1);
+#else /* WPA_TRACE */
+       struct wpabuf *buf = (struct wpabuf *)os_zalloc(sizeof(struct wpabuf));
+       if (buf == NULL)
+               return NULL;
+#endif /* WPA_TRACE */
+
+       buf->size = len;
+       buf->used = len;
+       buf->ext_data = data;
+
+       return buf;
+}
+
+
+struct wpabuf * wpabuf_alloc_copy(const void *data, size_t len)
+{
+       struct wpabuf *buf = wpabuf_alloc(len);
+       if (buf)
+               wpabuf_put_data(buf, data, len);
+       return buf;
+}
+
+
+struct wpabuf * wpabuf_dup(const struct wpabuf *src)
+{
+       struct wpabuf *buf = wpabuf_alloc(wpabuf_len(src));
+       if (buf)
+               wpabuf_put_data(buf, wpabuf_head(src), wpabuf_len(src));
+       return buf;
+}
+
+
+/**
+ * wpabuf_free - Free a wpabuf
+ * @buf: wpabuf buffer
+ */
+void wpabuf_free(struct wpabuf *buf)
+{
+#ifdef WPA_TRACE
+       struct wpabuf_trace *trace;
+       if (buf == NULL)
+               return;
+       trace = wpabuf_get_trace(buf);
+       if (trace->magic != WPABUF_MAGIC) {
+               wpa_printf( MSG_ERROR,  "wpabuf_free: invalid magic %x",
+                          trace->magic);
+               abort();
+       }
+       os_free(buf->ext_data);
+       os_free(trace);
+#else /* WPA_TRACE */
+       if (buf == NULL)
+               return;
+       os_free(buf->ext_data);
+       os_free(buf);
+#endif /* WPA_TRACE */
+}
+
+
+void * wpabuf_put(struct wpabuf *buf, size_t len)
+{
+       void *tmp = wpabuf_mhead_u8(buf) + wpabuf_len(buf);
+       buf->used += len;
+       if (buf->used > buf->size) {
+               wpabuf_overflow(buf, len);
+       }
+       return tmp;
+}
+
+
+/**
+ * wpabuf_concat - Concatenate two buffers into a newly allocated one
+ * @a: First buffer
+ * @b: Second buffer
+ * Returns: wpabuf with concatenated a + b data or %NULL on failure
+ *
+ * Both buffers a and b will be freed regardless of the return value. Input
+ * buffers can be %NULL which is interpreted as an empty buffer.
+ */
+struct wpabuf * wpabuf_concat(struct wpabuf *a, struct wpabuf *b)
+{
+       struct wpabuf *n = NULL;
+       size_t len = 0;
+
+       if (b == NULL)
+               return a;
+
+       if (a)
+               len += wpabuf_len(a);
+       if (b)
+               len += wpabuf_len(b);
+
+       n = wpabuf_alloc(len);
+       if (n) {
+               if (a)
+                       wpabuf_put_buf(n, a);
+               if (b)
+                       wpabuf_put_buf(n, b);
+       }
+
+       wpabuf_free(a);
+       wpabuf_free(b);
+
+       return n;
+}
+
+
+/**
+ * wpabuf_zeropad - Pad buffer with 0x00 octets (prefix) to specified length
+ * @buf: Buffer to be padded
+ * @len: Length for the padded buffer
+ * Returns: wpabuf padded to len octets or %NULL on failure
+ *
+ * If buf is longer than len octets or of same size, it will be returned as-is.
+ * Otherwise a new buffer is allocated and prefixed with 0x00 octets followed
+ * by the source data. The source buffer will be freed on error, i.e., caller
+ * will only be responsible on freeing the returned buffer. If buf is %NULL,
+ * %NULL will be returned.
+ */
+struct wpabuf * wpabuf_zeropad(struct wpabuf *buf, size_t len)
+{
+       struct wpabuf *ret;
+       size_t blen;
+
+       if (buf == NULL)
+               return NULL;
+
+       blen = wpabuf_len(buf);
+       if (blen >= len)
+               return buf;
+
+       ret = wpabuf_alloc(len);
+       if (ret) {
+               memset(wpabuf_put(ret, len - blen), 0, len - blen);
+               wpabuf_put_buf(ret, buf);
+       }
+       wpabuf_free(buf);
+
+       return ret;
+}
+
+void wpabuf_printf(struct wpabuf *buf, char *fmt, ...)
+{
+       va_list ap;
+       void *tmp = wpabuf_mhead_u8(buf) + wpabuf_len(buf);
+       int res;
+
+       va_start(ap, fmt);
+        res = vsnprintf(tmp, buf->size - buf->used, fmt, ap);
+       va_end(ap);
+       if (res < 0 || (size_t) res >= buf->size - buf->used)
+               wpabuf_overflow(buf, res);
+       buf->used += res;
+}
diff --git a/components/wpa_supplicant/src/wps/eap_common.c b/components/wpa_supplicant/src/wps/eap_common.c
deleted file mode 100644 (file)
index 640bd5a..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * EAP common peer/server definitions
- * Copyright (c) 2004-2012, Jouni Malinen <j@w1.fi>
- *
- * This software may be distributed under the terms of the BSD license.
- * See README for more details.
- */
-
-#include "wpa/includes.h"
-
-#include "wpa/common.h"
-#include "wpa2/eap_peer/eap_defs.h"
-#include "wpa2/eap_peer/eap_common.h"
-
-/**
- * eap_hdr_len_valid - Validate EAP header length field
- * @msg: EAP frame (starting with EAP header)
- * @min_payload: Minimum payload length needed
- * Returns: 1 for valid header, 0 for invalid
- *
- * This is a helper function that does minimal validation of EAP messages. The
- * length field is verified to be large enough to include the header and not
- * too large to go beyond the end of the buffer.
- */
-int eap_hdr_len_valid(const struct wpabuf *msg, size_t min_payload)
-{
-       const struct eap_hdr *hdr;
-       size_t len;
-
-       if (msg == NULL)
-               return 0;
-
-       hdr = wpabuf_head(msg);
-
-       if (wpabuf_len(msg) < sizeof(*hdr)) {
-               wpa_printf(MSG_INFO,  "EAP: Too short EAP frame");
-               return 0;
-       }
-
-       len = be_to_host16(hdr->length);
-       if (len < sizeof(*hdr) + min_payload || len > wpabuf_len(msg)) {
-               wpa_printf(MSG_INFO,  "EAP: Invalid EAP length");
-               return 0;
-       }
-
-       return 1;
-}
-
-
-/**
- * eap_hdr_validate - Validate EAP header
- * @vendor: Expected EAP Vendor-Id (0 = IETF)
- * @eap_type: Expected EAP type number
- * @msg: EAP frame (starting with EAP header)
- * @plen: Pointer to variable to contain the returned payload length
- * Returns: Pointer to EAP payload (after type field), or %NULL on failure
- *
- * This is a helper function for EAP method implementations. This is usually
- * called in the beginning of struct eap_method::process() function to verify
- * that the received EAP request packet has a valid header. This function is
- * able to process both legacy and expanded EAP headers and in most cases, the
- * caller can just use the returned payload pointer (into *plen) for processing
- * the payload regardless of whether the packet used the expanded EAP header or
- * not.
- */
-const u8 * eap_hdr_validate(int vendor, EapType eap_type,
-                           const struct wpabuf *msg, size_t *plen)
-{
-       const struct eap_hdr *hdr;
-       const u8 *pos;
-       size_t len;
-
-       if (!eap_hdr_len_valid(msg, 1))
-               return NULL;
-
-       hdr = wpabuf_head(msg);
-       len = be_to_host16(hdr->length);
-       pos = (const u8 *) (hdr + 1);
-
-       if (*pos == EAP_TYPE_EXPANDED) {
-               int exp_vendor;
-               u32 exp_type;
-               if (len < sizeof(*hdr) + 8) {
-                       wpa_printf(MSG_INFO,  "EAP: Invalid expanded EAP "
-                                  "length");
-                       return NULL;
-               }
-               pos++;
-               exp_vendor = WPA_GET_BE24(pos);
-               pos += 3;
-               exp_type = WPA_GET_BE32(pos);
-               pos += 4;
-               if (exp_vendor != vendor || exp_type != (u32) eap_type) {
-                       wpa_printf(MSG_INFO,  "EAP: Invalid expanded frame "
-                                  "type");
-                       return NULL;
-               }
-
-               *plen = len - sizeof(*hdr) - 8;
-               return pos;
-       } else {
-               if (vendor != EAP_VENDOR_IETF || *pos != eap_type) {
-                       wpa_printf(MSG_INFO,  "EAP: Invalid frame type");
-                       return NULL;
-               }
-               *plen = len - sizeof(*hdr) - 1;
-               return pos + 1;
-       }
-}
-
-
-/**
- * eap_msg_alloc - Allocate a buffer for an EAP message
- * @vendor: Vendor-Id (0 = IETF)
- * @type: EAP type
- * @payload_len: Payload length in bytes (data after Type)
- * @code: Message Code (EAP_CODE_*)
- * @identifier: Identifier
- * Returns: Pointer to the allocated message buffer or %NULL on error
- *
- * This function can be used to allocate a buffer for an EAP message and fill
- * in the EAP header. This function is automatically using expanded EAP header
- * if the selected Vendor-Id is not IETF. In other words, most EAP methods do
- * not need to separately select which header type to use when using this
- * function to allocate the message buffers. The returned buffer has room for
- * payload_len bytes and has the EAP header and Type field already filled in.
- */
-struct wpabuf * eap_msg_alloc(int vendor, EapType type, size_t payload_len,
-                             u8 code, u8 identifier)
-{
-       struct wpabuf *buf;
-       struct eap_hdr *hdr;
-       size_t len;
-
-       len = sizeof(struct eap_hdr) + (vendor == EAP_VENDOR_IETF ? 1 : 8) +
-               payload_len;
-       buf = wpabuf_alloc(len);
-       if (buf == NULL)
-               return NULL;
-
-       hdr = wpabuf_put(buf, sizeof(*hdr));
-       hdr->code = code;
-       hdr->identifier = identifier;
-       hdr->length = host_to_be16(len);
-
-       if (vendor == EAP_VENDOR_IETF) {
-               wpabuf_put_u8(buf, type);
-       } else {
-               wpabuf_put_u8(buf, EAP_TYPE_EXPANDED);
-               wpabuf_put_be24(buf, vendor);
-               wpabuf_put_be32(buf, type);
-       }
-
-       return buf;
-}
-
-
-/**
- * eap_update_len - Update EAP header length
- * @msg: EAP message from eap_msg_alloc
- *
- * This function updates the length field in the EAP header to match with the
- * current length for the buffer. This allows eap_msg_alloc() to be used to
- * allocate a larger buffer than the exact message length (e.g., if exact
- * message length is not yet known).
- */
-void eap_update_len(struct wpabuf *msg)
-{
-       struct eap_hdr *hdr;
-       hdr = wpabuf_mhead(msg);
-       if (wpabuf_len(msg) < sizeof(*hdr))
-               return;
-       hdr->length = host_to_be16(wpabuf_len(msg));
-}
-
-
-/**
- * eap_get_id - Get EAP Identifier from wpabuf
- * @msg: Buffer starting with an EAP header
- * Returns: The Identifier field from the EAP header
- */
-u8 eap_get_id(const struct wpabuf *msg)
-{
-       const struct eap_hdr *eap;
-
-       if (wpabuf_len(msg) < sizeof(*eap))
-               return 0;
-
-       eap = wpabuf_head(msg);
-       return eap->identifier;
-}
-
-
-/**
- * eap_get_id - Get EAP Type from wpabuf
- * @msg: Buffer starting with an EAP header
- * Returns: The EAP Type after the EAP header
- */
-EapType eap_get_type(const struct wpabuf *msg)
-{
-       if (wpabuf_len(msg) < sizeof(struct eap_hdr) + 1)
-               return EAP_TYPE_NONE;
-
-       return ((const u8 *) wpabuf_head(msg))[sizeof(struct eap_hdr)];
-}
\ No newline at end of file
index 2ed83bbf6f7a8f86963accce5f37eb88c2fab6b1..1700f0f4b1f7dee3511bc26b2410d3597afc362a 100644 (file)
@@ -7,20 +7,20 @@
  */
 #include <string.h>
 
-#include "wpa/includes.h"
-#include "wpa/wpa.h"
-#include "wpa/common.h"
-#include "wpa/eapol_common.h"
-#include "wpa/wpa_debug.h"
-#include "wpa/ieee802_11_defs.h"
+#include "utils/includes.h"
+#include "rsn_supp/wpa.h"
+#include "utils/common.h"
+#include "common/eapol_common.h"
+#include "utils/wpa_debug.h"
+#include "common/ieee802_11_defs.h"
 
 #include "crypto/dh_group5.h"
 
 #include "wps/wps_i.h"
 #include "wps/wps_dev_attr.h"
 
-#include "wpa2/eap_peer/eap_defs.h"
-#include "wpa2/eap_peer/eap_common.h"
+#include "eap_peer/eap_defs.h"
+#include "eap_peer/eap_common.h"
 
 
 /**
@@ -109,16 +109,7 @@ int wps_is_selected_pbc_registrar(const struct wpabuf *msg, u8 *bssid)
         os_free(attr);
         return 0;
     }
-#if 0
-#ifdef CONFIG_WPS_STRICT
-    if (!attr->sel_reg_config_methods ||
-        !(WPA_GET_BE16(attr->sel_reg_config_methods) &
-          WPS_CONFIG_PUSHBUTTON)) {
-        os_free(attr);
-        return 0;
-        }
-#endif /* CONFIG_WPS_STRICT */
-#endif
+
     os_free(attr);
     return 1;
 }
@@ -160,9 +151,7 @@ static int is_selected_pin_registrar(struct wps_parse_attr *attr, u8 *bssid)
         return 0;
     }
 #ifdef CONFIG_WPS_STRICT
-    if (!attr->sel_reg_config_methods)// ||
-        //!(WPA_GET_BE16(attr->sel_reg_config_methods) &
-          //(WPS_CONFIG_LABEL | WPS_CONFIG_DISPLAY | WPS_CONFIG_KEYPAD)))
+    if (!attr->sel_reg_config_methods)
         return 0;
 #endif /* CONFIG_WPS_STRICT */
     return 1;
similarity index 98%
rename from components/wpa_supplicant/include/wps/wps.h
rename to components/wpa_supplicant/src/wps/wps.h
index 7249d6eee8d0fc55d0a3cc3bc50f8ee38e43b39c..ab2eb00bda5e8756f55caeb83c10314b00a6564d 100644 (file)
@@ -27,7 +27,6 @@ enum wsc_op_code {
 };
 
 struct wps_registrar;
-//struct upnp_wps_device_sm;
 struct wps_er;
 struct wps_parse_attr;
 
@@ -192,10 +191,8 @@ struct discard_ap_list_t{
        u8 bssid[6];
 };
 
-//struct wps_data * wps_init(const struct wps_config *cfg);
 struct wps_data * wps_init(void);
 
-//void wps_deinit(struct wps_data *data);
 void wps_deinit(void);
 
 /**
@@ -747,10 +744,7 @@ struct wps_context {
         */
        void *cb_ctx;
 
-       //struct upnp_wps_device_sm *wps_upnp;
-
        /* Pending messages from UPnP PutWLANResponse */
-       //struct upnp_pending_message *upnp_msgs;
 #ifdef CONFIG_WPS_NFC
 
        u16 ap_nfc_dev_pw_id;
@@ -798,11 +792,11 @@ int wps_registrar_add_nfc_password_token(struct wps_registrar *reg,
 int wps_build_credential_wrap(struct wpabuf *msg,
                              const struct wps_credential *cred);
 #ifdef CONFIG_WPS_PIN
-
 unsigned int wps_pin_checksum(unsigned int pin);
 unsigned int wps_pin_valid(unsigned int pin);
 int wps_pin_str_valid(const char *pin);
 #endif
+
 unsigned int wps_generate_pin(void);
 
 #ifdef CONFIG_WPS_OOB
@@ -1009,9 +1003,18 @@ enum wps_cb_status {
 typedef void (*wps_st_cb_t)(int status);
 
 #ifdef USE_WPS_TASK
-#define SIG_WPS_START  2
-#define        SIG_WPS_RX      3
-#define        SIG_WPS_NUM     9
+enum wps_sig_type {
+    SIG_WPS_ENABLE = 1,         //1
+    SIG_WPS_DISABLE,            //2
+    SIG_WPS_START,              //3
+    SIG_WPS_RX,                 //4
+    SIG_WPS_TIMER_TIMEOUT,      //5
+    SIG_WPS_TIMER_MSG_TIMEOUT,  //6
+    SIG_WPS_TIMER_SUCCESS_CB,   //7
+    SIG_WPS_TIMER_SCAN,         //8
+    SIG_WPS_TIMER_EAPOL_START,  //9
+    SIG_WPS_NUM,                //10
+};
 #endif
 
 #define WPS_EAP_EXT_VENDOR_TYPE "WFA-SimpleConfig-Enrollee-1-0"
@@ -1051,7 +1054,7 @@ struct wps_sm {
     wifi_sta_config_t config;
 };
 
-#define    IEEE80211_CAPINFO_PRIVACY        0x0010
+#define    WIFI_CAPINFO_PRIVACY        0x0010
 
 struct wps_sm *wps_sm_get(void);
 int wps_ssid_save(u8 *ssid, u8 ssid_len);
index 602d77fc50fd2edc94d6a5f52d942d4925b71349..d57096af11894c8b4380bf41e9ea3235c1d6d96a 100644 (file)
@@ -5,9 +5,9 @@
  * This software may be distributed under the terms of the BSD license.
  * See README for more details.
  */
-#include "wpa/includes.h"
-#include "wpa/common.h"
-#include "wpa/wpa_debug.h"
+#include "utils/includes.h"
+#include "utils/common.h"
+#include "utils/wpa_debug.h"
 
 #include "crypto/aes_wrap.h"
 #include "crypto/crypto.h"
@@ -15,7 +15,7 @@
 #include "crypto/sha256.h"
 #include "crypto/random.h"
 
-#include "wpa/ieee802_11_defs.h"
+#include "common/ieee802_11_defs.h"
 #include "wps/wps_i.h"
 
 int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg, wps_key_mode_t mode)
@@ -166,12 +166,7 @@ int wps_build_authenticator(struct wps_data *wps, struct wpabuf *msg)
        len[0] = wpabuf_len(wps->last_msg);
        addr[1] = wpabuf_head(msg);
        len[1] = wpabuf_len(msg);
-       if (wps_crypto_funcs.hmac_sha256_vector) {
-               wps_crypto_funcs.hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 2, addr, (int *)len, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "Fail to register hmac sha256 vector!\r\n");
-               return -1;
-       }
+       fast_hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 2, addr, len, hash);
        wpa_printf(MSG_DEBUG,  "WPS:  * Authenticator");
        wpabuf_put_be16(msg, ATTR_AUTHENTICATOR);
        wpabuf_put_be16(msg, WPS_AUTHENTICATOR_LEN);
@@ -329,13 +324,8 @@ int wps_build_key_wrap_auth(struct wps_data *wps, struct wpabuf *msg)
        u8 hash[SHA256_MAC_LEN];
 
        wpa_printf(MSG_DEBUG,  "WPS:  * Key Wrap Authenticator");
-       if (wps_crypto_funcs.hmac_sha256) {
-               wps_crypto_funcs.hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN, wpabuf_head(msg),
-                                            wpabuf_len(msg), hash);
-       } else {
-               wpa_printf(MSG_ERROR, "Fail to register hmac sha256 function!\r\n");
-               return -1;
-       }
+       fast_hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN, wpabuf_head(msg),
+                           wpabuf_len(msg), hash);
        wpabuf_put_be16(msg, ATTR_KEY_WRAP_AUTH);
        wpabuf_put_be16(msg, WPS_KWA_LEN);
        wpabuf_put_data(msg, hash, WPS_KWA_LEN);
@@ -366,13 +356,8 @@ int wps_build_encr_settings(struct wps_data *wps, struct wpabuf *msg,
        data = wpabuf_put(msg, 0);
        wpabuf_put_buf(msg, plain);
        wpa_printf(MSG_DEBUG,  "WPS:  * AES 128 Encrypted Settings");
-       if (wps_crypto_funcs.aes_128_encrypt) {
-               if (wps_crypto_funcs.aes_128_encrypt(wps->keywrapkey, iv, data, wpabuf_len(plain)))
-                       return -1;
-       } else {
-               wpa_printf(MSG_ERROR, "Fail to register aes_128_encrypt function!\r\n");
+       if (fast_aes_128_cbc_encrypt(wps->keywrapkey, iv, data, wpabuf_len(plain)))
                return -1;
-       }
        return 0;
 }
 
@@ -388,12 +373,7 @@ int wps_build_oob_dev_pw(struct wpabuf *msg, u16 dev_pw_id,
 
        addr[0] = wpabuf_head(pubkey);
        hash_len = wpabuf_len(pubkey);
-       if (wps_crypto_funcs.sha256_vector) {
-               wps_crypto_funcs.sha256_vector(1, addr, &hash_len, pubkey_hash);
-       } else {
-               wpa_printf(MSG_ERROR, "Fail to register sha256 vector function!\r\n");
-               return -1;
-       }
+       fast_sha256_vector(1, addr, &hash_len, pubkey_hash);
        wpabuf_put_be16(msg, ATTR_OOB_DEVICE_PASSWORD);
        wpabuf_put_be16(msg, WPS_OOB_PUBKEY_HASH_LEN + 2 + dev_pw_len);
        wpabuf_put_data(msg, pubkey_hash, WPS_OOB_PUBKEY_HASH_LEN);
index a8cf76683d729023d937b82c50aab8705baf9062..dfe9b5359db64c83212b3a59d57514e0c450fd60 100644 (file)
@@ -5,9 +5,9 @@
  * This software may be distributed under the terms of the BSD license.
  * See README for more details.
  */
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "wps/wps_defs.h"
 #include "wps/wps_attr_parse.h"
 
index cd2c6d4b40cf423a4a87260bb93af608e804a27a..15df0360a5b243ee8e371bc753e0a7e70a5f90bc 100644 (file)
@@ -5,9 +5,9 @@
  * This software may be distributed under the terms of the BSD license.
  * See README for more details.
  */
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/sha256.h"
 #include "wps/wps_i.h"
 
@@ -38,12 +38,7 @@ int wps_process_authenticator(struct wps_data *wps, const u8 *authenticator,
        len[0] = wpabuf_len(wps->last_msg);
        addr[1] = wpabuf_head(msg);
        len[1] = wpabuf_len(msg) - 4 - WPS_AUTHENTICATOR_LEN;
-       if (wps_crypto_funcs.hmac_sha256_vector) {
-               wps_crypto_funcs.hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 2, addr, (int *)len, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "Fail to register hmac_sha256_vector function!\r\n");
-               return -1;
-       }
+       fast_hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 2, addr, len, hash);
        if (os_memcmp(hash, authenticator, WPS_AUTHENTICATOR_LEN) != 0) {
                wpa_printf(MSG_DEBUG,  "WPS: Incorrect Authenticator");
                return -1;
@@ -73,12 +68,7 @@ int wps_process_key_wrap_auth(struct wps_data *wps, struct wpabuf *msg,
                return -1;
        }
 
-       if (wps_crypto_funcs.hmac_sha256) {
-               wps_crypto_funcs.hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN, head, len, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "Fail to register hmac sha256 function!\r\n");
-               return -1;
-       }
+       fast_hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN, head, len, hash);
        if (os_memcmp(hash, key_wrap_auth, WPS_KWA_LEN) != 0) {
                wpa_printf(MSG_DEBUG,  "WPS: Invalid KWA");
                return -1;
index 8a462a498390812d081321e5cd62b94d7f0bc262..8eaf3e9c12f62149b6c1a063b37fec3b4adf528e 100644 (file)
@@ -7,8 +7,8 @@
  */
 #include <string.h>
 
-#include "wpa/includes.h"
-#include "wpa/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 
 #include "crypto/aes_wrap.h"
 #include "crypto/crypto.h"
@@ -46,12 +46,7 @@ void wps_kdf(const u8 *key, const u8 *label_prefix, size_t label_prefix_len,
 
        for (i = 1; i <= iter; i++) {
                WPA_PUT_BE32(i_buf, i);
-               if (wps_crypto_funcs.hmac_sha256_vector) {
-                       wps_crypto_funcs.hmac_sha256_vector(key, SHA256_MAC_LEN, 4, addr, (int *)len, hash);
-               } else {
-                       wpa_printf(MSG_ERROR, "In function %s, fail to reigster hmac sha256 vector function!\r\n", __FUNCTION__);
-                       return ;
-               }
+               fast_hmac_sha256_vector(key, SHA256_MAC_LEN, 4, addr, len, hash);
                if (i < iter) {
                        os_memcpy(opos, hash, SHA256_MAC_LEN);
                        opos += SHA256_MAC_LEN;
@@ -108,12 +103,7 @@ int wps_derive_keys(struct wps_data *wps)
        addr[0] = wpabuf_head(dh_shared);
        len[0] = wpabuf_len(dh_shared);
 
-       if (wps_crypto_funcs.sha256_vector) {
-               wps_crypto_funcs.sha256_vector(1, addr, (int *)len, dhkey);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, Fail to register sha256 vector function!\r\n", __FUNCTION__);
-               return -1;
-       }
+       fast_sha256_vector(1, addr, len, dhkey);
        wpa_hexdump_key(MSG_DEBUG, "WPS: DHKey", dhkey, sizeof(dhkey));
        wpabuf_free(dh_shared);
 
@@ -124,12 +114,7 @@ int wps_derive_keys(struct wps_data *wps)
        len[1] = ETH_ALEN;
        addr[2] = wps->nonce_r;
        len[2] = WPS_NONCE_LEN;
-       if (wps_crypto_funcs.hmac_sha256_vector) {
-               wps_crypto_funcs.hmac_sha256_vector(dhkey, sizeof(dhkey), 3, addr, (int *)len, kdk);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, Fail to register hmac sha256 vector function!\r\n", __FUNCTION__);
-               return -1;
-       }
+       fast_hmac_sha256_vector(dhkey, sizeof(dhkey), 3, addr, len, kdk);
        wpa_hexdump_key(MSG_DEBUG, "WPS: KDK", kdk, sizeof(kdk));
 
        wps_kdf(kdk, NULL, 0, "Wi-Fi Easy and Secure Key Derivation",
@@ -154,22 +139,12 @@ void wps_derive_psk(struct wps_data *wps, const u8 *dev_passwd,
 {
        u8 hash[SHA256_MAC_LEN];
 
-       if (wps_crypto_funcs.hmac_sha256) {
-               wps_crypto_funcs.hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN, dev_passwd,
+       fast_hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN, dev_passwd,
                                             (dev_passwd_len + 1) / 2, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register hmac_sha256 function!\r\n", __FUNCTION__);
-               return ;
-       }
        os_memcpy(wps->psk1, hash, WPS_PSK_LEN);
-       if (wps_crypto_funcs.hmac_sha256) {
-               wps_crypto_funcs.hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN,
-                                            dev_passwd + (dev_passwd_len + 1) / 2,
-                                            dev_passwd_len / 2, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register hmac_sha256 function!\r\n", __FUNCTION__);
-               return ;
-       }
+       fast_hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN,
+                           dev_passwd + (dev_passwd_len + 1) / 2,
+                           dev_passwd_len / 2, hash);
        os_memcpy(wps->psk2, hash, WPS_PSK_LEN);
 
        wpa_hexdump_ascii_key(MSG_DEBUG, "WPS: Device Password",
@@ -202,14 +177,9 @@ struct wpabuf * wps_decrypt_encr_settings(struct wps_data *wps, const u8 *encr,
        wpa_hexdump(MSG_MSGDUMP, "WPS: Encrypted Settings", encr, encr_len);
        wpabuf_put_data(decrypted, encr + block_size, encr_len - block_size);
        wpa_printf(MSG_DEBUG,  "WPS: AES Decrypt setting");
-       if (wps_crypto_funcs.aes_128_decrypt) {
-               if (wps_crypto_funcs.aes_128_decrypt(wps->keywrapkey, encr, wpabuf_mhead(decrypted),
-                                                    wpabuf_len(decrypted))) {
-                       wpabuf_free(decrypted);
-                       return NULL;
-           }
-       } else {
-                wpa_printf(MSG_ERROR, "In function %s, fail to register aes 128 decrypt function!\r\n", __FUNCTION__);
+       if (fast_aes_128_cbc_decrypt(wps->keywrapkey, encr, wpabuf_mhead(decrypted),
+                                       wpabuf_len(decrypted))) {
+               wpabuf_free(decrypted);
                return NULL;
        }
 
index 89a14c98baa6c980ae6924e4b003885632ba97cd..9ef2fde03bb3def215c518c2252a967e561ecf50 100644 (file)
@@ -5,8 +5,8 @@
  * This software may be distributed under the terms of the BSD license.
  * See README for more details.
  */
-#include "wpa/includes.h"
-#include "wpa/common.h"
+#include "utils/includes.h"
+#include "utils/common.h"
 
 #include "wps/wps_i.h"
 #include "wps/wps_dev_attr.h"
@@ -352,20 +352,12 @@ static int wps_process_dev_name(struct wps_device_data *dev, const u8 *str,
 static int wps_process_primary_dev_type(struct wps_device_data *dev,
                                        const u8 *dev_type)
 {
-#if 0
-#ifndef CONFIG_NO_STDOUT_DEBUG
-       char devtype[WPS_DEV_TYPE_BUFSIZE];
-#endif /* CONFIG_NO_STDOUT_DEBUG */
-#endif
        if (dev_type == NULL) {
                wpa_printf(MSG_DEBUG,  "WPS: No Primary Device Type received");
                return -1;
        }
 
        os_memcpy(dev->pri_dev_type, dev_type, WPS_DEV_TYPE_LEN);
-       //wpa_printf(MSG_DEBUG,  "WPS: Primary Device Type: %s",
-       //         wps_dev_type_bin2str(dev->pri_dev_type, devtype,
-       //                              sizeof(devtype)));
 
        return 0;
 }
index b3890c4e86ebcaf4157eba7eab6640a23803b38a..ffe4d5789b082c1c13893b10057945fb820f9e8f 100644 (file)
@@ -7,9 +7,9 @@
  */
 
 #include "esp32/rom/ets_sys.h"
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "crypto/crypto.h"
 #include "crypto/sha256.h"
 #include "crypto/random.h"
@@ -74,12 +74,7 @@ static int wps_build_e_hash(struct wps_data *wps, struct wpabuf *msg)
        len[2] = wpabuf_len(wps->dh_pubkey_e);
        addr[3] = wpabuf_head(wps->dh_pubkey_r);
        len[3] = wpabuf_len(wps->dh_pubkey_r);
-       if (wps_crypto_funcs.hmac_sha256_vector) {
-               wps_crypto_funcs.hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, (int *)len, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register hmac_sha256_vector function!\r\n", __FUNCTION__);
-               return -1;
-       }
+       fast_hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, len, hash);
        wpa_hexdump(MSG_DEBUG, "WPS: E-Hash1", hash, SHA256_MAC_LEN);
 
        wpa_printf(MSG_DEBUG,  "WPS:  * E-Hash2");
@@ -89,12 +84,7 @@ static int wps_build_e_hash(struct wps_data *wps, struct wpabuf *msg)
        /* E-Hash2 = HMAC_AuthKey(E-S2 || PSK2 || PK_E || PK_R) */
        addr[0] = wps->snonce + WPS_SECRET_NONCE_LEN;
        addr[1] = wps->psk2;
-       if (wps_crypto_funcs.hmac_sha256_vector) {
-               wps_crypto_funcs.hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, (int *)len, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register hmac_sha256_vector function!\r\n", __FUNCTION__);
-               return -1;
-       }
+       fast_hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, len, hash);
        wpa_hexdump(MSG_DEBUG, "WPS: E-Hash2", hash, SHA256_MAC_LEN);
 
        return 0;
@@ -603,12 +593,7 @@ static int wps_process_r_snonce1(struct wps_data *wps, const u8 *r_snonce1)
        addr[3] = wpabuf_head(wps->dh_pubkey_r);
        len[3] = wpabuf_len(wps->dh_pubkey_r);
 
-       if (wps_crypto_funcs.hmac_sha256_vector) {
-               wps_crypto_funcs.hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, (int *)len, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register hmac_sha256_vector function!\r\n", __FUNCTION__);
-               return -1;
-       }
+       fast_hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, len, hash);
        if (os_memcmp(wps->peer_hash1, hash, WPS_HASH_LEN) != 0) {
                wpa_printf(MSG_DEBUG,  "WPS: R-Hash1 derived from R-S1 does "
                           "not match with the pre-committed value");
@@ -648,12 +633,7 @@ static int wps_process_r_snonce2(struct wps_data *wps, const u8 *r_snonce2)
        addr[3] = wpabuf_head(wps->dh_pubkey_r);
        len[3] = wpabuf_len(wps->dh_pubkey_r);
 
-       if (wps_crypto_funcs.hmac_sha256_vector) {
-               wps_crypto_funcs.hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, (int *)len, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to regiset hmac_sha256_vector function!\r\n", __FUNCTION__);
-               return -1;
-       }
+       fast_hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, len, hash);
 
        if (os_memcmp(wps->peer_hash2, hash, WPS_HASH_LEN) != 0) {
                wpa_printf(MSG_DEBUG,  "WPS: R-Hash2 derived from R-S2 does "
similarity index 99%
rename from components/wpa_supplicant/include/wps/wps_i.h
rename to components/wpa_supplicant/src/wps/wps_i.h
index c20d5ef917c0eca184a601d267b9c97b62fe0a03..5cdd51ec3c00b603424b95d31e60a9fd0c978c45 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "wps.h"
 #include "wps_attr_parse.h"
+#include "esp_wps.h"
 #include "esp_wifi_crypto_types.h"
 
 #ifdef CONFIG_WPS_NFC
@@ -124,8 +125,6 @@ struct wps_data {
 #endif
 };
 
-wps_crypto_funcs_t wps_crypto_funcs;
-
 /* wps_common.c */
 void wps_kdf(const u8 *key, const u8 *label_prefix, size_t label_prefix_len,
             const char *label, u8 *res, size_t res_len);
index a38a75d1fee62c4e55dd826a2a2ebc7057bad64e..3293ef6263ad3ffe35d28e754c816df86350c8ab 100644 (file)
@@ -5,21 +5,18 @@
  * This software may be distributed under the terms of the BSD license.
  * See README for more details.
  */
-#include "wpa/includes.h"
-#include "wpa/list.h"
-#include "wpa/common.h"
-#include "crypto/base64.h"
-//#include "utils/eloop.h"
-#include "wps/utils/uuid.h"
-#include "wpa/list.h"
+#include "utils/includes.h"
+#include "utils/list.h"
+#include "utils/common.h"
+#include "utils/base64.h"
+#include "utils/uuid.h"
+#include "utils/list.h"
 #include "crypto/crypto.h"
 #include "crypto/sha256.h"
 #include "crypto/random.h"
-#include "wpa/ieee802_11_defs.h"
+#include "common/ieee802_11_defs.h"
 #include "wps/wps_i.h"
 #include "wps/wps_dev_attr.h"
-//#include "wps/wps_upnp.h"
-//#include "wps/wps_upnp_i.h"
 
 #ifndef CONFIG_WPS_STRICT
 #define WPS_WORKAROUNDS
@@ -188,11 +185,7 @@ struct wps_registrar {
 
 
 static int wps_set_ie(struct wps_registrar *reg);
-//static void wps_registrar_pbc_timeout(void *eloop_ctx, void *timeout_ctx);
-//static void wps_registrar_set_selected_timeout(void *eloop_ctx,
-//                                            void *timeout_ctx);
 static void wps_registrar_pbc_timeout(void *eloop_ctx);
-//static void wps_registrar_set_selected_timeout(void *eloop_ctx);
 
 #ifdef CONFIG_WPS_PIN
 
@@ -695,12 +688,6 @@ void wps_registrar_deinit(struct wps_registrar *reg)
 {
        if (reg == NULL)
                return;
-       //eloop_cancel_timeout(wps_registrar_pbc_timeout, reg, NULL);
-       //eloop_cancel_timeout(wps_registrar_set_selected_timeout, reg, NULL);
-
-       // TODO: snake to check, no sys_untimeout now, by wujg
-//     sys_untimeout(wps_registrar_pbc_timeout, reg);
-//     sys_untimeout(wps_registrar_set_selected_timeout, reg);
 
 #ifdef CONFIG_WPS_PIN
        wps_free_pins(&reg->pins);
@@ -787,10 +774,6 @@ int wps_registrar_add_pin(struct wps_registrar *reg, const u8 *addr,
                wps_registrar_add_authorized_mac(
                        reg, (u8 *) "\xff\xff\xff\xff\xff\xff");
        wps_registrar_selected_registrar_changed(reg);
-       //eloop_cancel_timeout(wps_registrar_set_selected_timeout, reg, NULL);
-       //eloop_register_timeout(WPS_PBC_WALK_TIME, 0,
-                              //wps_registrar_set_selected_timeout,
-                              //reg, NULL);
 
        return 0;
 }
@@ -975,7 +958,6 @@ static void wps_registrar_stop_pbc(struct wps_registrar *reg)
 }
 
 
-//static void ICACHE_FLASH_ATTR wps_registrar_pbc_timeout(void *eloop_ctx, void *timeout_ctx)
 static void wps_registrar_pbc_timeout(void *eloop_ctx)
 {
        struct wps_registrar *reg = eloop_ctx;
@@ -1022,17 +1004,6 @@ int wps_registrar_button_pushed(struct wps_registrar *reg,
                                         (u8 *) "\xff\xff\xff\xff\xff\xff");
        wps_registrar_selected_registrar_changed(reg);
 
-       //eloop_cancel_timeout(wps_registrar_set_selected_timeout, reg, NULL);
-       //eloop_cancel_timeout(wps_registrar_pbc_timeout, reg, NULL);
-
-       // TODO: snake to check, no sys_untimeout now, by wujg
-//     sys_untimeout(wps_registrar_set_selected_timeout, reg);
-//     sys_untimeout(wps_registrar_pbc_timeout, reg);
-
-       //eloop_register_timeout(WPS_PBC_WALK_TIME, 0, wps_registrar_pbc_timeout,
-       //                     reg, NULL);
-//     sys_timeout(WPS_PBC_WALK_TIME*1000, wps_registrar_pbc_timeout, reg);
-
        return 0;
 }
 
@@ -1041,10 +1012,6 @@ static void wps_registrar_pbc_completed(struct wps_registrar *reg)
 {
        wpa_printf(MSG_DEBUG,  "WPS: PBC completed - stopping PBC mode");
 
-       // TODO: snake to check, no sys_untimeout now, by wujg
-       //eloop_cancel_timeout(wps_registrar_pbc_timeout, reg, NULL);
-//     sys_untimeout(wps_registrar_pbc_timeout, reg);
-
        wps_registrar_stop_pbc(reg);
 }
 
@@ -1053,7 +1020,6 @@ static void wps_registrar_pbc_completed(struct wps_registrar *reg)
 static void wps_registrar_pin_completed(struct wps_registrar *reg)
 {
        wpa_printf(MSG_DEBUG,  "WPS: PIN completed using internal Registrar");
-       //eloop_cancel_timeout(wps_registrar_set_selected_timeout, reg, NULL);
        reg->selected_registrar = 0;
        wps_registrar_selected_registrar_changed(reg);
 }
@@ -1088,13 +1054,8 @@ int wps_registrar_wps_cancel(struct wps_registrar *reg)
 {
        if (reg->pbc) {
                wpa_printf(MSG_DEBUG,  "WPS: PBC is set - cancelling it");
-               //wps_registrar_pbc_timeout(reg, NULL);
-               //eloop_cancel_timeout(wps_registrar_pbc_timeout, reg, NULL);
                wps_registrar_pbc_timeout(reg);
 
-               // TODO: snake to check, no sys_untimeout now, by wujg
-//             sys_untimeout(wps_registrar_pbc_timeout, reg);
-
                return 1;
        } else if (reg->selected_registrar) {
 #ifdef CONFIG_WPS_PIN
@@ -1466,12 +1427,7 @@ static int wps_build_r_hash(struct wps_data *wps, struct wpabuf *msg)
        len[2] = wpabuf_len(wps->dh_pubkey_e);
        addr[3] = wpabuf_head(wps->dh_pubkey_r);
        len[3] = wpabuf_len(wps->dh_pubkey_r);
-       if (wps_crypto_funcs.hmac_sha256_vector) {
-               wps_crypto_funcs.hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, (int *)len, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register hmac_sha256_vector function!\r\n", __FUNCTION__);
-               return -1;
-       }
+       fast_hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, len, hash);
        wpa_hexdump(MSG_DEBUG, "WPS: R-Hash1", hash, SHA256_MAC_LEN);
 
        wpa_printf(MSG_DEBUG,  "WPS:  * R-Hash2");
@@ -1481,12 +1437,7 @@ static int wps_build_r_hash(struct wps_data *wps, struct wpabuf *msg)
        /* R-Hash2 = HMAC_AuthKey(R-S2 || PSK2 || PK_E || PK_R) */
        addr[0] = wps->snonce + WPS_SECRET_NONCE_LEN;
        addr[1] = wps->psk2;
-       if (wps_crypto_funcs.hmac_sha256_vector) {
-               wps_crypto_funcs.hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, (int *)len, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register hmac_sha256_vector function!\r\n", __FUNCTION__);
-               return -1;
-       }
+       fast_hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, len, hash);
        wpa_hexdump(MSG_DEBUG, "WPS: R-Hash2", hash, SHA256_MAC_LEN);
 
        return 0;
@@ -1689,7 +1640,6 @@ int wps_build_cred(struct wps_data *wps, struct wpabuf *msg)
                if (random_get_bytes(r, sizeof(r)) < 0)
                        return -1;
                os_free(wps->new_psk);
-               //wps->new_psk = base64_encode(r, sizeof(r), &wps->new_psk_len);
                if (wps->new_psk == NULL)
                        return -1;
                wps->new_psk_len--; /* remove newline */
@@ -1703,7 +1653,6 @@ int wps_build_cred(struct wps_data *wps, struct wpabuf *msg)
        } else if (wps->use_psk_key && wps->wps->psk_set) {
                char hex[65];
                wpa_printf(MSG_DEBUG,  "WPS: Use PSK format for Network Key");
-               //wpa_snprintf_hex(hex, sizeof(hex), wps->wps->psk, 32);
                os_memcpy(wps->cred.key, hex, 32 * 2);
                wps->cred.key_len = 32 * 2;
        } else if (wps->wps->network_key) {
@@ -1725,8 +1674,6 @@ int wps_build_cred(struct wps_data *wps, struct wpabuf *msg)
                }
                wpa_hexdump_key(MSG_DEBUG, "WPS: Generated per-device PSK",
                                wps->new_psk, wps->new_psk_len);
-               //wpa_snprintf_hex(hex, sizeof(hex), wps->new_psk,
-               //               wps->new_psk_len);
                os_memcpy(wps->cred.key, hex, wps->new_psk_len * 2);
                wps->cred.key_len = wps->new_psk_len * 2;
        }
@@ -2223,12 +2170,7 @@ static int wps_process_e_snonce1(struct wps_data *wps, const u8 *e_snonce1)
        len[2] = wpabuf_len(wps->dh_pubkey_e);
        addr[3] = wpabuf_head(wps->dh_pubkey_r);
        len[3] = wpabuf_len(wps->dh_pubkey_r);
-       if (wps_crypto_funcs.hmac_sha256_vector) {
-               wps_crypto_funcs.hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, (int *)len, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register hmac_sha256_vector function!\r\n", __FUNCTION__);
-               return -1;
-       }
+       fast_hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, len, hash);
        if (os_memcmp(wps->peer_hash1, hash, WPS_HASH_LEN) != 0) {
                wpa_printf(MSG_DEBUG,  "WPS: E-Hash1 derived from E-S1 does "
                           "not match with the pre-committed value");
@@ -2268,12 +2210,7 @@ static int wps_process_e_snonce2(struct wps_data *wps, const u8 *e_snonce2)
        addr[3] = wpabuf_head(wps->dh_pubkey_r);
        len[3] = wpabuf_len(wps->dh_pubkey_r);
 
-       if (wps_crypto_funcs.hmac_sha256_vector) {
-               wps_crypto_funcs.hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, (int *)len, hash);
-       } else {
-               wpa_printf(MSG_ERROR, "In function %s, fail to register hmac_sha256_vector function!\r\n", __FUNCTION__);
-               return -1;
-       }
+       fast_hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, len, hash);
        if (os_memcmp(wps->peer_hash2, hash, WPS_HASH_LEN) != 0) {
                wpa_printf(MSG_DEBUG,  "WPS: E-Hash2 derived from E-S2 does "
                           "not match with the pre-committed value");
@@ -2610,12 +2547,7 @@ static enum wps_process_res wps_process_m1(struct wps_data *wps,
                        wps->nfc_pw_token = token;
 
                        addr[0] = attr->public_key;
-                       if (wps_crypto_funcs.sha256_vector) {
-                               wps_crypto_funcs.sha256_vector(1, addr, &attr->public_key_len, hash);
-                       } else {
-                               wpa_printf(MSG_ERROR, "In function %s, fail to register sha256_vector function!\r\n", __FUNCTION__);
-                               return WPS_FAILURE;
-                       }
+                       fast_sha256_vector(1, addr, &attr->public_key_len, hash);
                        if (os_memcmp(hash, wps->nfc_pw_token->pubkey_hash,
                                      WPS_OOB_PUBKEY_HASH_LEN) != 0) {
                                wpa_printf(MSG_ERROR,  "WPS: Public Key hash "
@@ -3161,8 +3093,6 @@ static enum wps_process_res wps_process_wsc_done(struct wps_data *wps,
 
        wpa_printf(MSG_DEBUG,  "WPS: Received WSC_Done");
 
-       //if (wps->state != RECV_DONE &&
-       //    (!wps->wps->wps_upnp || !wps->ext_reg))
        if (wps->state != RECV_DONE && (!wps->ext_reg)){
                wpa_printf(MSG_DEBUG,  "WPS: Unexpected state (%d) for "
                           "receiving WSC_Done", wps->state);
@@ -3353,21 +3283,6 @@ int wps_registrar_update_ie(struct wps_registrar *reg)
 }
 
 
-//static void ICACHE_FLASH_ATTR wps_registrar_set_selected_timeout(void *eloop_ctx,
-//                                            void *timeout_ctx)
-#if 0
-static void wps_registrar_set_selected_timeout(void *eloop_ctx)
-{
-       struct wps_registrar *reg = eloop_ctx;
-
-       wpa_printf(MSG_DEBUG,  "WPS: Selected Registrar timeout - "
-                  "unselect internal Registrar");
-       reg->selected_registrar = 0;
-       reg->pbc = 0;
-       wps_registrar_selected_registrar_changed(reg);
-}
-#endif
-
 #ifdef CONFIG_WPS_UPNP
 static void wps_registrar_sel_reg_add(struct wps_registrar *reg,
                                      struct subscription *s)
@@ -3582,12 +3497,6 @@ int wps_registrar_add_nfc_pw_token(struct wps_registrar *reg,
        wps_registrar_add_authorized_mac(reg,
                                         (u8 *) "\xff\xff\xff\xff\xff\xff");
        wps_registrar_selected_registrar_changed(reg);
-       #if 0
-       eloop_cancel_timeout(wps_registrar_set_selected_timeout, reg, NULL);
-       eloop_register_timeout(WPS_PBC_WALK_TIME, 0,
-                              wps_registrar_set_selected_timeout,
-                              reg, NULL);
-    #endif
        return 0;
 }
 
index 7f2ad5eeb6e089ae7fe53898ae7a31beae0d86f8..34f0865b117517e25cb70f91a0a3d29af05a29a4 100644 (file)
@@ -5,9 +5,9 @@
  * This software may be distributed under the terms of the BSD license.
  * See README for more details.
  */
-#include "wpa/includes.h"
+#include "utils/includes.h"
 
-#include "wpa/common.h"
+#include "utils/common.h"
 #include "wps/wps_i.h"
 #include "wps/wps.h"
 
diff --git a/components/wpa_supplicant/tags b/components/wpa_supplicant/tags
new file mode 100644 (file)
index 0000000..781b954
--- /dev/null
@@ -0,0 +1,5454 @@
+!_TAG_FILE_FORMAT      2       /extended format; --format=1 will not append ;" to lines/
+!_TAG_FILE_SORTED      1       /0=unsorted, 1=sorted, 2=foldcase/
+!_TAG_PROGRAM_AUTHOR   Darren Hiebert  /dhiebert@users.sourceforge.net/
+!_TAG_PROGRAM_NAME     Exuberant Ctags //
+!_TAG_PROGRAM_URL      http://ctags.sourceforge.net    /official site/
+!_TAG_PROGRAM_VERSION  5.9~svn20110310 //
+ACCEPT_UNLESS_DENIED   src/ap/ap_config.h      /^              ACCEPT_UNLESS_DENIED = 0,$/;"   e       enum:hostapd_bss_config::__anon17
+ACK_FINISHED   src/tls/tlsv1_client_i.h        /^              SERVER_CHANGE_CIPHER_SPEC, SERVER_FINISHED, ACK_FINISHED,$/;"   e       enum:tlsv1_client::__anon43
+AES_BLOCK_SIZE include/crypto/aes.h    18;"    d
+AES_H  include/crypto/aes.h    16;"    d
+AES_I_H        src/crypto/aes_i.h      16;"    d
+AES_PRIV_NR_POS        src/crypto/aes_i.h      127;"   d
+AES_PRIV_SIZE  src/crypto/aes_i.h      126;"   d
+AES_SMALL_TABLES       src/crypto/aes-internal.c       57;"    d       file:
+AES_SMALL_TABLES       src/crypto/aes_i.h      21;"    d
+AES_WRAP_H     include/crypto/aes_wrap.h       23;"    d
+ALG_AES_CMAC   src/common/defs.h       /^      ALG_AES_CMAC,$/;"       e       enum:wifi_key_alg
+ALG_CCMP       src/common/defs.h       /^      ALG_CCMP,$/;"   e       enum:wifi_key_alg
+ALG_TKIP       src/common/defs.h       /^      ALG_TKIP,$/;"   e       enum:wifi_key_alg
+ALG_WEP        src/common/defs.h       /^      ALG_WEP,$/;"    e       enum:wifi_key_alg
+ANONYMOUS_ID_LEN_MAX   src/esp_supplicant/esp_wpa_enterprise.c 937;"   d       file:
+ANS1_TAG_RELATIVE_OID  src/tls/asn1.h  24;"    d
+ANonce src/ap/wpa_auth_i.h     /^      u8 ANonce[WPA_NONCE_LEN];$/;"   m       struct:wpa_state_machine
+API_MUTEX_GIVE src/esp_supplicant/esp_wps.c    45;"    d       file:
+API_MUTEX_TAKE src/esp_supplicant/esp_wps.c    34;"    d       file:
+AP_DEAUTH_DELAY        src/ap/sta_info.h       144;"   d
+AP_DISASSOC_DELAY      src/ap/sta_info.h       143;"   d
+AP_MAX_INACTIVITY      src/ap/sta_info.h       142;"   d
+AP_MAX_INACTIVITY_AFTER_DEAUTH src/ap/sta_info.h       149;"   d
+AP_MAX_INACTIVITY_AFTER_DISASSOC       src/ap/sta_info.h       147;"   d
+AP_REJECTED_BLOCKED_STA        src/common/wpa_ctrl.h   167;"   d
+AP_REJECTED_MAX_STA    src/common/wpa_ctrl.h   166;"   d
+AP_STA_CONNECTED       src/common/wpa_ctrl.h   163;"   d
+AP_STA_DISCONNECTED    src/common/wpa_ctrl.h   164;"   d
+ASEL_CAPABILITY_ANT_INDICES_FEEDBACK_BASED_TX_AS_CAP   src/common/ieee802_11_defs.h    442;"   d
+ASEL_CAPABILITY_ANT_INDICES_FEEDBACK_CAP       src/common/ieee802_11_defs.h    444;"   d
+ASEL_CAPABILITY_ASEL_CAPABLE   src/common/ieee802_11_defs.h    440;"   d
+ASEL_CAPABILITY_EXPLICIT_CSI_FEEDBACK_BASED_TX_AS_CAP  src/common/ieee802_11_defs.h    441;"   d
+ASEL_CAPABILITY_EXPLICIT_CSI_FEEDBACK_CAP      src/common/ieee802_11_defs.h    443;"   d
+ASEL_CAPABILITY_RX_AS_CAP      src/common/ieee802_11_defs.h    445;"   d
+ASEL_CAPABILITY_TX_SOUND_PPDUS_CAP     src/common/ieee802_11_defs.h    446;"   d
+ASN1_CLASS_APPLICATION src/tls/asn1.h  41;"    d
+ASN1_CLASS_CONTEXT_SPECIFIC    src/tls/asn1.h  42;"    d
+ASN1_CLASS_PRIVATE     src/tls/asn1.h  43;"    d
+ASN1_CLASS_UNIVERSAL   src/tls/asn1.h  40;"    d
+ASN1_H src/tls/asn1.h  10;"    d
+ASN1_MAX_OID_LEN       src/tls/asn1.h  52;"    d
+ASN1_TAG_BITSTRING     src/tls/asn1.h  15;"    d
+ASN1_TAG_BMPSTRING     src/tls/asn1.h  38;"    d
+ASN1_TAG_BOOLEAN       src/tls/asn1.h  13;"    d
+ASN1_TAG_ENUMERATED    src/tls/asn1.h  22;"    d
+ASN1_TAG_EOC   src/tls/asn1.h  12;"    d
+ASN1_TAG_EXTERNAL      src/tls/asn1.h  20;"    d
+ASN1_TAG_GENERALIZEDTIME       src/tls/asn1.h  33;"    d
+ASN1_TAG_GENERALSTRING src/tls/asn1.h  36;"    d
+ASN1_TAG_GRAPHICSTRING src/tls/asn1.h  34;"    d
+ASN1_TAG_IA5STRING     src/tls/asn1.h  31;"    d
+ASN1_TAG_INTEGER       src/tls/asn1.h  14;"    d
+ASN1_TAG_NULL  src/tls/asn1.h  17;"    d
+ASN1_TAG_NUMERICSTRING src/tls/asn1.h  27;"    d
+ASN1_TAG_OBJECT_DESCRIPTOR     src/tls/asn1.h  19;"    d
+ASN1_TAG_OCTETSTRING   src/tls/asn1.h  16;"    d
+ASN1_TAG_OID   src/tls/asn1.h  18;"    d
+ASN1_TAG_PRINTABLESTRING       src/tls/asn1.h  28;"    d
+ASN1_TAG_REAL  src/tls/asn1.h  21;"    d
+ASN1_TAG_SEQUENCE      src/tls/asn1.h  25;"    d
+ASN1_TAG_SET   src/tls/asn1.h  26;"    d
+ASN1_TAG_TG1STRING     src/tls/asn1.h  29;"    d
+ASN1_TAG_UNIVERSALSTRING       src/tls/asn1.h  37;"    d
+ASN1_TAG_UTCTIME       src/tls/asn1.h  32;"    d
+ASN1_TAG_UTF8STRING    src/tls/asn1.h  23;"    d
+ASN1_TAG_VIDEOTEXSTRING        src/tls/asn1.h  30;"    d
+ASN1_TAG_VISIBLESTRING src/tls/asn1.h  35;"    d
+ASSOC_IE_LEN   src/rsn_supp/wpa.c      50;"    d       file:
+ATTR_802_1X_ENABLED    src/wps/wps_defs.h      /^      ATTR_802_1X_ENABLED = 0x1062,$/;"       e       enum:wps_attribute
+ATTR_APPLICATION_EXT   src/wps/wps_defs.h      /^      ATTR_APPLICATION_EXT = 0x1058,$/;"      e       enum:wps_attribute
+ATTR_APPSESSIONKEY     src/wps/wps_defs.h      /^      ATTR_APPSESSIONKEY = 0x1063,$/;"        e       enum:wps_attribute
+ATTR_AP_CHANNEL        src/wps/wps_defs.h      /^      ATTR_AP_CHANNEL = 0x1001,$/;"   e       enum:wps_attribute
+ATTR_AP_SETUP_LOCKED   src/wps/wps_defs.h      /^      ATTR_AP_SETUP_LOCKED = 0x1057,$/;"      e       enum:wps_attribute
+ATTR_ASSOC_STATE       src/wps/wps_defs.h      /^      ATTR_ASSOC_STATE = 0x1002,$/;"  e       enum:wps_attribute
+ATTR_AUTHENTICATOR     src/wps/wps_defs.h      /^      ATTR_AUTHENTICATOR = 0x1005,$/;"        e       enum:wps_attribute
+ATTR_AUTH_TYPE src/wps/wps_defs.h      /^      ATTR_AUTH_TYPE = 0x1003,$/;"    e       enum:wps_attribute
+ATTR_AUTH_TYPE_FLAGS   src/wps/wps_defs.h      /^      ATTR_AUTH_TYPE_FLAGS = 0x1004,$/;"      e       enum:wps_attribute
+ATTR_CONFIG_ERROR      src/wps/wps_defs.h      /^      ATTR_CONFIG_ERROR = 0x1009,$/;" e       enum:wps_attribute
+ATTR_CONFIG_METHODS    src/wps/wps_defs.h      /^      ATTR_CONFIG_METHODS = 0x1008,$/;"       e       enum:wps_attribute
+ATTR_CONFIRM_URL4      src/wps/wps_defs.h      /^      ATTR_CONFIRM_URL4 = 0x100a,$/;" e       enum:wps_attribute
+ATTR_CONFIRM_URL6      src/wps/wps_defs.h      /^      ATTR_CONFIRM_URL6 = 0x100b,$/;" e       enum:wps_attribute
+ATTR_CONN_TYPE src/wps/wps_defs.h      /^      ATTR_CONN_TYPE = 0x100c,$/;"    e       enum:wps_attribute
+ATTR_CONN_TYPE_FLAGS   src/wps/wps_defs.h      /^      ATTR_CONN_TYPE_FLAGS = 0x100d,$/;"      e       enum:wps_attribute
+ATTR_CRED      src/wps/wps_defs.h      /^      ATTR_CRED = 0x100e,$/;" e       enum:wps_attribute
+ATTR_DEV_NAME  src/wps/wps_defs.h      /^      ATTR_DEV_NAME = 0x1011,$/;"     e       enum:wps_attribute
+ATTR_DEV_PASSWORD_ID   src/wps/wps_defs.h      /^      ATTR_DEV_PASSWORD_ID = 0x1012,$/;"      e       enum:wps_attribute
+ATTR_EAP_IDENTITY      src/wps/wps_defs.h      /^      ATTR_EAP_IDENTITY = 0x104d,$/;" e       enum:wps_attribute
+ATTR_EAP_TYPE  src/wps/wps_defs.h      /^      ATTR_EAP_TYPE = 0x1059,$/;"     e       enum:wps_attribute
+ATTR_ENCR_SETTINGS     src/wps/wps_defs.h      /^      ATTR_ENCR_SETTINGS = 0x1018,$/;"        e       enum:wps_attribute
+ATTR_ENCR_TYPE src/wps/wps_defs.h      /^      ATTR_ENCR_TYPE = 0x100f,$/;"    e       enum:wps_attribute
+ATTR_ENCR_TYPE_FLAGS   src/wps/wps_defs.h      /^      ATTR_ENCR_TYPE_FLAGS = 0x1010,$/;"      e       enum:wps_attribute
+ATTR_ENROLLEE_NONCE    src/wps/wps_defs.h      /^      ATTR_ENROLLEE_NONCE = 0x101a,$/;"       e       enum:wps_attribute
+ATTR_EXTENSIBILITY_TEST        src/wps/wps_defs.h      /^      ATTR_EXTENSIBILITY_TEST = 0x10fa \/* _NOT_ defined in the spec *\/$/;"  e       enum:wps_attribute
+ATTR_E_HASH1   src/wps/wps_defs.h      /^      ATTR_E_HASH1 = 0x1014,$/;"      e       enum:wps_attribute
+ATTR_E_HASH2   src/wps/wps_defs.h      /^      ATTR_E_HASH2 = 0x1015,$/;"      e       enum:wps_attribute
+ATTR_E_SNONCE1 src/wps/wps_defs.h      /^      ATTR_E_SNONCE1 = 0x1016,$/;"    e       enum:wps_attribute
+ATTR_E_SNONCE2 src/wps/wps_defs.h      /^      ATTR_E_SNONCE2 = 0x1017,$/;"    e       enum:wps_attribute
+ATTR_FEATURE_ID        src/wps/wps_defs.h      /^      ATTR_FEATURE_ID = 0x101b,$/;"   e       enum:wps_attribute
+ATTR_IDENTITY  src/wps/wps_defs.h      /^      ATTR_IDENTITY = 0x101c,$/;"     e       enum:wps_attribute
+ATTR_IDENTITY_PROOF    src/wps/wps_defs.h      /^      ATTR_IDENTITY_PROOF = 0x101d,$/;"       e       enum:wps_attribute
+ATTR_IV        src/wps/wps_defs.h      /^      ATTR_IV = 0x1060,$/;"   e       enum:wps_attribute
+ATTR_KEY_ID    src/wps/wps_defs.h      /^      ATTR_KEY_ID = 0x101f,$/;"       e       enum:wps_attribute
+ATTR_KEY_LIFETIME      src/wps/wps_defs.h      /^      ATTR_KEY_LIFETIME = 0x1051,$/;" e       enum:wps_attribute
+ATTR_KEY_PROVIDED_AUTO src/wps/wps_defs.h      /^      ATTR_KEY_PROVIDED_AUTO = 0x1061,$/;"    e       enum:wps_attribute
+ATTR_KEY_WRAP_AUTH     src/wps/wps_defs.h      /^      ATTR_KEY_WRAP_AUTH = 0x101e,$/;"        e       enum:wps_attribute
+ATTR_MAC_ADDR  src/wps/wps_defs.h      /^      ATTR_MAC_ADDR = 0x1020,$/;"     e       enum:wps_attribute
+ATTR_MANUFACTURER      src/wps/wps_defs.h      /^      ATTR_MANUFACTURER = 0x1021,$/;" e       enum:wps_attribute
+ATTR_MODEL_NAME        src/wps/wps_defs.h      /^      ATTR_MODEL_NAME = 0x1023,$/;"   e       enum:wps_attribute
+ATTR_MODEL_NUMBER      src/wps/wps_defs.h      /^      ATTR_MODEL_NUMBER = 0x1024,$/;" e       enum:wps_attribute
+ATTR_MSG_COUNTER       src/wps/wps_defs.h      /^      ATTR_MSG_COUNTER = 0x104e,$/;"  e       enum:wps_attribute
+ATTR_MSG_TYPE  src/wps/wps_defs.h      /^      ATTR_MSG_TYPE = 0x1022,$/;"     e       enum:wps_attribute
+ATTR_NETWORK_INDEX     src/wps/wps_defs.h      /^      ATTR_NETWORK_INDEX = 0x1026,$/;"        e       enum:wps_attribute
+ATTR_NETWORK_KEY       src/wps/wps_defs.h      /^      ATTR_NETWORK_KEY = 0x1027,$/;"  e       enum:wps_attribute
+ATTR_NETWORK_KEY_INDEX src/wps/wps_defs.h      /^      ATTR_NETWORK_KEY_INDEX = 0x1028,$/;"    e       enum:wps_attribute
+ATTR_NEW_DEVICE_NAME   src/wps/wps_defs.h      /^      ATTR_NEW_DEVICE_NAME = 0x1029,$/;"      e       enum:wps_attribute
+ATTR_NEW_PASSWORD      src/wps/wps_defs.h      /^      ATTR_NEW_PASSWORD = 0x102a,$/;" e       enum:wps_attribute
+ATTR_OOB_DEVICE_PASSWORD       src/wps/wps_defs.h      /^      ATTR_OOB_DEVICE_PASSWORD = 0x102c,$/;"  e       enum:wps_attribute
+ATTR_OS_VERSION        src/wps/wps_defs.h      /^      ATTR_OS_VERSION = 0x102d,$/;"   e       enum:wps_attribute
+ATTR_PERMITTED_CFG_METHODS     src/wps/wps_defs.h      /^      ATTR_PERMITTED_CFG_METHODS = 0x1052,$/;"        e       enum:wps_attribute
+ATTR_PORTABLE_DEV      src/wps/wps_defs.h      /^      ATTR_PORTABLE_DEV = 0x1056,$/;" e       enum:wps_attribute
+ATTR_POWER_LEVEL       src/wps/wps_defs.h      /^      ATTR_POWER_LEVEL = 0x102f,$/;"  e       enum:wps_attribute
+ATTR_PRIMARY_DEV_TYPE  src/wps/wps_defs.h      /^      ATTR_PRIMARY_DEV_TYPE = 0x1054,$/;"     e       enum:wps_attribute
+ATTR_PSK_CURRENT       src/wps/wps_defs.h      /^      ATTR_PSK_CURRENT = 0x1030,$/;"  e       enum:wps_attribute
+ATTR_PSK_MAX   src/wps/wps_defs.h      /^      ATTR_PSK_MAX = 0x1031,$/;"      e       enum:wps_attribute
+ATTR_PUBKEY_HASH       src/wps/wps_defs.h      /^      ATTR_PUBKEY_HASH = 0x104f,$/;"  e       enum:wps_attribute
+ATTR_PUBLIC_KEY        src/wps/wps_defs.h      /^      ATTR_PUBLIC_KEY = 0x1032,$/;"   e       enum:wps_attribute
+ATTR_RADIO_ENABLE      src/wps/wps_defs.h      /^      ATTR_RADIO_ENABLE = 0x1033,$/;" e       enum:wps_attribute
+ATTR_REBOOT    src/wps/wps_defs.h      /^      ATTR_REBOOT = 0x1034,$/;"       e       enum:wps_attribute
+ATTR_REGISTRAR_CURRENT src/wps/wps_defs.h      /^      ATTR_REGISTRAR_CURRENT = 0x1035,$/;"    e       enum:wps_attribute
+ATTR_REGISTRAR_ESTABLISHED     src/wps/wps_defs.h      /^      ATTR_REGISTRAR_ESTABLISHED = 0x1036,$/;"        e       enum:wps_attribute
+ATTR_REGISTRAR_LIST    src/wps/wps_defs.h      /^      ATTR_REGISTRAR_LIST = 0x1037,$/;"       e       enum:wps_attribute
+ATTR_REGISTRAR_MAX     src/wps/wps_defs.h      /^      ATTR_REGISTRAR_MAX = 0x1038,$/;"        e       enum:wps_attribute
+ATTR_REGISTRAR_NONCE   src/wps/wps_defs.h      /^      ATTR_REGISTRAR_NONCE = 0x1039,$/;"      e       enum:wps_attribute
+ATTR_REKEY_KEY src/wps/wps_defs.h      /^      ATTR_REKEY_KEY = 0x1050,$/;"    e       enum:wps_attribute
+ATTR_REQUESTED_DEV_TYPE        src/wps/wps_defs.h      /^      ATTR_REQUESTED_DEV_TYPE = 0x106a,$/;"   e       enum:wps_attribute
+ATTR_REQUEST_TYPE      src/wps/wps_defs.h      /^      ATTR_REQUEST_TYPE = 0x103a,$/;" e       enum:wps_attribute
+ATTR_RESPONSE_TYPE     src/wps/wps_defs.h      /^      ATTR_RESPONSE_TYPE = 0x103b,$/;"        e       enum:wps_attribute
+ATTR_RF_BANDS  src/wps/wps_defs.h      /^      ATTR_RF_BANDS = 0x103c,$/;"     e       enum:wps_attribute
+ATTR_R_HASH1   src/wps/wps_defs.h      /^      ATTR_R_HASH1 = 0x103d,$/;"      e       enum:wps_attribute
+ATTR_R_HASH2   src/wps/wps_defs.h      /^      ATTR_R_HASH2 = 0x103e,$/;"      e       enum:wps_attribute
+ATTR_R_SNONCE1 src/wps/wps_defs.h      /^      ATTR_R_SNONCE1 = 0x103f,$/;"    e       enum:wps_attribute
+ATTR_R_SNONCE2 src/wps/wps_defs.h      /^      ATTR_R_SNONCE2 = 0x1040,$/;"    e       enum:wps_attribute
+ATTR_SECONDARY_DEV_TYPE_LIST   src/wps/wps_defs.h      /^      ATTR_SECONDARY_DEV_TYPE_LIST = 0x1055,$/;"      e       enum:wps_attribute
+ATTR_SELECTED_REGISTRAR        src/wps/wps_defs.h      /^      ATTR_SELECTED_REGISTRAR = 0x1041,$/;"   e       enum:wps_attribute
+ATTR_SELECTED_REGISTRAR_CONFIG_METHODS src/wps/wps_defs.h      /^      ATTR_SELECTED_REGISTRAR_CONFIG_METHODS = 0x1053,$/;"    e       enum:wps_attribute
+ATTR_SERIAL_NUMBER     src/wps/wps_defs.h      /^      ATTR_SERIAL_NUMBER = 0x1042,$/;"        e       enum:wps_attribute
+ATTR_SSID      src/wps/wps_defs.h      /^      ATTR_SSID = 0x1045,$/;" e       enum:wps_attribute
+ATTR_TOTAL_NETWORKS    src/wps/wps_defs.h      /^      ATTR_TOTAL_NETWORKS = 0x1046,$/;"       e       enum:wps_attribute
+ATTR_UUID_E    src/wps/wps_defs.h      /^      ATTR_UUID_E = 0x1047,$/;"       e       enum:wps_attribute
+ATTR_UUID_R    src/wps/wps_defs.h      /^      ATTR_UUID_R = 0x1048,$/;"       e       enum:wps_attribute
+ATTR_VENDOR_EXT        src/wps/wps_defs.h      /^      ATTR_VENDOR_EXT = 0x1049,$/;"   e       enum:wps_attribute
+ATTR_VERSION   src/wps/wps_defs.h      /^      ATTR_VERSION = 0x104a,$/;"      e       enum:wps_attribute
+ATTR_WEPTRANSMITKEY    src/wps/wps_defs.h      /^      ATTR_WEPTRANSMITKEY = 0x1064,$/;"       e       enum:wps_attribute
+ATTR_WPS_STATE src/wps/wps_defs.h      /^      ATTR_WPS_STATE = 0x1044,$/;"    e       enum:wps_attribute
+ATTR_X509_CERT src/wps/wps_defs.h      /^      ATTR_X509_CERT = 0x104c,$/;"    e       enum:wps_attribute
+ATTR_X509_CERT_REQ     src/wps/wps_defs.h      /^      ATTR_X509_CERT_REQ = 0x104b,$/;"        e       enum:wps_attribute
+AVP_FLAGS_MANDATORY    src/eap_peer/eap_ttls.h 29;"    d
+AVP_FLAGS_VENDOR       src/eap_peer/eap_ttls.h 28;"    d
+AVP_PAD        src/eap_peer/eap_ttls.h 31;"    d
+AuthenticationRequest  src/ap/wpa_auth_i.h     /^      Boolean AuthenticationRequest;$/;"      m       struct:wpa_state_machine
+BASE64_H       src/utils/base64.h      16;"    d
+BIGNUM_H       src/crypto/bignum.h     16;"    d
+BIGNUM_H       src/tls/bignum.h        16;"    d
+BIG_ENDIAN     port/include/endian.h   37;"    d
+BIT    include/utils/common.h  264;"   d
+BLOB_NAME_LEN  src/eap_peer/eap_i.h    98;"    d
+BLOB_NUM       src/eap_peer/eap_i.h    99;"    d
+BN_FAST_MP_MONTGOMERY_REDUCE_C src/crypto/libtommath.h 42;"    d
+BN_FAST_MP_MONTGOMERY_REDUCE_C src/tls/libtommath.h    44;"    d
+BN_FAST_S_MP_SQR_C     src/crypto/libtommath.h 47;"    d
+BN_FAST_S_MP_SQR_C     src/tls/libtommath.h    49;"    d
+BN_MP_ABS_C    src/crypto/libtommath.h 54;"    d
+BN_MP_ABS_C    src/tls/libtommath.h    56;"    d
+BN_MP_CLEAR_MULTI_C    src/crypto/libtommath.h 53;"    d
+BN_MP_CLEAR_MULTI_C    src/tls/libtommath.h    55;"    d
+BN_MP_DIV_SMALL        src/crypto/libtommath.h 51;"    d
+BN_MP_DIV_SMALL        src/tls/libtommath.h    53;"    d
+BN_MP_EXPTMOD_FAST_C   src/crypto/libtommath.h 40;"    d
+BN_MP_EXPTMOD_FAST_C   src/tls/libtommath.h    42;"    d
+BN_MP_INIT_MULTI_C     src/crypto/libtommath.h 52;"    d
+BN_MP_INIT_MULTI_C     src/tls/libtommath.h    54;"    d
+BN_MP_INVMOD_C src/crypto/libtommath.h 25;"    d
+BN_MP_INVMOD_C src/tls/libtommath.h    27;"    d
+BN_MP_INVMOD_SLOW_C    src/crypto/libtommath.h 29;"    d
+BN_MP_INVMOD_SLOW_C    src/tls/libtommath.h    31;"    d
+BN_MP_MONTGOMERY_CALC_NORMALIZATION_C  src/crypto/libtommath.h 43;"    d
+BN_MP_MONTGOMERY_CALC_NORMALIZATION_C  src/tls/libtommath.h    45;"    d
+BN_MP_MONTGOMERY_SETUP_C       src/crypto/libtommath.h 41;"    d
+BN_MP_MONTGOMERY_SETUP_C       src/tls/libtommath.h    43;"    d
+BN_MP_MUL_2_C  src/crypto/libtommath.h 44;"    d
+BN_MP_MUL_2_C  src/tls/libtommath.h    46;"    d
+BN_MP_MUL_D_C  src/crypto/libtommath.h 37;"    d
+BN_MP_MUL_D_C  src/tls/libtommath.h    39;"    d
+BN_S_MP_EXPTMOD_C      src/crypto/libtommath.h 26;"    d
+BN_S_MP_EXPTMOD_C      src/tls/libtommath.h    28;"    d
+BN_S_MP_MUL_DIGS_C     src/crypto/libtommath.h 28;"    d
+BN_S_MP_MUL_DIGS_C     src/tls/libtommath.h    30;"    d
+BN_S_MP_MUL_HIGH_DIGS_C        src/crypto/libtommath.h 31;"    d
+BN_S_MP_MUL_HIGH_DIGS_C        src/tls/libtommath.h    33;"    d
+BN_S_MP_SQR_C  src/crypto/libtommath.h 30;"    d
+BN_S_MP_SQR_C  src/tls/libtommath.h    32;"    d
+BYTESWAP_H     port/include/byteswap.h 6;"     d
+BYTES_TO_T_UINT_2      test/test_crypto.c      295;"   d       file:
+BYTES_TO_T_UINT_2      test/test_crypto.c      317;"   d       file:
+BYTES_TO_T_UINT_4      test/test_crypto.c      289;"   d       file:
+BYTES_TO_T_UINT_4      test/test_crypto.c      314;"   d       file:
+BYTES_TO_T_UINT_8      test/test_crypto.c      298;"   d       file:
+BYTES_TO_T_UINT_8      test/test_crypto.c      304;"   d       file:
+BYTE_ORDER     port/include/endian.h   45;"    d
+BYTE_ORDER     port/include/endian.h   47;"    d
+Boolean        src/common/defs.h       /^typedef enum { FALSE = 0, TRUE = 1 } Boolean;$/;"     t       typeref:enum:__anon87
+CA_CERT_NAME   src/eap_peer/eap_i.h    96;"    d
+CERTIFICATE_VERIFY     src/tls/tlsv1_server_i.h        /^              CERTIFICATE_VERIFY, CHANGE_CIPHER_SPEC, CLIENT_FINISHED,$/;"    e       enum:tlsv1_server::__anon39
+CHANGE_CIPHER_SPEC     src/tls/tlsv1_client_i.h        /^              SERVER_HELLO_DONE, CLIENT_KEY_EXCHANGE, CHANGE_CIPHER_SPEC,$/;" e       enum:tlsv1_client::__anon43
+CHANGE_CIPHER_SPEC     src/tls/tlsv1_server_i.h        /^              CERTIFICATE_VERIFY, CHANGE_CIPHER_SPEC, CLIENT_FINISHED,$/;"    e       enum:tlsv1_server::__anon39
+CHAR_BIT       src/crypto/libtommath.h 22;"    d
+CHAR_BIT       src/tls/libtommath.h    24;"    d
+CIPHER_CCMP    src/common/defs.h       /^      CIPHER_CCMP,$/;"        e       enum:wpa_cipher
+CIPHER_NONE    src/common/defs.h       /^      CIPHER_NONE,$/;"        e       enum:wpa_cipher
+CIPHER_TKIP    src/common/defs.h       /^      CIPHER_TKIP,$/;"        e       enum:wpa_cipher
+CIPHER_WEP104  src/common/defs.h       /^      CIPHER_WEP104$/;"       e       enum:wpa_cipher
+CIPHER_WEP40   src/common/defs.h       /^      CIPHER_WEP40,$/;"       e       enum:wpa_cipher
+CLIENT_CERTIFICATE     src/tls/tlsv1_server_i.h        /^              SERVER_HELLO_DONE, CLIENT_CERTIFICATE, CLIENT_KEY_EXCHANGE,$/;" e       enum:tlsv1_server::__anon39
+CLIENT_CERT_NAME       src/eap_peer/eap_i.h    95;"    d
+CLIENT_FINISHED        src/tls/tlsv1_server_i.h        /^              CERTIFICATE_VERIFY, CHANGE_CIPHER_SPEC, CLIENT_FINISHED,$/;"    e       enum:tlsv1_server::__anon39
+CLIENT_HELLO   src/tls/tlsv1_client_i.h        /^              CLIENT_HELLO, SERVER_HELLO, SERVER_CERTIFICATE,$/;"     e       enum:tlsv1_client::__anon43
+CLIENT_HELLO   src/tls/tlsv1_server_i.h        /^              CLIENT_HELLO, SERVER_HELLO, SERVER_CERTIFICATE,$/;"     e       enum:tlsv1_server::__anon39
+CLIENT_KEY_EXCHANGE    src/tls/tlsv1_client_i.h        /^              SERVER_HELLO_DONE, CLIENT_KEY_EXCHANGE, CHANGE_CIPHER_SPEC,$/;" e       enum:tlsv1_client::__anon43
+CLIENT_KEY_EXCHANGE    src/tls/tlsv1_server_i.h        /^              SERVER_HELLO_DONE, CLIENT_CERTIFICATE, CLIENT_KEY_EXCHANGE,$/;" e       enum:tlsv1_server::__anon39
+COMMON_H       include/utils/common.h  16;"    d
+COMPONENT_ADD_INCLUDEDIRS      component.mk    /^COMPONENT_ADD_INCLUDEDIRS := include port\/include include\/esp_supplicant$/;"        m
+COMPONENT_ADD_LDFLAGS  test/component.mk       /^COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME) -Wl,--no-whole-archive$/;"    m
+COMPONENT_PRIV_INCLUDEDIRS     component.mk    /^COMPONENT_PRIV_INCLUDEDIRS := src$/;" m
+COMPONENT_SRCDIRS      component.mk    /^COMPONENT_SRCDIRS := port src\/ap src\/common src\/crypto src\/eap_peer src\/fast_crypto src\/rsn_supp src\/tls src\/utils src\/esp_supplicant src\/wps$/;"   m
+CONFIG_INTERNAL_LIBTOMMATH     src/crypto/bignum.c     21;"    d       file:
+CONFIG_INTERNAL_LIBTOMMATH     src/tls/bignum.c        21;"    d       file:
+CONFIG_NO_RANDOM_POOL  include/crypto/random.h 18;"    d
+CONFIG_TLS_INTERNAL_CLIENT     src/tls/tls_internal.c  22;"    d       file:
+CONFIG_WPS_STRICT      src/wps/wps_defs.h      28;"    d
+CRYPTO_CIPHER_ALG_3DES include/crypto/crypto.h /^      CRYPTO_CIPHER_NULL = 0, CRYPTO_CIPHER_ALG_AES, CRYPTO_CIPHER_ALG_3DES,$/;"      e       enum:crypto_cipher_alg
+CRYPTO_CIPHER_ALG_AES  include/crypto/crypto.h /^      CRYPTO_CIPHER_NULL = 0, CRYPTO_CIPHER_ALG_AES, CRYPTO_CIPHER_ALG_3DES,$/;"      e       enum:crypto_cipher_alg
+CRYPTO_CIPHER_ALG_DES  include/crypto/crypto.h /^      CRYPTO_CIPHER_ALG_DES, CRYPTO_CIPHER_ALG_RC2, CRYPTO_CIPHER_ALG_RC4$/;" e       enum:crypto_cipher_alg
+CRYPTO_CIPHER_ALG_RC2  include/crypto/crypto.h /^      CRYPTO_CIPHER_ALG_DES, CRYPTO_CIPHER_ALG_RC2, CRYPTO_CIPHER_ALG_RC4$/;" e       enum:crypto_cipher_alg
+CRYPTO_CIPHER_ALG_RC4  include/crypto/crypto.h /^      CRYPTO_CIPHER_ALG_DES, CRYPTO_CIPHER_ALG_RC2, CRYPTO_CIPHER_ALG_RC4$/;" e       enum:crypto_cipher_alg
+CRYPTO_CIPHER_NULL     include/crypto/crypto.h /^      CRYPTO_CIPHER_NULL = 0, CRYPTO_CIPHER_ALG_AES, CRYPTO_CIPHER_ALG_3DES,$/;"      e       enum:crypto_cipher_alg
+CRYPTO_H       include/crypto/crypto.h 28;"    d
+CRYPTO_HASH_ALG_HMAC_MD5       include/crypto/crypto.h /^        CRYPTO_HASH_ALG_HMAC_MD5, CRYPTO_HASH_ALG_HMAC_SHA1,$/;"      e       enum:crypto_hash_alg
+CRYPTO_HASH_ALG_HMAC_SHA1      include/crypto/crypto.h /^        CRYPTO_HASH_ALG_HMAC_MD5, CRYPTO_HASH_ALG_HMAC_SHA1,$/;"      e       enum:crypto_hash_alg
+CRYPTO_HASH_ALG_HMAC_SHA256    include/crypto/crypto.h /^        CRYPTO_HASH_ALG_SHA256, CRYPTO_HASH_ALG_HMAC_SHA256$/;"       e       enum:crypto_hash_alg
+CRYPTO_HASH_ALG_MD5    include/crypto/crypto.h /^        CRYPTO_HASH_ALG_MD5, CRYPTO_HASH_ALG_SHA1,$/;"        e       enum:crypto_hash_alg
+CRYPTO_HASH_ALG_SHA1   include/crypto/crypto.h /^        CRYPTO_HASH_ALG_MD5, CRYPTO_HASH_ALG_SHA1,$/;"        e       enum:crypto_hash_alg
+CRYPTO_HASH_ALG_SHA256 include/crypto/crypto.h /^        CRYPTO_HASH_ALG_SHA256, CRYPTO_HASH_ALG_HMAC_SHA256$/;"       e       enum:crypto_hash_alg
+Ch     src/crypto/sha256-internal.c    87;"    d       file:
+Counter        src/ap/wpa_auth_i.h     /^      u8 Counter[WPA_NONCE_LEN];$/;"  m       struct:wpa_group
+DATA_MUTEX_GIVE        src/esp_supplicant/esp_wps.c    47;"    d       file:
+DATA_MUTEX_TAKE        src/esp_supplicant/esp_wps.c    46;"    d       file:
+DEBUG_PRINT    include/utils/wpa_debug.h       61;"    d
+DECISION_COND_SUCC     src/eap_peer/eap_i.h    /^      DECISION_FAIL, DECISION_COND_SUCC, DECISION_UNCOND_SUCC$/;"     e       enum:__anon1
+DECISION_FAIL  src/eap_peer/eap_i.h    /^      DECISION_FAIL, DECISION_COND_SUCC, DECISION_UNCOND_SUCC$/;"     e       enum:__anon1
+DECISION_UNCOND_SUCC   src/eap_peer/eap_i.h    /^      DECISION_FAIL, DECISION_COND_SUCC, DECISION_UNCOND_SUCC$/;"     e       enum:__anon1
+DEFINE_DL_LIST src/utils/list.h        100;"   d
+DEFS_H src/common/defs.h       16;"    d
+DENY_UNLESS_ACCEPTED   src/ap/ap_config.h      /^              DENY_UNLESS_ACCEPTED = 1,$/;"   e       enum:hostapd_bss_config::__anon17
+DES_I_H        src/crypto/des_i.h      10;"    d
+DEV_PW_DEFAULT src/wps/wps_defs.h      /^      DEV_PW_DEFAULT = 0x0000,$/;"    e       enum:wps_dev_password_id
+DEV_PW_MACHINE_SPECIFIED       src/wps/wps_defs.h      /^      DEV_PW_MACHINE_SPECIFIED = 0x0002,$/;"  e       enum:wps_dev_password_id
+DEV_PW_PUSHBUTTON      src/wps/wps_defs.h      /^      DEV_PW_PUSHBUTTON = 0x0004,$/;" e       enum:wps_dev_password_id
+DEV_PW_REGISTRAR_SPECIFIED     src/wps/wps_defs.h      /^      DEV_PW_REGISTRAR_SPECIFIED = 0x0005$/;" e       enum:wps_dev_password_id
+DEV_PW_REKEY   src/wps/wps_defs.h      /^      DEV_PW_REKEY = 0x0003,$/;"      e       enum:wps_dev_password_id
+DEV_PW_USER_SPECIFIED  src/wps/wps_defs.h      /^      DEV_PW_USER_SPECIFIED = 0x0001,$/;"     e       enum:wps_dev_password_id
+DH_GROUP       src/crypto/dh_groups.c  518;"   d       file:
+DH_GROUP5_H    include/crypto/dh_group5.h      16;"    d
+DH_GROUPS_H    include/crypto/dh_groups.h      16;"    d
+DIGIT_BIT      src/crypto/libtommath.h 76;"    d
+DIGIT_BIT      src/tls/libtommath.h    78;"    d
+DeauthenticationRequest        src/ap/wpa_auth_i.h     /^      Boolean DeauthenticationRequest;$/;"    m       struct:wpa_state_machine
+Disconnect     src/ap/wpa_auth_i.h     /^      Boolean Disconnect;$/;" m       struct:wpa_state_machine
+EAPOLKeyPairwise       src/ap/wpa_auth_i.h     /^      Boolean EAPOLKeyPairwise;$/;"   m       struct:wpa_state_machine
+EAPOLKeyReceived       src/ap/wpa_auth_i.h     /^      Boolean EAPOLKeyReceived;$/;"   m       struct:wpa_state_machine
+EAPOLKeyRequest        src/ap/wpa_auth_i.h     /^      Boolean EAPOLKeyRequest;$/;"    m       struct:wpa_state_machine
+EAPOL_COMMON_H src/common/eapol_common.h       16;"    d
+EAPOL_KEY_TYPE_RC4     src/common/eapol_common.h       /^enum { EAPOL_KEY_TYPE_RC4 = 1, EAPOL_KEY_TYPE_RSN = 2,$/;"    e       enum:__anon86
+EAPOL_KEY_TYPE_RSN     src/common/eapol_common.h       /^enum { EAPOL_KEY_TYPE_RC4 = 1, EAPOL_KEY_TYPE_RSN = 2,$/;"    e       enum:__anon86
+EAPOL_KEY_TYPE_WPA     src/common/eapol_common.h       /^       EAPOL_KEY_TYPE_WPA = 254 };$/;"        e       enum:__anon86
+EAPOL_VERSION  src/common/eapol_common.h       28;"    d
+EAP_CODE_FAILURE       src/eap_peer/eap_defs.h /^       EAP_CODE_FAILURE = 4 };$/;"    e       enum:__anon4
+EAP_CODE_REQUEST       src/eap_peer/eap_defs.h /^enum { EAP_CODE_REQUEST = 1, EAP_CODE_RESPONSE = 2, EAP_CODE_SUCCESS = 3,$/;" e       enum:__anon4
+EAP_CODE_RESPONSE      src/eap_peer/eap_defs.h /^enum { EAP_CODE_REQUEST = 1, EAP_CODE_RESPONSE = 2, EAP_CODE_SUCCESS = 3,$/;" e       enum:__anon4
+EAP_CODE_SUCCESS       src/eap_peer/eap_defs.h /^enum { EAP_CODE_REQUEST = 1, EAP_CODE_RESPONSE = 2, EAP_CODE_SUCCESS = 3,$/;" e       enum:__anon4
+EAP_COMMON_H   src/eap_peer/eap_common.h       10;"    d
+EAP_CONFIG_FLAGS_EXT_PASSWORD  src/eap_peer/eap_config.h       196;"   d
+EAP_CONFIG_FLAGS_PASSWORD_NTHASH       src/eap_peer/eap_config.h       195;"   d
+EAP_CONFIG_H   src/eap_peer/eap_config.h       10;"    d
+EAP_DEFS_H     src/eap_peer/eap_defs.h 10;"    d
+EAP_EMSK_LEN   src/eap_peer/eap_defs.h 90;"    d
+EAP_H  src/eap_peer/eap.h      10;"    d
+EAP_I_H        src/eap_peer/eap_i.h    10;"    d
+EAP_METHODS_H  src/eap_peer/eap_methods.h      10;"    d
+EAP_MSK_LEN    src/eap_peer/eap_defs.h 89;"    d
+EAP_PEAP_COMMON_H      src/eap_peer/eap_peap_common.h  10;"    d
+EAP_PEAP_VERSION       src/eap_peer/eap_peap.c 28;"    d       file:
+EAP_TLS_COMMON_H       src/eap_peer/eap_tls_common.h   10;"    d
+EAP_TLS_FLAGS_LENGTH_INCLUDED  src/eap_peer/eap_tls_common.h   80;"    d
+EAP_TLS_FLAGS_MORE_FRAGMENTS   src/eap_peer/eap_tls_common.h   81;"    d
+EAP_TLS_FLAGS_START    src/eap_peer/eap_tls_common.h   82;"    d
+EAP_TLS_H      src/eap_peer/eap_tls.h  10;"    d
+EAP_TLS_KEY_LEN        src/eap_peer/eap_tls_common.h   86;"    d
+EAP_TLS_VERSION_MASK   src/eap_peer/eap_tls_common.h   83;"    d
+EAP_TLV_ACTION_NEGOTIATE_EAP   src/eap_peer/eap_tlv_common.h   110;"   d
+EAP_TLV_ACTION_PROCESS_TLV     src/eap_peer/eap_tlv_common.h   109;"   d
+EAP_TLV_CALLED_STATION_ID_TLV  src/eap_peer/eap_tlv_common.h   24;"    d
+EAP_TLV_CALLING_STATION_ID_TLV src/eap_peer/eap_tlv_common.h   23;"    d
+EAP_TLV_COMMON_H       src/eap_peer/eap_tlv_common.h   10;"    d
+EAP_TLV_CONNECTION_BINDING_TLV src/eap_peer/eap_tlv_common.h   16;"    d
+EAP_TLV_CRYPTO_BINDING_SUBTYPE_REQUEST src/eap_peer/eap_tlv_common.h   106;"   d
+EAP_TLV_CRYPTO_BINDING_SUBTYPE_RESPONSE        src/eap_peer/eap_tlv_common.h   107;"   d
+EAP_TLV_CRYPTO_BINDING_TLV     src/eap_peer/eap_tlv_common.h   22;"    d
+EAP_TLV_EAP_PAYLOAD_TLV        src/eap_peer/eap_tlv_common.h   19;"    d
+EAP_TLV_ERROR_CODE_TLV src/eap_peer/eap_tlv_common.h   15;"    d
+EAP_TLV_IDENTITY_TYPE_TLV      src/eap_peer/eap_tlv_common.h   27;"    d
+EAP_TLV_INTERMEDIATE_RESULT_TLV        src/eap_peer/eap_tlv_common.h   20;"    d
+EAP_TLV_NAK_TLV        src/eap_peer/eap_tlv_common.h   14;"    d
+EAP_TLV_NAS_PORT_TYPE_TLV      src/eap_peer/eap_tlv_common.h   25;"    d
+EAP_TLV_PAC_TLV        src/eap_peer/eap_tlv_common.h   21;"    d
+EAP_TLV_PKCS7_TLV      src/eap_peer/eap_tlv_common.h   30;"    d
+EAP_TLV_REQUEST_ACTION_TLV     src/eap_peer/eap_tlv_common.h   29;"    d
+EAP_TLV_RESULT_FAILURE src/eap_peer/eap_tlv_common.h   33;"    d
+EAP_TLV_RESULT_SUCCESS src/eap_peer/eap_tlv_common.h   32;"    d
+EAP_TLV_RESULT_TLV     src/eap_peer/eap_tlv_common.h   13;"    d
+EAP_TLV_SERVER_IDENTIFIER_TLV  src/eap_peer/eap_tlv_common.h   26;"    d
+EAP_TLV_SERVER_TRUSTED_ROOT_TLV        src/eap_peer/eap_tlv_common.h   28;"    d
+EAP_TLV_TYPE_MANDATORY src/eap_peer/eap_tlv_common.h   35;"    d
+EAP_TLV_TYPE_MASK      src/eap_peer/eap_tlv_common.h   36;"    d
+EAP_TLV_URI_TLV        src/eap_peer/eap_tlv_common.h   18;"    d
+EAP_TLV_VENDOR_SPECIFIC_TLV    src/eap_peer/eap_tlv_common.h   17;"    d
+EAP_TTLS_CHAP_CHALLENGE_LEN    src/eap_peer/eap_ttls.h 62;"    d
+EAP_TTLS_CHAP_PASSWORD_LEN     src/eap_peer/eap_ttls.h 63;"    d
+EAP_TTLS_H     src/eap_peer/eap_ttls.h 10;"    d
+EAP_TTLS_MSCHAPV2_CHALLENGE_LEN        src/eap_peer/eap_ttls.h 58;"    d
+EAP_TTLS_MSCHAPV2_RESPONSE_LEN src/eap_peer/eap_ttls.h 59;"    d
+EAP_TTLS_MSCHAP_CHALLENGE_LEN  src/eap_peer/eap_ttls.h 60;"    d
+EAP_TTLS_MSCHAP_RESPONSE_LEN   src/eap_peer/eap_ttls.h 61;"    d
+EAP_TTLS_PHASE2_CHAP   src/eap_peer/eap_ttls.c /^              EAP_TTLS_PHASE2_CHAP$/;"        e       enum:eap_ttls_data::phase2_types        file:
+EAP_TTLS_PHASE2_EAP    src/eap_peer/eap_ttls.c /^              EAP_TTLS_PHASE2_EAP,$/;"        e       enum:eap_ttls_data::phase2_types        file:
+EAP_TTLS_PHASE2_MSCHAP src/eap_peer/eap_ttls.c /^              EAP_TTLS_PHASE2_MSCHAP,$/;"     e       enum:eap_ttls_data::phase2_types        file:
+EAP_TTLS_PHASE2_MSCHAPV2       src/eap_peer/eap_ttls.c /^              EAP_TTLS_PHASE2_MSCHAPV2,$/;"   e       enum:eap_ttls_data::phase2_types        file:
+EAP_TTLS_PHASE2_PAP    src/eap_peer/eap_ttls.c /^              EAP_TTLS_PHASE2_PAP,$/;"        e       enum:eap_ttls_data::phase2_types        file:
+EAP_TTLS_VERSION       src/eap_peer/eap_ttls.c 28;"    d       file:
+EAP_TYPE_AKA   src/eap_peer/eap_defs.h /^      EAP_TYPE_AKA = 23 \/* RFC 4187 *\/,$/;" e       enum:__anon5
+EAP_TYPE_AKA_PRIME     src/eap_peer/eap_defs.h /^      EAP_TYPE_AKA_PRIME = 50 \/* RFC 5448 *\/,$/;"   e       enum:__anon5
+EAP_TYPE_EKE   src/eap_peer/eap_defs.h /^      EAP_TYPE_EKE = 53 \/* RFC 6124 *\/,$/;" e       enum:__anon5
+EAP_TYPE_EXPANDED      src/eap_peer/eap_defs.h /^      EAP_TYPE_EXPANDED = 254 \/* RFC 3748 *\/$/;"    e       enum:__anon5
+EAP_TYPE_FAST  src/eap_peer/eap_defs.h /^      EAP_TYPE_FAST = 43 \/* RFC 4851 *\/,$/;"        e       enum:__anon5
+EAP_TYPE_GPSK  src/eap_peer/eap_defs.h /^      EAP_TYPE_GPSK = 51 \/* RFC 5433 *\/,$/;"        e       enum:__anon5
+EAP_TYPE_GTC   src/eap_peer/eap_defs.h /^      EAP_TYPE_GTC = 6, \/* RFC 3748 *\/$/;"  e       enum:__anon5
+EAP_TYPE_IDENTITY      src/eap_peer/eap_defs.h /^      EAP_TYPE_IDENTITY = 1 \/* RFC 3748 *\/,$/;"     e       enum:__anon5
+EAP_TYPE_IKEV2 src/eap_peer/eap_defs.h /^      EAP_TYPE_IKEV2 = 49 \/* RFC 5106 *\/,$/;"       e       enum:__anon5
+EAP_TYPE_LEAP  src/eap_peer/eap_defs.h /^      EAP_TYPE_LEAP = 17 \/* Cisco proprietary *\/,$/;"       e       enum:__anon5
+EAP_TYPE_MD5   src/eap_peer/eap_defs.h /^      EAP_TYPE_MD5 = 4, \/* RFC 3748 *\/$/;"  e       enum:__anon5
+EAP_TYPE_MSCHAPV2      src/eap_peer/eap_defs.h /^      EAP_TYPE_MSCHAPV2 = 26 \/* draft-kamath-pppext-eap-mschapv2-00.txt *\/,$/;"     e       enum:__anon5
+EAP_TYPE_NAK   src/eap_peer/eap_defs.h /^      EAP_TYPE_NAK = 3 \/* Response only, RFC 3748 *\/,$/;"   e       enum:__anon5
+EAP_TYPE_NONE  src/eap_peer/eap_defs.h /^      EAP_TYPE_NONE = 0,$/;"  e       enum:__anon5
+EAP_TYPE_NOTIFICATION  src/eap_peer/eap_defs.h /^      EAP_TYPE_NOTIFICATION = 2 \/* RFC 3748 *\/,$/;" e       enum:__anon5
+EAP_TYPE_OTP   src/eap_peer/eap_defs.h /^      EAP_TYPE_OTP = 5 \/* RFC 3748 *\/,$/;"  e       enum:__anon5
+EAP_TYPE_PAX   src/eap_peer/eap_defs.h /^      EAP_TYPE_PAX = 46 \/* RFC 4746 *\/,$/;" e       enum:__anon5
+EAP_TYPE_PEAP  src/eap_peer/eap_defs.h /^      EAP_TYPE_PEAP = 25 \/* draft-josefsson-pppext-eap-tls-eap-06.txt *\/,$/;"       e       enum:__anon5
+EAP_TYPE_PSK   src/eap_peer/eap_defs.h /^      EAP_TYPE_PSK = 47 \/* RFC 4764 *\/,$/;" e       enum:__anon5
+EAP_TYPE_PWD   src/eap_peer/eap_defs.h /^      EAP_TYPE_PWD = 52 \/* RFC 5931 *\/,$/;" e       enum:__anon5
+EAP_TYPE_SAKE  src/eap_peer/eap_defs.h /^      EAP_TYPE_SAKE = 48 \/* RFC 4763 *\/,$/;"        e       enum:__anon5
+EAP_TYPE_SIM   src/eap_peer/eap_defs.h /^      EAP_TYPE_SIM = 18 \/* RFC 4186 *\/,$/;" e       enum:__anon5
+EAP_TYPE_TLS   src/eap_peer/eap_defs.h /^      EAP_TYPE_TLS = 13 \/* RFC 2716 *\/,$/;" e       enum:__anon5
+EAP_TYPE_TLV   src/eap_peer/eap_defs.h /^      EAP_TYPE_TLV = 33 \/* draft-josefsson-pppext-eap-tls-eap-07.txt *\/,$/;"        e       enum:__anon5
+EAP_TYPE_TNC   src/eap_peer/eap_defs.h /^      EAP_TYPE_TNC = 38 \/* TNC IF-T v1.0-r3; note: tentative assignment;$/;" e       enum:__anon5
+EAP_TYPE_TTLS  src/eap_peer/eap_defs.h /^      EAP_TYPE_TTLS = 21 \/* RFC 5281 *\/,$/;"        e       enum:__anon5
+EAP_UNAUTH_TLS_TYPE    src/eap_peer/eap_tls_common.h   89;"    d
+EAP_VENDOR_HOSTAP      src/eap_peer/eap_defs.h /^      EAP_VENDOR_HOSTAP = 39068 \/* hostapd\/wpa_supplicant project *\/$/;"   e       enum:__anon6
+EAP_VENDOR_IETF        src/eap_peer/eap_defs.h /^      EAP_VENDOR_IETF = 0,$/;"        e       enum:__anon6
+EAP_VENDOR_MICROSOFT   src/eap_peer/eap_defs.h /^      EAP_VENDOR_MICROSOFT = 0x000137 \/* Microsoft *\/,$/;"  e       enum:__anon6
+EAP_VENDOR_TYPE_UNAUTH_TLS     src/eap_peer/eap_defs.h 87;"    d
+EAP_VENDOR_UNAUTH_TLS  src/eap_peer/eap_defs.h 86;"    d
+EAP_VENDOR_WFA src/eap_peer/eap_defs.h /^      EAP_VENDOR_WFA = 0x00372A \/* Wi-Fi Alliance *\/,$/;"   e       enum:__anon6
+ERP_INFO_BARKER_PREAMBLE_MODE  src/common/ieee802_11_defs.h    388;"   d
+ERP_INFO_NON_ERP_PRESENT       src/common/ieee802_11_defs.h    386;"   d
+ERP_INFO_USE_PROTECTION        src/common/ieee802_11_defs.h    387;"   d
+ERROR_ACCT_DISABLED    src/eap_peer/eap_mschapv2.c     35;"    d       file:
+ERROR_AUTHENTICATION_FAILURE   src/eap_peer/eap_mschapv2.c     38;"    d       file:
+ERROR_CHANGING_PASSWORD        src/eap_peer/eap_mschapv2.c     39;"    d       file:
+ERROR_NO_DIALIN_PERMISSION     src/eap_peer/eap_mschapv2.c     37;"    d       file:
+ERROR_PASSWD_EXPIRED   src/eap_peer/eap_mschapv2.c     36;"    d       file:
+ERROR_RESTRICTED_LOGON_HOURS   src/eap_peer/eap_mschapv2.c     34;"    d       file:
+ESP_ERR_WIFI_REGISTRAR include/esp_supplicant/esp_wps.h        46;"    d
+ESP_ERR_WIFI_WPS_SM    include/esp_supplicant/esp_wps.h        48;"    d
+ESP_ERR_WIFI_WPS_TYPE  include/esp_supplicant/esp_wps.h        47;"    d
+ESP_HOSTAP_H   src/esp_supplicant/esp_hostap.h 16;"    d
+ESP_WPA_ENTERPRISE_H   include/esp_supplicant/esp_wpa_enterprise.h     16;"    d
+ESS_DISASSOC_IMMINENT  src/common/wpa_ctrl.h   148;"   d
+ESTABLISHED    src/tls/tlsv1_client_i.h        /^              ESTABLISHED, FAILED$/;" e       enum:tlsv1_client::__anon43
+ESTABLISHED    src/tls/tlsv1_server_i.h        /^              ESTABLISHED, FAILED$/;" e       enum:tlsv1_server::__anon39
+ETH_ALEN       include/utils/common.h  194;"   d
+ETH_P_ALL      include/utils/common.h  200;"   d
+ETH_P_EAPOL    include/utils/common.h  206;"   d
+ETH_P_PAE      include/utils/common.h  203;"   d
+ETH_P_RRB      include/utils/common.h  212;"   d
+ETH_P_RSN_PREAUTH      include/utils/common.h  209;"   d
+ETSParam       src/esp_supplicant/esp_wifi_driver.h    /^typedef uint32_t ETSParam;$/;"        t
+ETSSignal      src/esp_supplicant/esp_wifi_driver.h    /^typedef uint32_t ETSSignal;$/;"       t
+EXT_HT_CAP_INFO_HTC_SUPPORTED  src/common/ieee802_11_defs.h    416;"   d
+EXT_HT_CAP_INFO_MCS_FEEDBACK_OFFSET    src/common/ieee802_11_defs.h    415;"   d
+EXT_HT_CAP_INFO_PCO    src/common/ieee802_11_defs.h    413;"   d
+EXT_HT_CAP_INFO_RD_RESPONDER   src/common/ieee802_11_defs.h    417;"   d
+EXT_HT_CAP_INFO_TRANS_TIME_OFFSET      src/common/ieee802_11_defs.h    414;"   d
+EXT_PASSWORD_H src/utils/ext_password.h        10;"    d
+EXT_PASSWORD_I_H       src/utils/ext_password_i.h      10;"    d
+EapDecision    src/eap_peer/eap_i.h    /^} EapDecision;$/;"    t       typeref:enum:__anon1
+EapMethodState src/eap_peer/eap_i.h    /^} EapMethodState;$/;" t       typeref:enum:__anon2
+EapType        src/eap_peer/eap_defs.h /^} EapType;$/;"        t       typeref:enum:__anon5
+F1     src/crypto/md4-internal.c       128;"   d       file:
+F1     src/crypto/md5-internal.c       201;"   d       file:
+F2     src/crypto/md4-internal.c       129;"   d       file:
+F2     src/crypto/md5-internal.c       202;"   d       file:
+F3     src/crypto/md4-internal.c       130;"   d       file:
+F3     src/crypto/md5-internal.c       203;"   d       file:
+F4     src/crypto/md5-internal.c       204;"   d       file:
+FAILED src/tls/tlsv1_client_i.h        /^              ESTABLISHED, FAILED$/;" e       enum:tlsv1_client::__anon43
+FAILED src/tls/tlsv1_server_i.h        /^              ESTABLISHED, FAILED$/;" e       enum:tlsv1_server::__anon39
+FALSE  src/common/defs.h       /^typedef enum { FALSE = 0, TRUE = 1 } Boolean;$/;"     e       enum:__anon87
+FALSE  src/common/defs.h       19;"    d
+FTIE_SUBELEM_GTK       src/common/wpa_common.h 290;"   d
+FTIE_SUBELEM_IGTK      src/common/wpa_common.h 292;"   d
+FTIE_SUBELEM_R0KH_ID   src/common/wpa_common.h 291;"   d
+FTIE_SUBELEM_R1KH_ID   src/common/wpa_common.h 289;"   d
+FT_PACKET_R0KH_R1KH_PULL       src/ap/wpa_auth.h       40;"    d
+FT_PACKET_R0KH_R1KH_PUSH       src/ap/wpa_auth.h       42;"    d
+FT_PACKET_R0KH_R1KH_RESP       src/ap/wpa_auth.h       41;"    d
+FT_PACKET_REQUEST      src/ap/wpa_auth.h       37;"    d
+FT_PACKET_RESPONSE     src/ap/wpa_auth.h       38;"    d
+FT_R0KH_ID_MAX_LEN     src/common/wpa_common.h 125;"   d
+FT_R0KH_R1KH_PULL_DATA_LEN     src/ap/wpa_auth.h       44;"    d
+FT_R0KH_R1KH_PUSH_DATA_LEN     src/ap/wpa_auth.h       46;"    d
+FT_R0KH_R1KH_RESP_DATA_LEN     src/ap/wpa_auth.h       45;"    d
+FT_R1KH_ID_LEN src/common/wpa_common.h 126;"   d
+GAS_DIALOG_MAX src/ap/sta_info.h       118;"   d
+GAS_RESPONSE_INFO      src/common/wpa_ctrl.h   153;"   d
+GETU32 src/crypto/aes_i.h      116;"   d
+GETU32 src/crypto/aes_i.h      119;"   d
+GInit  src/ap/wpa_auth_i.h     /^      Boolean GInit;$/;"      m       struct:wpa_group
+GKeyDoneStations       src/ap/wpa_auth_i.h     /^      int GKeyDoneStations;$/;"       m       struct:wpa_group
+GM     src/ap/wpa_auth_i.h     /^      int GN, GM;$/;" m       struct:wpa_group
+GMK    src/ap/wpa_auth_i.h     /^      u8 GMK[WPA_GMK_LEN];$/;"        m       struct:wpa_group
+GM_igtk        src/ap/wpa_auth_i.h     /^      int GN_igtk, GM_igtk;$/;"       m       struct:wpa_group
+GN     src/ap/wpa_auth_i.h     /^      int GN, GM;$/;" m       struct:wpa_group
+GN_igtk        src/ap/wpa_auth_i.h     /^      int GN_igtk, GM_igtk;$/;"       m       struct:wpa_group
+GNonce src/ap/wpa_auth_i.h     /^      u8 GNonce[WPA_NONCE_LEN];$/;"   m       struct:wpa_group
+GTK    src/ap/wpa_auth_i.h     /^      u8 GTK[2][WPA_GTK_MAX_LEN];$/;" m       struct:wpa_group
+GTKAuthenticator       src/ap/wpa_auth_i.h     /^      Boolean GTKAuthenticator;$/;"   m       struct:wpa_group
+GTKReKey       src/ap/wpa_auth_i.h     /^      Boolean GTKReKey;$/;"   m       struct:wpa_group
+GTK_len        src/ap/wpa_auth_i.h     /^      int GTK_len;$/;"        m       struct:wpa_group
+GTimeoutCtr    src/ap/wpa_auth_i.h     /^      int GTimeoutCtr;$/;"    m       struct:wpa_state_machine
+GUpdateStationKeys     src/ap/wpa_auth_i.h     /^      Boolean GUpdateStationKeys;$/;" m       struct:wpa_state_machine
+Gamma0 src/crypto/sha256-internal.c    93;"    d       file:
+Gamma1 src/crypto/sha256-internal.c    94;"    d       file:
+HOSTAPD_CONFIG_H       src/ap/ap_config.h      10;"    d
+HOSTAPD_H      src/ap/hostapd.h        10;"    d
+HOSTAPD_MAX_SSID_LEN   src/ap/ap_config.h      32;"    d
+HOSTAPD_MODE_IEEE80211A        src/common/defs.h       /^      HOSTAPD_MODE_IEEE80211A,$/;"    e       enum:hostapd_hw_mode
+HOSTAPD_MODE_IEEE80211AD       src/common/defs.h       /^      HOSTAPD_MODE_IEEE80211AD,$/;"   e       enum:hostapd_hw_mode
+HOSTAPD_MODE_IEEE80211B        src/common/defs.h       /^      HOSTAPD_MODE_IEEE80211B,$/;"    e       enum:hostapd_hw_mode
+HOSTAPD_MODE_IEEE80211G        src/common/defs.h       /^      HOSTAPD_MODE_IEEE80211G,$/;"    e       enum:hostapd_hw_mode
+HOSTAPD_RATE_BASIC     src/ap/hostapd.h        53;"    d
+HT_CAP_INFO_40MHZ_INTOLERANT   src/common/ieee802_11_defs.h    409;"   d
+HT_CAP_INFO_DELAYED_BA src/common/ieee802_11_defs.h    405;"   d
+HT_CAP_INFO_DSSS_CCK40MHZ      src/common/ieee802_11_defs.h    407;"   d
+HT_CAP_INFO_GREEN_FIELD        src/common/ieee802_11_defs.h    397;"   d
+HT_CAP_INFO_LDPC_CODING_CAP    src/common/ieee802_11_defs.h    391;"   d
+HT_CAP_INFO_LSIG_TXOP_PROTECT_SUPPORT  src/common/ieee802_11_defs.h    410;"   d
+HT_CAP_INFO_MAX_AMSDU_SIZE     src/common/ieee802_11_defs.h    406;"   d
+HT_CAP_INFO_PSMP_SUPP  src/common/ieee802_11_defs.h    408;"   d
+HT_CAP_INFO_RX_STBC_1  src/common/ieee802_11_defs.h    402;"   d
+HT_CAP_INFO_RX_STBC_12 src/common/ieee802_11_defs.h    403;"   d
+HT_CAP_INFO_RX_STBC_123        src/common/ieee802_11_defs.h    404;"   d
+HT_CAP_INFO_RX_STBC_MASK       src/common/ieee802_11_defs.h    401;"   d
+HT_CAP_INFO_SHORT_GI20MHZ      src/common/ieee802_11_defs.h    398;"   d
+HT_CAP_INFO_SHORT_GI40MHZ      src/common/ieee802_11_defs.h    399;"   d
+HT_CAP_INFO_SMPS_DISABLED      src/common/ieee802_11_defs.h    396;"   d
+HT_CAP_INFO_SMPS_DYNAMIC       src/common/ieee802_11_defs.h    395;"   d
+HT_CAP_INFO_SMPS_MASK  src/common/ieee802_11_defs.h    393;"   d
+HT_CAP_INFO_SMPS_STATIC        src/common/ieee802_11_defs.h    394;"   d
+HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET     src/common/ieee802_11_defs.h    392;"   d
+HT_CAP_INFO_TX_STBC    src/common/ieee802_11_defs.h    400;"   d
+HT_INFO_HT_PARAM_CTRL_ACCESS_ONLY      src/common/ieee802_11_defs.h    453;"   d
+HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH  src/common/ieee802_11_defs.h    451;"   d
+HT_INFO_HT_PARAM_RIFS_MODE     src/common/ieee802_11_defs.h    452;"   d
+HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE  src/common/ieee802_11_defs.h    449;"   d
+HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW  src/common/ieee802_11_defs.h    450;"   d
+HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK       src/common/ieee802_11_defs.h    448;"   d
+HT_INFO_HT_PARAM_SRV_INTERVAL_GRANULARITY      src/common/ieee802_11_defs.h    454;"   d
+HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT     src/common/ieee802_11_defs.h    465;"   d
+HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT      src/common/ieee802_11_defs.h    467;"   d
+HT_INFO_OPERATION_MODE_OP_MODE_MASK    src/common/ieee802_11_defs.h    462;"   d
+HT_INFO_OPERATION_MODE_OP_MODE_OFFSET  src/common/ieee802_11_defs.h    464;"   d
+HT_INFO_OPERATION_MODE_TRANSMIT_BURST_LIMIT    src/common/ieee802_11_defs.h    466;"   d
+HT_INFO_STBC_PARAM_DUAL_BEACON src/common/ieee802_11_defs.h    469;"   d
+HT_INFO_STBC_PARAM_DUAL_STBC_PROTECT   src/common/ieee802_11_defs.h    470;"   d
+HT_INFO_STBC_PARAM_LSIG_TXOP_PROTECT_ALLOWED   src/common/ieee802_11_defs.h    472;"   d
+HT_INFO_STBC_PARAM_PCO_ACTIVE  src/common/ieee802_11_defs.h    473;"   d
+HT_INFO_STBC_PARAM_PCO_PHASE   src/common/ieee802_11_defs.h    474;"   d
+HT_INFO_STBC_PARAM_SECONDARY_BCN       src/common/ieee802_11_defs.h    471;"   d
+IANA_SECP256R1 src/crypto/crypto_mbedtls.c     30;"    d       file:
+IBSS_RSN_COMPLETED     src/common/wpa_ctrl.h   71;"    d
+ICACHE_RODATA_ATTR     src/crypto/crypto_internal-cipher.c     /^static const char mem_debug_file[] ICACHE_RODATA_ATTR = __FILE__;$/;" v       file:
+ICACHE_RODATA_ATTR     src/crypto/crypto_internal.c    /^static const char mem_debug_file[] ICACHE_RODATA_ATTR = __FILE__;$/;" v       file:
+ICACHE_RODATA_ATTR     src/fast_crypto/fast_crypto_internal.c  /^static const char mem_debug_file[] ICACHE_RODATA_ATTR = __FILE__;$/;" v       file:
+ICACHE_RODATA_ATTR     src/tls/libtommath.h    /^static const char mem_debug_file[] ICACHE_RODATA_ATTR = __FILE__;$/;" v
+IEEE80211_BSSID_FROMDS src/common/ieee802_11_defs.h    252;"   d
+IEEE80211_DA_FROMDS    src/common/ieee802_11_defs.h    251;"   d
+IEEE80211_FC   src/common/ieee802_11_defs.h    257;"   d
+IEEE80211_HDRLEN       src/common/ieee802_11_defs.h    255;"   d
+IEEE80211_SA_FROMDS    src/common/ieee802_11_defs.h    253;"   d
+IEEE8021X_KEY_INDEX_FLAG       src/common/eapol_common.h       44;"    d
+IEEE8021X_KEY_INDEX_MASK       src/common/eapol_common.h       45;"    d
+IEEE8021X_KEY_IV_LEN   src/common/eapol_common.h       42;"    d
+IEEE8021X_KEY_SIGN_LEN src/common/eapol_common.h       41;"    d
+IEEE8021X_REPLAY_COUNTER_LEN   src/common/eapol_common.h       40;"    d
+IEEE802_11_DEFS_H      src/common/ieee802_11_defs.h    17;"    d
+IEEE802_1X_H   src/ap/ieee802_1x.h     10;"    d
+IEEE802_1X_TYPE_EAPOL_ENCAPSULATED_ASF_ALERT   src/common/eapol_common.h       /^       IEEE802_1X_TYPE_EAPOL_ENCAPSULATED_ASF_ALERT = 4$/;"   e       enum:__anon85
+IEEE802_1X_TYPE_EAPOL_KEY      src/common/eapol_common.h       /^       IEEE802_1X_TYPE_EAPOL_KEY = 3,$/;"     e       enum:__anon85
+IEEE802_1X_TYPE_EAPOL_LOGOFF   src/common/eapol_common.h       /^       IEEE802_1X_TYPE_EAPOL_LOGOFF = 2,$/;"  e       enum:__anon85
+IEEE802_1X_TYPE_EAPOL_START    src/common/eapol_common.h       /^       IEEE802_1X_TYPE_EAPOL_START = 1,$/;"   e       enum:__anon85
+IEEE802_1X_TYPE_EAP_PACKET     src/common/eapol_common.h       /^enum { IEEE802_1X_TYPE_EAP_PACKET = 0,$/;"    e       enum:__anon85
+IGTK   src/ap/wpa_auth_i.h     /^      u8 IGTK[2][WPA_IGTK_LEN];$/;"   m       struct:wpa_group
+INCLUDES_H     src/utils/includes.h    20;"    d
+INLINE port/include/endian.h   118;"   d
+INTERWORKING_AP        src/common/wpa_ctrl.h   150;"   d
+INTERWORKING_NO_MATCH  src/common/wpa_ctrl.h   151;"   d
+IS_WPS_ENROLLEE        src/esp_supplicant/esp_wifi_driver.h    118;"   d
+IS_WPS_REGISTRAR       src/esp_supplicant/esp_wifi_driver.h    117;"   d
+Init   src/ap/wpa_auth_i.h     /^      Boolean Init;$/;"       m       struct:wpa_state_machine
+K      src/crypto/sha256-internal.c    /^static const unsigned long K[64] = {$/;"      v       file:
+KEYENTRY_TABLE_MAP     src/rsn_supp/wpa.h      178;"   d
+KEY_MGMT_802_1X        src/common/defs.h       /^      KEY_MGMT_802_1X,$/;"    e       enum:wpa_key_mgmt
+KEY_MGMT_802_1X_NO_WPA src/common/defs.h       /^      KEY_MGMT_802_1X_NO_WPA,$/;"     e       enum:wpa_key_mgmt
+KEY_MGMT_802_1X_SHA256 src/common/defs.h       /^      KEY_MGMT_802_1X_SHA256,$/;"     e       enum:wpa_key_mgmt
+KEY_MGMT_FT_802_1X     src/common/defs.h       /^      KEY_MGMT_FT_802_1X,$/;" e       enum:wpa_key_mgmt
+KEY_MGMT_FT_PSK        src/common/defs.h       /^      KEY_MGMT_FT_PSK,$/;"    e       enum:wpa_key_mgmt
+KEY_MGMT_NONE  src/common/defs.h       /^      KEY_MGMT_NONE,$/;"      e       enum:wpa_key_mgmt
+KEY_MGMT_PSK   src/common/defs.h       /^      KEY_MGMT_PSK,$/;"       e       enum:wpa_key_mgmt
+KEY_MGMT_PSK_SHA256    src/common/defs.h       /^      KEY_MGMT_PSK_SHA256,$/;"        e       enum:wpa_key_mgmt
+KEY_MGMT_WPA_NONE      src/common/defs.h       /^      KEY_MGMT_WPA_NONE,$/;"  e       enum:wpa_key_mgmt
+KEY_MGMT_WPS   src/common/defs.h       /^      KEY_MGMT_WPS$/;"        e       enum:wpa_key_mgmt
+LIST_H src/utils/list.h        16;"    d
+LITTLE_ENDIAN  port/include/endian.h   40;"    d
+LOGGER_DEBUG   src/ap/wpa_auth.h       /^      LOGGER_DEBUG, LOGGER_INFO, LOGGER_WARNING$/;"   e       enum:__anon20
+LOGGER_INFO    src/ap/wpa_auth.h       /^      LOGGER_DEBUG, LOGGER_INFO, LOGGER_WARNING$/;"   e       enum:__anon20
+LOGGER_WARNING src/ap/wpa_auth.h       /^      LOGGER_DEBUG, LOGGER_INFO, LOGGER_WARNING$/;"   e       enum:__anon20
+LONG_PREAMBLE  src/ap/ap_config.h      /^              LONG_PREAMBLE = 0,$/;"  e       enum:hostapd_config::__anon19
+LTM_NO_NEG_EXP src/crypto/libtommath.h 59;"    d
+LTM_NO_NEG_EXP src/tls/libtommath.h    61;"    d
+MAC2STR        include/utils/common.h  259;"   d
+MACSTR include/utils/common.h  260;"   d
+MAX    src/crypto/libtommath.h 68;"    d
+MAX    src/tls/libtommath.h    70;"    d
+MAX_CIPHER_COUNT       src/tls/tlsv1_client_i.h        42;"    d
+MAX_CIPHER_COUNT       src/tls/tlsv1_server_i.h        37;"    d
+MAX_CRED_COUNT src/wps/wps_attr_parse.h        92;"    d
+MAX_REQ_DEV_TYPE_COUNT src/wps/wps_attr_parse.h        97;"    d
+MAX_STA_COUNT  src/ap/ap_config.h      18;"    d
+MAX_VLAN_ID    src/ap/ap_config.h      19;"    d
+MAX_WPS_PARSE_VENDOR_EXT       src/wps/wps.h   71;"    d
+MAX_WPS_VENDOR_EXTENSIONS      src/wps/wps.h   67;"    d
+MD4Context     src/crypto/md4-internal.c       /^typedef struct MD4Context {$/;"       s       file:
+MD4Final       src/crypto/md4-internal.c       /^static void MD4Final(unsigned char digest[MD4_DIGEST_LENGTH], MD4_CTX *ctx)$/;"       f       file:
+MD4Init        src/crypto/md4-internal.c       /^static void MD4Init(MD4_CTX *ctx)$/;" f       file:
+MD4Pad src/crypto/md4-internal.c       /^static void MD4Pad(MD4_CTX *ctx)$/;"  f       file:
+MD4SETP        src/crypto/md4-internal.c       132;"   d       file:
+MD4Transform   src/crypto/md4-internal.c       /^static void MD4Transform(u32 state[4], const u8 block[MD4_BLOCK_LENGTH])$/;"  f       file:
+MD4Update      src/crypto/md4-internal.c       /^static void MD4Update(MD4_CTX *ctx, const unsigned char *input, size_t len)$/;"       f       file:
+MD4_BLOCK_LENGTH       src/crypto/md4-internal.c       11;"    d       file:
+MD4_CTX        src/crypto/md4-internal.c       /^} MD4_CTX;$/;"        t       typeref:struct:MD4Context       file:
+MD4_DIGEST_LENGTH      src/crypto/md4-internal.c       12;"    d       file:
+MD4_DIGEST_STRING_LENGTH       src/crypto/md4-internal.c       36;"    d       file:
+MD5Context     src/crypto/md5_i.h      /^struct MD5Context {$/;"       s
+MD5Final       src/crypto/md5-internal.c       /^MD5Final(unsigned char digest[16], struct MD5Context *ctx)$/;"        f
+MD5Init        src/crypto/md5-internal.c       /^MD5Init(struct MD5Context *ctx)$/;"   f
+MD5STEP        src/crypto/md5-internal.c       207;"   d       file:
+MD5Transform   src/crypto/md5-internal.c       /^MD5Transform(u32 buf[4], u32 const in[16])$/;"        f       file:
+MD5Update      src/crypto/md5-internal.c       /^MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)$/;" f
+MD5_CTX        src/crypto/md5-internal.c       /^typedef struct MD5Context MD5_CTX;$/;"        t       typeref:struct:MD5Context       file:
+MD5_H  include/crypto/md5.h    16;"    d
+MD5_I_H        src/crypto/md5_i.h      16;"    d
+MD5_MAC_LEN    include/crypto/md5.h    18;"    d
+MD5_MAC_LEN    src/common/wpa_common.c 26;"    d       file:
+METHOD_CONT    src/eap_peer/eap_i.h    /^      METHOD_NONE, METHOD_INIT, METHOD_CONT, METHOD_MAY_CONT, METHOD_DONE$/;" e       enum:__anon2
+METHOD_DONE    src/eap_peer/eap_i.h    /^      METHOD_NONE, METHOD_INIT, METHOD_CONT, METHOD_MAY_CONT, METHOD_DONE$/;" e       enum:__anon2
+METHOD_INIT    src/eap_peer/eap_i.h    /^      METHOD_NONE, METHOD_INIT, METHOD_CONT, METHOD_MAY_CONT, METHOD_DONE$/;" e       enum:__anon2
+METHOD_MAY_CONT        src/eap_peer/eap_i.h    /^      METHOD_NONE, METHOD_INIT, METHOD_CONT, METHOD_MAY_CONT, METHOD_DONE$/;" e       enum:__anon2
+METHOD_NONE    src/eap_peer/eap_i.h    /^      METHOD_NONE, METHOD_INIT, METHOD_CONT, METHOD_MAY_CONT, METHOD_DONE$/;" e       enum:__anon2
+MICVerified    src/ap/wpa_auth_i.h     /^      Boolean MICVerified;$/;"        m       struct:wpa_state_machine
+MIN    src/crypto/libtommath.h 64;"    d
+MIN    src/crypto/sha256-internal.c    96;"    d       file:
+MIN    src/tls/libtommath.h    66;"    d
+MLME_SETPROTECTION_KEY_TYPE_GROUP      src/common/defs.h       249;"   d
+MLME_SETPROTECTION_KEY_TYPE_PAIRWISE   src/common/defs.h       250;"   d
+MLME_SETPROTECTION_PROTECT_TYPE_NONE   src/common/defs.h       244;"   d
+MLME_SETPROTECTION_PROTECT_TYPE_RX     src/common/defs.h       245;"   d
+MLME_SETPROTECTION_PROTECT_TYPE_RX_TX  src/common/defs.h       247;"   d
+MLME_SETPROTECTION_PROTECT_TYPE_TX     src/common/defs.h       246;"   d
+MOBILITY_DOMAIN_ID_LEN src/common/wpa_common.h 124;"   d
+MP_28BIT       src/crypto/libtommath.h 77;"    d
+MP_28BIT       src/tls/libtommath.h    79;"    d
+MP_EQ  src/crypto/libtommath.h 88;"    d
+MP_EQ  src/tls/libtommath.h    90;"    d
+MP_GT  src/crypto/libtommath.h 89;"    d
+MP_GT  src/tls/libtommath.h    91;"    d
+MP_LOW_MEM     src/crypto/libtommath.h 104;"   d
+MP_LOW_MEM     src/tls/libtommath.h    106;"   d
+MP_LT  src/crypto/libtommath.h 87;"    d
+MP_LT  src/tls/libtommath.h    89;"    d
+MP_MASK        src/crypto/libtommath.h 85;"    d
+MP_MASK        src/tls/libtommath.h    87;"    d
+MP_MEM src/crypto/libtommath.h 95;"    d
+MP_MEM src/tls/libtommath.h    97;"    d
+MP_NEG src/crypto/libtommath.h 92;"    d
+MP_NEG src/tls/libtommath.h    94;"    d
+MP_NO  src/crypto/libtommath.h 99;"    d
+MP_NO  src/tls/libtommath.h    101;"   d
+MP_OKAY        src/crypto/libtommath.h 94;"    d
+MP_OKAY        src/tls/libtommath.h    96;"    d
+MP_PREC        src/crypto/libtommath.h 109;"   d
+MP_PREC        src/crypto/libtommath.h 111;"   d
+MP_PREC        src/tls/libtommath.h    111;"   d
+MP_PREC        src/tls/libtommath.h    113;"   d
+MP_VAL src/crypto/libtommath.h 96;"    d
+MP_VAL src/tls/libtommath.h    98;"    d
+MP_WARRAY      src/crypto/libtommath.h 116;"   d
+MP_WARRAY      src/tls/libtommath.h    118;"   d
+MP_YES src/crypto/libtommath.h 98;"    d
+MP_YES src/tls/libtommath.h    100;"   d
+MP_ZPOS        src/crypto/libtommath.h 91;"    d
+MP_ZPOS        src/tls/libtommath.h    93;"    d
+MSCHAPV2_AUTH_RESPONSE_LEN     src/eap_peer/mschapv2.h 11;"    d
+MSCHAPV2_CHAL_LEN      src/eap_peer/mschapv2.h 9;"     d
+MSCHAPV2_H     src/eap_peer/mschapv2.h 7;"     d
+MSCHAPV2_KEY_LEN       src/eap_peer/eap_mschapv2.c     32;"    d       file:
+MSCHAPV2_MASTER_KEY_LEN        src/eap_peer/mschapv2.h 12;"    d
+MSCHAPV2_NT_RESPONSE_LEN       src/eap_peer/mschapv2.h 10;"    d
+MSCHAPV2_OP_CHALLENGE  src/eap_peer/eap_mschapv2.c     25;"    d       file:
+MSCHAPV2_OP_CHANGE_PASSWORD    src/eap_peer/eap_mschapv2.c     29;"    d       file:
+MSCHAPV2_OP_FAILURE    src/eap_peer/eap_mschapv2.c     28;"    d       file:
+MSCHAPV2_OP_RESPONSE   src/eap_peer/eap_mschapv2.c     26;"    d       file:
+MSCHAPV2_OP_SUCCESS    src/eap_peer/eap_mschapv2.c     27;"    d       file:
+MSG_DEBUG      include/utils/wpa_debug.h       /^enum { MSG_MSGDUMP, MSG_DEBUG, MSG_INFO, MSG_WARNING, MSG_ERROR };$/;"        e       enum:__anon91
+MSG_DEBUG      include/utils/wpa_debug.h       28;"    d
+MSG_DONTWAIT   include/utils/common.h  249;"   d
+MSG_ERROR      include/utils/wpa_debug.h       /^enum { MSG_MSGDUMP, MSG_DEBUG, MSG_INFO, MSG_WARNING, MSG_ERROR };$/;"        e       enum:__anon91
+MSG_ERROR      include/utils/wpa_debug.h       25;"    d
+MSG_INFO       include/utils/wpa_debug.h       /^enum { MSG_MSGDUMP, MSG_DEBUG, MSG_INFO, MSG_WARNING, MSG_ERROR };$/;"        e       enum:__anon91
+MSG_INFO       include/utils/wpa_debug.h       27;"    d
+MSG_MSGDUMP    include/utils/wpa_debug.h       /^enum { MSG_MSGDUMP, MSG_DEBUG, MSG_INFO, MSG_WARNING, MSG_ERROR };$/;"        e       enum:__anon91
+MSG_MSGDUMP    include/utils/wpa_debug.h       29;"    d
+MSG_PRINT      include/utils/wpa_debug.h       62;"    d
+MSG_WARNING    include/utils/wpa_debug.h       /^enum { MSG_MSGDUMP, MSG_DEBUG, MSG_INFO, MSG_WARNING, MSG_ERROR };$/;"        e       enum:__anon91
+MSG_WARNING    include/utils/wpa_debug.h       26;"    d
+MS_FUNCS_H     include/crypto/ms_funcs.h       8;"     d
+Maj    src/crypto/sha256-internal.c    88;"    d       file:
+NONE_AUTH      src/esp_supplicant/esp_wifi_driver.h    /^    NONE_AUTH           = 0x01,$/;"   e       enum:__anon29
+NO_BINDING     src/eap_peer/eap_peap.c /^      enum { NO_BINDING, OPTIONAL_BINDING, REQUIRE_BINDING } crypto_binding;$/;"      e       enum:eap_peap_data::__anon7     file:
+NUM_DH_GROUPS  src/crypto/dh_groups.c  536;"   d       file:
+NUM_ELEMS      src/tls/tlsv1_common.c  70;"    d       file:
+NUM_HOSTAPD_MODES      src/common/defs.h       /^      NUM_HOSTAPD_MODES$/;"   e       enum:hostapd_hw_mode
+NUM_TLS_CIPHER_DATA    src/tls/tlsv1_common.c  101;"   d       file:
+NUM_TLS_CIPHER_SUITES  src/tls/tlsv1_common.c  71;"    d       file:
+NUM_WEP_KEYS   src/ap/ap_config.h      34;"    d
+NUM_WPS_EI_VALUES      src/wps/wps_defs.h      /^      NUM_WPS_EI_VALUES$/;"   e       enum:wps_error_indication
+OPTIONAL_BINDING       src/eap_peer/eap_peap.c /^      enum { NO_BINDING, OPTIONAL_BINDING, REQUIRE_BINDING } crypto_binding;$/;"      e       enum:eap_peap_data::__anon7     file:
+OPT_CAST       src/crypto/libtommath.h 71;"    d
+OPT_CAST       src/tls/libtommath.h    73;"    d
+OP_MODE_20MHZ_HT_STA_ASSOCED   src/common/ieee802_11_defs.h    459;"   d
+OP_MODE_MAY_BE_LEGACY_STAS     src/common/ieee802_11_defs.h    458;"   d
+OP_MODE_MIXED  src/common/ieee802_11_defs.h    460;"   d
+OP_MODE_PURE   src/common/ieee802_11_defs.h    457;"   d
+OS_H   port/include/os.h       16;"    d
+OUI_BROADCOM   src/common/ieee802_11_defs.h    590;"   d
+OUI_MICROSOFT  src/common/ieee802_11_defs.h    477;"   d
+P2P_ALLOW_CROSS_CONNECTION     src/ap/ap_config.h      384;"   d
+P2P_ENABLED    src/ap/ap_config.h      380;"   d
+P2P_EVENT_CROSS_CONNECT_DISABLE        src/common/wpa_ctrl.h   127;"   d
+P2P_EVENT_CROSS_CONNECT_ENABLE src/common/wpa_ctrl.h   126;"   d
+P2P_EVENT_DEVICE_FOUND src/common/wpa_ctrl.h   112;"   d
+P2P_EVENT_DEVICE_LOST  src/common/wpa_ctrl.h   115;"   d
+P2P_EVENT_FIND_STOPPED src/common/wpa_ctrl.h   144;"   d
+P2P_EVENT_GO_NEG_FAILURE       src/common/wpa_ctrl.h   121;"   d
+P2P_EVENT_GO_NEG_REQUEST       src/common/wpa_ctrl.h   119;"   d
+P2P_EVENT_GO_NEG_SUCCESS       src/common/wpa_ctrl.h   120;"   d
+P2P_EVENT_GROUP_FORMATION_FAILURE      src/common/wpa_ctrl.h   123;"   d
+P2P_EVENT_GROUP_FORMATION_SUCCESS      src/common/wpa_ctrl.h   122;"   d
+P2P_EVENT_GROUP_REMOVED        src/common/wpa_ctrl.h   125;"   d
+P2P_EVENT_GROUP_STARTED        src/common/wpa_ctrl.h   124;"   d
+P2P_EVENT_INVITATION_RECEIVED  src/common/wpa_ctrl.h   142;"   d
+P2P_EVENT_INVITATION_RESULT    src/common/wpa_ctrl.h   143;"   d
+P2P_EVENT_PERSISTENT_PSK_FAIL  src/common/wpa_ctrl.h   145;"   d
+P2P_EVENT_PROV_DISC_ENTER_PIN  src/common/wpa_ctrl.h   131;"   d
+P2P_EVENT_PROV_DISC_FAILURE    src/common/wpa_ctrl.h   137;"   d
+P2P_EVENT_PROV_DISC_PBC_REQ    src/common/wpa_ctrl.h   133;"   d
+P2P_EVENT_PROV_DISC_PBC_RESP   src/common/wpa_ctrl.h   135;"   d
+P2P_EVENT_PROV_DISC_SHOW_PIN   src/common/wpa_ctrl.h   129;"   d
+P2P_EVENT_SERV_DISC_REQ        src/common/wpa_ctrl.h   139;"   d
+P2P_EVENT_SERV_DISC_RESP       src/common/wpa_ctrl.h   141;"   d
+P2P_GROUP_FORMATION    src/ap/ap_config.h      382;"   d
+P2P_GROUP_OWNER        src/ap/ap_config.h      381;"   d
+P2P_MANAGE     src/ap/ap_config.h      383;"   d
+PADDING        src/crypto/md4-internal.c       /^static u8 PADDING[MD4_BLOCK_LENGTH] = {$/;"   v       file:
+PASSWD_CHANGE_CHAL_LEN src/eap_peer/eap_mschapv2.c     31;"    d       file:
+PIN_EXPIRES    src/wps/wps_registrar.c 83;"    d       file:
+PIN_LOCKED     src/wps/wps_registrar.c 82;"    d       file:
+PInitAKeys     src/ap/wpa_auth_i.h     /^      Boolean PInitAKeys; \/* WPA only, not in IEEE 802.11i *\/$/;"   m       struct:wpa_state_machine
+PKCS1_H        src/tls/pkcs1.h 10;"    d
+PKCS5_ALG_MD5_DES_CBC  src/tls/pkcs5.c /^              PKCS5_ALG_MD5_DES_CBC$/;"       e       enum:pkcs5_params::pkcs5_alg    file:
+PKCS5_ALG_UNKNOWN      src/tls/pkcs5.c /^              PKCS5_ALG_UNKNOWN,$/;"  e       enum:pkcs5_params::pkcs5_alg    file:
+PKCS5_H        src/tls/pkcs5.h 10;"    d
+PKCS8_H        src/tls/pkcs8.h 10;"    d
+PMK    src/ap/wpa_auth_i.h     /^      u8 PMK[PMK_LEN];$/;"    m       struct:wpa_state_machine
+PMKID_LEN      src/common/wpa_common.h 22;"    d
+PMK_LEN        src/ap/ap_config.h      102;"   d
+PMK_LEN        src/common/wpa_common.h 23;"    d
+PRINTF_FORMAT  include/utils/common.h  217;"   d
+PRINTF_FORMAT  include/utils/common.h  220;"   d
+PRIVATE_KEY_NAME       src/eap_peer/eap_i.h    97;"    d
+PSK_RADIUS_ACCEPTED    src/ap/ap_config.h      /^              PSK_RADIUS_ACCEPTED = 1,$/;"    e       enum:hostapd_bss_config::__anon18
+PSK_RADIUS_IGNORED     src/ap/ap_config.h      /^              PSK_RADIUS_IGNORED = 0,$/;"     e       enum:hostapd_bss_config::__anon18
+PSK_RADIUS_REQUIRED    src/ap/ap_config.h      /^              PSK_RADIUS_REQUIRED = 2$/;"     e       enum:hostapd_bss_config::__anon18
+PTK    src/ap/wpa_auth_i.h     /^      struct wpa_ptk PTK;$/;" m       struct:wpa_state_machine        typeref:struct:wpa_state_machine::wpa_ptk
+PTKRequest     src/ap/wpa_auth_i.h     /^      Boolean PTKRequest; \/* not in IEEE 802.11i state machine *\/$/;"       m       struct:wpa_state_machine
+PTK_valid      src/ap/wpa_auth_i.h     /^      Boolean PTK_valid;$/;"  m       struct:wpa_state_machine
+PUTU32 src/crypto/aes_i.h      117;"   d
+PUTU32 src/crypto/aes_i.h      121;"   d
+PUT_32BIT_LE   src/crypto/md4-internal.c       50;"    d       file:
+PUT_64BIT_LE   src/crypto/md4-internal.c       40;"    d       file:
+PWBLOCK_LEN    src/crypto/ms_funcs.c   420;"   d       file:
+Pair   src/ap/wpa_auth_i.h     /^      Boolean Pair;$/;"       m       struct:wpa_state_machine
+PtkGroupInit   src/ap/wpa_auth_i.h     /^      Boolean PtkGroupInit; \/* init request for PTK Group state machine *\/$/;"      m       struct:wpa_state_machine
+R      src/crypto/sha256-internal.c    90;"    d       file:
+R0     src/crypto/sha1-internal.c      146;"   d       file:
+R1     src/crypto/sha1-internal.c      149;"   d       file:
+R2     src/crypto/sha1-internal.c      152;"   d       file:
+R3     src/crypto/sha1-internal.c      154;"   d       file:
+R4     src/crypto/sha1-internal.c      157;"   d       file:
+RADIUS_ATTR_CHAP_CHALLENGE     src/eap_peer/eap_ttls.h 45;"    d
+RADIUS_ATTR_CHAP_PASSWORD      src/eap_peer/eap_ttls.h 43;"    d
+RADIUS_ATTR_EAP_MESSAGE        src/eap_peer/eap_ttls.h 46;"    d
+RADIUS_ATTR_MS_CHAP2_CPW       src/eap_peer/eap_ttls.h 56;"    d
+RADIUS_ATTR_MS_CHAP2_RESPONSE  src/eap_peer/eap_ttls.h 54;"    d
+RADIUS_ATTR_MS_CHAP2_SUCCESS   src/eap_peer/eap_ttls.h 55;"    d
+RADIUS_ATTR_MS_CHAP_CHALLENGE  src/eap_peer/eap_ttls.h 53;"    d
+RADIUS_ATTR_MS_CHAP_ERROR      src/eap_peer/eap_ttls.h 51;"    d
+RADIUS_ATTR_MS_CHAP_NT_ENC_PW  src/eap_peer/eap_ttls.h 52;"    d
+RADIUS_ATTR_MS_CHAP_RESPONSE   src/eap_peer/eap_ttls.h 50;"    d
+RADIUS_ATTR_REPLY_MESSAGE      src/eap_peer/eap_ttls.h 44;"    d
+RADIUS_ATTR_USER_NAME  src/eap_peer/eap_ttls.h 41;"    d
+RADIUS_ATTR_USER_PASSWORD      src/eap_peer/eap_ttls.h 42;"    d
+RADIUS_VENDOR_ID_MICROSOFT     src/eap_peer/eap_ttls.h 49;"    d
+RANDOM_H       include/crypto/random.h 16;"    d
+RCON   src/crypto/aes_i.h      39;"    d
+RCON   src/crypto/aes_i.h      74;"    d
+RECEIVED_M2D   src/wps/wps_i.h /^              RECV_M8, RECEIVED_M2D, WPS_MSG_DONE, RECV_ACK, WPS_FINISHED,$/;"        e       enum:wps_data::__anon53
+RECV_ACK       src/wps/wps_i.h /^              RECV_M8, RECEIVED_M2D, WPS_MSG_DONE, RECV_ACK, WPS_FINISHED,$/;"        e       enum:wps_data::__anon53
+RECV_DONE      src/wps/wps_i.h /^              RECV_M7, SEND_M8, RECV_DONE, SEND_M2D, RECV_M2D_ACK$/;" e       enum:wps_data::__anon53
+RECV_M1        src/wps/wps_i.h /^              RECV_M1, SEND_M2, RECV_M3, SEND_M4, RECV_M5, SEND_M6,$/;"       e       enum:wps_data::__anon53
+RECV_M2        src/wps/wps_i.h /^              SEND_M1, RECV_M2, SEND_M3, RECV_M4, SEND_M5, RECV_M6, SEND_M7,$/;"      e       enum:wps_data::__anon53
+RECV_M2D_ACK   src/wps/wps_i.h /^              RECV_M7, SEND_M8, RECV_DONE, SEND_M2D, RECV_M2D_ACK$/;" e       enum:wps_data::__anon53
+RECV_M3        src/wps/wps_i.h /^              RECV_M1, SEND_M2, RECV_M3, SEND_M4, RECV_M5, SEND_M6,$/;"       e       enum:wps_data::__anon53
+RECV_M4        src/wps/wps_i.h /^              SEND_M1, RECV_M2, SEND_M3, RECV_M4, SEND_M5, RECV_M6, SEND_M7,$/;"      e       enum:wps_data::__anon53
+RECV_M5        src/wps/wps_i.h /^              RECV_M1, SEND_M2, RECV_M3, SEND_M4, RECV_M5, SEND_M6,$/;"       e       enum:wps_data::__anon53
+RECV_M6        src/wps/wps_i.h /^              SEND_M1, RECV_M2, SEND_M3, RECV_M4, SEND_M5, RECV_M6, SEND_M7,$/;"      e       enum:wps_data::__anon53
+RECV_M7        src/wps/wps_i.h /^              RECV_M7, SEND_M8, RECV_DONE, SEND_M2D, RECV_M2D_ACK$/;" e       enum:wps_data::__anon53
+RECV_M8        src/wps/wps_i.h /^              RECV_M8, RECEIVED_M2D, WPS_MSG_DONE, RECV_ACK, WPS_FINISHED,$/;"        e       enum:wps_data::__anon53
+REQUIRE_BINDING        src/eap_peer/eap_peap.c /^      enum { NO_BINDING, OPTIONAL_BINDING, REQUIRE_BINDING } crypto_binding;$/;"      e       enum:eap_peap_data::__anon7     file:
+RND    src/crypto/sha256-internal.c    123;"   d       file:
+ROLc   src/crypto/des-internal.c       39;"    d       file:
+RORc   src/crypto/des-internal.c       43;"    d       file:
+RORc   src/crypto/sha256-internal.c    84;"    d       file:
+ROUND  src/crypto/aes-internal-dec.c   103;"   d       file:
+ROUND  src/crypto/aes-internal-dec.c   145;"   d       file:
+ROUND  src/crypto/aes-internal-enc.c   47;"    d       file:
+ROUND  src/crypto/aes-internal-enc.c   89;"    d       file:
+RSA_H  src/tls/rsa.h   10;"    d
+RSNA_MAX_EAPOL_RETRIES src/ap/wpa_auth_i.h     13;"    d
+RSN_AUTH_KEY_MGMT_802_1X_SHA256        src/common/wpa_common.h 58;"    d
+RSN_AUTH_KEY_MGMT_FT_802_1X    src/common/wpa_common.h 55;"    d
+RSN_AUTH_KEY_MGMT_FT_PSK       src/common/wpa_common.h 56;"    d
+RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X      src/common/wpa_common.h 53;"    d
+RSN_AUTH_KEY_MGMT_PSK_SHA256   src/common/wpa_common.h 59;"    d
+RSN_AUTH_KEY_MGMT_UNSPEC_802_1X        src/common/wpa_common.h 52;"    d
+RSN_CIPHER_SUITE_AES_128_CMAC  src/common/wpa_common.h 70;"    d
+RSN_CIPHER_SUITE_CCMP  src/common/wpa_common.h 67;"    d
+RSN_CIPHER_SUITE_GCMP  src/common/wpa_common.h 73;"    d
+RSN_CIPHER_SUITE_NONE  src/common/wpa_common.h 61;"    d
+RSN_CIPHER_SUITE_NO_GROUP_ADDRESSED    src/common/wpa_common.h 72;"    d
+RSN_CIPHER_SUITE_TKIP  src/common/wpa_common.h 63;"    d
+RSN_CIPHER_SUITE_WEP104        src/common/wpa_common.h 68;"    d
+RSN_CIPHER_SUITE_WEP40 src/common/wpa_common.h 62;"    d
+RSN_FT_CAPAB_FT_OVER_DS        src/common/wpa_common.h 278;"   d
+RSN_FT_CAPAB_FT_RESOURCE_REQ_SUPP      src/common/wpa_common.h 279;"   d
+RSN_KEY_DATA_ERROR     src/common/wpa_common.h 88;"    d
+RSN_KEY_DATA_GROUPKEY  src/common/wpa_common.h 78;"    d
+RSN_KEY_DATA_IGTK      src/common/wpa_common.h 91;"    d
+RSN_KEY_DATA_LIFETIME  src/common/wpa_common.h 87;"    d
+RSN_KEY_DATA_MAC_ADDR  src/common/wpa_common.h 82;"    d
+RSN_KEY_DATA_NONCE     src/common/wpa_common.h 86;"    d
+RSN_KEY_DATA_PMKID     src/common/wpa_common.h 83;"    d
+RSN_KEY_DATA_SMK       src/common/wpa_common.h 85;"    d
+RSN_NUM_REPLAY_COUNTERS_1      src/common/wpa_common.h 99;"    d
+RSN_NUM_REPLAY_COUNTERS_16     src/common/wpa_common.h 102;"   d
+RSN_NUM_REPLAY_COUNTERS_2      src/common/wpa_common.h 100;"   d
+RSN_NUM_REPLAY_COUNTERS_4      src/common/wpa_common.h 101;"   d
+RSN_REMOTE_FRAME_TYPE_FT_RRB   src/ap/wpa_auth.h       35;"    d
+RSN_SELECTOR   src/common/wpa_common.h 35;"    d
+RSN_SELECTOR_GET       src/common/wpa_common.h 97;"    d
+RSN_SELECTOR_LEN       src/common/wpa_common.h 32;"    d
+RSN_SELECTOR_PUT       src/common/wpa_common.h 96;"    d
+RSN_VERSION    src/common/wpa_common.h 33;"    d
+ReAuthenticationRequest        src/ap/wpa_auth_i.h     /^      Boolean ReAuthenticationRequest;$/;"    m       struct:wpa_state_machine
+S      src/crypto/sha256-internal.c    89;"    d       file:
+SAE_COMMIT     src/ap/sta_info.h       /^      enum { SAE_INIT, SAE_COMMIT, SAE_CONFIRM } sae_state;$/;"       e       enum:sta_info::__anon16
+SAE_CONFIRM    src/ap/sta_info.h       /^      enum { SAE_INIT, SAE_COMMIT, SAE_CONFIRM } sae_state;$/;"       e       enum:sta_info::__anon16
+SAE_INIT       src/ap/sta_info.h       /^      enum { SAE_INIT, SAE_COMMIT, SAE_CONFIRM } sae_state;$/;"       e       enum:sta_info::__anon16
+SECURITY_IEEE_802_1X   src/ap/ap_config.h      /^      SECURITY_IEEE_802_1X = 2,$/;"   e       enum:hostap_security_policy
+SECURITY_PLAINTEXT     src/ap/ap_config.h      /^      SECURITY_PLAINTEXT = 0,$/;"     e       enum:hostap_security_policy
+SECURITY_STATIC_WEP    src/ap/ap_config.h      /^      SECURITY_STATIC_WEP = 1,$/;"    e       enum:hostap_security_policy
+SECURITY_WPA   src/ap/ap_config.h      /^      SECURITY_WPA = 4$/;"    e       enum:hostap_security_policy
+SECURITY_WPA_PSK       src/ap/ap_config.h      /^      SECURITY_WPA_PSK = 3,$/;"       e       enum:hostap_security_policy
+SEND_M1        src/wps/wps_i.h /^              SEND_M1, RECV_M2, SEND_M3, RECV_M4, SEND_M5, RECV_M6, SEND_M7,$/;"      e       enum:wps_data::__anon53
+SEND_M2        src/wps/wps_i.h /^              RECV_M1, SEND_M2, RECV_M3, SEND_M4, RECV_M5, SEND_M6,$/;"       e       enum:wps_data::__anon53
+SEND_M2D       src/wps/wps_i.h /^              RECV_M7, SEND_M8, RECV_DONE, SEND_M2D, RECV_M2D_ACK$/;" e       enum:wps_data::__anon53
+SEND_M3        src/wps/wps_i.h /^              SEND_M1, RECV_M2, SEND_M3, RECV_M4, SEND_M5, RECV_M6, SEND_M7,$/;"      e       enum:wps_data::__anon53
+SEND_M4        src/wps/wps_i.h /^              RECV_M1, SEND_M2, RECV_M3, SEND_M4, RECV_M5, SEND_M6,$/;"       e       enum:wps_data::__anon53
+SEND_M5        src/wps/wps_i.h /^              SEND_M1, RECV_M2, SEND_M3, RECV_M4, SEND_M5, RECV_M6, SEND_M7,$/;"      e       enum:wps_data::__anon53
+SEND_M6        src/wps/wps_i.h /^              RECV_M1, SEND_M2, RECV_M3, SEND_M4, RECV_M5, SEND_M6,$/;"       e       enum:wps_data::__anon53
+SEND_M7        src/wps/wps_i.h /^              SEND_M1, RECV_M2, SEND_M3, RECV_M4, SEND_M5, RECV_M6, SEND_M7,$/;"      e       enum:wps_data::__anon53
+SEND_M8        src/wps/wps_i.h /^              RECV_M7, SEND_M8, RECV_DONE, SEND_M2D, RECV_M2D_ACK$/;" e       enum:wps_data::__anon53
+SEND_WSC_NACK  src/wps/wps_i.h /^              SEND_WSC_NACK,$/;"      e       enum:wps_data::__anon53
+SERVER_CERTIFICATE     src/tls/tlsv1_client_i.h        /^              CLIENT_HELLO, SERVER_HELLO, SERVER_CERTIFICATE,$/;"     e       enum:tlsv1_client::__anon43
+SERVER_CERTIFICATE     src/tls/tlsv1_server_i.h        /^              CLIENT_HELLO, SERVER_HELLO, SERVER_CERTIFICATE,$/;"     e       enum:tlsv1_server::__anon39
+SERVER_CERTIFICATE_REQUEST     src/tls/tlsv1_client_i.h        /^              SERVER_KEY_EXCHANGE, SERVER_CERTIFICATE_REQUEST,$/;"    e       enum:tlsv1_client::__anon43
+SERVER_CERTIFICATE_REQUEST     src/tls/tlsv1_server_i.h        /^              SERVER_KEY_EXCHANGE, SERVER_CERTIFICATE_REQUEST,$/;"    e       enum:tlsv1_server::__anon39
+SERVER_CHANGE_CIPHER_SPEC      src/tls/tlsv1_client_i.h        /^              SERVER_CHANGE_CIPHER_SPEC, SERVER_FINISHED, ACK_FINISHED,$/;"   e       enum:tlsv1_client::__anon43
+SERVER_CHANGE_CIPHER_SPEC      src/tls/tlsv1_server_i.h        /^              SERVER_CHANGE_CIPHER_SPEC, SERVER_FINISHED,$/;" e       enum:tlsv1_server::__anon39
+SERVER_FINISHED        src/tls/tlsv1_client_i.h        /^              SERVER_CHANGE_CIPHER_SPEC, SERVER_FINISHED, ACK_FINISHED,$/;"   e       enum:tlsv1_client::__anon43
+SERVER_FINISHED        src/tls/tlsv1_server_i.h        /^              SERVER_CHANGE_CIPHER_SPEC, SERVER_FINISHED,$/;" e       enum:tlsv1_server::__anon39
+SERVER_HELLO   src/tls/tlsv1_client_i.h        /^              CLIENT_HELLO, SERVER_HELLO, SERVER_CERTIFICATE,$/;"     e       enum:tlsv1_client::__anon43
+SERVER_HELLO   src/tls/tlsv1_server_i.h        /^              CLIENT_HELLO, SERVER_HELLO, SERVER_CERTIFICATE,$/;"     e       enum:tlsv1_server::__anon39
+SERVER_HELLO_DONE      src/tls/tlsv1_client_i.h        /^              SERVER_HELLO_DONE, CLIENT_KEY_EXCHANGE, CHANGE_CIPHER_SPEC,$/;" e       enum:tlsv1_client::__anon43
+SERVER_HELLO_DONE      src/tls/tlsv1_server_i.h        /^              SERVER_HELLO_DONE, CLIENT_CERTIFICATE, CLIENT_KEY_EXCHANGE,$/;" e       enum:tlsv1_server::__anon39
+SERVER_KEY_EXCHANGE    src/tls/tlsv1_client_i.h        /^              SERVER_KEY_EXCHANGE, SERVER_CERTIFICATE_REQUEST,$/;"    e       enum:tlsv1_client::__anon43
+SERVER_KEY_EXCHANGE    src/tls/tlsv1_server_i.h        /^              SERVER_KEY_EXCHANGE, SERVER_CERTIFICATE_REQUEST,$/;"    e       enum:tlsv1_server::__anon39
+SHA1Context    src/crypto/sha1_i.h     /^struct SHA1Context {$/;"      s
+SHA1Final      src/crypto/sha1-internal.c      /^SHA1Final(unsigned char digest[20], SHA1_CTX* context)$/;"    f
+SHA1HANDSOFF   src/crypto/sha1-internal.c      130;"   d       file:
+SHA1Init       src/crypto/sha1-internal.c      /^SHA1Init(SHA1_CTX* context)$/;"       f
+SHA1Transform  src/crypto/sha1-internal.c      /^SHA1Transform(u32 state[5], const unsigned char buffer[64])$/;"       f
+SHA1Update     src/crypto/sha1-internal.c      /^SHA1Update(SHA1_CTX* context, const void *_data, u32 len)$/;" f
+SHA1_CTX       src/crypto/sha1-internal.c      /^typedef struct SHA1Context SHA1_CTX;$/;"      t       typeref:struct:SHA1Context      file:
+SHA1_H include/crypto/sha1.h   16;"    d
+SHA1_I_H       src/crypto/sha1_i.h     16;"    d
+SHA1_MAC_LEN   include/crypto/sha1.h   18;"    d
+SHA256_BLOCK_SIZE      src/crypto/sha256-internal.c    21;"    d       file:
+SHA256_H       include/crypto/sha256.h 16;"    d
+SHA256_MAC_LEN include/crypto/sha256.h 18;"    d
+SHAPrintContext        src/crypto/sha1-internal.c      /^void SHAPrintContext(SHA1_CTX *context, char *msg)$/;"        f
+SHORT_PREAMBLE src/ap/ap_config.h      /^              SHORT_PREAMBLE = 1$/;"  e       enum:hostapd_config::__anon19
+SIG_WPA2       src/eap_peer/eap_i.h    /^enum SIG_WPA2 {$/;"   g
+SIG_WPA2_MAX   src/eap_peer/eap_i.h    /^    SIG_WPA2_MAX,$/;" e       enum:SIG_WPA2
+SIG_WPA2_RX    src/eap_peer/eap_i.h    /^    SIG_WPA2_RX,$/;"  e       enum:SIG_WPA2
+SIG_WPA2_START src/eap_peer/eap_i.h    /^    SIG_WPA2_START = 0,$/;"   e       enum:SIG_WPA2
+SIG_WPA2_TASK_DEL      src/eap_peer/eap_i.h    /^    SIG_WPA2_TASK_DEL,$/;"    e       enum:SIG_WPA2
+SIG_WPS_DISABLE        src/wps/wps.h   /^    SIG_WPS_DISABLE,            \/\/2$/;"     e       enum:wps_sig_type
+SIG_WPS_ENABLE src/wps/wps.h   /^    SIG_WPS_ENABLE = 1,         \/\/1$/;"     e       enum:wps_sig_type
+SIG_WPS_NUM    src/wps/wps.h   /^    SIG_WPS_NUM,                \/\/10$/;"    e       enum:wps_sig_type
+SIG_WPS_RX     src/wps/wps.h   /^    SIG_WPS_RX,                 \/\/4$/;"     e       enum:wps_sig_type
+SIG_WPS_START  src/wps/wps.h   /^    SIG_WPS_START,              \/\/3$/;"     e       enum:wps_sig_type
+SIG_WPS_TIMER_EAPOL_START      src/wps/wps.h   /^    SIG_WPS_TIMER_EAPOL_START,  \/\/9$/;"     e       enum:wps_sig_type
+SIG_WPS_TIMER_MSG_TIMEOUT      src/wps/wps.h   /^    SIG_WPS_TIMER_MSG_TIMEOUT,  \/\/6$/;"     e       enum:wps_sig_type
+SIG_WPS_TIMER_SCAN     src/wps/wps.h   /^    SIG_WPS_TIMER_SCAN,         \/\/8$/;"     e       enum:wps_sig_type
+SIG_WPS_TIMER_SUCCESS_CB       src/wps/wps.h   /^    SIG_WPS_TIMER_SUCCESS_CB,   \/\/7$/;"     e       enum:wps_sig_type
+SIG_WPS_TIMER_TIMEOUT  src/wps/wps.h   /^    SIG_WPS_TIMER_TIMEOUT,      \/\/5$/;"     e       enum:wps_sig_type
+SM_ENTER       src/utils/state_machine.h       101;"   d
+SM_ENTER_GLOBAL        src/utils/state_machine.h       114;"   d
+SM_ENTRY       src/utils/state_machine.h       46;"    d
+SM_ENTRY_M     src/utils/state_machine.h       65;"    d
+SM_ENTRY_MA    src/utils/state_machine.h       83;"    d
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK, AUTHENTICATION)$/;" f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK, AUTHENTICATION2)$/;"        f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK, DISCONNECT)$/;"     f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK, DISCONNECTED)$/;"   f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK, INITIALIZE)$/;"     f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK, INITPMK)$/;"        f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK, INITPSK)$/;"        f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)$/;"     f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK, PTKCALCNEGOTIATING2)$/;"    f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK, PTKINITDONE)$/;"    f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK, PTKINITNEGOTIATING)$/;"     f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK, PTKSTART)$/;"       f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK_GROUP, IDLE)$/;"     f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK_GROUP, KEYERROR)$/;" f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK_GROUP, REKEYESTABLISHED)$/;" f
+SM_STATE       src/ap/wpa_auth.c       /^SM_STATE(WPA_PTK_GROUP, REKEYNEGOTIATING)$/;" f
+SM_STATE       src/utils/state_machine.h       32;"    d
+SM_STEP        src/ap/wpa_auth.c       /^SM_STEP(WPA_PTK)$/;"  f
+SM_STEP        src/ap/wpa_auth.c       /^SM_STEP(WPA_PTK_GROUP)$/;"    f
+SM_STEP        src/utils/state_machine.h       126;"   d
+SM_STEP_RUN    src/utils/state_machine.h       136;"   d
+SNonce src/ap/wpa_auth_i.h     /^      u8 SNonce[WPA_NONCE_LEN];$/;"   m       struct:wpa_state_machine
+SP1    src/crypto/des-internal.c       /^static const u32 SP1[64] =$/;"        v       file:
+SP2    src/crypto/des-internal.c       /^static const u32 SP2[64] =$/;"        v       file:
+SP3    src/crypto/des-internal.c       /^static const u32 SP3[64] =$/;"        v       file:
+SP4    src/crypto/des-internal.c       /^static const u32 SP4[64] =$/;"        v       file:
+SP5    src/crypto/des-internal.c       /^static const u32 SP5[64] =$/;"        v       file:
+SP6    src/crypto/des-internal.c       /^static const u32 SP6[64] =$/;"        v       file:
+SP7    src/crypto/des-internal.c       /^static const u32 SP7[64] =$/;"        v       file:
+SP8    src/crypto/des-internal.c       /^static const u32 SP8[64] =$/;"        v       file:
+SSID_LEN       src/ap/wpa_auth.h       149;"   d
+STATE_MACHINE_ADDR     src/ap/wpa_auth.c       34;"    d       file:
+STATE_MACHINE_DATA     src/ap/wpa_auth.c       32;"    d       file:
+STATE_MACHINE_DEBUG_PREFIX     src/ap/wpa_auth.c       33;"    d       file:
+STATE_MACHINE_H        src/utils/state_machine.h       21;"    d
+STA_DEAUTH     src/ap/sta_info.h       /^              STA_NULLFUNC = 0, STA_DISASSOC, STA_DEAUTH, STA_REMOVE$/;"      e       enum:sta_info::__anon15
+STA_DISASSOC   src/ap/sta_info.h       /^              STA_NULLFUNC = 0, STA_DISASSOC, STA_DEAUTH, STA_REMOVE$/;"      e       enum:sta_info::__anon15
+STA_INFO_H     src/ap/sta_info.h       10;"    d
+STA_NULLFUNC   src/ap/sta_info.h       /^              STA_NULLFUNC = 0, STA_DISASSOC, STA_DEAUTH, STA_REMOVE$/;"      e       enum:sta_info::__anon15
+STA_REMOVE     src/ap/sta_info.h       /^              STA_NULLFUNC = 0, STA_DISASSOC, STA_DEAUTH, STA_REMOVE$/;"      e       enum:sta_info::__anon15
+STK_ERR_CPHR_NS        src/common/wpa_common.h /^      STK_ERR_CPHR_NS = 3,$/;"        e       enum:__anon65
+STK_ERR_NO_STSL        src/common/wpa_common.h /^      STK_ERR_NO_STSL = 4$/;" e       enum:__anon65
+STK_ERR_STA_NR src/common/wpa_common.h /^      STK_ERR_STA_NR = 1,$/;" e       enum:__anon65
+STK_ERR_STA_NRSN       src/common/wpa_common.h /^      STK_ERR_STA_NRSN = 2,$/;"       e       enum:__anon65
+STK_MUI_4WAY_STAT_STA  src/common/wpa_common.h /^      STK_MUI_4WAY_STAT_STA = 2,$/;"  e       enum:__anon64
+STK_MUI_4WAY_STA_AP    src/common/wpa_common.h /^      STK_MUI_4WAY_STA_AP = 1,$/;"    e       enum:__anon64
+STK_MUI_GTK    src/common/wpa_common.h /^      STK_MUI_GTK = 3,$/;"    e       enum:__anon64
+STK_MUI_SMK    src/common/wpa_common.h /^      STK_MUI_SMK = 4$/;"     e       enum:__anon64
+STRUCT_PACKED  include/utils/common.h  218;"   d
+STRUCT_PACKED  include/utils/common.h  221;"   d
+STRUCT_PACKED  src/ap/wpa_auth.h       /^} STRUCT_PACKED;$/;"  v       typeref:struct:ft_r0kh_r1kh_pull_frame
+STRUCT_PACKED  src/ap/wpa_auth.h       /^} STRUCT_PACKED;$/;"  v       typeref:struct:ft_r0kh_r1kh_push_frame
+STRUCT_PACKED  src/ap/wpa_auth.h       /^} STRUCT_PACKED;$/;"  v       typeref:struct:ft_r0kh_r1kh_resp_frame
+STRUCT_PACKED  src/ap/wpa_auth.h       /^} STRUCT_PACKED;$/;"  v       typeref:struct:ft_rrb_frame
+STRUCT_PACKED  src/common/eapol_common.h       /^} STRUCT_PACKED;$/;"  v       typeref:struct:ieee802_1x_eapol_key
+STRUCT_PACKED  src/common/eapol_common.h       /^} STRUCT_PACKED;$/;"  v       typeref:struct:ieee802_1x_hdr
+STRUCT_PACKED  src/common/ieee802_11_defs.h    /^}  STRUCT_PACKED;$/;" v       typeref:struct:wmm_ac_parameter
+STRUCT_PACKED  src/common/ieee802_11_defs.h    /^} STRUCT_PACKED;$/;"  v       typeref:struct:ieee80211_hdr
+STRUCT_PACKED  src/common/ieee802_11_defs.h    /^} STRUCT_PACKED;$/;"  v       typeref:struct:ieee80211_ht_capabilities
+STRUCT_PACKED  src/common/ieee802_11_defs.h    /^} STRUCT_PACKED;$/;"  v       typeref:struct:ieee80211_ht_operation
+STRUCT_PACKED  src/common/ieee802_11_defs.h    /^} STRUCT_PACKED;$/;"  v       typeref:struct:ieee80211_mgmt
+STRUCT_PACKED  src/common/ieee802_11_defs.h    /^} STRUCT_PACKED;$/;"  v       typeref:struct:wmm_information_element
+STRUCT_PACKED  src/common/ieee802_11_defs.h    /^} STRUCT_PACKED;$/;"  v       typeref:struct:wmm_parameter_element
+STRUCT_PACKED  src/common/ieee802_11_defs.h    /^} STRUCT_PACKED;$/;"  v       typeref:struct:wmm_tspec_element
+STRUCT_PACKED  src/common/wpa_common.h /^} STRUCT_PACKED;$/;"  v       typeref:struct:rsn_error_kde
+STRUCT_PACKED  src/common/wpa_common.h /^} STRUCT_PACKED;$/;"  v       typeref:struct:rsn_ftie
+STRUCT_PACKED  src/common/wpa_common.h /^} STRUCT_PACKED;$/;"  v       typeref:struct:rsn_ie_hdr
+STRUCT_PACKED  src/common/wpa_common.h /^} STRUCT_PACKED;$/;"  v       typeref:struct:rsn_mdie
+STRUCT_PACKED  src/common/wpa_common.h /^} STRUCT_PACKED;$/;"  v       typeref:struct:rsn_rdie
+STRUCT_PACKED  src/common/wpa_common.h /^} STRUCT_PACKED;$/;"  v       typeref:struct:wpa_eapol_key
+STRUCT_PACKED  src/common/wpa_common.h /^} STRUCT_PACKED;$/;"  v       typeref:struct:wpa_ie_hdr
+STRUCT_PACKED  src/common/wpa_common.h /^} STRUCT_PACKED;$/;"  v       typeref:struct:wpa_igtk_kde
+STRUCT_PACKED  src/common/wpa_common.h /^} STRUCT_PACKED;$/;"  v       typeref:struct:wpa_ptk
+STRUCT_PACKED  src/eap_peer/eap_defs.h /^} STRUCT_PACKED;$/;"  v       typeref:struct:eap_expand
+STRUCT_PACKED  src/eap_peer/eap_defs.h /^} STRUCT_PACKED;$/;"  v       typeref:struct:eap_hdr
+STRUCT_PACKED  src/eap_peer/eap_tlv_common.h   /^} STRUCT_PACKED;$/;"  v       typeref:struct:eap_tlv_crypto_binding_tlv
+STRUCT_PACKED  src/eap_peer/eap_tlv_common.h   /^} STRUCT_PACKED;$/;"  v       typeref:struct:eap_tlv_hdr
+STRUCT_PACKED  src/eap_peer/eap_tlv_common.h   /^} STRUCT_PACKED;$/;"  v       typeref:struct:eap_tlv_intermediate_result_tlv
+STRUCT_PACKED  src/eap_peer/eap_tlv_common.h   /^} STRUCT_PACKED;$/;"  v       typeref:struct:eap_tlv_nak_tlv
+STRUCT_PACKED  src/eap_peer/eap_tlv_common.h   /^} STRUCT_PACKED;$/;"  v       typeref:struct:eap_tlv_pac_ack_tlv
+STRUCT_PACKED  src/eap_peer/eap_tlv_common.h   /^} STRUCT_PACKED;$/;"  v       typeref:struct:eap_tlv_pac_type_tlv
+STRUCT_PACKED  src/eap_peer/eap_tlv_common.h   /^} STRUCT_PACKED;$/;"  v       typeref:struct:eap_tlv_request_action_tlv
+STRUCT_PACKED  src/eap_peer/eap_tlv_common.h   /^} STRUCT_PACKED;$/;"  v       typeref:struct:eap_tlv_result_tlv
+STRUCT_PACKED  src/rsn_supp/wpa.h      /^} STRUCT_PACKED;$/;"  v       typeref:struct:l2_ethhdr
+SWAP   src/crypto/aes_i.h      115;"   d
+S_SWAP src/crypto/rc4.c        20;"    d       file:
+Sigma0 src/crypto/sha256-internal.c    91;"    d       file:
+Sigma1 src/crypto/sha256-internal.c    92;"    d       file:
+TAB_SIZE       src/crypto/libtommath.h 1906;"  d
+TAB_SIZE       src/crypto/libtommath.h 1908;"  d
+TAB_SIZE       src/tls/libtommath.h    1906;"  d
+TAB_SIZE       src/tls/libtommath.h    1908;"  d
+TAG    include/utils/wpa_debug.h       23;"    d
+TASK_STACK_SIZE_ADD    src/esp_supplicant/esp_wifi_driver.h    22;"    d
+TASK_STACK_SIZE_ADD    src/esp_supplicant/esp_wifi_driver.h    24;"    d
+TD0    src/crypto/aes_i.h      59;"    d
+TD0    src/crypto/aes_i.h      99;"    d
+TD0_   src/crypto/aes_i.h      107;"   d
+TD0_   src/crypto/aes_i.h      67;"    d
+TD1    src/crypto/aes_i.h      100;"   d
+TD1    src/crypto/aes_i.h      60;"    d
+TD1_   src/crypto/aes_i.h      108;"   d
+TD1_   src/crypto/aes_i.h      68;"    d
+TD2    src/crypto/aes_i.h      101;"   d
+TD2    src/crypto/aes_i.h      61;"    d
+TD2_   src/crypto/aes_i.h      109;"   d
+TD2_   src/crypto/aes_i.h      69;"    d
+TD3    src/crypto/aes_i.h      102;"   d
+TD3    src/crypto/aes_i.h      62;"    d
+TD3_   src/crypto/aes_i.h      110;"   d
+TD3_   src/crypto/aes_i.h      70;"    d
+TD41   src/crypto/aes_i.h      103;"   d
+TD41   src/crypto/aes_i.h      63;"    d
+TD42   src/crypto/aes_i.h      104;"   d
+TD42   src/crypto/aes_i.h      64;"    d
+TD43   src/crypto/aes_i.h      105;"   d
+TD43   src/crypto/aes_i.h      65;"    d
+TD44   src/crypto/aes_i.h      106;"   d
+TD44   src/crypto/aes_i.h      66;"    d
+TDLS_PROHIBIT  src/ap/ap_config.h      390;"   d
+TDLS_PROHIBIT_CHAN_SWITCH      src/ap/ap_config.h      391;"   d
+TE0    src/crypto/aes_i.h      41;"    d
+TE0    src/crypto/aes_i.h      81;"    d
+TE1    src/crypto/aes_i.h      42;"    d
+TE1    src/crypto/aes_i.h      82;"    d
+TE2    src/crypto/aes_i.h      43;"    d
+TE2    src/crypto/aes_i.h      83;"    d
+TE3    src/crypto/aes_i.h      44;"    d
+TE3    src/crypto/aes_i.h      84;"    d
+TE4    src/crypto/aes_i.h      57;"    d
+TE4    src/crypto/aes_i.h      97;"    d
+TE41   src/crypto/aes_i.h      45;"    d
+TE41   src/crypto/aes_i.h      85;"    d
+TE411  src/crypto/aes_i.h      53;"    d
+TE411  src/crypto/aes_i.h      93;"    d
+TE414  src/crypto/aes_i.h      52;"    d
+TE414  src/crypto/aes_i.h      92;"    d
+TE42   src/crypto/aes_i.h      46;"    d
+TE42   src/crypto/aes_i.h      86;"    d
+TE421  src/crypto/aes_i.h      49;"    d
+TE421  src/crypto/aes_i.h      89;"    d
+TE422  src/crypto/aes_i.h      54;"    d
+TE422  src/crypto/aes_i.h      94;"    d
+TE43   src/crypto/aes_i.h      47;"    d
+TE43   src/crypto/aes_i.h      87;"    d
+TE432  src/crypto/aes_i.h      50;"    d
+TE432  src/crypto/aes_i.h      90;"    d
+TE433  src/crypto/aes_i.h      55;"    d
+TE433  src/crypto/aes_i.h      95;"    d
+TE44   src/crypto/aes_i.h      48;"    d
+TE44   src/crypto/aes_i.h      88;"    d
+TE443  src/crypto/aes_i.h      51;"    d
+TE443  src/crypto/aes_i.h      91;"    d
+TE444  src/crypto/aes_i.h      56;"    d
+TE444  src/crypto/aes_i.h      96;"    d
+TLSV1_CLIENT_H src/tls/tlsv1_client.h  10;"    d
+TLSV1_CLIENT_I_H       src/tls/tlsv1_client_i.h        10;"    d
+TLSV1_COMMON_H src/tls/tlsv1_common.h  10;"    d
+TLSV1_CRED_H   src/tls/tlsv1_cred.h    10;"    d
+TLSV1_RECORD_H src/tls/tlsv1_record.h  10;"    d
+TLSV1_SERVER_H src/tls/tlsv1_server.h  10;"    d
+TLSV1_SERVER_I_H       src/tls/tlsv1_server_i.h        10;"    d
+TLS_ALERT      src/tls/tls.h   /^      TLS_ALERT$/;"   e       enum:tls_event
+TLS_ALERT_ACCESS_DENIED        src/tls/tlsv1_common.h  145;"   d
+TLS_ALERT_BAD_CERTIFICATE      src/tls/tlsv1_common.h  138;"   d
+TLS_ALERT_BAD_CERTIFICATE_HASH_VALUE   src/tls/tlsv1_common.h  158;"   d
+TLS_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE      src/tls/tlsv1_common.h  157;"   d
+TLS_ALERT_BAD_RECORD_MAC       src/tls/tlsv1_common.h  133;"   d
+TLS_ALERT_CERTIFICATE_EXPIRED  src/tls/tlsv1_common.h  141;"   d
+TLS_ALERT_CERTIFICATE_REVOKED  src/tls/tlsv1_common.h  140;"   d
+TLS_ALERT_CERTIFICATE_UNKNOWN  src/tls/tlsv1_common.h  142;"   d
+TLS_ALERT_CERTIFICATE_UNOBTAINABLE     src/tls/tlsv1_common.h  155;"   d
+TLS_ALERT_CLOSE_NOTIFY src/tls/tlsv1_common.h  131;"   d
+TLS_ALERT_DECODE_ERROR src/tls/tlsv1_common.h  146;"   d
+TLS_ALERT_DECOMPRESSION_FAILURE        src/tls/tlsv1_common.h  136;"   d
+TLS_ALERT_DECRYPTION_FAILED    src/tls/tlsv1_common.h  134;"   d
+TLS_ALERT_DECRYPT_ERROR        src/tls/tlsv1_common.h  147;"   d
+TLS_ALERT_EXPORT_RESTRICTION   src/tls/tlsv1_common.h  148;"   d
+TLS_ALERT_HANDSHAKE_FAILURE    src/tls/tlsv1_common.h  137;"   d
+TLS_ALERT_ILLEGAL_PARAMETER    src/tls/tlsv1_common.h  143;"   d
+TLS_ALERT_INSUFFICIENT_SECURITY        src/tls/tlsv1_common.h  150;"   d
+TLS_ALERT_INTERNAL_ERROR       src/tls/tlsv1_common.h  151;"   d
+TLS_ALERT_LEVEL_FATAL  src/tls/tlsv1_common.h  128;"   d
+TLS_ALERT_LEVEL_WARNING        src/tls/tlsv1_common.h  127;"   d
+TLS_ALERT_NO_RENEGOTIATION     src/tls/tlsv1_common.h  153;"   d
+TLS_ALERT_PROTOCOL_VERSION     src/tls/tlsv1_common.h  149;"   d
+TLS_ALERT_RECORD_OVERFLOW      src/tls/tlsv1_common.h  135;"   d
+TLS_ALERT_UNEXPECTED_MESSAGE   src/tls/tlsv1_common.h  132;"   d
+TLS_ALERT_UNKNOWN_CA   src/tls/tlsv1_common.h  144;"   d
+TLS_ALERT_UNRECOGNIZED_NAME    src/tls/tlsv1_common.h  156;"   d
+TLS_ALERT_UNSUPPORTED_CERTIFICATE      src/tls/tlsv1_common.h  139;"   d
+TLS_ALERT_UNSUPPORTED_EXTENSION        src/tls/tlsv1_common.h  154;"   d
+TLS_ALERT_USER_CANCELED        src/tls/tlsv1_common.h  152;"   d
+TLS_CERT_CHAIN_FAILURE src/tls/tls.h   /^      TLS_CERT_CHAIN_FAILURE,$/;"     e       enum:tls_event
+TLS_CERT_CHAIN_SUCCESS src/tls/tls.h   /^      TLS_CERT_CHAIN_SUCCESS,$/;"     e       enum:tls_event
+TLS_CHANGE_CIPHER_SPEC src/tls/tlsv1_common.h  /^      TLS_CHANGE_CIPHER_SPEC = 1$/;"  e       enum:__anon48
+TLS_CIPHER_3DES_EDE_CBC        src/tls/tlsv1_common.h  /^      TLS_CIPHER_3DES_EDE_CBC,$/;"    e       enum:__anon50
+TLS_CIPHER_AES128_SHA  src/tls/tls.h   /^      TLS_CIPHER_AES128_SHA \/* 0x002f *\/,$/;"       e       enum:__anon38
+TLS_CIPHER_AES_128_CBC src/tls/tlsv1_common.h  /^      TLS_CIPHER_AES_128_CBC,$/;"     e       enum:__anon50
+TLS_CIPHER_AES_256_CBC src/tls/tlsv1_common.h  /^      TLS_CIPHER_AES_256_CBC$/;"      e       enum:__anon50
+TLS_CIPHER_ANON_DH_AES128_SHA  src/tls/tls.h   /^      TLS_CIPHER_ANON_DH_AES128_SHA \/* 0x0034 *\/$/;"        e       enum:__anon38
+TLS_CIPHER_BLOCK       src/tls/tlsv1_common.h  /^      TLS_CIPHER_BLOCK$/;"    e       enum:__anon52
+TLS_CIPHER_DES40_CBC   src/tls/tlsv1_common.h  /^      TLS_CIPHER_DES40_CBC,$/;"       e       enum:__anon50
+TLS_CIPHER_DES_CBC     src/tls/tlsv1_common.h  /^      TLS_CIPHER_DES_CBC,$/;" e       enum:__anon50
+TLS_CIPHER_IDEA_CBC    src/tls/tlsv1_common.h  /^      TLS_CIPHER_IDEA_CBC,$/;"        e       enum:__anon50
+TLS_CIPHER_NONE        src/tls/tls.h   /^      TLS_CIPHER_NONE,$/;"    e       enum:__anon38
+TLS_CIPHER_NULL        src/tls/tlsv1_common.h  /^      TLS_CIPHER_NULL,$/;"    e       enum:__anon50
+TLS_CIPHER_RC2_CBC_40  src/tls/tlsv1_common.h  /^      TLS_CIPHER_RC2_CBC_40,$/;"      e       enum:__anon50
+TLS_CIPHER_RC4_128     src/tls/tlsv1_common.h  /^      TLS_CIPHER_RC4_128,$/;" e       enum:__anon50
+TLS_CIPHER_RC4_40      src/tls/tlsv1_common.h  /^      TLS_CIPHER_RC4_40,$/;"  e       enum:__anon50
+TLS_CIPHER_RC4_SHA     src/tls/tls.h   /^      TLS_CIPHER_RC4_SHA \/* 0x0005 *\/,$/;"  e       enum:__anon38
+TLS_CIPHER_RSA_DHE_AES128_SHA  src/tls/tls.h   /^      TLS_CIPHER_RSA_DHE_AES128_SHA \/* 0x0031 *\/,$/;"       e       enum:__anon38
+TLS_CIPHER_STREAM      src/tls/tlsv1_common.h  /^      TLS_CIPHER_STREAM,$/;"  e       enum:__anon52
+TLS_COMPRESSION_NULL   src/tls/tlsv1_common.h  105;"   d
+TLS_CONN_ALLOW_SIGN_RSA_MD5    src/tls/tls.h   82;"    d
+TLS_CONN_DISABLE_SESSION_TICKET        src/tls/tls.h   84;"    d
+TLS_CONN_DISABLE_TIME_CHECKS   src/tls/tls.h   83;"    d
+TLS_CONN_REQUEST_OCSP  src/tls/tls.h   85;"    d
+TLS_CONN_REQUIRE_OCSP  src/tls/tls.h   86;"    d
+TLS_CONTENT_TYPE_ALERT src/tls/tlsv1_record.h  /^      TLS_CONTENT_TYPE_ALERT = 21,$/;"        e       enum:__anon44
+TLS_CONTENT_TYPE_APPLICATION_DATA      src/tls/tlsv1_record.h  /^      TLS_CONTENT_TYPE_APPLICATION_DATA = 23$/;"      e       enum:__anon44
+TLS_CONTENT_TYPE_CHANGE_CIPHER_SPEC    src/tls/tlsv1_record.h  /^      TLS_CONTENT_TYPE_CHANGE_CIPHER_SPEC = 20,$/;"   e       enum:__anon44
+TLS_CONTENT_TYPE_HANDSHAKE     src/tls/tlsv1_record.h  /^      TLS_CONTENT_TYPE_HANDSHAKE = 22,$/;"    e       enum:__anon44
+TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA  src/tls/tlsv1_common.h  67;"    d
+TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA      src/tls/tlsv1_common.h  69;"    d
+TLS_DHE_DSS_WITH_AES_128_CBC_SHA       src/tls/tlsv1_common.h  81;"    d
+TLS_DHE_DSS_WITH_AES_128_CBC_SHA256    src/tls/tlsv1_common.h  95;"    d
+TLS_DHE_DSS_WITH_AES_256_CBC_SHA       src/tls/tlsv1_common.h  87;"    d
+TLS_DHE_DSS_WITH_AES_256_CBC_SHA256    src/tls/tlsv1_common.h  99;"    d
+TLS_DHE_DSS_WITH_DES_CBC_SHA   src/tls/tlsv1_common.h  68;"    d
+TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA  src/tls/tlsv1_common.h  70;"    d
+TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA      src/tls/tlsv1_common.h  72;"    d
+TLS_DHE_RSA_WITH_AES_128_CBC_SHA       src/tls/tlsv1_common.h  82;"    d
+TLS_DHE_RSA_WITH_AES_128_CBC_SHA256    src/tls/tlsv1_common.h  96;"    d
+TLS_DHE_RSA_WITH_AES_256_CBC_SHA       src/tls/tlsv1_common.h  88;"    d
+TLS_DHE_RSA_WITH_AES_256_CBC_SHA256    src/tls/tlsv1_common.h  100;"   d
+TLS_DHE_RSA_WITH_DES_CBC_SHA   src/tls/tlsv1_common.h  71;"    d
+TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA   src/tls/tlsv1_common.h  61;"    d
+TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA       src/tls/tlsv1_common.h  63;"    d
+TLS_DH_DSS_WITH_AES_128_CBC_SHA        src/tls/tlsv1_common.h  79;"    d
+TLS_DH_DSS_WITH_AES_128_CBC_SHA256     src/tls/tlsv1_common.h  93;"    d
+TLS_DH_DSS_WITH_AES_256_CBC_SHA        src/tls/tlsv1_common.h  85;"    d
+TLS_DH_DSS_WITH_AES_256_CBC_SHA256     src/tls/tlsv1_common.h  97;"    d
+TLS_DH_DSS_WITH_DES_CBC_SHA    src/tls/tlsv1_common.h  62;"    d
+TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA   src/tls/tlsv1_common.h  64;"    d
+TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA       src/tls/tlsv1_common.h  66;"    d
+TLS_DH_RSA_WITH_AES_128_CBC_SHA        src/tls/tlsv1_common.h  80;"    d
+TLS_DH_RSA_WITH_AES_128_CBC_SHA256     src/tls/tlsv1_common.h  94;"    d
+TLS_DH_RSA_WITH_AES_256_CBC_SHA        src/tls/tlsv1_common.h  86;"    d
+TLS_DH_RSA_WITH_AES_256_CBC_SHA256     src/tls/tlsv1_common.h  98;"    d
+TLS_DH_RSA_WITH_DES_CBC_SHA    src/tls/tlsv1_common.h  65;"    d
+TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA  src/tls/tlsv1_common.h  75;"    d
+TLS_DH_anon_EXPORT_WITH_RC4_40_MD5     src/tls/tlsv1_common.h  73;"    d
+TLS_DH_anon_WITH_3DES_EDE_CBC_SHA      src/tls/tlsv1_common.h  77;"    d
+TLS_DH_anon_WITH_AES_128_CBC_SHA       src/tls/tlsv1_common.h  83;"    d
+TLS_DH_anon_WITH_AES_128_CBC_SHA256    src/tls/tlsv1_common.h  101;"   d
+TLS_DH_anon_WITH_AES_256_CBC_SHA       src/tls/tlsv1_common.h  89;"    d
+TLS_DH_anon_WITH_AES_256_CBC_SHA256    src/tls/tlsv1_common.h  102;"   d
+TLS_DH_anon_WITH_DES_CBC_SHA   src/tls/tlsv1_common.h  76;"    d
+TLS_DH_anon_WITH_RC4_128_MD5   src/tls/tlsv1_common.h  74;"    d
+TLS_EXT_CLIENT_CERTIFICATE_URL src/tls/tlsv1_common.h  168;"   d
+TLS_EXT_MAX_FRAGMENT_LENGTH    src/tls/tlsv1_common.h  167;"   d
+TLS_EXT_PAC_OPAQUE     src/tls/tlsv1_common.h  174;"   d
+TLS_EXT_SERVER_NAME    src/tls/tlsv1_common.h  166;"   d
+TLS_EXT_SESSION_TICKET src/tls/tlsv1_common.h  172;"   d
+TLS_EXT_STATUS_REQUEST src/tls/tlsv1_common.h  171;"   d
+TLS_EXT_TRUNCATED_HMAC src/tls/tlsv1_common.h  170;"   d
+TLS_EXT_TRUSTED_CA_KEYS        src/tls/tlsv1_common.h  169;"   d
+TLS_FAIL_ALTSUBJECT_MISMATCH   src/tls/tls.h   /^      TLS_FAIL_ALTSUBJECT_MISMATCH = 6,$/;"   e       enum:tls_fail_reason
+TLS_FAIL_BAD_CERTIFICATE       src/tls/tls.h   /^      TLS_FAIL_BAD_CERTIFICATE = 7,$/;"       e       enum:tls_fail_reason
+TLS_FAIL_EXPIRED       src/tls/tls.h   /^      TLS_FAIL_EXPIRED = 4,$/;"       e       enum:tls_fail_reason
+TLS_FAIL_NOT_YET_VALID src/tls/tls.h   /^      TLS_FAIL_NOT_YET_VALID = 3,$/;" e       enum:tls_fail_reason
+TLS_FAIL_REVOKED       src/tls/tls.h   /^      TLS_FAIL_REVOKED = 2,$/;"       e       enum:tls_fail_reason
+TLS_FAIL_SERVER_CHAIN_PROBE    src/tls/tls.h   /^      TLS_FAIL_SERVER_CHAIN_PROBE = 8$/;"     e       enum:tls_fail_reason
+TLS_FAIL_SUBJECT_MISMATCH      src/tls/tls.h   /^      TLS_FAIL_SUBJECT_MISMATCH = 5,$/;"      e       enum:tls_fail_reason
+TLS_FAIL_UNSPECIFIED   src/tls/tls.h   /^      TLS_FAIL_UNSPECIFIED = 0,$/;"   e       enum:tls_fail_reason
+TLS_FAIL_UNTRUSTED     src/tls/tls.h   /^      TLS_FAIL_UNTRUSTED = 1,$/;"     e       enum:tls_fail_reason
+TLS_H  src/tls/tls.h   10;"    d
+TLS_HANDSHAKE_TYPE_CERTIFICATE src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_CERTIFICATE = 11,$/;"        e       enum:__anon45
+TLS_HANDSHAKE_TYPE_CERTIFICATE_REQUEST src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_CERTIFICATE_REQUEST = 13,$/;"        e       enum:__anon45
+TLS_HANDSHAKE_TYPE_CERTIFICATE_STATUS  src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_CERTIFICATE_STATUS = 22 \/* RFC 4366 *\/$/;" e       enum:__anon45
+TLS_HANDSHAKE_TYPE_CERTIFICATE_URL     src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_CERTIFICATE_URL = 21 \/* RFC 4366 *\/,$/;"   e       enum:__anon45
+TLS_HANDSHAKE_TYPE_CERTIFICATE_VERIFY  src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_CERTIFICATE_VERIFY = 15,$/;" e       enum:__anon45
+TLS_HANDSHAKE_TYPE_CLIENT_HELLO        src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_CLIENT_HELLO = 1,$/;"        e       enum:__anon45
+TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE = 16,$/;"        e       enum:__anon45
+TLS_HANDSHAKE_TYPE_FINISHED    src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_FINISHED = 20,$/;"   e       enum:__anon45
+TLS_HANDSHAKE_TYPE_HELLO_REQUEST       src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_HELLO_REQUEST = 0,$/;"       e       enum:__anon45
+TLS_HANDSHAKE_TYPE_NEW_SESSION_TICKET  src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_NEW_SESSION_TICKET = 4 \/* RFC 4507 *\/,$/;" e       enum:__anon45
+TLS_HANDSHAKE_TYPE_SERVER_HELLO        src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_SERVER_HELLO = 2,$/;"        e       enum:__anon45
+TLS_HANDSHAKE_TYPE_SERVER_HELLO_DONE   src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_SERVER_HELLO_DONE = 14,$/;"  e       enum:__anon45
+TLS_HANDSHAKE_TYPE_SERVER_KEY_EXCHANGE src/tls/tlsv1_common.h  /^      TLS_HANDSHAKE_TYPE_SERVER_KEY_EXCHANGE = 12,$/;"        e       enum:__anon45
+TLS_HASH_ALG_MD5       src/tls/tlsv1_common.h  /^      TLS_HASH_ALG_MD5 = 1,$/;"       e       enum:__anon46
+TLS_HASH_ALG_NONE      src/tls/tlsv1_common.h  /^      TLS_HASH_ALG_NONE = 0,$/;"      e       enum:__anon46
+TLS_HASH_ALG_SHA1      src/tls/tlsv1_common.h  /^      TLS_HASH_ALG_SHA1 = 2,$/;"      e       enum:__anon46
+TLS_HASH_ALG_SHA224    src/tls/tlsv1_common.h  /^      TLS_HASH_ALG_SHA224 = 3,$/;"    e       enum:__anon46
+TLS_HASH_ALG_SHA256    src/tls/tlsv1_common.h  /^      TLS_HASH_ALG_SHA256 = 4,$/;"    e       enum:__anon46
+TLS_HASH_ALG_SHA384    src/tls/tlsv1_common.h  /^      TLS_HASH_ALG_SHA384 = 5,$/;"    e       enum:__anon46
+TLS_HASH_ALG_SHA512    src/tls/tlsv1_common.h  /^      TLS_HASH_ALG_SHA512 = 6$/;"     e       enum:__anon46
+TLS_HASH_MD5   src/tls/tlsv1_common.h  /^      TLS_HASH_MD5,$/;"       e       enum:__anon51
+TLS_HASH_NULL  src/tls/tlsv1_common.h  /^      TLS_HASH_NULL,$/;"      e       enum:__anon51
+TLS_HASH_SHA   src/tls/tlsv1_common.h  /^      TLS_HASH_SHA,$/;"       e       enum:__anon51
+TLS_HASH_SHA256        src/tls/tlsv1_common.h  /^      TLS_HASH_SHA256$/;"     e       enum:__anon51
+TLS_KEY_X_DHE_DSS      src/tls/tlsv1_common.h  /^      TLS_KEY_X_DHE_DSS,$/;"  e       enum:__anon49
+TLS_KEY_X_DHE_DSS_EXPORT       src/tls/tlsv1_common.h  /^      TLS_KEY_X_DHE_DSS_EXPORT,$/;"   e       enum:__anon49
+TLS_KEY_X_DHE_RSA      src/tls/tlsv1_common.h  /^      TLS_KEY_X_DHE_RSA,$/;"  e       enum:__anon49
+TLS_KEY_X_DHE_RSA_EXPORT       src/tls/tlsv1_common.h  /^      TLS_KEY_X_DHE_RSA_EXPORT,$/;"   e       enum:__anon49
+TLS_KEY_X_DH_DSS       src/tls/tlsv1_common.h  /^      TLS_KEY_X_DH_DSS,$/;"   e       enum:__anon49
+TLS_KEY_X_DH_DSS_EXPORT        src/tls/tlsv1_common.h  /^      TLS_KEY_X_DH_DSS_EXPORT,$/;"    e       enum:__anon49
+TLS_KEY_X_DH_RSA       src/tls/tlsv1_common.h  /^      TLS_KEY_X_DH_RSA,$/;"   e       enum:__anon49
+TLS_KEY_X_DH_RSA_EXPORT        src/tls/tlsv1_common.h  /^      TLS_KEY_X_DH_RSA_EXPORT,$/;"    e       enum:__anon49
+TLS_KEY_X_DH_anon      src/tls/tlsv1_common.h  /^      TLS_KEY_X_DH_anon$/;"   e       enum:__anon49
+TLS_KEY_X_DH_anon_EXPORT       src/tls/tlsv1_common.h  /^      TLS_KEY_X_DH_anon_EXPORT,$/;"   e       enum:__anon49
+TLS_KEY_X_NULL src/tls/tlsv1_common.h  /^      TLS_KEY_X_NULL,$/;"     e       enum:__anon49
+TLS_KEY_X_RSA  src/tls/tlsv1_common.h  /^      TLS_KEY_X_RSA,$/;"      e       enum:__anon49
+TLS_KEY_X_RSA_EXPORT   src/tls/tlsv1_common.h  /^      TLS_KEY_X_RSA_EXPORT,$/;"       e       enum:__anon49
+TLS_MASTER_SECRET_LEN  src/tls/tlsv1_common.h  28;"    d
+TLS_MAX_IV_LEN src/tls/tlsv1_record.h  16;"    d
+TLS_MAX_KEY_BLOCK_LEN  src/tls/tlsv1_record.h  17;"    d
+TLS_MAX_WRITE_KEY_LEN  src/tls/tlsv1_record.h  15;"    d
+TLS_MAX_WRITE_MAC_SECRET_LEN   src/tls/tlsv1_record.h  14;"    d
+TLS_NULL_WITH_NULL_NULL        src/tls/tlsv1_common.h  50;"    d
+TLS_PEER_CERTIFICATE   src/tls/tls.h   /^      TLS_PEER_CERTIFICATE,$/;"       e       enum:tls_event
+TLS_PRE_MASTER_SECRET_LEN      src/tls/tlsv1_common.h  27;"    d
+TLS_RANDOM_LEN src/tls/tlsv1_common.h  26;"    d
+TLS_RECORD_HEADER_LEN  src/tls/tlsv1_record.h  21;"    d
+TLS_RSA_EXPORT_WITH_DES40_CBC_SHA      src/tls/tlsv1_common.h  58;"    d
+TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5     src/tls/tlsv1_common.h  56;"    d
+TLS_RSA_EXPORT_WITH_RC4_40_MD5 src/tls/tlsv1_common.h  53;"    d
+TLS_RSA_WITH_3DES_EDE_CBC_SHA  src/tls/tlsv1_common.h  60;"    d
+TLS_RSA_WITH_AES_128_CBC_SHA   src/tls/tlsv1_common.h  78;"    d
+TLS_RSA_WITH_AES_128_CBC_SHA256        src/tls/tlsv1_common.h  91;"    d
+TLS_RSA_WITH_AES_256_CBC_SHA   src/tls/tlsv1_common.h  84;"    d
+TLS_RSA_WITH_AES_256_CBC_SHA256        src/tls/tlsv1_common.h  92;"    d
+TLS_RSA_WITH_DES_CBC_SHA       src/tls/tlsv1_common.h  59;"    d
+TLS_RSA_WITH_IDEA_CBC_SHA      src/tls/tlsv1_common.h  57;"    d
+TLS_RSA_WITH_NULL_MD5  src/tls/tlsv1_common.h  51;"    d
+TLS_RSA_WITH_NULL_SHA  src/tls/tlsv1_common.h  52;"    d
+TLS_RSA_WITH_NULL_SHA256       src/tls/tlsv1_common.h  90;"    d
+TLS_RSA_WITH_RC4_128_MD5       src/tls/tlsv1_common.h  54;"    d
+TLS_RSA_WITH_RC4_128_SHA       src/tls/tlsv1_common.h  55;"    d
+TLS_SEQ_NUM_LEN        src/tls/tlsv1_record.h  20;"    d
+TLS_SESSION_ID_MAX_LEN src/tls/tlsv1_common.h  29;"    d
+TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED  src/tls/tls.h   /^      TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED = -2$/;"  e       enum:__anon37
+TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED        src/tls/tls.h   /^      TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED = -3,$/;"       e       enum:__anon37
+TLS_SIGN_ALG_ANONYMOUS src/tls/tlsv1_common.h  /^      TLS_SIGN_ALG_ANONYMOUS = 0,$/;" e       enum:__anon47
+TLS_SIGN_ALG_DSA       src/tls/tlsv1_common.h  /^      TLS_SIGN_ALG_DSA = 2,$/;"       e       enum:__anon47
+TLS_SIGN_ALG_ECDSA     src/tls/tlsv1_common.h  /^      TLS_SIGN_ALG_ECDSA = 3,$/;"     e       enum:__anon47
+TLS_SIGN_ALG_RSA       src/tls/tlsv1_common.h  /^      TLS_SIGN_ALG_RSA = 1,$/;"       e       enum:__anon47
+TLS_VERIFY_DATA_LEN    src/tls/tlsv1_common.h  30;"    d
+TLS_VERSION    src/tls/tlsv1_common.h  18;"    d
+TLS_VERSION    src/tls/tlsv1_common.h  21;"    d
+TLS_VERSION    src/tls/tlsv1_common.h  23;"    d
+TLS_VERSION_1  src/tls/tlsv1_common.h  14;"    d
+TLS_VERSION_1_1        src/tls/tlsv1_common.h  15;"    d
+TLS_VERSION_1_2        src/tls/tlsv1_common.h  16;"    d
+TRUE   src/common/defs.h       /^typedef enum { FALSE = 0, TRUE = 1 } Boolean;$/;"     e       enum:__anon87
+TRUE   src/common/defs.h       22;"    d
+TX_BEAMFORM_CAP_CALIB_OFFSET   src/common/ieee802_11_defs.h    426;"   d
+TX_BEAMFORM_CAP_COMPRESSED_STEERING_MATRIX_BEAMFORMER_ANT_OFFSET       src/common/ieee802_11_defs.h    436;"   d
+TX_BEAMFORM_CAP_CSI_NUM_BEAMFORMER_ANT_OFFSET  src/common/ieee802_11_defs.h    434;"   d
+TX_BEAMFORM_CAP_EXPLICIT_BF_CSI_FEEDBACK_CAP   src/common/ieee802_11_defs.h    429;"   d
+TX_BEAMFORM_CAP_EXPLICIT_BF_CSI_FEEDBACK_OFFSET        src/common/ieee802_11_defs.h    430;"   d
+TX_BEAMFORM_CAP_EXPLICIT_COMPRESSED_STEERING_MATRIX_FEEDBACK_OFFSET    src/common/ieee802_11_defs.h    432;"   d
+TX_BEAMFORM_CAP_EXPLICIT_CSI_TXBF_CAP  src/common/ieee802_11_defs.h    427;"   d
+TX_BEAMFORM_CAP_EXPLICIT_UNCOMPR_STEERING_MATRIX_CAP   src/common/ieee802_11_defs.h    428;"   d
+TX_BEAMFORM_CAP_EXPLICIT_UNCOMPR_STEERING_MATRIX_FEEDBACK_OFFSET       src/common/ieee802_11_defs.h    431;"   d
+TX_BEAMFORM_CAP_IMPLICIT_ZLF_CAP       src/common/ieee802_11_defs.h    425;"   d
+TX_BEAMFORM_CAP_MINIMAL_GROUPING_OFFSET        src/common/ieee802_11_defs.h    433;"   d
+TX_BEAMFORM_CAP_RX_STAGGERED_SOUNDING_CAP      src/common/ieee802_11_defs.h    421;"   d
+TX_BEAMFORM_CAP_RX_ZLF_CAP     src/common/ieee802_11_defs.h    423;"   d
+TX_BEAMFORM_CAP_SCI_MAX_OF_ROWS_BEANFORMER_SUPPORTED_OFFSET    src/common/ieee802_11_defs.h    437;"   d
+TX_BEAMFORM_CAP_TXBF_CAP       src/common/ieee802_11_defs.h    420;"   d
+TX_BEAMFORM_CAP_TX_STAGGERED_SOUNDING_CAP      src/common/ieee802_11_defs.h    422;"   d
+TX_BEAMFORM_CAP_TX_ZLF_CAP     src/common/ieee802_11_defs.h    424;"   d
+TX_BEAMFORM_CAP_UNCOMPRESSED_STEERING_MATRIX_BEAMFORMER_ANT_OFFSET     src/common/ieee802_11_defs.h    435;"   d
+Td0    src/crypto/aes-internal.c       /^const u32 Td0[256] \/* ICACHE_RODATA_ATTR *\/ = {$/;" v
+Td1    src/crypto/aes-internal.c       /^const u32 Td1[256] \/* ICACHE_RODATA_ATTR *\/ = {$/;" v
+Td2    src/crypto/aes-internal.c       /^const u32 Td2[256] \/* ICACHE_RODATA_ATTR *\/ = {$/;" v
+Td3    src/crypto/aes-internal.c       /^const u32 Td3[256] \/* ICACHE_RODATA_ATTR *\/ = {$/;" v
+Td4    src/crypto/aes-internal.c       /^const u32 Td4[256] \/* ICACHE_RODATA_ATTR *\/ = {$/;" v
+Td4s   src/crypto/aes-internal.c       /^const u8 Td4s[256] \/* ICACHE_RODATA_ATTR *\/ = {$/;" v
+Te0    src/crypto/aes-internal.c       /^const u32 Te0[256] \/* ICACHE_RODATA_ATTR *\/ = {$/;" v
+Te1    src/crypto/aes-internal.c       /^const u32 Te1[256] \/* ICACHE_RODATA_ATTR *\/ = {$/;" v
+Te2    src/crypto/aes-internal.c       /^const u32 Te2[256] \/* ICACHE_RODATA_ATTR *\/ = {$/;" v
+Te3    src/crypto/aes-internal.c       /^const u32 Te3[256] \/* ICACHE_RODATA_ATTR *\/ = {$/;" v
+Te4    src/crypto/aes-internal.c       /^const u32 Te4[256] \/* ICACHE_RODATA_ATTR *\/ = {$/;" v
+TimeoutCtr     src/ap/wpa_auth_i.h     /^      int TimeoutCtr;$/;"     m       struct:wpa_state_machine
+TimeoutEvt     src/ap/wpa_auth_i.h     /^      Boolean TimeoutEvt;$/;" m       struct:wpa_state_machine
+USERNAME_LEN_MAX       src/esp_supplicant/esp_wpa_enterprise.c 969;"   d       file:
+USE_EXTERNAL_RADIUS_AUTH       src/ap/ap_config.h      /^              USE_EXTERNAL_RADIUS_AUTH = 2$/;"        e       enum:hostapd_bss_config::__anon17
+UUID_H src/utils/uuid.h        10;"    d
+UUID_LEN       src/utils/uuid.h        12;"    d
+VENDOR_HT_CAPAB_OUI_TYPE       src/common/ieee802_11_defs.h    592;"   d
+WEPKEY_64_BYTES        include/crypto/wepkey.h 4;"     d
+WEPKEY_H       include/crypto/wepkey.h 2;"     d
+WFA_ELEM_AUTHORIZEDMACS        src/wps/wps_defs.h      /^      WFA_ELEM_AUTHORIZEDMACS = 0x01,$/;"     e       enum:__anon55
+WFA_ELEM_NETWORK_KEY_SHAREABLE src/wps/wps_defs.h      /^      WFA_ELEM_NETWORK_KEY_SHAREABLE = 0x02,$/;"      e       enum:__anon55
+WFA_ELEM_REQUEST_TO_ENROLL     src/wps/wps_defs.h      /^      WFA_ELEM_REQUEST_TO_ENROLL = 0x03,$/;"  e       enum:__anon55
+WFA_ELEM_SETTINGS_DELAY_TIME   src/wps/wps_defs.h      /^      WFA_ELEM_SETTINGS_DELAY_TIME = 0x04$/;" e       enum:__anon55
+WFA_ELEM_VERSION2      src/wps/wps_defs.h      /^      WFA_ELEM_VERSION2 = 0x00,$/;"   e       enum:__anon55
+WIFI_APPIE_ASSOC_REQ   src/esp_supplicant/esp_wifi_driver.h    /^    WIFI_APPIE_ASSOC_REQ,$/;" e       enum:__anon28
+WIFI_APPIE_ASSOC_RESP  src/esp_supplicant/esp_wifi_driver.h    /^    WIFI_APPIE_ASSOC_RESP,$/;"        e       enum:__anon28
+WIFI_APPIE_COUNTRY     src/esp_supplicant/esp_wifi_driver.h    /^    WIFI_APPIE_COUNTRY,$/;"   e       enum:__anon28
+WIFI_APPIE_ESP_MANUFACTOR      src/esp_supplicant/esp_wifi_driver.h    /^    WIFI_APPIE_ESP_MANUFACTOR,$/;"    e       enum:__anon28
+WIFI_APPIE_FREQ_ERROR  src/esp_supplicant/esp_wifi_driver.h    /^    WIFI_APPIE_FREQ_ERROR,$/;"        e       enum:__anon28
+WIFI_APPIE_MAX src/esp_supplicant/esp_wifi_driver.h    /^    WIFI_APPIE_MAX,$/;"       e       enum:__anon28
+WIFI_APPIE_MESH_QUICK  src/esp_supplicant/esp_wifi_driver.h    /^    WIFI_APPIE_MESH_QUICK,$/;"        e       enum:__anon28
+WIFI_APPIE_PROBEREQ    src/esp_supplicant/esp_wifi_driver.h    /^    WIFI_APPIE_PROBEREQ = 0,$/;"      e       enum:__anon28
+WIFI_APPIE_RSN src/esp_supplicant/esp_wifi_driver.h    /^    WIFI_APPIE_RSN,$/;"       e       enum:__anon28
+WIFI_APPIE_WPA src/esp_supplicant/esp_wifi_driver.h    /^    WIFI_APPIE_WPA,$/;"       e       enum:__anon28
+WIFI_APPIE_WPS_AR      src/esp_supplicant/esp_wifi_driver.h    /^    WIFI_APPIE_WPS_AR,$/;"    e       enum:__anon28
+WIFI_APPIE_WPS_PR      src/esp_supplicant/esp_wifi_driver.h    /^    WIFI_APPIE_WPS_PR,$/;"    e       enum:__anon28
+WIFI_CAPINFO_PRIVACY   src/wps/wps.h   1063;"  d
+WIFI_TID_SIZE  src/esp_supplicant/esp_wifi_driver.h    144;"   d
+WIFI_TXCB_EAPOL_ID     src/esp_supplicant/esp_wifi_driver.h    134;"   d
+WLAN_ACTION_BLOCK_ACK  src/common/ieee802_11_defs.h    216;"   d
+WLAN_ACTION_DLS        src/common/ieee802_11_defs.h    215;"   d
+WLAN_ACTION_FT src/common/ieee802_11_defs.h    219;"   d
+WLAN_ACTION_HT src/common/ieee802_11_defs.h    220;"   d
+WLAN_ACTION_PUBLIC     src/common/ieee802_11_defs.h    217;"   d
+WLAN_ACTION_QOS        src/common/ieee802_11_defs.h    214;"   d
+WLAN_ACTION_RADIO_MEASUREMENT  src/common/ieee802_11_defs.h    218;"   d
+WLAN_ACTION_SA_QUERY   src/common/ieee802_11_defs.h    221;"   d
+WLAN_ACTION_SPECTRUM_MGMT      src/common/ieee802_11_defs.h    213;"   d
+WLAN_ACTION_WMM        src/common/ieee802_11_defs.h    222;"   d
+WLAN_AKM_SUITE_8021X   src/common/ieee802_11_defs.h    604;"   d
+WLAN_AKM_SUITE_PSK     src/common/ieee802_11_defs.h    605;"   d
+WLAN_AUTH_CHALLENGE_LEN        src/common/ieee802_11_defs.h    81;"    d
+WLAN_AUTH_FT   src/common/ieee802_11_defs.h    78;"    d
+WLAN_AUTH_LEAP src/common/ieee802_11_defs.h    79;"    d
+WLAN_AUTH_OPEN src/common/ieee802_11_defs.h    76;"    d
+WLAN_AUTH_SHARED_KEY   src/common/ieee802_11_defs.h    77;"    d
+WLAN_CAPABILITY_CF_POLLABLE    src/common/ieee802_11_defs.h    85;"    d
+WLAN_CAPABILITY_CF_POLL_REQUEST        src/common/ieee802_11_defs.h    86;"    d
+WLAN_CAPABILITY_CHANNEL_AGILITY        src/common/ieee802_11_defs.h    90;"    d
+WLAN_CAPABILITY_DSSS_OFDM      src/common/ieee802_11_defs.h    93;"    d
+WLAN_CAPABILITY_ESS    src/common/ieee802_11_defs.h    83;"    d
+WLAN_CAPABILITY_IBSS   src/common/ieee802_11_defs.h    84;"    d
+WLAN_CAPABILITY_PBCC   src/common/ieee802_11_defs.h    89;"    d
+WLAN_CAPABILITY_PRIVACY        src/common/ieee802_11_defs.h    87;"    d
+WLAN_CAPABILITY_SHORT_PREAMBLE src/common/ieee802_11_defs.h    88;"    d
+WLAN_CAPABILITY_SHORT_SLOT_TIME        src/common/ieee802_11_defs.h    92;"    d
+WLAN_CAPABILITY_SPECTRUM_MGMT  src/common/ieee802_11_defs.h    91;"    d
+WLAN_CIPHER_SUITE_AES_CMAC     src/common/ieee802_11_defs.h    601;"   d
+WLAN_CIPHER_SUITE_CCMP src/common/ieee802_11_defs.h    599;"   d
+WLAN_CIPHER_SUITE_TKIP src/common/ieee802_11_defs.h    597;"   d
+WLAN_CIPHER_SUITE_USE_GROUP    src/common/ieee802_11_defs.h    595;"   d
+WLAN_CIPHER_SUITE_WEP104       src/common/ieee802_11_defs.h    600;"   d
+WLAN_CIPHER_SUITE_WEP40        src/common/ieee802_11_defs.h    596;"   d
+WLAN_EID_20_40_BSS_COEXISTENCE src/common/ieee802_11_defs.h    205;"   d
+WLAN_EID_20_40_BSS_INTOLERANT  src/common/ieee802_11_defs.h    206;"   d
+WLAN_EID_CF_PARAMS     src/common/ieee802_11_defs.h    178;"   d
+WLAN_EID_CHALLENGE     src/common/ieee802_11_defs.h    182;"   d
+WLAN_EID_CHANNEL_SWITCH        src/common/ieee802_11_defs.h    189;"   d
+WLAN_EID_COUNTRY       src/common/ieee802_11_defs.h    181;"   d
+WLAN_EID_DS_PARAMS     src/common/ieee802_11_defs.h    177;"   d
+WLAN_EID_ERP_INFO      src/common/ieee802_11_defs.h    195;"   d
+WLAN_EID_EXT_SUPP_RATES        src/common/ieee802_11_defs.h    198;"   d
+WLAN_EID_FAST_BSS_TRANSITION   src/common/ieee802_11_defs.h    200;"   d
+WLAN_EID_FH_PARAMS     src/common/ieee802_11_defs.h    176;"   d
+WLAN_EID_HT_CAP        src/common/ieee802_11_defs.h    196;"   d
+WLAN_EID_HT_OPERATION  src/common/ieee802_11_defs.h    203;"   d
+WLAN_EID_IBSS_DFS      src/common/ieee802_11_defs.h    193;"   d
+WLAN_EID_IBSS_PARAMS   src/common/ieee802_11_defs.h    180;"   d
+WLAN_EID_MEASURE_REPORT        src/common/ieee802_11_defs.h    191;"   d
+WLAN_EID_MEASURE_REQUEST       src/common/ieee802_11_defs.h    190;"   d
+WLAN_EID_MMIE  src/common/ieee802_11_defs.h    208;"   d
+WLAN_EID_MOBILITY_DOMAIN       src/common/ieee802_11_defs.h    199;"   d
+WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS   src/common/ieee802_11_defs.h    207;"   d
+WLAN_EID_PWR_CAPABILITY        src/common/ieee802_11_defs.h    185;"   d
+WLAN_EID_PWR_CONSTRAINT        src/common/ieee802_11_defs.h    184;"   d
+WLAN_EID_QUITE src/common/ieee802_11_defs.h    192;"   d
+WLAN_EID_RIC_DATA      src/common/ieee802_11_defs.h    202;"   d
+WLAN_EID_RSN   src/common/ieee802_11_defs.h    197;"   d
+WLAN_EID_SECONDARY_CHANNEL_OFFSET      src/common/ieee802_11_defs.h    204;"   d
+WLAN_EID_SSID  src/common/ieee802_11_defs.h    174;"   d
+WLAN_EID_SUPPORTED_CHANNELS    src/common/ieee802_11_defs.h    188;"   d
+WLAN_EID_SUPP_RATES    src/common/ieee802_11_defs.h    175;"   d
+WLAN_EID_TIM   src/common/ieee802_11_defs.h    179;"   d
+WLAN_EID_TIMEOUT_INTERVAL      src/common/ieee802_11_defs.h    201;"   d
+WLAN_EID_TPC_REPORT    src/common/ieee802_11_defs.h    187;"   d
+WLAN_EID_TPC_REQUEST   src/common/ieee802_11_defs.h    186;"   d
+WLAN_EID_VENDOR_SPECIFIC       src/common/ieee802_11_defs.h    209;"   d
+WLAN_FC_FROMDS src/common/ieee802_11_defs.h    23;"    d
+WLAN_FC_GET_STYPE      src/common/ieee802_11_defs.h    32;"    d
+WLAN_FC_GET_TYPE       src/common/ieee802_11_defs.h    31;"    d
+WLAN_FC_ISWEP  src/common/ieee802_11_defs.h    28;"    d
+WLAN_FC_MOREDATA       src/common/ieee802_11_defs.h    27;"    d
+WLAN_FC_MOREFRAG       src/common/ieee802_11_defs.h    24;"    d
+WLAN_FC_ORDER  src/common/ieee802_11_defs.h    29;"    d
+WLAN_FC_PVER   src/common/ieee802_11_defs.h    21;"    d
+WLAN_FC_PWRMGT src/common/ieee802_11_defs.h    26;"    d
+WLAN_FC_RETRY  src/common/ieee802_11_defs.h    25;"    d
+WLAN_FC_STYPE_ACK      src/common/ieee802_11_defs.h    60;"    d
+WLAN_FC_STYPE_ACTION   src/common/ieee802_11_defs.h    54;"    d
+WLAN_FC_STYPE_ASSOC_REQ        src/common/ieee802_11_defs.h    43;"    d
+WLAN_FC_STYPE_ASSOC_RESP       src/common/ieee802_11_defs.h    44;"    d
+WLAN_FC_STYPE_ATIM     src/common/ieee802_11_defs.h    50;"    d
+WLAN_FC_STYPE_AUTH     src/common/ieee802_11_defs.h    52;"    d
+WLAN_FC_STYPE_BEACON   src/common/ieee802_11_defs.h    49;"    d
+WLAN_FC_STYPE_CFACK    src/common/ieee802_11_defs.h    70;"    d
+WLAN_FC_STYPE_CFACKPOLL        src/common/ieee802_11_defs.h    72;"    d
+WLAN_FC_STYPE_CFEND    src/common/ieee802_11_defs.h    61;"    d
+WLAN_FC_STYPE_CFENDACK src/common/ieee802_11_defs.h    62;"    d
+WLAN_FC_STYPE_CFPOLL   src/common/ieee802_11_defs.h    71;"    d
+WLAN_FC_STYPE_CTS      src/common/ieee802_11_defs.h    59;"    d
+WLAN_FC_STYPE_DATA     src/common/ieee802_11_defs.h    65;"    d
+WLAN_FC_STYPE_DATA_CFACK       src/common/ieee802_11_defs.h    66;"    d
+WLAN_FC_STYPE_DATA_CFACKPOLL   src/common/ieee802_11_defs.h    68;"    d
+WLAN_FC_STYPE_DATA_CFPOLL      src/common/ieee802_11_defs.h    67;"    d
+WLAN_FC_STYPE_DEAUTH   src/common/ieee802_11_defs.h    53;"    d
+WLAN_FC_STYPE_DISASSOC src/common/ieee802_11_defs.h    51;"    d
+WLAN_FC_STYPE_NULLFUNC src/common/ieee802_11_defs.h    69;"    d
+WLAN_FC_STYPE_PROBE_REQ        src/common/ieee802_11_defs.h    47;"    d
+WLAN_FC_STYPE_PROBE_RESP       src/common/ieee802_11_defs.h    48;"    d
+WLAN_FC_STYPE_PSPOLL   src/common/ieee802_11_defs.h    57;"    d
+WLAN_FC_STYPE_QOS_DATA src/common/ieee802_11_defs.h    73;"    d
+WLAN_FC_STYPE_REASSOC_REQ      src/common/ieee802_11_defs.h    45;"    d
+WLAN_FC_STYPE_REASSOC_RESP     src/common/ieee802_11_defs.h    46;"    d
+WLAN_FC_STYPE_RTS      src/common/ieee802_11_defs.h    58;"    d
+WLAN_FC_TODS   src/common/ieee802_11_defs.h    22;"    d
+WLAN_FC_TYPE_CTRL      src/common/ieee802_11_defs.h    39;"    d
+WLAN_FC_TYPE_DATA      src/common/ieee802_11_defs.h    40;"    d
+WLAN_FC_TYPE_MGMT      src/common/ieee802_11_defs.h    38;"    d
+WLAN_GET_SEQ_FRAG      src/common/ieee802_11_defs.h    34;"    d
+WLAN_GET_SEQ_SEQ       src/common/ieee802_11_defs.h    35;"    d
+WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT     src/common/ieee802_11_defs.h    161;"   d
+WLAN_REASON_AKMP_NOT_VALID     src/common/ieee802_11_defs.h    166;"   d
+WLAN_REASON_CIPHER_SUITE_REJECTED      src/common/ieee802_11_defs.h    170;"   d
+WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA      src/common/ieee802_11_defs.h    151;"   d
+WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA     src/common/ieee802_11_defs.h    152;"   d
+WLAN_REASON_DEAUTH_LEAVING     src/common/ieee802_11_defs.h    148;"   d
+WLAN_REASON_DISASSOC_AP_BUSY   src/common/ieee802_11_defs.h    150;"   d
+WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY src/common/ieee802_11_defs.h    149;"   d
+WLAN_REASON_DISASSOC_STA_HAS_LEFT      src/common/ieee802_11_defs.h    153;"   d
+WLAN_REASON_GROUP_CIPHER_NOT_VALID     src/common/ieee802_11_defs.h    164;"   d
+WLAN_REASON_GROUP_KEY_UPDATE_TIMEOUT   src/common/ieee802_11_defs.h    162;"   d
+WLAN_REASON_IEEE_802_1X_AUTH_FAILED    src/common/ieee802_11_defs.h    169;"   d
+WLAN_REASON_IE_IN_4WAY_DIFFERS src/common/ieee802_11_defs.h    163;"   d
+WLAN_REASON_INVALID_IE src/common/ieee802_11_defs.h    159;"   d
+WLAN_REASON_INVALID_RSN_IE_CAPAB       src/common/ieee802_11_defs.h    168;"   d
+WLAN_REASON_MICHAEL_MIC_FAILURE        src/common/ieee802_11_defs.h    160;"   d
+WLAN_REASON_PAIRWISE_CIPHER_NOT_VALID  src/common/ieee802_11_defs.h    165;"   d
+WLAN_REASON_PREV_AUTH_NOT_VALID        src/common/ieee802_11_defs.h    147;"   d
+WLAN_REASON_PWR_CAPABILITY_NOT_VALID   src/common/ieee802_11_defs.h    156;"   d
+WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH src/common/ieee802_11_defs.h    154;"   d
+WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID        src/common/ieee802_11_defs.h    157;"   d
+WLAN_REASON_UNSPECIFIED        src/common/ieee802_11_defs.h    146;"   d
+WLAN_REASON_UNSUPPORTED_RSN_IE_VERSION src/common/ieee802_11_defs.h    167;"   d
+WLAN_SA_QUERY_REQUEST  src/common/ieee802_11_defs.h    225;"   d
+WLAN_SA_QUERY_RESPONSE src/common/ieee802_11_defs.h    226;"   d
+WLAN_SA_QUERY_TR_ID_LEN        src/common/ieee802_11_defs.h    228;"   d
+WLAN_STATUS_AKMP_NOT_VALID     src/common/ieee802_11_defs.h    130;"   d
+WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA        src/common/ieee802_11_defs.h    105;"   d
+WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE  src/common/ieee802_11_defs.h    138;"   d
+WLAN_STATUS_ASSOC_DENIED_NOAGILITY     src/common/ieee802_11_defs.h    110;"   d
+WLAN_STATUS_ASSOC_DENIED_NOPBCC        src/common/ieee802_11_defs.h    109;"   d
+WLAN_STATUS_ASSOC_DENIED_NOSHORT       src/common/ieee802_11_defs.h    108;"   d
+WLAN_STATUS_ASSOC_DENIED_NO_DSSS_OFDM  src/common/ieee802_11_defs.h    118;"   d
+WLAN_STATUS_ASSOC_DENIED_NO_ER_PBCC    src/common/ieee802_11_defs.h    117;"   d
+WLAN_STATUS_ASSOC_DENIED_NO_SHORT_SLOT_TIME    src/common/ieee802_11_defs.h    116;"   d
+WLAN_STATUS_ASSOC_DENIED_RATES src/common/ieee802_11_defs.h    106;"   d
+WLAN_STATUS_ASSOC_DENIED_UNSPEC        src/common/ieee802_11_defs.h    100;"   d
+WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY src/common/ieee802_11_defs.h    121;"   d
+WLAN_STATUS_AUTH_TIMEOUT       src/common/ieee802_11_defs.h    104;"   d
+WLAN_STATUS_CAPS_UNSUPPORTED   src/common/ieee802_11_defs.h    98;"    d
+WLAN_STATUS_CHALLENGE_FAIL     src/common/ieee802_11_defs.h    103;"   d
+WLAN_STATUS_CIPHER_REJECTED_PER_POLICY src/common/ieee802_11_defs.h    133;"   d
+WLAN_STATUS_DEST_STA_NOT_PRESENT       src/common/ieee802_11_defs.h    136;"   d
+WLAN_STATUS_DEST_STA_NOT_QOS_STA       src/common/ieee802_11_defs.h    137;"   d
+WLAN_STATUS_DIRECT_LINK_NOT_ALLOWED    src/common/ieee802_11_defs.h    135;"   d
+WLAN_STATUS_GROUP_CIPHER_NOT_VALID     src/common/ieee802_11_defs.h    128;"   d
+WLAN_STATUS_INVALID_FTIE       src/common/ieee802_11_defs.h    143;"   d
+WLAN_STATUS_INVALID_FT_ACTION_FRAME_COUNT      src/common/ieee802_11_defs.h    140;"   d
+WLAN_STATUS_INVALID_IE src/common/ieee802_11_defs.h    127;"   d
+WLAN_STATUS_INVALID_MDIE       src/common/ieee802_11_defs.h    142;"   d
+WLAN_STATUS_INVALID_PARAMETERS src/common/ieee802_11_defs.h    125;"   d
+WLAN_STATUS_INVALID_PMKID      src/common/ieee802_11_defs.h    141;"   d
+WLAN_STATUS_INVALID_RSN_IE_CAPAB       src/common/ieee802_11_defs.h    132;"   d
+WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG     src/common/ieee802_11_defs.h    101;"   d
+WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID  src/common/ieee802_11_defs.h    129;"   d
+WLAN_STATUS_PWR_CAPABILITY_NOT_VALID   src/common/ieee802_11_defs.h    113;"   d
+WLAN_STATUS_R0KH_UNREACHABLE   src/common/ieee802_11_defs.h    119;"   d
+WLAN_STATUS_REASSOC_NO_ASSOC   src/common/ieee802_11_defs.h    99;"    d
+WLAN_STATUS_REQUEST_DECLINED   src/common/ieee802_11_defs.h    124;"   d
+WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION src/common/ieee802_11_defs.h    122;"   d
+WLAN_STATUS_SPEC_MGMT_REQUIRED src/common/ieee802_11_defs.h    112;"   d
+WLAN_STATUS_SUCCESS    src/common/ieee802_11_defs.h    96;"    d
+WLAN_STATUS_SUPPORTED_CHANNEL_NOT_VALID        src/common/ieee802_11_defs.h    114;"   d
+WLAN_STATUS_TS_NOT_CREATED     src/common/ieee802_11_defs.h    134;"   d
+WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION   src/common/ieee802_11_defs.h    102;"   d
+WLAN_STATUS_UNSPECIFIED_FAILURE        src/common/ieee802_11_defs.h    97;"    d
+WLAN_STATUS_UNSPECIFIED_QOS_FAILURE    src/common/ieee802_11_defs.h    123;"   d
+WLAN_STATUS_UNSUPPORTED_RSN_IE_VERSION src/common/ieee802_11_defs.h    131;"   d
+WLAN_STA_ASSOC src/ap/sta_info.h       14;"    d
+WLAN_STA_ASSOC_REQ_OK  src/ap/sta_info.h       28;"    d
+WLAN_STA_AUTH  src/ap/sta_info.h       13;"    d
+WLAN_STA_AUTHORIZED    src/ap/sta_info.h       18;"    d
+WLAN_STA_GAS   src/ap/sta_info.h       30;"    d
+WLAN_STA_HT    src/ap/sta_info.h       24;"    d
+WLAN_STA_MAYBE_WPS     src/ap/sta_info.h       26;"    d
+WLAN_STA_MFP   src/ap/sta_info.h       23;"    d
+WLAN_STA_NONERP        src/ap/sta_info.h       34;"    d
+WLAN_STA_PENDING_DEAUTH_CB     src/ap/sta_info.h       33;"    d
+WLAN_STA_PENDING_DISASSOC_CB   src/ap/sta_info.h       32;"    d
+WLAN_STA_PENDING_POLL  src/ap/sta_info.h       19;"    d
+WLAN_STA_PERM  src/ap/sta_info.h       17;"    d
+WLAN_STA_PREAUTH       src/ap/sta_info.h       21;"    d
+WLAN_STA_PS    src/ap/sta_info.h       15;"    d
+WLAN_STA_SHORT_PREAMBLE        src/ap/sta_info.h       20;"    d
+WLAN_STA_TIM   src/ap/sta_info.h       16;"    d
+WLAN_STA_VHT   src/ap/sta_info.h       31;"    d
+WLAN_STA_WDS   src/ap/sta_info.h       27;"    d
+WLAN_STA_WMM   src/ap/sta_info.h       22;"    d
+WLAN_STA_WPS   src/ap/sta_info.h       25;"    d
+WLAN_STA_WPS2  src/ap/sta_info.h       29;"    d
+WLAN_SUPP_RATES_MAX    src/ap/sta_info.h       38;"    d
+WLAN_TIMEOUT_ASSOC_COMEBACK    src/common/ieee802_11_defs.h    233;"   d
+WLAN_TIMEOUT_KEY_LIFETIME      src/common/ieee802_11_defs.h    232;"   d
+WLAN_TIMEOUT_REASSOC_DEADLINE  src/common/ieee802_11_defs.h    231;"   d
+WMM_ACTION_CODE_ADDTS_REQ      src/common/ieee802_11_defs.h    488;"   d
+WMM_ACTION_CODE_ADDTS_RESP     src/common/ieee802_11_defs.h    489;"   d
+WMM_ACTION_CODE_DELTS  src/common/ieee802_11_defs.h    490;"   d
+WMM_AC_ACI_MASK        src/common/ieee802_11_defs.h    522;"   d
+WMM_AC_ACI_SHIFT       src/common/ieee802_11_defs.h    523;"   d
+WMM_AC_ACM     src/common/ieee802_11_defs.h    521;"   d
+WMM_AC_AIFNS_SHIFT     src/common/ieee802_11_defs.h    520;"   d
+WMM_AC_AIFSN_MASK      src/common/ieee802_11_defs.h    519;"   d
+WMM_AC_BE      src/common/ieee802_11_defs.h    /^      WMM_AC_BE = 0 \/* Best Effort *\/,$/;"  e       enum:__anon84
+WMM_AC_BK      src/common/ieee802_11_defs.h    /^      WMM_AC_BK = 1 \/* Background *\/,$/;"   e       enum:__anon84
+WMM_AC_ECWMAX_MASK     src/common/ieee802_11_defs.h    527;"   d
+WMM_AC_ECWMAX_SHIFT    src/common/ieee802_11_defs.h    528;"   d
+WMM_AC_ECWMIN_MASK     src/common/ieee802_11_defs.h    525;"   d
+WMM_AC_ECWMIN_SHIFT    src/common/ieee802_11_defs.h    526;"   d
+WMM_AC_VI      src/common/ieee802_11_defs.h    /^      WMM_AC_VI = 2 \/* Video *\/,$/;"        e       enum:__anon84
+WMM_AC_VO      src/common/ieee802_11_defs.h    /^      WMM_AC_VO = 3 \/* Voice *\/$/;" e       enum:__anon84
+WMM_ADDTS_STATUS_ADMISSION_ACCEPTED    src/common/ieee802_11_defs.h    492;"   d
+WMM_ADDTS_STATUS_INVALID_PARAMETERS    src/common/ieee802_11_defs.h    493;"   d
+WMM_ADDTS_STATUS_REFUSED       src/common/ieee802_11_defs.h    495;"   d
+WMM_OUI_SUBTYPE_INFORMATION_ELEMENT    src/common/ieee802_11_defs.h    483;"   d
+WMM_OUI_SUBTYPE_PARAMETER_ELEMENT      src/common/ieee802_11_defs.h    484;"   d
+WMM_OUI_SUBTYPE_TSPEC_ELEMENT  src/common/ieee802_11_defs.h    485;"   d
+WMM_OUI_TYPE   src/common/ieee802_11_defs.h    482;"   d
+WMM_TSPEC_DIRECTION_BI_DIRECTIONAL     src/common/ieee802_11_defs.h    502;"   d
+WMM_TSPEC_DIRECTION_DOWNLINK   src/common/ieee802_11_defs.h    500;"   d
+WMM_TSPEC_DIRECTION_UPLINK     src/common/ieee802_11_defs.h    499;"   d
+WMM_VERSION    src/common/ieee802_11_defs.h    486;"   d
+WORDS_BIGENDIAN        include/utils/common.h  116;"   d
+WPA2_AUTH_CCKM src/esp_supplicant/esp_wifi_driver.h    /^    WPA2_AUTH_CCKM      = 0x07,$/;"   e       enum:__anon29
+WPA2_AUTH_ENT  src/esp_supplicant/esp_wifi_driver.h    /^    WPA2_AUTH_ENT       = 0x04,$/;"   e       enum:__anon29
+WPA2_AUTH_PSK  src/esp_supplicant/esp_wifi_driver.h    /^    WPA2_AUTH_PSK       = 0x05,$/;"   e       enum:__anon29
+WPA2_CONFIG_INIT_DEFAULT       include/esp_supplicant/esp_wpa_enterprise.h     29;"    d
+WPA2_ENT_EAP_STATE_FAIL        src/esp_supplicant/esp_wifi_driver.h    /^    WPA2_ENT_EAP_STATE_FAIL,$/;"      e       enum:__anon30
+WPA2_ENT_EAP_STATE_IN_PROGRESS src/esp_supplicant/esp_wifi_driver.h    /^    WPA2_ENT_EAP_STATE_IN_PROGRESS,$/;"       e       enum:__anon30
+WPA2_ENT_EAP_STATE_NOT_START   src/esp_supplicant/esp_wifi_driver.h    /^    WPA2_ENT_EAP_STATE_NOT_START,$/;" e       enum:__anon30
+WPA2_ENT_EAP_STATE_SUCCESS     src/esp_supplicant/esp_wifi_driver.h    /^    WPA2_ENT_EAP_STATE_SUCCESS,$/;"   e       enum:__anon30
+WPA2_STATE_DISABLED    src/eap_peer/eap_i.h    /^    WPA2_STATE_DISABLED,$/;"  e       enum:__anon3
+WPA2_STATE_ENABLED     src/eap_peer/eap_i.h    /^    WPA2_STATE_ENABLED = 0,$/;"       e       enum:__anon3
+WPA2_TASK_STACK_SIZE   src/esp_supplicant/esp_wifi_driver.h    27;"    d
+WPA2_VERSION   src/esp_supplicant/esp_wpa_enterprise.c 48;"    d       file:
+WPABUF_H       include/utils/wpabuf.h  16;"    d
+WPABUF_MAGIC   src/utils/wpabuf.c      25;"    d       file:
+WPAS_GLUE_H    src/esp_supplicant/esp_wpas_glue.h      16;"    d
+WPA_4_4_HANDSHAKE_BIT  src/rsn_supp/wpa.c      43;"    d       file:
+WPA_ADDR_LEN   src/esp_supplicant/esp_wpa_enterprise.c 130;"   d       file:
+WPA_ALG_CCMP   src/common/defs.h       /^      WPA_ALG_CCMP = 3,$/;"   e       enum:wpa_alg
+WPA_ALG_GCMP   src/common/defs.h       /^      WPA_ALG_GCMP$/;"        e       enum:wpa_alg
+WPA_ALG_IGTK   src/common/defs.h       /^      WPA_ALG_IGTK,$/;"       e       enum:wpa_alg
+WPA_ALG_NONE   src/common/defs.h       /^      WPA_ALG_NONE =0,$/;"    e       enum:wpa_alg
+WPA_ALG_PMK    src/common/defs.h       /^      WPA_ALG_PMK,$/;"        e       enum:wpa_alg
+WPA_ALG_TKIP   src/common/defs.h       /^      WPA_ALG_TKIP = 2,$/;"   e       enum:wpa_alg
+WPA_ALG_WAPI   src/common/defs.h       /^      WPA_ALG_WAPI = 4,$/;"   e       enum:wpa_alg
+WPA_ALG_WEP    src/common/defs.h       /^      WPA_ALG_WEP,$/;"        e       enum:wpa_alg
+WPA_ALG_WEP104 src/common/defs.h       /^      WPA_ALG_WEP104 = 5,$/;" e       enum:wpa_alg
+WPA_ALG_WEP40  src/common/defs.h       /^      WPA_ALG_WEP40 = 1,$/;"  e       enum:wpa_alg
+WPA_ALLOC_FAIL src/ap/wpa_auth.h       /^      WPA_INVALID_AKMP, WPA_NOT_ENABLED, WPA_ALLOC_FAIL,$/;"  e       enum:__anon22
+WPA_ASSERT     src/rsn_supp/wpa.h      32;"    d
+WPA_ASSOC      src/ap/wpa_auth.h       /^      WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH,$/;"  e       enum:__anon23
+WPA_ASSOCIATED src/common/defs.h       /^      WPA_ASSOCIATED,$/;"     e       enum:wpa_states
+WPA_ASSOCIATING        src/common/defs.h       /^      WPA_ASSOCIATING,$/;"    e       enum:wpa_states
+WPA_ASSOC_FT   src/ap/wpa_auth.h       /^      WPA_REAUTH_EAPOL, WPA_ASSOC_FT$/;"      e       enum:__anon23
+WPA_AUTH       src/ap/wpa_auth.h       /^      WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH,$/;"  e       enum:__anon23
+WPA_AUTHENTICATING     src/common/defs.h       /^      WPA_AUTHENTICATING,$/;" e       enum:wpa_states
+WPA_AUTH_ALG_FT        src/common/defs.h       80;"    d
+WPA_AUTH_ALG_LEAP      src/common/defs.h       79;"    d
+WPA_AUTH_ALG_OPEN      src/common/defs.h       77;"    d
+WPA_AUTH_ALG_SHARED    src/common/defs.h       78;"    d
+WPA_AUTH_CCKM  src/esp_supplicant/esp_wifi_driver.h    /^    WPA_AUTH_CCKM       = 0x06,$/;"   e       enum:__anon29
+WPA_AUTH_H     src/ap/wpa_auth.h       10;"    d
+WPA_AUTH_IE_H  src/ap/wpa_auth_ie.h    10;"    d
+WPA_AUTH_I_H   src/ap/wpa_auth_i.h     10;"    d
+WPA_AUTH_KEY_MGMT_NONE src/common/wpa_common.h 39;"    d
+WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X      src/common/wpa_common.h 41;"    d
+WPA_AUTH_KEY_MGMT_UNSPEC_802_1X        src/common/wpa_common.h 40;"    d
+WPA_AUTH_PSK   src/esp_supplicant/esp_wifi_driver.h    /^    WPA_AUTH_PSK        = 0x03,$/;"   e       enum:__anon29
+WPA_AUTH_UNSPEC        src/esp_supplicant/esp_wifi_driver.h    /^    WPA_AUTH_UNSPEC     = 0x02,$/;"   e       enum:__anon29
+WPA_BSS_MASK_AGE       src/common/wpa_ctrl.h   181;"   d
+WPA_BSS_MASK_ALL       src/common/wpa_ctrl.h   171;"   d
+WPA_BSS_MASK_BEACON_INT        src/common/wpa_ctrl.h   175;"   d
+WPA_BSS_MASK_BSSID     src/common/wpa_ctrl.h   173;"   d
+WPA_BSS_MASK_CAPABILITIES      src/common/wpa_ctrl.h   176;"   d
+WPA_BSS_MASK_DELIM     src/common/wpa_ctrl.h   189;"   d
+WPA_BSS_MASK_FLAGS     src/common/wpa_ctrl.h   183;"   d
+WPA_BSS_MASK_FREQ      src/common/wpa_ctrl.h   174;"   d
+WPA_BSS_MASK_ID        src/common/wpa_ctrl.h   172;"   d
+WPA_BSS_MASK_IE        src/common/wpa_ctrl.h   182;"   d
+WPA_BSS_MASK_INTERNETW src/common/wpa_ctrl.h   187;"   d
+WPA_BSS_MASK_LEVEL     src/common/wpa_ctrl.h   179;"   d
+WPA_BSS_MASK_NOISE     src/common/wpa_ctrl.h   178;"   d
+WPA_BSS_MASK_P2P_SCAN  src/common/wpa_ctrl.h   186;"   d
+WPA_BSS_MASK_QUAL      src/common/wpa_ctrl.h   177;"   d
+WPA_BSS_MASK_SSID      src/common/wpa_ctrl.h   184;"   d
+WPA_BSS_MASK_TSF       src/common/wpa_ctrl.h   180;"   d
+WPA_BSS_MASK_WIFI_DISPLAY      src/common/wpa_ctrl.h   188;"   d
+WPA_BSS_MASK_WPS_SCAN  src/common/wpa_ctrl.h   185;"   d
+WPA_BYTE_SWAP_DEFINED  include/utils/common.h  122;"   d
+WPA_BYTE_SWAP_DEFINED  include/utils/common.h  71;"    d
+WPA_CAPABILITY_MFPC    src/common/wpa_common.h 119;"   d
+WPA_CAPABILITY_MFPR    src/common/wpa_common.h 118;"   d
+WPA_CAPABILITY_NO_PAIRWISE     src/common/wpa_common.h 115;"   d
+WPA_CAPABILITY_PEERKEY_ENABLED src/common/wpa_common.h 120;"   d
+WPA_CAPABILITY_PREAUTH src/common/wpa_common.h 114;"   d
+WPA_CIPHER_AES_128_CMAC        src/common/defs.h       31;"    d
+WPA_CIPHER_CCMP        src/common/defs.h       30;"    d
+WPA_CIPHER_GCMP        src/common/defs.h       32;"    d
+WPA_CIPHER_NONE        src/common/defs.h       26;"    d
+WPA_CIPHER_SUITE_CCMP  src/common/wpa_common.h 48;"    d
+WPA_CIPHER_SUITE_NONE  src/common/wpa_common.h 42;"    d
+WPA_CIPHER_SUITE_TKIP  src/common/wpa_common.h 44;"    d
+WPA_CIPHER_SUITE_WEP104        src/common/wpa_common.h 49;"    d
+WPA_CIPHER_SUITE_WEP40 src/common/wpa_common.h 43;"    d
+WPA_CIPHER_TKIP        src/common/defs.h       29;"    d
+WPA_CIPHER_WEP104      src/common/defs.h       28;"    d
+WPA_CIPHER_WEP40       src/common/defs.h       27;"    d
+WPA_COMMON_H   src/common/wpa_common.h 17;"    d
+WPA_COMPLETED  src/common/defs.h       /^      WPA_COMPLETED,$/;"      e       enum:wpa_states
+WPA_CTRL_H     src/common/wpa_ctrl.h   10;"    d
+WPA_CTRL_REQ   src/common/wpa_ctrl.h   19;"    d
+WPA_CTRL_RSP   src/common/wpa_ctrl.h   22;"    d
+WPA_DEAUTH     src/ap/wpa_auth.h       /^      WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH,$/;"  e       enum:__anon23
+WPA_DEAUTH_FUNC        src/rsn_supp/wpa_i.h    /^typedef void (*WPA_DEAUTH_FUNC)(u8 reason_code);$/;"  t
+WPA_DEBUG_H    include/utils/wpa_debug.h       16;"    d
+WPA_DISASSOC   src/ap/wpa_auth.h       /^      WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH,$/;"  e       enum:__anon23
+WPA_DISCONNECTED       src/common/defs.h       /^      WPA_DISCONNECTED,$/;"   e       enum:wpa_states
+WPA_EAPOL_authorized   src/ap/wpa_auth.h       /^      WPA_EAPOL_portEnabled, WPA_EAPOL_portValid, WPA_EAPOL_authorized,$/;"   e       enum:__anon21
+WPA_EAPOL_inc_EapolFramesTx    src/ap/wpa_auth.h       /^      WPA_EAPOL_keyDone, WPA_EAPOL_inc_EapolFramesTx$/;"      e       enum:__anon21
+WPA_EAPOL_keyAvailable src/ap/wpa_auth.h       /^      WPA_EAPOL_portControl_Auto, WPA_EAPOL_keyRun, WPA_EAPOL_keyAvailable,$/;"       e       enum:__anon21
+WPA_EAPOL_keyDone      src/ap/wpa_auth.h       /^      WPA_EAPOL_keyDone, WPA_EAPOL_inc_EapolFramesTx$/;"      e       enum:__anon21
+WPA_EAPOL_keyRun       src/ap/wpa_auth.h       /^      WPA_EAPOL_portControl_Auto, WPA_EAPOL_keyRun, WPA_EAPOL_keyAvailable,$/;"       e       enum:__anon21
+WPA_EAPOL_portControl_Auto     src/ap/wpa_auth.h       /^      WPA_EAPOL_portControl_Auto, WPA_EAPOL_keyRun, WPA_EAPOL_keyAvailable,$/;"       e       enum:__anon21
+WPA_EAPOL_portEnabled  src/ap/wpa_auth.h       /^      WPA_EAPOL_portEnabled, WPA_EAPOL_portValid, WPA_EAPOL_authorized,$/;"   e       enum:__anon21
+WPA_EAPOL_portValid    src/ap/wpa_auth.h       /^      WPA_EAPOL_portEnabled, WPA_EAPOL_portValid, WPA_EAPOL_authorized,$/;"   e       enum:__anon21
+WPA_EVENT_ASSOC_REJECT src/common/wpa_ctrl.h   30;"    d
+WPA_EVENT_BSS_ADDED    src/common/wpa_ctrl.h   62;"    d
+WPA_EVENT_BSS_REMOVED  src/common/wpa_ctrl.h   64;"    d
+WPA_EVENT_CONNECTED    src/common/wpa_ctrl.h   26;"    d
+WPA_EVENT_DISCONNECTED src/common/wpa_ctrl.h   28;"    d
+WPA_EVENT_EAP_FAILURE  src/common/wpa_ctrl.h   52;"    d
+WPA_EVENT_EAP_METHOD   src/common/wpa_ctrl.h   42;"    d
+WPA_EVENT_EAP_NOTIFICATION     src/common/wpa_ctrl.h   36;"    d
+WPA_EVENT_EAP_PEER_CERT        src/common/wpa_ctrl.h   44;"    d
+WPA_EVENT_EAP_PROPOSED_METHOD  src/common/wpa_ctrl.h   40;"    d
+WPA_EVENT_EAP_STARTED  src/common/wpa_ctrl.h   38;"    d
+WPA_EVENT_EAP_STATUS   src/common/wpa_ctrl.h   48;"    d
+WPA_EVENT_EAP_SUCCESS  include/utils/wpa_debug.h       36;"    d
+WPA_EVENT_EAP_SUCCESS  src/common/wpa_ctrl.h   50;"    d
+WPA_EVENT_EAP_TLS_CERT_ERROR   src/common/wpa_ctrl.h   46;"    d
+WPA_EVENT_FREQ_CONFLICT        src/common/wpa_ctrl.h   67;"    d
+WPA_EVENT_PASSWORD_CHANGED     src/common/wpa_ctrl.h   34;"    d
+WPA_EVENT_REENABLED    src/common/wpa_ctrl.h   56;"    d
+WPA_EVENT_SCAN_RESULTS src/common/wpa_ctrl.h   58;"    d
+WPA_EVENT_STATE_CHANGE src/common/wpa_ctrl.h   60;"    d
+WPA_EVENT_TEMP_DISABLED        src/common/wpa_ctrl.h   54;"    d
+WPA_EVENT_TERMINATING  src/common/wpa_ctrl.h   32;"    d
+WPA_FIRST_HALF_4WAY_HANDSHAKE  src/common/defs.h       /^      WPA_FIRST_HALF_4WAY_HANDSHAKE,$/;"      e       enum:wpa_states
+WPA_GET_BE16   include/utils/common.h  128;"   d
+WPA_GET_BE24   include/utils/common.h  142;"   d
+WPA_GET_BE32   include/utils/common.h  151;"   d
+WPA_GET_BE64   include/utils/common.h  171;"   d
+WPA_GET_KEY    src/rsn_supp/wpa_i.h    /^typedef int (*WPA_GET_KEY) (u8 *ifx, int *alg, u8 *addt, int *keyidx, u8 *key, size_t key_len, int key_entry_valid);$/;"      t
+WPA_GET_LE16   include/utils/common.h  135;"   d
+WPA_GET_LE32   include/utils/common.h  161;"   d
+WPA_GET_LE64   include/utils/common.h  187;"   d
+WPA_GMK_LEN    src/common/wpa_common.h 27;"    d
+WPA_GROUP_GTK_INIT     src/ap/wpa_auth_i.h     /^              WPA_GROUP_GTK_INIT = 0,$/;"     e       enum:wpa_group::__anon27
+WPA_GROUP_HANDSHAKE    src/common/defs.h       /^      WPA_GROUP_HANDSHAKE,$/;"        e       enum:wpa_states
+WPA_GROUP_HANDSHAKE_BIT        src/rsn_supp/wpa.c      44;"    d       file:
+WPA_GROUP_SETKEYS      src/ap/wpa_auth_i.h     /^              WPA_GROUP_SETKEYS, WPA_GROUP_SETKEYSDONE$/;"    e       enum:wpa_group::__anon27
+WPA_GROUP_SETKEYSDONE  src/ap/wpa_auth_i.h     /^              WPA_GROUP_SETKEYS, WPA_GROUP_SETKEYSDONE$/;"    e       enum:wpa_group::__anon27
+WPA_GTK_MAX_LEN        src/common/wpa_common.h 28;"    d
+WPA_H  src/rsn_supp/wpa.h      16;"    d
+WPA_IE_H       src/rsn_supp/wpa_ie.h   16;"    d
+WPA_IE_OK      src/ap/wpa_auth.h       /^      WPA_IE_OK, WPA_INVALID_IE, WPA_INVALID_GROUP, WPA_INVALID_PAIRWISE,$/;" e       enum:__anon22
+WPA_IE_VENDOR_TYPE     src/common/ieee802_11_defs.h    479;"   d
+WPA_IGTK_LEN   src/common/wpa_common.h 109;"   d
+WPA_INACTIVE   src/common/defs.h       /^      WPA_INACTIVE,$/;"       e       enum:wpa_states
+WPA_INSTALL_KEY        src/rsn_supp/wpa_i.h    /^typedef void (*WPA_INSTALL_KEY) (enum wpa_alg alg, u8 *addr, int key_idx, int set_tx,$/;"     t
+WPA_INVALID_AKMP       src/ap/wpa_auth.h       /^      WPA_INVALID_AKMP, WPA_NOT_ENABLED, WPA_ALLOC_FAIL,$/;"  e       enum:__anon22
+WPA_INVALID_GROUP      src/ap/wpa_auth.h       /^      WPA_IE_OK, WPA_INVALID_IE, WPA_INVALID_GROUP, WPA_INVALID_PAIRWISE,$/;" e       enum:__anon22
+WPA_INVALID_IE src/ap/wpa_auth.h       /^      WPA_IE_OK, WPA_INVALID_IE, WPA_INVALID_GROUP, WPA_INVALID_PAIRWISE,$/;" e       enum:__anon22
+WPA_INVALID_MDIE       src/ap/wpa_auth.h       /^      WPA_INVALID_MDIE, WPA_INVALID_PROTO$/;" e       enum:__anon22
+WPA_INVALID_MGMT_GROUP_CIPHER  src/ap/wpa_auth.h       /^      WPA_MGMT_FRAME_PROTECTION_VIOLATION, WPA_INVALID_MGMT_GROUP_CIPHER,$/;" e       enum:__anon22
+WPA_INVALID_PAIRWISE   src/ap/wpa_auth.h       /^      WPA_IE_OK, WPA_INVALID_IE, WPA_INVALID_GROUP, WPA_INVALID_PAIRWISE,$/;" e       enum:__anon22
+WPA_INVALID_PROTO      src/ap/wpa_auth.h       /^      WPA_INVALID_MDIE, WPA_INVALID_PROTO$/;" e       enum:__anon22
+WPA_IS_MULTICAST       src/ap/wpa_auth.h       20;"    d
+WPA_I_H        src/rsn_supp/wpa_i.h    16;"    d
+WPA_KEY_INFO_ACK       src/common/wpa_common.h 141;"   d
+WPA_KEY_INFO_ENCR_KEY_DATA     src/common/wpa_common.h 146;"   d
+WPA_KEY_INFO_ERROR     src/common/wpa_common.h 144;"   d
+WPA_KEY_INFO_INSTALL   src/common/wpa_common.h 139;"   d
+WPA_KEY_INFO_KEY_INDEX_MASK    src/common/wpa_common.h 137;"   d
+WPA_KEY_INFO_KEY_INDEX_SHIFT   src/common/wpa_common.h 138;"   d
+WPA_KEY_INFO_KEY_TYPE  src/common/wpa_common.h 135;"   d
+WPA_KEY_INFO_MIC       src/common/wpa_common.h 142;"   d
+WPA_KEY_INFO_REQUEST   src/common/wpa_common.h 145;"   d
+WPA_KEY_INFO_SECURE    src/common/wpa_common.h 143;"   d
+WPA_KEY_INFO_SMK_MESSAGE       src/common/wpa_common.h 147;"   d
+WPA_KEY_INFO_TXRX      src/common/wpa_common.h 140;"   d
+WPA_KEY_INFO_TYPE_AES_128_CMAC src/common/wpa_common.h 134;"   d
+WPA_KEY_INFO_TYPE_HMAC_MD5_RC4 src/common/wpa_common.h 132;"   d
+WPA_KEY_INFO_TYPE_HMAC_SHA1_AES        src/common/wpa_common.h 133;"   d
+WPA_KEY_INFO_TYPE_MASK src/common/wpa_common.h 131;"   d
+WPA_KEY_MGMT_CCKM      src/common/defs.h       44;"    d
+WPA_KEY_MGMT_FT_IEEE8021X      src/common/defs.h       39;"    d
+WPA_KEY_MGMT_FT_PSK    src/common/defs.h       40;"    d
+WPA_KEY_MGMT_IEEE8021X src/common/defs.h       34;"    d
+WPA_KEY_MGMT_IEEE8021X_NO_WPA  src/common/defs.h       37;"    d
+WPA_KEY_MGMT_IEEE8021X_SHA256  src/common/defs.h       41;"    d
+WPA_KEY_MGMT_NONE      src/common/defs.h       36;"    d
+WPA_KEY_MGMT_PSK       src/common/defs.h       35;"    d
+WPA_KEY_MGMT_PSK_SHA256        src/common/defs.h       42;"    d
+WPA_KEY_MGMT_WPA_NONE  src/common/defs.h       38;"    d
+WPA_KEY_MGMT_WPS       src/common/defs.h       43;"    d
+WPA_KEY_RSC_LEN        src/common/wpa_common.h 26;"    d
+WPA_LAST_HALF_4WAY_HANDSHAKE   src/common/defs.h       /^      WPA_LAST_HALF_4WAY_HANDSHAKE,$/;"       e       enum:wpa_states
+WPA_MAX_SSID_LEN       src/common/wpa_common.h 19;"    d
+WPA_MGMT_FRAME_PROTECTION_VIOLATION    src/ap/wpa_auth.h       /^      WPA_MGMT_FRAME_PROTECTION_VIOLATION, WPA_INVALID_MGMT_GROUP_CIPHER,$/;" e       enum:__anon22
+WPA_MIC_FAILURE        src/common/defs.h       /^      WPA_MIC_FAILURE,                         \/\/ first mic_error event occur$/;"   e       enum:wpa_states
+WPA_NEG_COMPLETE       src/rsn_supp/wpa_i.h    /^typedef void (*WPA_NEG_COMPLETE)();$/;"       t
+WPA_NONCE_LEN  src/common/wpa_common.h 25;"    d
+WPA_NOT_ENABLED        src/ap/wpa_auth.h       /^      WPA_INVALID_AKMP, WPA_NOT_ENABLED, WPA_ALLOC_FAIL,$/;"  e       enum:__anon22
+WPA_OUI_TYPE   src/common/wpa_common.h 94;"    d
+WPA_PMK_NAME_LEN       src/common/wpa_common.h 127;"   d
+WPA_PROTO_RSN  src/common/defs.h       75;"    d
+WPA_PROTO_WPA  src/common/defs.h       74;"    d
+WPA_PTK_AUTHENTICATION src/ap/wpa_auth_i.h     /^              WPA_PTK_AUTHENTICATION, WPA_PTK_AUTHENTICATION2,$/;"    e       enum:wpa_state_machine::__anon24
+WPA_PTK_AUTHENTICATION2        src/ap/wpa_auth_i.h     /^              WPA_PTK_AUTHENTICATION, WPA_PTK_AUTHENTICATION2,$/;"    e       enum:wpa_state_machine::__anon24
+WPA_PTK_DISCONNECT     src/ap/wpa_auth_i.h     /^              WPA_PTK_INITIALIZE, WPA_PTK_DISCONNECT, WPA_PTK_DISCONNECTED,$/;"       e       enum:wpa_state_machine::__anon24
+WPA_PTK_DISCONNECTED   src/ap/wpa_auth_i.h     /^              WPA_PTK_INITIALIZE, WPA_PTK_DISCONNECT, WPA_PTK_DISCONNECTED,$/;"       e       enum:wpa_state_machine::__anon24
+WPA_PTK_GROUP_IDLE     src/ap/wpa_auth_i.h     /^              WPA_PTK_GROUP_IDLE = 0,$/;"     e       enum:wpa_state_machine::__anon25
+WPA_PTK_GROUP_KEYERROR src/ap/wpa_auth_i.h     /^              WPA_PTK_GROUP_KEYERROR$/;"      e       enum:wpa_state_machine::__anon25
+WPA_PTK_GROUP_REKEYESTABLISHED src/ap/wpa_auth_i.h     /^              WPA_PTK_GROUP_REKEYESTABLISHED,$/;"     e       enum:wpa_state_machine::__anon25
+WPA_PTK_GROUP_REKEYNEGOTIATING src/ap/wpa_auth_i.h     /^              WPA_PTK_GROUP_REKEYNEGOTIATING,$/;"     e       enum:wpa_state_machine::__anon25
+WPA_PTK_INITIALIZE     src/ap/wpa_auth_i.h     /^              WPA_PTK_INITIALIZE, WPA_PTK_DISCONNECT, WPA_PTK_DISCONNECTED,$/;"       e       enum:wpa_state_machine::__anon24
+WPA_PTK_INITPMK        src/ap/wpa_auth_i.h     /^              WPA_PTK_INITPMK, WPA_PTK_INITPSK, WPA_PTK_PTKSTART,$/;" e       enum:wpa_state_machine::__anon24
+WPA_PTK_INITPSK        src/ap/wpa_auth_i.h     /^              WPA_PTK_INITPMK, WPA_PTK_INITPSK, WPA_PTK_PTKSTART,$/;" e       enum:wpa_state_machine::__anon24
+WPA_PTK_PTKCALCNEGOTIATING     src/ap/wpa_auth_i.h     /^              WPA_PTK_PTKCALCNEGOTIATING, WPA_PTK_PTKCALCNEGOTIATING2,$/;"    e       enum:wpa_state_machine::__anon24
+WPA_PTK_PTKCALCNEGOTIATING2    src/ap/wpa_auth_i.h     /^              WPA_PTK_PTKCALCNEGOTIATING, WPA_PTK_PTKCALCNEGOTIATING2,$/;"    e       enum:wpa_state_machine::__anon24
+WPA_PTK_PTKINITDONE    src/ap/wpa_auth_i.h     /^              WPA_PTK_PTKINITNEGOTIATING, WPA_PTK_PTKINITDONE$/;"     e       enum:wpa_state_machine::__anon24
+WPA_PTK_PTKINITNEGOTIATING     src/ap/wpa_auth_i.h     /^              WPA_PTK_PTKINITNEGOTIATING, WPA_PTK_PTKINITDONE$/;"     e       enum:wpa_state_machine::__anon24
+WPA_PTK_PTKSTART       src/ap/wpa_auth_i.h     /^              WPA_PTK_INITPMK, WPA_PTK_INITPSK, WPA_PTK_PTKSTART,$/;" e       enum:wpa_state_machine::__anon24
+WPA_PUT_BE16   include/utils/common.h  129;"   d
+WPA_PUT_BE24   include/utils/common.h  144;"   d
+WPA_PUT_BE32   include/utils/common.h  153;"   d
+WPA_PUT_BE64   include/utils/common.h  175;"   d
+WPA_PUT_LE16   include/utils/common.h  136;"   d
+WPA_PUT_LE32   include/utils/common.h  163;"   d
+WPA_REAUTH     src/ap/wpa_auth.h       /^      WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH,$/;"  e       enum:__anon23
+WPA_REAUTH_EAPOL       src/ap/wpa_auth.h       /^      WPA_REAUTH_EAPOL, WPA_ASSOC_FT$/;"      e       enum:__anon23
+WPA_REPLAY_COUNTER_LEN src/common/wpa_common.h 24;"    d
+WPA_SCANNING   src/common/defs.h       /^      WPA_SCANNING,$/;"       e       enum:wpa_states
+WPA_SELECTOR_LEN       src/common/wpa_common.h 30;"    d
+WPA_SEND_FUNC  src/rsn_supp/wpa_i.h    /^typedef void (* WPA_SEND_FUNC)(void *buffer, u16 len);$/;"    t
+WPA_SET_ASSOC_IE       src/rsn_supp/wpa_i.h    /^typedef void (* WPA_SET_ASSOC_IE)(u8 proto, u8 *assoc_buf, u32 assoc_wpa_ie_len);$/;" t
+WPA_SM_MAX_INDEX       src/ap/wpa_auth.c       55;"    d       file:
+WPA_SM_STATE   src/rsn_supp/wpa.h      25;"    d
+WPA_TKIP_COUNTERMEASURES       src/common/defs.h       /^      WPA_TKIP_COUNTERMEASURES  \/\/in countermeasure period that stop connect with ap in 60 sec$/;"  e       enum:wpa_states
+WPA_TX_MSG_BUFF_MAXLEN src/ap/wpa_auth.c       159;"   d       file:
+WPA_TX_MSG_BUFF_MAXLEN src/esp_supplicant/esp_wpa_main.c       62;"    d       file:
+WPA_TX_MSG_BUFF_MAXLEN src/rsn_supp/wpa.c      47;"    d       file:
+WPA_VERSION    src/common/wpa_common.h 31;"    d
+WPA_VERSION_NO_WPA     src/ap/wpa_auth_i.h     /^              WPA_VERSION_NO_WPA = 0 \/* WPA not used *\/,$/;"        e       enum:wpa_state_machine::__anon26
+WPA_VERSION_WPA        src/ap/wpa_auth_i.h     /^              WPA_VERSION_WPA = 1 \/* WPA \/ IEEE 802.11i\/D3.0 *\/,$/;"      e       enum:wpa_state_machine::__anon26
+WPA_VERSION_WPA2       src/ap/wpa_auth_i.h     /^              WPA_VERSION_WPA2 = 2 \/* WPA2 \/ IEEE 802.11i *\/$/;"   e       enum:wpa_state_machine::__anon26
+WPS_ADDR_LEN   src/esp_supplicant/esp_wps.c    49;"    d       file:
+WPS_ASSOC_CFG_FAILURE  src/wps/wps_defs.h      /^      WPS_ASSOC_CFG_FAILURE = 2,$/;"  e       enum:wps_assoc_state
+WPS_ASSOC_CONN_SUCCESS src/wps/wps_defs.h      /^      WPS_ASSOC_CONN_SUCCESS = 1,$/;" e       enum:wps_assoc_state
+WPS_ASSOC_FAILURE      src/wps/wps_defs.h      /^      WPS_ASSOC_FAILURE = 3,$/;"      e       enum:wps_assoc_state
+WPS_ASSOC_IP_FAILURE   src/wps/wps_defs.h      /^      WPS_ASSOC_IP_FAILURE = 4$/;"    e       enum:wps_assoc_state
+WPS_ASSOC_NOT_ASSOC    src/wps/wps_defs.h      /^      WPS_ASSOC_NOT_ASSOC = 0,$/;"    e       enum:wps_assoc_state
+WPS_ATTR_PARSE_H       src/wps/wps_attr_parse.h        10;"    d
+WPS_AUTHENTICATOR_LEN  src/wps/wps_defs.h      35;"    d
+WPS_AUTHKEY_LEN        src/wps/wps_defs.h      36;"    d
+WPS_AUTH_SHARED        src/wps/wps_defs.h      191;"   d
+WPS_AUTH_TYPES src/wps/wps_defs.h      195;"   d
+WPS_AUTH_WPA   src/wps/wps_defs.h      192;"   d
+WPS_AUTH_WPA2  src/wps/wps_defs.h      193;"   d
+WPS_AUTH_WPA2PSK       src/wps/wps_defs.h      194;"   d
+WPS_AUTH_WPAPSK        src/wps/wps_defs.h      190;"   d
+WPS_Beacon     src/wps/wps_defs.h      /^      WPS_Beacon = 0x01,$/;"  e       enum:wps_msg_type
+WPS_CALC_KEY_MAX       src/wps/wps_i.h /^      WPS_CALC_KEY_MAX,$/;"   e       enum:wps_calc_key_mode
+WPS_CALC_KEY_NORMAL    src/wps/wps_i.h /^      WPS_CALC_KEY_NORMAL = 0,$/;"    e       enum:wps_calc_key_mode
+WPS_CALC_KEY_NO_CALC   src/wps/wps_i.h /^      WPS_CALC_KEY_NO_CALC,$/;"       e       enum:wps_calc_key_mode
+WPS_CALC_KEY_PRE_CALC  src/wps/wps_i.h /^      WPS_CALC_KEY_PRE_CALC,$/;"      e       enum:wps_calc_key_mode
+WPS_CB_ST_FAILED       src/wps/wps.h   /^      WPS_CB_ST_FAILED,$/;"   e       enum:wps_cb_status
+WPS_CB_ST_SCAN_ERR     src/wps/wps.h   /^      WPS_CB_ST_SCAN_ERR,$/;" e       enum:wps_cb_status
+WPS_CB_ST_SUCCESS      src/wps/wps.h   /^      WPS_CB_ST_SUCCESS = 0,$/;"      e       enum:wps_cb_status
+WPS_CB_ST_TIMEOUT      src/wps/wps.h   /^      WPS_CB_ST_TIMEOUT,$/;"  e       enum:wps_cb_status
+WPS_CB_ST_WEP  src/wps/wps.h   /^      WPS_CB_ST_WEP,$/;"      e       enum:wps_cb_status
+WPS_CFG_24_CHAN_NOT_SUPPORTED  src/wps/wps_defs.h      /^      WPS_CFG_24_CHAN_NOT_SUPPORTED = 3,$/;"  e       enum:wps_config_error
+WPS_CFG_50_CHAN_NOT_SUPPORTED  src/wps/wps_defs.h      /^      WPS_CFG_50_CHAN_NOT_SUPPORTED = 4,$/;"  e       enum:wps_config_error
+WPS_CFG_DECRYPTION_CRC_FAILURE src/wps/wps_defs.h      /^      WPS_CFG_DECRYPTION_CRC_FAILURE = 2,$/;" e       enum:wps_config_error
+WPS_CFG_DEVICE_BUSY    src/wps/wps_defs.h      /^      WPS_CFG_DEVICE_BUSY = 14,$/;"   e       enum:wps_config_error
+WPS_CFG_DEV_PASSWORD_AUTH_FAILURE      src/wps/wps_defs.h      /^      WPS_CFG_DEV_PASSWORD_AUTH_FAILURE = 18$/;"      e       enum:wps_config_error
+WPS_CFG_FAILED_DHCP_CONFIG     src/wps/wps_defs.h      /^      WPS_CFG_FAILED_DHCP_CONFIG = 9,$/;"     e       enum:wps_config_error
+WPS_CFG_IP_ADDR_CONFLICT       src/wps/wps_defs.h      /^      WPS_CFG_IP_ADDR_CONFLICT = 10,$/;"      e       enum:wps_config_error
+WPS_CFG_MSG_TIMEOUT    src/wps/wps_defs.h      /^      WPS_CFG_MSG_TIMEOUT = 16,$/;"   e       enum:wps_config_error
+WPS_CFG_MULTIPLE_PBC_DETECTED  src/wps/wps_defs.h      /^      WPS_CFG_MULTIPLE_PBC_DETECTED = 12,$/;" e       enum:wps_config_error
+WPS_CFG_NETWORK_ASSOC_FAILURE  src/wps/wps_defs.h      /^      WPS_CFG_NETWORK_ASSOC_FAILURE = 7,$/;"  e       enum:wps_config_error
+WPS_CFG_NETWORK_AUTH_FAILURE   src/wps/wps_defs.h      /^      WPS_CFG_NETWORK_AUTH_FAILURE = 6,$/;"   e       enum:wps_config_error
+WPS_CFG_NO_CONN_TO_REGISTRAR   src/wps/wps_defs.h      /^      WPS_CFG_NO_CONN_TO_REGISTRAR = 11,$/;"  e       enum:wps_config_error
+WPS_CFG_NO_DHCP_RESPONSE       src/wps/wps_defs.h      /^      WPS_CFG_NO_DHCP_RESPONSE = 8,$/;"       e       enum:wps_config_error
+WPS_CFG_NO_ERROR       src/wps/wps_defs.h      /^      WPS_CFG_NO_ERROR = 0,$/;"       e       enum:wps_config_error
+WPS_CFG_OOB_IFACE_READ_ERROR   src/wps/wps_defs.h      /^      WPS_CFG_OOB_IFACE_READ_ERROR = 1,$/;"   e       enum:wps_config_error
+WPS_CFG_REG_SESS_TIMEOUT       src/wps/wps_defs.h      /^      WPS_CFG_REG_SESS_TIMEOUT = 17,$/;"      e       enum:wps_config_error
+WPS_CFG_ROGUE_SUSPECTED        src/wps/wps_defs.h      /^      WPS_CFG_ROGUE_SUSPECTED = 13,$/;"       e       enum:wps_config_error
+WPS_CFG_SETUP_LOCKED   src/wps/wps_defs.h      /^      WPS_CFG_SETUP_LOCKED = 15,$/;"  e       enum:wps_config_error
+WPS_CFG_SIGNAL_TOO_WEAK        src/wps/wps_defs.h      /^      WPS_CFG_SIGNAL_TOO_WEAK = 5,$/;"        e       enum:wps_config_error
+WPS_CONFIG_DISPLAY     src/wps/wps_defs.h      245;"   d
+WPS_CONFIG_ETHERNET    src/wps/wps_defs.h      243;"   d
+WPS_CONFIG_EXT_NFC_TOKEN       src/wps/wps_defs.h      246;"   d
+WPS_CONFIG_INIT_DEFAULT        include/esp_supplicant/esp_wps.h        80;"    d
+WPS_CONFIG_INT_NFC_TOKEN       src/wps/wps_defs.h      247;"   d
+WPS_CONFIG_KEYPAD      src/wps/wps_defs.h      250;"   d
+WPS_CONFIG_LABEL       src/wps/wps_defs.h      244;"   d
+WPS_CONFIG_NFC_INTERFACE       src/wps/wps_defs.h      248;"   d
+WPS_CONFIG_PHY_DISPLAY src/wps/wps_defs.h      255;"   d
+WPS_CONFIG_PHY_PUSHBUTTON      src/wps/wps_defs.h      253;"   d
+WPS_CONFIG_PUSHBUTTON  src/wps/wps_defs.h      249;"   d
+WPS_CONFIG_USBA        src/wps/wps_defs.h      242;"   d
+WPS_CONFIG_VIRT_DISPLAY        src/wps/wps_defs.h      254;"   d
+WPS_CONFIG_VIRT_PUSHBUTTON     src/wps/wps_defs.h      252;"   d
+WPS_CONN_ESS   src/wps/wps_defs.h      259;"   d
+WPS_CONN_IBSS  src/wps/wps_defs.h      260;"   d
+WPS_CONTINUE   src/wps/wps.h   /^      WPS_CONTINUE,$/;"       e       enum:wps_process_res
+WPS_DEFS_H     src/wps/wps_defs.h      10;"    d
+WPS_DEV_ATTR_H src/wps/wps_dev_attr.h  10;"    d
+WPS_DEV_CAMERA src/wps/wps_defs.h      /^      WPS_DEV_CAMERA = 4,$/;" e       enum:wps_dev_categ
+WPS_DEV_CAMERA_DIGITAL_STILL_CAMERA    src/wps/wps_defs.h      /^      WPS_DEV_CAMERA_DIGITAL_STILL_CAMERA = 1,$/;"    e       enum:wps_dev_subcateg
+WPS_DEV_COMPUTER       src/wps/wps_defs.h      /^      WPS_DEV_COMPUTER = 1,$/;"       e       enum:wps_dev_categ
+WPS_DEV_COMPUTER_MEDIA_CENTER  src/wps/wps_defs.h      /^      WPS_DEV_COMPUTER_MEDIA_CENTER = 3,$/;"  e       enum:wps_dev_subcateg
+WPS_DEV_COMPUTER_PC    src/wps/wps_defs.h      /^      WPS_DEV_COMPUTER_PC = 1,$/;"    e       enum:wps_dev_subcateg
+WPS_DEV_COMPUTER_SERVER        src/wps/wps_defs.h      /^      WPS_DEV_COMPUTER_SERVER = 2,$/;"        e       enum:wps_dev_subcateg
+WPS_DEV_DISPLAY        src/wps/wps_defs.h      /^      WPS_DEV_DISPLAY = 7,$/;"        e       enum:wps_dev_categ
+WPS_DEV_DISPLAY_PICTURE_FRAME  src/wps/wps_defs.h      /^      WPS_DEV_DISPLAY_PICTURE_FRAME = 2,$/;"  e       enum:wps_dev_subcateg
+WPS_DEV_DISPLAY_PROJECTOR      src/wps/wps_defs.h      /^      WPS_DEV_DISPLAY_PROJECTOR = 3,$/;"      e       enum:wps_dev_subcateg
+WPS_DEV_DISPLAY_TV     src/wps/wps_defs.h      /^      WPS_DEV_DISPLAY_TV = 1,$/;"     e       enum:wps_dev_subcateg
+WPS_DEV_GAMING src/wps/wps_defs.h      /^      WPS_DEV_GAMING = 9,$/;" e       enum:wps_dev_categ
+WPS_DEV_GAMING_PLAYSTATION     src/wps/wps_defs.h      /^      WPS_DEV_GAMING_PLAYSTATION = 3,$/;"     e       enum:wps_dev_subcateg
+WPS_DEV_GAMING_XBOX    src/wps/wps_defs.h      /^      WPS_DEV_GAMING_XBOX = 1,$/;"    e       enum:wps_dev_subcateg
+WPS_DEV_GAMING_XBOX360 src/wps/wps_defs.h      /^      WPS_DEV_GAMING_XBOX360 = 2,$/;" e       enum:wps_dev_subcateg
+WPS_DEV_INPUT  src/wps/wps_defs.h      /^      WPS_DEV_INPUT = 2,$/;"  e       enum:wps_dev_categ
+WPS_DEV_MULTIMEDIA     src/wps/wps_defs.h      /^      WPS_DEV_MULTIMEDIA = 8,$/;"     e       enum:wps_dev_categ
+WPS_DEV_MULTIMEDIA_DAR src/wps/wps_defs.h      /^      WPS_DEV_MULTIMEDIA_DAR = 1,$/;" e       enum:wps_dev_subcateg
+WPS_DEV_MULTIMEDIA_MCX src/wps/wps_defs.h      /^      WPS_DEV_MULTIMEDIA_MCX = 3,$/;" e       enum:wps_dev_subcateg
+WPS_DEV_MULTIMEDIA_PVR src/wps/wps_defs.h      /^      WPS_DEV_MULTIMEDIA_PVR = 2,$/;" e       enum:wps_dev_subcateg
+WPS_DEV_NETWORK_INFRA  src/wps/wps_defs.h      /^      WPS_DEV_NETWORK_INFRA = 6,$/;"  e       enum:wps_dev_categ
+WPS_DEV_NETWORK_INFRA_AP       src/wps/wps_defs.h      /^      WPS_DEV_NETWORK_INFRA_AP = 1,$/;"       e       enum:wps_dev_subcateg
+WPS_DEV_NETWORK_INFRA_ROUTER   src/wps/wps_defs.h      /^      WPS_DEV_NETWORK_INFRA_ROUTER = 2,$/;"   e       enum:wps_dev_subcateg
+WPS_DEV_NETWORK_INFRA_SWITCH   src/wps/wps_defs.h      /^      WPS_DEV_NETWORK_INFRA_SWITCH = 3,$/;"   e       enum:wps_dev_subcateg
+WPS_DEV_OUI_WFA        src/wps/wps_defs.h      278;"   d
+WPS_DEV_PHONE  src/wps/wps_defs.h      /^      WPS_DEV_PHONE = 10$/;"  e       enum:wps_dev_categ
+WPS_DEV_PHONE_WINDOWS_MOBILE   src/wps/wps_defs.h      /^      WPS_DEV_PHONE_WINDOWS_MOBILE = 1$/;"    e       enum:wps_dev_subcateg
+WPS_DEV_PRINTER        src/wps/wps_defs.h      /^      WPS_DEV_PRINTER = 3,$/;"        e       enum:wps_dev_categ
+WPS_DEV_PRINTER_PRINTER        src/wps/wps_defs.h      /^      WPS_DEV_PRINTER_PRINTER = 1,$/;"        e       enum:wps_dev_subcateg
+WPS_DEV_PRINTER_SCANNER        src/wps/wps_defs.h      /^      WPS_DEV_PRINTER_SCANNER = 2,$/;"        e       enum:wps_dev_subcateg
+WPS_DEV_STORAGE        src/wps/wps_defs.h      /^      WPS_DEV_STORAGE = 5,$/;"        e       enum:wps_dev_categ
+WPS_DEV_STORAGE_NAS    src/wps/wps_defs.h      /^      WPS_DEV_STORAGE_NAS = 1,$/;"    e       enum:wps_dev_subcateg
+WPS_DEV_TYPE_BUFSIZE   src/wps/wps.h   64;"    d
+WPS_DEV_TYPE_LEN       src/wps/wps.h   63;"    d
+WPS_DH_GROUP   src/wps/wps_defs.h      31;"    d
+WPS_DONE       src/wps/wps.h   /^      WPS_DONE,$/;"   e       enum:wps_process_res
+WPS_EAP_EXT_VENDOR_TYPE        src/wps/wps.h   1026;"  d
+WPS_EI_NO_ERROR        src/wps/wps_defs.h      /^      WPS_EI_NO_ERROR,$/;"    e       enum:wps_error_indication
+WPS_EI_SECURITY_TKIP_ONLY_PROHIBITED   src/wps/wps_defs.h      /^      WPS_EI_SECURITY_TKIP_ONLY_PROHIBITED,$/;"       e       enum:wps_error_indication
+WPS_EI_SECURITY_WEP_PROHIBITED src/wps/wps_defs.h      /^      WPS_EI_SECURITY_WEP_PROHIBITED,$/;"     e       enum:wps_error_indication
+WPS_EMSK_LEN   src/wps/wps_defs.h      38;"    d
+WPS_ENCR_AES   src/wps/wps_defs.h      202;"   d
+WPS_ENCR_NONE  src/wps/wps_defs.h      199;"   d
+WPS_ENCR_TKIP  src/wps/wps_defs.h      201;"   d
+WPS_ENCR_TYPES src/wps/wps_defs.h      203;"   d
+WPS_ENCR_WEP   src/wps/wps_defs.h      200;"   d
+WPS_ER_SET_SEL_REG_DONE        src/wps/wps.h   /^                      WPS_ER_SET_SEL_REG_DONE,$/;"    e       enum:wps_event_data::wps_event_er_set_selected_registrar::__anon54
+WPS_ER_SET_SEL_REG_FAILED      src/wps/wps.h   /^                      WPS_ER_SET_SEL_REG_FAILED$/;"   e       enum:wps_event_data::wps_event_er_set_selected_registrar::__anon54
+WPS_ER_SET_SEL_REG_START       src/wps/wps.h   /^                      WPS_ER_SET_SEL_REG_START,$/;"   e       enum:wps_event_data::wps_event_er_set_selected_registrar::__anon54
+WPS_EVENT_ACTIVE       src/common/wpa_ctrl.h   95;"    d
+WPS_EVENT_AP_AVAILABLE src/common/wpa_ctrl.h   83;"    d
+WPS_EVENT_AP_AVAILABLE_AUTH    src/common/wpa_ctrl.h   78;"    d
+WPS_EVENT_AP_AVAILABLE_PBC     src/common/wpa_ctrl.h   76;"    d
+WPS_EVENT_AP_AVAILABLE_PIN     src/common/wpa_ctrl.h   81;"    d
+WPS_EVENT_AP_PIN_DISABLED      src/common/wpa_ctrl.h   162;"   d
+WPS_EVENT_AP_PIN_ENABLED       src/common/wpa_ctrl.h   161;"   d
+WPS_EVENT_AP_SETUP_LOCKED      src/common/wpa_ctrl.h   159;"   d
+WPS_EVENT_AP_SETUP_UNLOCKED    src/common/wpa_ctrl.h   160;"   d
+WPS_EVENT_CRED_RECEIVED        src/common/wpa_ctrl.h   85;"    d
+WPS_EVENT_DISABLE      src/common/wpa_ctrl.h   97;"    d
+WPS_EVENT_ENROLLEE_SEEN        src/common/wpa_ctrl.h   99;"    d
+WPS_EVENT_ER_AP_ADD    src/common/wpa_ctrl.h   104;"   d
+WPS_EVENT_ER_AP_REMOVE src/common/wpa_ctrl.h   105;"   d
+WPS_EVENT_ER_AP_SETTINGS       src/common/wpa_ctrl.h   108;"   d
+WPS_EVENT_ER_ENROLLEE_ADD      src/common/wpa_ctrl.h   106;"   d
+WPS_EVENT_ER_ENROLLEE_REMOVE   src/common/wpa_ctrl.h   107;"   d
+WPS_EVENT_ER_SET_SEL_REG       src/common/wpa_ctrl.h   109;"   d
+WPS_EVENT_FAIL src/common/wpa_ctrl.h   89;"    d
+WPS_EVENT_M2D  src/common/wpa_ctrl.h   87;"    d
+WPS_EVENT_NEW_AP_SETTINGS      src/common/wpa_ctrl.h   157;"   d
+WPS_EVENT_OPEN_NETWORK src/common/wpa_ctrl.h   101;"   d
+WPS_EVENT_OVERLAP      src/common/wpa_ctrl.h   74;"    d
+WPS_EVENT_PIN_NEEDED   src/common/wpa_ctrl.h   156;"   d
+WPS_EVENT_REG_SUCCESS  src/common/wpa_ctrl.h   158;"   d
+WPS_EVENT_SUCCESS      src/common/wpa_ctrl.h   91;"    d
+WPS_EVENT_TIMEOUT      src/common/wpa_ctrl.h   93;"    d
+WPS_EV_AP_PIN_SUCCESS  src/wps/wps.h   /^      WPS_EV_AP_PIN_SUCCESS$/;"       e       enum:wps_event
+WPS_EV_ER_AP_ADD       src/wps/wps.h   /^      WPS_EV_ER_AP_ADD,$/;"   e       enum:wps_event
+WPS_EV_ER_AP_REMOVE    src/wps/wps.h   /^      WPS_EV_ER_AP_REMOVE,$/;"        e       enum:wps_event
+WPS_EV_ER_AP_SETTINGS  src/wps/wps.h   /^      WPS_EV_ER_AP_SETTINGS,$/;"      e       enum:wps_event
+WPS_EV_ER_ENROLLEE_ADD src/wps/wps.h   /^      WPS_EV_ER_ENROLLEE_ADD,$/;"     e       enum:wps_event
+WPS_EV_ER_ENROLLEE_REMOVE      src/wps/wps.h   /^      WPS_EV_ER_ENROLLEE_REMOVE,$/;"  e       enum:wps_event
+WPS_EV_ER_SET_SELECTED_REGISTRAR       src/wps/wps.h   /^      WPS_EV_ER_SET_SELECTED_REGISTRAR,$/;"   e       enum:wps_event
+WPS_EV_FAIL    src/wps/wps.h   /^      WPS_EV_FAIL,$/;"        e       enum:wps_event
+WPS_EV_M2D     src/wps/wps.h   /^      WPS_EV_M2D,$/;" e       enum:wps_event
+WPS_EV_PBC_OVERLAP     src/wps/wps.h   /^      WPS_EV_PBC_OVERLAP,$/;" e       enum:wps_event
+WPS_EV_PBC_TIMEOUT     src/wps/wps.h   /^      WPS_EV_PBC_TIMEOUT,$/;" e       enum:wps_event
+WPS_EV_PWD_AUTH_FAIL   src/wps/wps.h   /^      WPS_EV_PWD_AUTH_FAIL,$/;"       e       enum:wps_event
+WPS_EV_SUCCESS src/wps/wps.h   /^      WPS_EV_SUCCESS,$/;"     e       enum:wps_event
+WPS_FAILURE    src/wps/wps.h   /^      WPS_FAILURE,$/;"        e       enum:wps_process_res
+WPS_FINISHED   src/wps/wps_i.h /^              RECV_M8, RECEIVED_M2D, WPS_MSG_DONE, RECV_ACK, WPS_FINISHED,$/;"        e       enum:wps_data::__anon53
+WPS_FRAGMENT   src/wps/wps.h   /^      WPS_FRAGMENT    \/* Tim, send wsc fragment ack *\/$/;"  e       enum:wps_process_res
+WPS_H  src/wps/wps.h   10;"    d
+WPS_HASH_LEN   src/wps/wps_defs.h      41;"    d
+WPS_IE_VENDOR_TYPE     src/common/ieee802_11_defs.h    480;"   d
+WPS_IGNORE     src/wps/wps.h   /^      WPS_IGNORE,     \/* snake, ignore the re-packge *\/$/;" e       enum:wps_process_res
+WPS_IGNORE_SEL_REG_MAX_CNT     src/wps/wps_defs.h      338;"   d
+WPS_IGNORE_STATE       src/wps/wps_enrollee.c  1235;"  d       file:
+WPS_I_H        src/wps/wps_i.h 10;"    d
+WPS_KEYWRAPKEY_LEN     src/wps/wps_defs.h      37;"    d
+WPS_KWA_LEN    src/wps/wps_defs.h      42;"    d
+WPS_M1 src/wps/wps_defs.h      /^      WPS_M1 = 0x04,$/;"      e       enum:wps_msg_type
+WPS_M2 src/wps/wps_defs.h      /^      WPS_M2 = 0x05,$/;"      e       enum:wps_msg_type
+WPS_M2D        src/wps/wps_defs.h      /^      WPS_M2D = 0x06,$/;"     e       enum:wps_msg_type
+WPS_M3 src/wps/wps_defs.h      /^      WPS_M3 = 0x07,$/;"      e       enum:wps_msg_type
+WPS_M4 src/wps/wps_defs.h      /^      WPS_M4 = 0x08,$/;"      e       enum:wps_msg_type
+WPS_M5 src/wps/wps_defs.h      /^      WPS_M5 = 0x09,$/;"      e       enum:wps_msg_type
+WPS_M6 src/wps/wps_defs.h      /^      WPS_M6 = 0x0a,$/;"      e       enum:wps_msg_type
+WPS_M7 src/wps/wps_defs.h      /^      WPS_M7 = 0x0b,$/;"      e       enum:wps_msg_type
+WPS_M8 src/wps/wps_defs.h      /^      WPS_M8 = 0x0c,$/;"      e       enum:wps_msg_type
+WPS_MAX_AUTHORIZED_MACS        src/wps/wps_defs.h      336;"   d
+WPS_MAX_DEVICE_NAME_LEN        include/esp_supplicant/esp_wps.h        66;"    d
+WPS_MAX_DIS_AP_NUM     src/wps/wps_defs.h      340;"   d
+WPS_MAX_MANUFACTURER_LEN       include/esp_supplicant/esp_wps.h        63;"    d
+WPS_MAX_MODEL_NAME_LEN include/esp_supplicant/esp_wps.h        65;"    d
+WPS_MAX_MODEL_NUMBER_LEN       include/esp_supplicant/esp_wps.h        64;"    d
+WPS_MAX_VENDOR_EXT_LEN src/wps/wps.h   69;"    d
+WPS_MGMTAUTHKEY_LEN    src/wps/wps_defs.h      43;"    d
+WPS_MGMTENCKEY_LEN     src/wps/wps_defs.h      44;"    d
+WPS_MGMT_KEY_ID_LEN    src/wps/wps_defs.h      45;"    d
+WPS_MSG_DONE   src/wps/wps_i.h /^              RECV_M8, RECEIVED_M2D, WPS_MSG_DONE, RECV_ACK, WPS_FINISHED,$/;"        e       enum:wps_data::__anon53
+WPS_MSG_FLAG_LEN       src/wps/wps_defs.h      /^      WPS_MSG_FLAG_LEN = 0x02$/;"     e       enum:wps_msg_flag
+WPS_MSG_FLAG_MORE      src/wps/wps_defs.h      /^      WPS_MSG_FLAG_MORE = 0x01,$/;"   e       enum:wps_msg_flag
+WPS_NONCE_LEN  src/wps/wps_defs.h      34;"    d
+WPS_OOB_DEVICE_PASSWORD_LEN    src/wps/wps_defs.h      47;"    d
+WPS_OOB_DEVICE_PASSWORD_MIN_LEN        src/wps/wps_defs.h      46;"    d
+WPS_OOB_PUBKEY_HASH_LEN        src/wps/wps_defs.h      48;"    d
+WPS_OUTBUF_SIZE        src/wps/wps.h   1027;"  d
+WPS_PBC_WALK_TIME      src/wps/wps_defs.h      334;"   d
+WPS_PENDING    src/wps/wps.h   /^      WPS_PENDING,$/;"        e       enum:wps_process_res
+WPS_PSK_LEN    src/wps/wps_defs.h      39;"    d
+WPS_ProbeRequest       src/wps/wps_defs.h      /^      WPS_ProbeRequest = 0x02,$/;"    e       enum:wps_msg_type
+WPS_ProbeResponse      src/wps/wps_defs.h      /^      WPS_ProbeResponse = 0x03,$/;"   e       enum:wps_msg_type
+WPS_REQ_ENROLLEE       src/wps/wps_defs.h      /^      WPS_REQ_ENROLLEE = 1,$/;"       e       enum:wps_request_type
+WPS_REQ_ENROLLEE_INFO  src/wps/wps_defs.h      /^      WPS_REQ_ENROLLEE_INFO = 0,$/;"  e       enum:wps_request_type
+WPS_REQ_REGISTRAR      src/wps/wps_defs.h      /^      WPS_REQ_REGISTRAR = 2,$/;"      e       enum:wps_request_type
+WPS_REQ_WLAN_MANAGER_REGISTRAR src/wps/wps_defs.h      /^      WPS_REQ_WLAN_MANAGER_REGISTRAR = 3$/;"  e       enum:wps_request_type
+WPS_RESP_AP    src/wps/wps_defs.h      /^      WPS_RESP_AP = 3$/;"     e       enum:wps_response_type
+WPS_RESP_ENROLLEE      src/wps/wps_defs.h      /^      WPS_RESP_ENROLLEE = 1,$/;"      e       enum:wps_response_type
+WPS_RESP_ENROLLEE_INFO src/wps/wps_defs.h      /^      WPS_RESP_ENROLLEE_INFO = 0,$/;" e       enum:wps_response_type
+WPS_RESP_REGISTRAR     src/wps/wps_defs.h      /^      WPS_RESP_REGISTRAR = 2,$/;"     e       enum:wps_response_type
+WPS_RF_24GHZ   src/wps/wps_defs.h      238;"   d
+WPS_RF_50GHZ   src/wps/wps_defs.h      239;"   d
+WPS_SECRET_NONCE_LEN   src/wps/wps_defs.h      40;"    d
+WPS_SEC_DEVICE_TYPES   src/wps/wps.h   96;"    d
+WPS_SEC_DEV_TYPE_MAX_LEN       src/wps/wps.h   65;"    d
+WPS_STATE_CONFIGURED   src/wps/wps_defs.h      /^      WPS_STATE_CONFIGURED = 2$/;"    e       enum:wps_state
+WPS_STATE_NOT_CONFIGURED       src/wps/wps_defs.h      /^      WPS_STATE_NOT_CONFIGURED = 1,$/;"       e       enum:wps_state
+WPS_STATUS_DISABLE     src/esp_supplicant/esp_wifi_driver.h    /^    WPS_STATUS_DISABLE = 0,$/;"       e       enum:wps_status
+WPS_STATUS_MAX src/esp_supplicant/esp_wifi_driver.h    /^    WPS_STATUS_MAX,$/;"       e       enum:wps_status
+WPS_STATUS_PENDING     src/esp_supplicant/esp_wifi_driver.h    /^    WPS_STATUS_PENDING,$/;"   e       enum:wps_status
+WPS_STATUS_SCANNING    src/esp_supplicant/esp_wifi_driver.h    /^    WPS_STATUS_SCANNING,$/;"  e       enum:wps_status
+WPS_STATUS_SUCCESS     src/esp_supplicant/esp_wifi_driver.h    /^    WPS_STATUS_SUCCESS,$/;"   e       enum:wps_status
+WPS_STATUS_t   src/esp_supplicant/esp_wifi_driver.h    /^} WPS_STATUS_t;$/;"   t       typeref:enum:wps_status
+WPS_STRDUP     src/wps/wps_registrar.c 281;"   d       file:
+WPS_STRDUP     src/wps/wps_registrar.c 290;"   d       file:
+WPS_STRICT_WPS2        src/wps/wps_validate.c  16;"    d       file:
+WPS_TASK_STACK_SIZE    src/esp_supplicant/esp_wifi_driver.h    28;"    d
+WPS_TYPE_ALL_MAX       include/esp_supplicant/esp_wps.h        /^    WPS_TYPE_ALL_MAX,$/;"     e       enum:wps_type
+WPS_TYPE_DISABLE       include/esp_supplicant/esp_wps.h        /^    WPS_TYPE_DISABLE = 0,$/;" e       enum:wps_type
+WPS_TYPE_DISPLAY       include/esp_supplicant/esp_wps.h        /^    WPS_TYPE_DISPLAY,$/;"     e       enum:wps_type
+WPS_TYPE_E_MAX include/esp_supplicant/esp_wps.h        /^    WPS_TYPE_E_MAX,$/;"       e       enum:wps_type
+WPS_TYPE_PBC   include/esp_supplicant/esp_wps.h        /^    WPS_TYPE_PBC,$/;" e       enum:wps_type
+WPS_TYPE_PIN   include/esp_supplicant/esp_wps.h        /^    WPS_TYPE_PIN,$/;" e       enum:wps_type
+WPS_TYPE_R_DISPLAY     include/esp_supplicant/esp_wps.h        /^    WPS_TYPE_R_DISPLAY,$/;"   e       enum:wps_type
+WPS_TYPE_R_MAX include/esp_supplicant/esp_wps.h        /^    WPS_TYPE_R_MAX,$/;"       e       enum:wps_type
+WPS_TYPE_R_PBC include/esp_supplicant/esp_wps.h        /^    WPS_TYPE_R_PBC,$/;"       e       enum:wps_type
+WPS_TYPE_R_PIN include/esp_supplicant/esp_wps.h        /^    WPS_TYPE_R_PIN,$/;"       e       enum:wps_type
+WPS_UUID_LEN   src/wps/wps_defs.h      33;"    d
+WPS_VENDOR_ID_WFA      src/wps/wps_defs.h      142;"   d
+WPS_VERSION    src/wps/wps_defs.h      16;"    d
+WPS_VERSION    src/wps/wps_defs.h      21;"    d
+WPS_VERSION    src/wps/wps_defs.h      23;"    d
+WPS_WIFI_AUTH_OPEN     src/wps/wps_defs.h      189;"   d
+WPS_WORKAROUNDS        src/wps/wps_attr_parse.c        15;"    d       file:
+WPS_WORKAROUNDS        src/wps/wps_registrar.c 25;"    d       file:
+WPS_WSC_ACK    src/wps/wps_defs.h      /^      WPS_WSC_ACK = 0x0d,$/;" e       enum:wps_msg_type
+WPS_WSC_DONE   src/wps/wps_defs.h      /^      WPS_WSC_DONE = 0x0f$/;" e       enum:wps_msg_type
+WPS_WSC_NACK   src/wps/wps_defs.h      /^      WPS_WSC_NACK = 0x0e,$/;"        e       enum:wps_msg_type
+WSC_ACK        src/wps/wps.h   /^      WSC_ACK = 0x02,$/;"     e       enum:wsc_op_code
+WSC_Done       src/wps/wps.h   /^      WSC_Done = 0x05,$/;"    e       enum:wsc_op_code
+WSC_FRAG_ACK   src/wps/wps.h   /^      WSC_FRAG_ACK = 0x06$/;" e       enum:wsc_op_code
+WSC_MSG        src/wps/wps.h   /^      WSC_MSG = 0x04,$/;"     e       enum:wsc_op_code
+WSC_NACK       src/wps/wps.h   /^      WSC_NACK = 0x03,$/;"    e       enum:wsc_op_code
+WSC_Start      src/wps/wps.h   /^      WSC_Start = 0x01,$/;"   e       enum:wsc_op_code
+WSC_UPnP       src/wps/wps.h   /^      WSC_UPnP = 0 \/* No OP Code in UPnP transport *\/,$/;"  e       enum:wsc_op_code
+WePKEY_128_BYTES       include/crypto/wepkey.h 5;"     d
+X509V3_H       src/tls/x509v3.h        10;"    d
+X509_CERT_V1   src/tls/x509v3.h        /^      enum { X509_CERT_V1 = 0, X509_CERT_V2 = 1, X509_CERT_V3 = 2 } version;$/;"      e       enum:x509_certificate::__anon41
+X509_CERT_V2   src/tls/x509v3.h        /^      enum { X509_CERT_V1 = 0, X509_CERT_V2 = 1, X509_CERT_V3 = 2 } version;$/;"      e       enum:x509_certificate::__anon41
+X509_CERT_V3   src/tls/x509v3.h        /^      enum { X509_CERT_V1 = 0, X509_CERT_V2 = 1, X509_CERT_V3 = 2 } version;$/;"      e       enum:x509_certificate::__anon41
+X509_EXT_BASIC_CONSTRAINTS     src/tls/x509v3.h        66;"    d
+X509_EXT_ISSUER_ALT_NAME       src/tls/x509v3.h        70;"    d
+X509_EXT_KEY_USAGE     src/tls/x509v3.h        68;"    d
+X509_EXT_PATH_LEN_CONSTRAINT   src/tls/x509v3.h        67;"    d
+X509_EXT_SUBJECT_ALT_NAME      src/tls/x509v3.h        69;"    d
+X509_KEY_USAGE_CRL_SIGN        src/tls/x509v3.h        84;"    d
+X509_KEY_USAGE_DATA_ENCIPHERMENT       src/tls/x509v3.h        81;"    d
+X509_KEY_USAGE_DECIPHER_ONLY   src/tls/x509v3.h        86;"    d
+X509_KEY_USAGE_DIGITAL_SIGNATURE       src/tls/x509v3.h        78;"    d
+X509_KEY_USAGE_ENCIPHER_ONLY   src/tls/x509v3.h        85;"    d
+X509_KEY_USAGE_KEY_AGREEMENT   src/tls/x509v3.h        82;"    d
+X509_KEY_USAGE_KEY_CERT_SIGN   src/tls/x509v3.h        83;"    d
+X509_KEY_USAGE_KEY_ENCIPHERMENT        src/tls/x509v3.h        80;"    d
+X509_KEY_USAGE_NON_REPUDIATION src/tls/x509v3.h        79;"    d
+X509_MAX_NAME_ATTRIBUTES       src/tls/x509v3.h        32;"    d
+X509_NAME_ATTR_C       src/tls/x509v3.h        /^              X509_NAME_ATTR_C,$/;"   e       enum:x509_name_attr::x509_name_attr_type
+X509_NAME_ATTR_CN      src/tls/x509v3.h        /^              X509_NAME_ATTR_CN,$/;"  e       enum:x509_name_attr::x509_name_attr_type
+X509_NAME_ATTR_DC      src/tls/x509v3.h        /^              X509_NAME_ATTR_DC,$/;"  e       enum:x509_name_attr::x509_name_attr_type
+X509_NAME_ATTR_L       src/tls/x509v3.h        /^              X509_NAME_ATTR_L,$/;"   e       enum:x509_name_attr::x509_name_attr_type
+X509_NAME_ATTR_NOT_USED        src/tls/x509v3.h        /^              X509_NAME_ATTR_NOT_USED,$/;"    e       enum:x509_name_attr::x509_name_attr_type
+X509_NAME_ATTR_O       src/tls/x509v3.h        /^              X509_NAME_ATTR_O,$/;"   e       enum:x509_name_attr::x509_name_attr_type
+X509_NAME_ATTR_OU      src/tls/x509v3.h        /^              X509_NAME_ATTR_OU$/;"   e       enum:x509_name_attr::x509_name_attr_type
+X509_NAME_ATTR_ST      src/tls/x509v3.h        /^              X509_NAME_ATTR_ST,$/;"  e       enum:x509_name_attr::x509_name_attr_type
+X509_VALIDATE_BAD_CERTIFICATE  src/tls/x509v3.h        /^      X509_VALIDATE_BAD_CERTIFICATE,$/;"      e       enum:__anon42
+X509_VALIDATE_CERTIFICATE_EXPIRED      src/tls/x509v3.h        /^      X509_VALIDATE_CERTIFICATE_EXPIRED,$/;"  e       enum:__anon42
+X509_VALIDATE_CERTIFICATE_REVOKED      src/tls/x509v3.h        /^      X509_VALIDATE_CERTIFICATE_REVOKED,$/;"  e       enum:__anon42
+X509_VALIDATE_CERTIFICATE_UNKNOWN      src/tls/x509v3.h        /^      X509_VALIDATE_CERTIFICATE_UNKNOWN,$/;"  e       enum:__anon42
+X509_VALIDATE_OK       src/tls/x509v3.h        /^      X509_VALIDATE_OK,$/;"   e       enum:__anon42
+X509_VALIDATE_UNKNOWN_CA       src/tls/x509v3.h        /^      X509_VALIDATE_UNKNOWN_CA$/;"    e       enum:__anon42
+X509_VALIDATE_UNSUPPORTED_CERTIFICATE  src/tls/x509v3.h        /^      X509_VALIDATE_UNSUPPORTED_CERTIFICATE,$/;"      e       enum:__anon42
+XFREE  src/crypto/libtommath.h 81;"    d
+XFREE  src/tls/libtommath.h    83;"    d
+XMALLOC        src/crypto/libtommath.h 80;"    d
+XMALLOC        src/tls/libtommath.h    82;"    d
+XREALLOC       src/crypto/libtommath.h 82;"    d
+XREALLOC       src/tls/libtommath.h    84;"    d
+_ENDIAN_H_     port/include/endian.h   30;"    d
+_ESP_WIFI_DRIVER_H_    src/esp_supplicant/esp_wifi_driver.h    16;"    d
+_UINT16_T_DECLARED     port/include/endian.h   57;"    d
+_UINT16_T_DECLARED     port/include/endian.h   60;"    d
+_UINT32_T_DECLARED     port/include/endian.h   63;"    d
+_UINT32_T_DECLARED     port/include/endian.h   66;"    d
+_UINT64_T_DECLARED     port/include/endian.h   69;"    d
+_UINT64_T_DECLARED     port/include/endian.h   72;"    d
+_UINT8_T_DECLARED      port/include/endian.h   51;"    d
+_UINT8_T_DECLARED      port/include/endian.h   54;"    d
+__BIG_ENDIAN   include/utils/common.h  40;"    d
+__BIG_ENDIAN   include/utils/common.h  82;"    d
+__BYTE_ORDER   include/utils/common.h  38;"    d
+__BYTE_ORDER   include/utils/common.h  84;"    d
+__ESP_WPA_PSK_H__      include/esp_supplicant/esp_wpa_psk.h    16;"    d
+__ESP_WPS_H__  include/esp_supplicant/esp_wps.h        16;"    d
+__LITTLE_ENDIAN        include/utils/common.h  39;"    d
+__LITTLE_ENDIAN        include/utils/common.h  81;"    d
+__bitwise      include/utils/common.h  273;"   d
+__bitwise      include/utils/common.h  276;"   d
+__bswap_16     port/include/byteswap.h /^__bswap_16 (unsigned short int __bsx)$/;"     f
+__bswap_16     port/include/byteswap.h 13;"    d
+__bswap_32     port/include/byteswap.h /^__bswap_32 (unsigned int __bsx)$/;"   f
+__bswap_32     port/include/byteswap.h 29;"    d
+__bswap_64     port/include/byteswap.h 57;"    d
+__bswap_constant_64    port/include/byteswap.h 47;"    d
+__force        include/utils/common.h  272;"   d
+__force        include/utils/common.h  275;"   d
+__func__       include/utils/common.h  234;"   d
+__must_check   include/utils/common.h  288;"   d
+__must_check   include/utils/common.h  290;"   d
+__packed       src/eap_peer/eap_mschapv2.c     /^} __packed;$/;"       v       typeref:struct:eap_mschapv2_hdr
+__packed       src/eap_peer/eap_mschapv2.c     /^} __packed;$/;"       v       typeref:struct:ms_change_password
+__packed       src/eap_peer/eap_mschapv2.c     /^} __packed;$/;"       v       typeref:struct:ms_response
+__wpa_send_eapol       src/ap/wpa_auth.c       /^void __wpa_send_eapol(struct wpa_authenticator *wpa_auth,$/;" f
+_wpa_snprintf_hex      src/utils/wpa_debug.c   /^static inline int  _wpa_snprintf_hex(char *buf, size_t buf_size, const u8 *data, size_t len, int uppercase)$/;"       f       file:
+a_mpdu_params  src/common/ieee802_11_defs.h    /^      u8 a_mpdu_params;$/;"   m       struct:ieee80211_ht_capabilities
+ac     src/common/ieee802_11_defs.h    /^      struct wmm_ac_parameter ac[4]; \/* AC_BE, AC_BK, AC_VI, AC_VO *\/$/;"   m       struct:wmm_parameter_element    typeref:struct:wmm_parameter_element::wmm_ac_parameter
+aci_aifsn      src/common/ieee802_11_defs.h    /^      u8 aci_aifsn; \/* AIFSN, ACM, ACI *\/$/;"       m       struct:wmm_ac_parameter
+action src/common/ieee802_11_defs.h    /^                                      u8 action; \/* *\/$/;"  m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon83
+action src/common/ieee802_11_defs.h    /^                                      u8 action;$/;"  m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon80
+action src/common/ieee802_11_defs.h    /^                                      u8 action;$/;"  m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon81
+action src/common/ieee802_11_defs.h    /^                                      u8 action;$/;"  m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon82
+action src/common/ieee802_11_defs.h    /^              } STRUCT_PACKED action;$/;"     m       union:ieee80211_mgmt::__anon66  typeref:struct:ieee80211_mgmt::__anon66::__anon76
+action src/eap_peer/eap_tlv_common.h   /^      be16 action;$/;"        m       struct:eap_tlv_request_action_tlv
+action_code    src/common/ieee802_11_defs.h    /^                                      u8 action_code;$/;"     m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon78
+action_code    src/common/ieee802_11_defs.h    /^                                      u8 action_code;$/;"     m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon79
+action_length  src/ap/wpa_auth.h       /^      le16 action_length; \/* little endian length of action_frame *\/$/;"    m       struct:ft_rrb_frame
+add_sta        src/ap/wpa_auth.h       /^      struct wpa_state_machine * (*add_sta)(void *ctx, const u8 *sta_addr);$/;"       m       struct:wpa_auth_callbacks       typeref:struct:wpa_auth_callbacks::add_sta
+add_tspec      src/ap/wpa_auth.h       /^      int (*add_tspec)(void *ctx, const u8 *sta_addr, u8 *tspec_ie,$/;"       m       struct:wpa_auth_callbacks
+addr   src/ap/ap_config.h      /^      macaddr addr;$/;"       m       struct:mac_acl_entry
+addr   src/ap/ap_config.h      /^      u8 addr[ETH_ALEN];$/;"  m       struct:hostapd_wpa_psk
+addr   src/ap/sta_info.h       /^      u8 addr[6];$/;" m       struct:sta_info
+addr   src/ap/wpa_auth.h       /^      u8 addr[ETH_ALEN];$/;"  m       struct:ft_remote_r0kh
+addr   src/ap/wpa_auth.h       /^      u8 addr[ETH_ALEN];$/;"  m       struct:ft_remote_r1kh
+addr   src/ap/wpa_auth_i.h     /^      u8 addr[ETH_ALEN];$/;"  m       struct:wpa_authenticator
+addr   src/ap/wpa_auth_i.h     /^      u8 addr[ETH_ALEN];$/;"  m       struct:wpa_state_machine
+addr   src/rsn_supp/wpa.h      /^    u8 addr[ETH_ALEN];$/;"    m       struct:install_key
+addr   src/wps/wps.h   /^      u8 addr[ETH_ALEN];$/;"  m       struct:upnp_pending_message
+addr   src/wps/wps_registrar.c /^      u8 addr[ETH_ALEN];$/;"  m       struct:wps_pbc_session  file:
+addr1  src/common/ieee802_11_defs.h    /^      u8 addr1[6];$/;"        m       struct:ieee80211_hdr
+addr2  src/common/ieee802_11_defs.h    /^      u8 addr2[6];$/;"        m       struct:ieee80211_hdr
+addr3  src/common/ieee802_11_defs.h    /^      u8 addr3[6];$/;"        m       struct:ieee80211_hdr
+aes    src/crypto/crypto_internal-cipher.c     /^              } aes;$/;"      m       union:crypto_cipher::__anon10   typeref:struct:crypto_cipher::__anon10::__anon12        file:
+aes    src/fast_crypto/fast_crypto_internal-cipher.c   /^        } aes;$/;"    m       union:fast_crypto_cipher::__anon56      typeref:struct:fast_crypto_cipher::__anon56::__anon58   file:
+aes_128_cbc_decrypt    src/crypto/aes-cbc.c    /^aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)$/;"       f
+aes_128_cbc_encrypt    src/crypto/aes-cbc.c    /^aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)$/;"       f
+aes_decrypt    src/crypto/aes-internal-dec.c   /^void  aes_decrypt(void *ctx, const u8 *crypt, u8 *plain)$/;"  f
+aes_decrypt_deinit     src/crypto/aes-internal-dec.c   /^void  aes_decrypt_deinit(void *ctx)$/;"       f
+aes_decrypt_init       src/crypto/aes-internal-dec.c   /^void *  aes_decrypt_init(const u8 *key, size_t len)$/;"       f
+aes_encrypt    src/crypto/aes-internal-enc.c   /^void  aes_encrypt(void *ctx, const u8 *plain, u8 *crypt)$/;"  f
+aes_encrypt_deinit     src/crypto/aes-internal-enc.c   /^void  aes_encrypt_deinit(void *ctx)$/;"       f
+aes_encrypt_init       src/crypto/aes-internal-enc.c   /^void *  aes_encrypt_init(const u8 *key, size_t len)$/;"       f
+aes_unwrap     src/crypto/aes-unwrap.c /^aes_unwrap(const u8 *kek, int n, const u8 *cipher, u8 *plain)$/;"     f
+aes_wrap       src/crypto/aes-wrap.c   /^int  aes_wrap(const u8 *kek, int n, const u8 *plain, u8 *cipher)$/;"  f
+aid    src/ap/sta_info.h       /^      u16 aid; \/* STA's unique AID (1 .. 2007) or 0 if not yet assigned *\/$/;"      m       struct:sta_info
+aid    src/common/ieee802_11_defs.h    /^                      le16 aid;$/;"   m       struct:ieee80211_mgmt::__anon66::__anon70
+alert  src/tls/tls.h   /^      } alert;$/;"    m       union:tls_event_data    typeref:struct:tls_event_data::__anon36
+alert_description      src/tls/tlsv1_client_i.h        /^      u8 alert_description;$/;"       m       struct:tlsv1_client
+alert_description      src/tls/tlsv1_server_i.h        /^      u8 alert_description;$/;"       m       struct:tlsv1_server
+alert_level    src/tls/tlsv1_client_i.h        /^      u8 alert_level;$/;"     m       struct:tlsv1_client
+alert_level    src/tls/tlsv1_server_i.h        /^      u8 alert_level;$/;"     m       struct:tlsv1_server
+alg    src/common/wpa_common.h /^      enum wpa_alg alg;$/;"   m       struct:wpa_gtk_data     typeref:enum:wpa_gtk_data::wpa_alg
+alg    src/crypto/crypto_internal-cipher.c     /^      enum crypto_cipher_alg alg;$/;" m       struct:crypto_cipher    typeref:enum:crypto_cipher::crypto_cipher_alg   file:
+alg    src/crypto/crypto_internal.c    /^      enum crypto_hash_alg alg;$/;"   m       struct:crypto_hash      typeref:enum:crypto_hash::crypto_hash_alg       file:
+alg    src/fast_crypto/fast_crypto_internal-cipher.c   /^    enum crypto_cipher_alg alg;$/;"   m       struct:fast_crypto_cipher       typeref:enum:fast_crypto_cipher::crypto_cipher_alg      file:
+alg    src/fast_crypto/fast_crypto_internal.c  /^      enum crypto_hash_alg alg;$/;"   m       struct:fast_crypto_hash typeref:enum:fast_crypto_hash::crypto_hash_alg  file:
+alg    src/rsn_supp/wpa.h      /^    enum wpa_alg alg;$/;"     m       struct:install_key      typeref:enum:install_key::wpa_alg
+alg    src/tls/pkcs5.c /^      } alg;$/;"      m       struct:pkcs5_params     typeref:enum:pkcs5_params::pkcs5_alg    file:
+alg    src/tls/tlsv1_common.h  /^      enum crypto_cipher_alg alg;$/;" m       struct:tls_cipher_data  typeref:enum:tls_cipher_data::crypto_cipher_alg
+aliasing_hide_typecast include/utils/common.h  336;"   d
+alloc  src/crypto/libtommath.h /^    int used, alloc, sign;$/;"        m       struct:__anon8
+alloc  src/tls/libtommath.h    /^    int used, alloc, sign;$/;"        m       struct:__anon40
+allowNotifications     src/eap_peer/eap_i.h    /^      Boolean allowNotifications;$/;" m       struct:eap_method_ret
+alt_email      src/tls/x509v3.h        /^      char *alt_email; \/* rfc822Name *\/$/;" m       struct:x509_name
+altsubject_match       src/tls/tls.h   /^      const char *altsubject_match;$/;"       m       struct:tls_connection_params
+anonce src/common/wpa_common.h /^      u8 anonce[WPA_NONCE_LEN];$/;"   m       struct:rsn_ftie
+anonce src/rsn_supp/wpa.h      /^    u8 anonce[WPA_NONCE_LEN]; \/* ANonce from the last 1\/4 msg *\/$/;"       m       struct:wpa_sm
+anonymous_identity     src/eap_peer/eap_config.h       /^      u8 *anonymous_identity;$/;"     m       struct:eap_peer_config
+anonymous_identity_len src/eap_peer/eap_config.h       /^      size_t anonymous_identity_len;$/;"      m       struct:eap_peer_config
+ap     src/wps/wps.h   /^      int ap;$/;"     m       struct:wps_context
+ap     src/wps/wps.h   /^      } ap;$/;"       m       union:wps_event_data    typeref:struct:wps_event_data::wps_event_er_ap
+ap_address     src/ap/wpa_auth.h       /^      u8 ap_address[ETH_ALEN];$/;"    m       struct:ft_r0kh_r1kh_pull_frame
+ap_address     src/ap/wpa_auth.h       /^      u8 ap_address[ETH_ALEN];$/;"    m       struct:ft_r0kh_r1kh_push_frame
+ap_address     src/ap/wpa_auth.h       /^      u8 ap_address[ETH_ALEN];$/;"    m       struct:ft_r0kh_r1kh_resp_frame
+ap_address     src/ap/wpa_auth.h       /^      u8 ap_address[ETH_ALEN];$/;"    m       struct:ft_rrb_frame
+ap_channel     src/wps/wps.h   /^      u16 ap_channel;$/;"     m       struct:wps_credential
+ap_channel     src/wps/wps_attr_parse.h        /^      const u8 *ap_channel; \/* 2 octets *\/$/;"      m       struct:wps_parse_attr
+ap_max_inactivity      src/ap/ap_config.h      /^      int ap_max_inactivity;$/;"      m       struct:hostapd_bss_config
+ap_mlme        src/ap/wpa_auth.h       /^      int ap_mlme;$/;"        m       struct:wpa_auth_config
+ap_nfc_dev_pw  src/wps/wps.h   /^      struct wpabuf *ap_nfc_dev_pw;$/;"       m       struct:wps_context      typeref:struct:wps_context::wpabuf
+ap_nfc_dev_pw_id       src/wps/wps.h   /^      u16 ap_nfc_dev_pw_id;$/;"       m       struct:wps_context
+ap_nfc_dh_privkey      src/wps/wps.h   /^      struct wpabuf *ap_nfc_dh_privkey;$/;"   m       struct:wps_context      typeref:struct:wps_context::wpabuf
+ap_nfc_dh_pubkey       src/wps/wps.h   /^      struct wpabuf *ap_nfc_dh_pubkey;$/;"    m       struct:wps_context      typeref:struct:wps_context::wpabuf
+ap_notify_completed_rsne       src/rsn_supp/wpa.h      /^    bool   ap_notify_completed_rsne;$/;"      m       struct:wpa_sm
+ap_pin src/ap/ap_config.h      /^      char *ap_pin;$/;"       m       struct:hostapd_bss_config
+ap_pin_failures        src/ap/hostapd.h        /^      unsigned int ap_pin_failures;$/;"       m       struct:hostapd_data
+ap_pin_failures_consecutive    src/ap/hostapd.h        /^      unsigned int ap_pin_failures_consecutive;$/;"   m       struct:hostapd_data
+ap_pin_lockout_time    src/ap/hostapd.h        /^      unsigned int ap_pin_lockout_time;$/;"   m       struct:hostapd_data
+ap_rsn_ie      src/rsn_supp/wpa.h      /^    u8 *ap_wpa_ie, *ap_rsn_ie;$/;"    m       struct:wpa_sm
+ap_rsn_ie_len  src/rsn_supp/wpa.h      /^    size_t ap_wpa_ie_len, ap_rsn_ie_len;$/;"  m       struct:wpa_sm
+ap_settings    src/ap/ap_config.h      /^      u8 *ap_settings;$/;"    m       struct:hostapd_bss_config
+ap_settings    src/wps/wps.h   /^      u8 *ap_settings;$/;"    m       struct:wps_context
+ap_settings    src/wps/wps.h   /^      } ap_settings;$/;"      m       union:wps_event_data    typeref:struct:wps_event_data::wps_event_er_ap_settings
+ap_settings_cb src/wps/wps_i.h /^      void (*ap_settings_cb)(void *ctx, const struct wps_credential *cred);$/;"       m       struct:wps_data
+ap_settings_cb_ctx     src/wps/wps_i.h /^      void *ap_settings_cb_ctx;$/;"   m       struct:wps_data
+ap_settings_len        src/ap/ap_config.h      /^      size_t ap_settings_len;$/;"     m       struct:hostapd_bss_config
+ap_settings_len        src/wps/wps.h   /^      size_t ap_settings_len;$/;"     m       struct:wps_context
+ap_setup_locked        src/ap/ap_config.h      /^      int ap_setup_locked;$/;"        m       struct:hostapd_bss_config
+ap_setup_locked        src/wps/wps.h   /^      int ap_setup_locked;$/;"        m       struct:wps_context
+ap_setup_locked        src/wps/wps_attr_parse.h        /^      const u8 *ap_setup_locked; \/* 1 octet *\/$/;"  m       struct:wps_parse_attr
+ap_sta_is_authorized   src/ap/sta_info.h       /^static inline int ap_sta_is_authorized(struct sta_info *sta)$/;"      f
+ap_table_expiration_time       src/ap/ap_config.h      /^      int ap_table_expiration_time;$/;"       m       struct:hostapd_config
+ap_table_max_size      src/ap/ap_config.h      /^      int ap_table_max_size;$/;"      m       struct:hostapd_config
+ap_wpa_ie      src/rsn_supp/wpa.h      /^    u8 *ap_wpa_ie, *ap_rsn_ie;$/;"    m       struct:wpa_sm
+ap_wpa_ie_len  src/rsn_supp/wpa.h      /^    size_t ap_wpa_ie_len, ap_rsn_ie_len;$/;"  m       struct:wpa_sm
+arg    src/esp_supplicant/esp_wifi_driver.h    /^    void *arg;$/;"    m       struct:__anon32
+arg    src/esp_supplicant/esp_wps.c    /^    void *arg;$/;"    m       struct:__anon33 file:
+arg_size       src/esp_supplicant/esp_wifi_driver.h    /^    uint32_t arg_size;$/;"    m       struct:__anon32
+asel_capabilities      src/common/ieee802_11_defs.h    /^      u8 asel_capabilities;$/;"       m       struct:ieee80211_ht_capabilities
+asn1_bit_string_to_long        src/tls/asn1.c  /^unsigned long asn1_bit_string_to_long(const u8 *buf, size_t len)$/;"  f
+asn1_get_next  src/tls/asn1.c  /^int asn1_get_next(const u8 *buf, size_t len, struct asn1_hdr *hdr)$/;"        f
+asn1_get_oid   src/tls/asn1.c  /^int asn1_get_oid(const u8 *buf, size_t len, struct asn1_oid *oid,$/;" f
+asn1_hdr       src/tls/asn1.h  /^struct asn1_hdr {$/;" s
+asn1_oid       src/tls/asn1.h  /^struct asn1_oid {$/;" s
+asn1_oid_to_str        src/tls/asn1.c  /^void asn1_oid_to_str(struct asn1_oid *oid, char *buf, size_t len)$/;" f
+asn1_parse_oid src/tls/asn1.c  /^int asn1_parse_oid(const u8 *buf, size_t len, struct asn1_oid *oid)$/;"       f
+assoc_ie_buf   src/rsn_supp/wpa.c      /^u8 assoc_ie_buf[ASSOC_IE_LEN+2]; $/;" v
+assoc_req      src/common/ieee802_11_defs.h    /^              } STRUCT_PACKED assoc_req;$/;"  m       union:ieee80211_mgmt::__anon66  typeref:struct:ieee80211_mgmt::__anon66::__anon69
+assoc_resp     src/common/ieee802_11_defs.h    /^              } STRUCT_PACKED assoc_resp, reassoc_resp;$/;"   m       union:ieee80211_mgmt::__anon66  typeref:struct:ieee80211_mgmt::__anon66::__anon70
+assoc_resp_ftie        src/ap/wpa_auth_i.h     /^      u8 *assoc_resp_ftie;$/;"        m       struct:wpa_state_machine
+assoc_sa_query_max_timeout     src/ap/ap_config.h      /^      unsigned int assoc_sa_query_max_timeout;$/;"    m       struct:hostapd_bss_config
+assoc_sa_query_retry_timeout   src/ap/ap_config.h      /^      int assoc_sa_query_retry_timeout;$/;"   m       struct:hostapd_bss_config
+assoc_state    src/wps/wps_attr_parse.h        /^      const u8 *assoc_state; \/* 2 octets *\/$/;"     m       struct:wps_parse_attr
+assoc_wpa_ie   src/rsn_supp/wpa.h      /^    u8 *assoc_wpa_ie; \/* Own WPA\/RSN IE from (Re)AssocReq *\/$/;"   m       struct:wpa_sm
+assoc_wpa_ie_len       src/rsn_supp/wpa.h      /^    size_t assoc_wpa_ie_len;$/;"      m       struct:wpa_sm
+assoc_wps_ie   src/wps/wps.h   /^      const struct wpabuf *assoc_wps_ie;$/;"  m       struct:wps_config       typeref:struct:wps_config::wpabuf
+attr   src/tls/x509v3.h        /^      struct x509_name_attr attr[X509_MAX_NAME_ATTRIBUTES];$/;"       m       struct:x509_name        typeref:struct:x509_name::x509_name_attr
+auth   src/common/ieee802_11_defs.h    /^              } STRUCT_PACKED auth;$/;"       m       union:ieee80211_mgmt::__anon66  typeref:struct:ieee80211_mgmt::__anon66::__anon67
+auth   src/common/wpa_common.h /^              } auth;$/;"     m       union:wpa_ptk::__anon62 typeref:struct:wpa_ptk::__anon62::__anon63
+auth_alg       src/ap/sta_info.h       /^      u16 auth_alg;$/;"       m       struct:sta_info
+auth_alg       src/common/ieee802_11_defs.h    /^                      le16 auth_alg;$/;"      m       struct:ieee80211_mgmt::__anon66::__anon67
+auth_algs      src/ap/ap_config.h      /^      int auth_algs; \/* bitfield of allowed IEEE 802.11 authentication$/;"   m       struct:hostapd_bss_config
+auth_challenge src/eap_peer/eap_mschapv2.c     /^      u8 *auth_challenge;$/;" m       struct:eap_mschapv2_data        file:
+auth_response  src/eap_peer/eap_mschapv2.c     /^      u8 auth_response[MSCHAPV2_AUTH_RESPONSE_LEN];$/;"       m       struct:eap_mschapv2_data        file:
+auth_response  src/eap_peer/eap_ttls.c /^      u8 auth_response[MSCHAPV2_AUTH_RESPONSE_LEN];$/;"       m       struct:eap_ttls_data    file:
+auth_response_valid    src/eap_peer/eap_mschapv2.c     /^      int auth_response_valid;$/;"    m       struct:eap_mschapv2_data        file:
+auth_response_valid    src/eap_peer/eap_ttls.c /^      int auth_response_valid;$/;"    m       struct:eap_ttls_data    file:
+auth_transaction       src/common/ieee802_11_defs.h    /^                      le16 auth_transaction;$/;"      m       struct:ieee80211_mgmt::__anon66::__anon67
+auth_type      src/wps/wps.h   /^      u16 auth_type;$/;"      m       struct:wps_credential
+auth_type      src/wps/wps_attr_parse.h        /^      const u8 *auth_type; \/* 2 octets *\/$/;"       m       struct:wps_parse_attr
+auth_type      src/wps/wps_i.h /^      u16 auth_type;$/;"      m       struct:wps_data
+auth_type_flags        src/wps/wps_attr_parse.h        /^      const u8 *auth_type_flags; \/* 2 octets *\/$/;" m       struct:wps_parse_attr
+auth_types     src/wps/wps.h   /^      u16 auth_types;$/;"     m       struct:wps_context
+authenticator  src/wps/wps_attr_parse.h        /^      const u8 *authenticator; \/* WPS_AUTHENTICATOR_LEN (8) octets *\/$/;"   m       struct:wps_parse_attr
+authkey        src/wps/wps_i.h /^      u8 authkey[WPS_AUTHKEY_LEN];$/;"        m       struct:wps_data
+authorized_macs        src/wps/wps_attr_parse.h        /^      const u8 *authorized_macs; \/* <= 30 octets *\/$/;"     m       struct:wps_parse_attr
+authorized_macs        src/wps/wps_registrar.c /^      u8 authorized_macs[WPS_MAX_AUTHORIZED_MACS][ETH_ALEN];$/;"      m       struct:wps_registrar    file:
+authorized_macs_len    src/wps/wps_attr_parse.h        /^      size_t authorized_macs_len;$/;" m       struct:wps_parse_attr
+authorized_macs_union  src/wps/wps_registrar.c /^      u8 authorized_macs_union[WPS_MAX_AUTHORIZED_MACS][ETH_ALEN];$/;"        m       struct:wps_registrar    file:
+avp_code       src/eap_peer/eap_ttls.h /^      be32 avp_code;$/;"      m       struct:ttls_avp
+avp_code       src/eap_peer/eap_ttls.h /^      be32 avp_code;$/;"      m       struct:ttls_avp_vendor
+avp_length     src/eap_peer/eap_ttls.h /^      be32 avp_length; \/* 8-bit flags, 24-bit length;$/;"    m       struct:ttls_avp
+avp_length     src/eap_peer/eap_ttls.h /^      be32 avp_length; \/* 8-bit flags, 24-bit length;$/;"    m       struct:ttls_avp_vendor
+backend        src/utils/ext_password.c        /^      const struct ext_password_backend *backend;$/;" m       struct:ext_password_data        typeref:struct:ext_password_data::ext_password_backend  file:
+backends       src/utils/ext_password.c        /^static const struct ext_password_backend *backends[] = {$/;"  v       typeref:struct:ext_password_backend     file:
+base64_decode  src/utils/base64.c      /^unsigned char * base64_decode(const unsigned char *src, size_t len,$/;"       f
+base64_encode  src/utils/base64.c      /^unsigned char * base64_encode(const unsigned char *src, size_t len,$/;"       f
+base64_table   src/utils/base64.c      /^static const unsigned char base64_table[65] =$/;"     v       file:
+basic_rates    src/ap/ap_config.h      /^      int *basic_rates;$/;"   m       struct:hostapd_config
+basic_set      src/common/ieee802_11_defs.h    /^      u8 basic_set[16];$/;"   m       struct:ieee80211_ht_operation
+be16   include/utils/common.h  /^typedef u16 __bitwise be16;$/;"       t
+be16dec        port/include/endian.h   /^be16dec(const void *pp)$/;"   f
+be16enc        port/include/endian.h   /^be16enc(void *pp, uint16_t u)$/;"     f
+be16toh        port/include/endian.h   109;"   d
+be16toh        port/include/endian.h   94;"    d
+be32   include/utils/common.h  /^typedef u32 __bitwise be32;$/;"       t
+be32dec        port/include/endian.h   /^be32dec(const void *pp)$/;"   f
+be32enc        port/include/endian.h   /^be32enc(void *pp, uint32_t u)$/;"     f
+be32toh        port/include/endian.h   110;"   d
+be32toh        port/include/endian.h   95;"    d
+be64   include/utils/common.h  /^typedef u64 __bitwise be64;$/;"       t
+be64dec        port/include/endian.h   /^be64dec(const void *pp)$/;"   f
+be64enc        port/include/endian.h   /^be64enc(void *pp, uint64_t u)$/;"     f
+be64toh        port/include/endian.h   111;"   d
+be64toh        port/include/endian.h   96;"    d
+be_to_host16   include/utils/common.h  106;"   d
+be_to_host16   include/utils/common.h  65;"    d
+be_to_host16   include/utils/common.h  93;"    d
+be_to_host32   include/utils/common.h  109;"   d
+be_to_host32   include/utils/common.h  68;"    d
+be_to_host32   include/utils/common.h  97;"    d
+be_to_host64   include/utils/common.h  101;"   d
+be_to_host64   include/utils/common.h  113;"   d
+beacon src/common/ieee802_11_defs.h    /^              } STRUCT_PACKED beacon;$/;"     m       union:ieee80211_mgmt::__anon66  typeref:struct:ieee80211_mgmt::__anon66::__anon73
+beacon_int     src/ap/ap_config.h      /^      u16 beacon_int;$/;"     m       struct:hostapd_config
+beacon_int     src/common/ieee802_11_defs.h    /^                      le16 beacon_int;$/;"    m       struct:ieee80211_mgmt::__anon66::__anon73
+beacon_int     src/common/ieee802_11_defs.h    /^                      le16 beacon_int;$/;"    m       struct:ieee80211_mgmt::__anon66::__anon75
+bigbyte        src/crypto/des-internal.c       /^static const u32 bigbyte[24] =$/;"    v       file:
+bignum_add     src/crypto/bignum.c     /^bignum_add(const struct bignum *a, const struct bignum *b,$/;"        f
+bignum_add     src/tls/bignum.c        /^bignum_add(const struct bignum *a, const struct bignum *b,$/;"        f
+bignum_cmp     src/crypto/bignum.c     /^bignum_cmp(const struct bignum *a, const struct bignum *b)$/;"        f
+bignum_cmp     src/tls/bignum.c        /^bignum_cmp(const struct bignum *a, const struct bignum *b)$/;"        f
+bignum_cmp_d   src/crypto/bignum.c     /^bignum_cmp_d(const struct bignum *a, unsigned long b)$/;"     f
+bignum_cmp_d   src/tls/bignum.c        /^bignum_cmp_d(const struct bignum *a, unsigned long b)$/;"     f
+bignum_deinit  src/crypto/bignum.c     /^bignum_deinit(struct bignum *n)$/;"   f
+bignum_deinit  src/tls/bignum.c        /^bignum_deinit(struct bignum *n)$/;"   f
+bignum_exptmod src/crypto/bignum.c     /^bignum_exptmod(const struct bignum *a, const struct bignum *b,$/;"    f
+bignum_exptmod src/tls/bignum.c        /^bignum_exptmod(const struct bignum *a, const struct bignum *b,$/;"    f
+bignum_get_unsigned_bin        src/crypto/bignum.c     /^bignum_get_unsigned_bin(const struct bignum *n, u8 *buf, size_t *len)$/;"     f
+bignum_get_unsigned_bin        src/tls/bignum.c        /^bignum_get_unsigned_bin(const struct bignum *n, u8 *buf, size_t *len)$/;"     f
+bignum_get_unsigned_bin_len    src/crypto/bignum.c     /^bignum_get_unsigned_bin_len(struct bignum *n)$/;"     f
+bignum_get_unsigned_bin_len    src/tls/bignum.c        /^bignum_get_unsigned_bin_len(struct bignum *n)$/;"     f
+bignum_init    src/crypto/bignum.c     /^bignum_init(void)$/;" f
+bignum_init    src/tls/bignum.c        /^bignum_init(void)$/;" f
+bignum_mul     src/crypto/bignum.c     /^bignum_mul(const struct bignum *a, const struct bignum *b,$/;"        f
+bignum_mul     src/tls/bignum.c        /^bignum_mul(const struct bignum *a, const struct bignum *b,$/;"        f
+bignum_mulmod  src/crypto/bignum.c     /^bignum_mulmod(const struct bignum *a, const struct bignum *b,$/;"     f
+bignum_mulmod  src/tls/bignum.c        /^bignum_mulmod(const struct bignum *a, const struct bignum *b,$/;"     f
+bignum_set_unsigned_bin        src/crypto/bignum.c     /^bignum_set_unsigned_bin(struct bignum *n, const u8 *buf, size_t len)$/;"      f
+bignum_set_unsigned_bin        src/tls/bignum.c        /^bignum_set_unsigned_bin(struct bignum *n, const u8 *buf, size_t len)$/;"      f
+bignum_sub     src/crypto/bignum.c     /^bignum_sub(const struct bignum *a, const struct bignum *b,$/;"        f
+bignum_sub     src/tls/bignum.c        /^bignum_sub(const struct bignum *a, const struct bignum *b,$/;"        f
+binding_nonce  src/eap_peer/eap_peap.c /^      u8 binding_nonce[32];$/;"       m       struct:eap_peap_data    file:
+bits   src/crypto/md5_i.h      /^      u32 bits[2];$/;"        m       struct:MD5Context
+blk    src/crypto/sha1-internal.c      142;"   d       file:
+blk0   src/crypto/sha1-internal.c      137;"   d       file:
+blk0   src/crypto/sha1-internal.c      140;"   d       file:
+blob   src/eap_peer/eap_i.h    /^      struct wpa_config_blob blob[BLOB_NUM];$/;"      m       struct:eap_sm   typeref:struct:eap_sm::wpa_config_blob
+block_size     src/tls/tlsv1_common.h  /^      size_t block_size; \/* also iv_size *\/$/;"     m       struct:tls_cipher_data
+bn_reverse     src/crypto/libtommath.h /^bn_reverse (unsigned char *s, int len)$/;"    f
+bn_reverse     src/tls/libtommath.h    /^bn_reverse (unsigned char *s, int len)$/;"    f
+broadcast_ether_addr   include/utils/common.h  320;"   d
+broadcast_key_idx_max  src/ap/ap_config.h      /^      int broadcast_key_idx_min, broadcast_key_idx_max;$/;"   m       struct:hostapd_bss_config
+broadcast_key_idx_min  src/ap/ap_config.h      /^      int broadcast_key_idx_min, broadcast_key_idx_max;$/;"   m       struct:hostapd_bss_config
+bss    src/ap/ap_config.h      /^      struct hostapd_bss_config *bss, *last_bss;$/;"  m       struct:hostapd_config   typeref:struct:hostapd_config::hostapd_bss_config
+bssid  src/ap/ap_config.h      /^      macaddr bssid;$/;"      m       struct:hostapd_bss_config
+bssid  src/common/ieee802_11_defs.h    /^      u8 bssid[6];$/;"        m       struct:ieee80211_mgmt
+bssid  src/esp_supplicant/esp_wifi_driver.h    /^    uint8_t    *bssid;$/;"    m       struct:wps_scan_ie
+bssid  src/esp_supplicant/esp_wpa_enterprise.c /^    uint8_t *bssid;$/;"       m       struct:wpa2_rx_param    file:
+bssid  src/rsn_supp/wpa.h      /^    u8 bssid[ETH_ALEN];$/;"   m       struct:wpa_sm
+bssid  src/wps/wps.h   /^      u8 bssid[6];$/;"        m       struct:discard_ap_list_t
+bssid  src/wps/wps.h   /^    u8 bssid[ETH_ALEN];$/;"   m       struct:wps_sm
+bswap16        port/include/endian.h   78;"    d
+bswap32        port/include/endian.h   79;"    d
+bswap64        port/include/endian.h   80;"    d
+bswap_16       include/utils/common.h  238;"   d
+bswap_32       include/utils/common.h  242;"   d
+buf    src/crypto/md5_i.h      /^      u32 buf[4];$/;" m       struct:MD5Context
+buf    src/crypto/sha256-internal.c    /^      u8 buf[SHA256_BLOCK_SIZE];$/;"  m       struct:sha256_state     file:
+buf    src/esp_supplicant/esp_wpa_enterprise.c /^    u8 *buf;$/;"      m       struct:wpa2_rx_param    file:
+buf    src/esp_supplicant/esp_wps.c    /^    u8 *buf;$/;"      m       struct:wps_rx_param     file:
+buffer src/crypto/md4-internal.c       /^      u8 buffer[MD4_BLOCK_LENGTH];$/;"        m       struct:MD4Context       file:
+buffer src/crypto/sha1_i.h     /^      unsigned char buffer[64];$/;"   m       struct:SHA1Context
+byteReverse    src/crypto/md5-internal.c       /^static void byteReverse(unsigned char *buf, unsigned longs)$/;"       f       file:
+byteReverse    src/crypto/md5-internal.c       70;"    d       file:
+bytebit        src/crypto/des-internal.c       /^static const u32 bytebit[8] =$/;"     v       file:
+ca     src/tls/x509v3.h        /^      int ca; \/* cA *\/$/;"  m       struct:x509_certificate
+ca_cert        src/eap_peer/eap_config.h       /^      u8 *ca_cert;$/;"        m       struct:eap_peer_config
+ca_cert        src/tls/tls.h   /^      const char *ca_cert;$/;"        m       struct:tls_connection_params
+ca_cert2       src/eap_peer/eap_config.h       /^      u8 *ca_cert2;$/;"       m       struct:eap_peer_config
+ca_cert_blob   src/tls/tls.h   /^      const u8 *ca_cert_blob;$/;"     m       struct:tls_connection_params
+ca_cert_blob_len       src/tls/tls.h   /^      size_t ca_cert_blob_len;$/;"    m       struct:tls_connection_params
+ca_cert_id     src/tls/tls.h   /^      const char *ca_cert_id;$/;"     m       struct:tls_connection_params
+ca_path        src/eap_peer/eap_config.h       /^      u8 *ca_path;$/;"        m       struct:eap_peer_config
+ca_path        src/tls/tls.h   /^      const char *ca_path;$/;"        m       struct:tls_connection_params
+ca_path2       src/eap_peer/eap_config.h       /^      u8 *ca_path2;$/;"       m       struct:eap_peer_config
+capab_info     src/common/ieee802_11_defs.h    /^                      le16 capab_info;$/;"    m       struct:ieee80211_mgmt::__anon66::__anon69
+capab_info     src/common/ieee802_11_defs.h    /^                      le16 capab_info;$/;"    m       struct:ieee80211_mgmt::__anon66::__anon70
+capab_info     src/common/ieee802_11_defs.h    /^                      le16 capab_info;$/;"    m       struct:ieee80211_mgmt::__anon66::__anon71
+capab_info     src/common/ieee802_11_defs.h    /^                      le16 capab_info;$/;"    m       struct:ieee80211_mgmt::__anon66::__anon73
+capab_info     src/common/ieee802_11_defs.h    /^                      le16 capab_info;$/;"    m       struct:ieee80211_mgmt::__anon66::__anon75
+capabilities   src/common/wpa_common.h /^      int capabilities;$/;"   m       struct:wpa_ie_data
+capability     src/ap/sta_info.h       /^      u16 capability;$/;"     m       struct:sta_info
+capinfo        src/esp_supplicant/esp_wifi_driver.h    /^    uint16_t   capinfo;$/;"   m       struct:wps_scan_ie
+category       src/common/ieee802_11_defs.h    /^                      u8 category;$/;"        m       struct:ieee80211_mgmt::__anon66::__anon76
+cb     src/ap/hostapd.h        /^      int (*cb)(void *ctx, const u8 *sa, const u8 *da, const u8 *bssid,$/;"   m       struct:hostapd_probereq_cb
+cb_ctx src/tls/tls.h   /^      void *cb_ctx;$/;"       m       struct:tls_config
+cb_ctx src/wps/wps.h   /^      void *cb_ctx;$/;"       m       struct:wps_context
+cb_ctx src/wps/wps.h   /^      void *cb_ctx;$/;"       m       struct:wps_registrar_config
+cb_ctx src/wps/wps_registrar.c /^      void *cb_ctx;$/;"       m       struct:wps_registrar    file:
+cbc    src/crypto/crypto_internal-cipher.c     /^                      u8 cbc[32];$/;" m       struct:crypto_cipher::__anon10::__anon12        file:
+cbc    src/crypto/crypto_internal-cipher.c     /^                      u8 cbc[8];$/;"  m       struct:crypto_cipher::__anon10::__anon13        file:
+cbc    src/crypto/crypto_internal-cipher.c     /^                      u8 cbc[8];$/;"  m       struct:crypto_cipher::__anon10::__anon14        file:
+cbc    src/fast_crypto/fast_crypto_internal-cipher.c   /^          uint32_t cbc[8];$/;"        m       struct:fast_crypto_cipher::__anon56::__anon60   file:
+cbc    src/fast_crypto/fast_crypto_internal-cipher.c   /^            uint8_t cbc[32];$/;"      m       struct:fast_crypto_cipher::__anon56::__anon58   file:
+cbc    src/fast_crypto/fast_crypto_internal-cipher.c   /^            uint8_t cbc[8];$/;"       m       struct:fast_crypto_cipher::__anon56::__anon59   file:
+ccmp   src/esp_supplicant/esp_wifi_driver.h    /^struct wifi_cipher ccmp;$/;"  v       typeref:struct:wifi_cipher
+cert   src/tls/tls.h   /^              const struct wpabuf *cert;$/;"  m       struct:tls_event_data::__anon34 typeref:struct:tls_event_data::__anon34::wpabuf
+cert   src/tls/tls.h   /^              const struct wpabuf *cert;$/;"  m       struct:tls_event_data::__anon35 typeref:struct:tls_event_data::__anon35::wpabuf
+cert   src/tls/tlsv1_cred.h    /^      struct x509_certificate *cert;$/;"      m       struct:tlsv1_credentials        typeref:struct:tlsv1_credentials::x509_certificate
+cert_fail      src/tls/tls.h   /^      } cert_fail;$/;"        m       union:tls_event_data    typeref:struct:tls_event_data::__anon34
+cert_id        src/tls/tls.h   /^      const char *cert_id;$/;"        m       struct:tls_connection_params
+cert_in_cb     src/tls/tls.h   /^      int cert_in_cb;$/;"     m       struct:tls_config
+cert_len       src/tls/x509v3.h        /^      size_t cert_len;$/;"    m       struct:x509_certificate
+cert_start     src/tls/x509v3.h        /^      const u8 *cert_start;$/;"       m       struct:x509_certificate
+certificate_requested  src/tls/tlsv1_client_i.h        /^      unsigned int certificate_requested:1;$/;"       m       struct:tlsv1_client
+challenge_hash src/crypto/ms_funcs.c   /^static int challenge_hash(const u8 *peer_challenge, const u8 *auth_challenge,$/;"     f       file:
+challenge_response     src/crypto/ms_funcs.c   /^void challenge_response(const u8 *challenge, const u8 *password_hash,$/;"     f
+chan   src/esp_supplicant/esp_wifi_driver.h    /^    uint8_t    chan;$/;"      m       struct:wps_scan_ie
+chan_switch    src/common/ieee802_11_defs.h    /^                              } STRUCT_PACKED chan_switch;$/;"        m       union:ieee80211_mgmt::__anon66::__anon76::__anon77      typeref:struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon79
+changed        src/ap/wpa_auth_i.h     /^      Boolean changed;$/;"    m       struct:wpa_group
+changed        src/ap/wpa_auth_i.h     /^      unsigned int changed:1;$/;"     m       struct:wpa_state_machine
+channel        src/ap/ap_config.h      /^      u8 channel;$/;" m       struct:hostapd_config
+channel        src/ap/hostapd.h        /^      u32 channel;$/;"        m       struct:hostapd_frame_info
+channel        src/wps/wps.h   /^    u8 channel;$/;"   m       struct:wps_sm
+chap_md5       src/eap_peer/chap.c     /^int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,$/;"     f
+check_crl      src/tls/tls_internal.c  /^      int check_crl;$/;"      m       struct:tls_global       file:
+cipher src/tls/tlsv1_common.h  /^      tls_cipher cipher;$/;"  m       struct:tls_cipher_data
+cipher src/tls/tlsv1_common.h  /^      tls_cipher cipher;$/;"  m       struct:tls_cipher_suite
+cipher_alg     src/tls/tlsv1_record.h  /^      enum crypto_cipher_alg cipher_alg;$/;"  m       struct:tlsv1_record_layer       typeref:enum:tlsv1_record_layer::crypto_cipher_alg
+cipher_suite   src/tls/tlsv1_record.h  /^      u16 cipher_suite;$/;"   m       struct:tlsv1_record_layer
+cipher_suite   src/tls/tlsv1_server_i.h        /^      u16 cipher_suite;$/;"   m       struct:tlsv1_server
+cipher_suites  src/tls/tlsv1_client_i.h        /^      u16 cipher_suites[MAX_CIPHER_COUNT];$/;"        m       struct:tlsv1_client
+cipher_suites  src/tls/tlsv1_server_i.h        /^      u16 cipher_suites[MAX_CIPHER_COUNT];$/;"        m       struct:tlsv1_server
+client src/tls/tls_internal.c  /^      struct tlsv1_client *client;$/;"        m       struct:tls_connection   typeref:struct:tls_connection::tlsv1_client     file:
+client_cert    src/eap_peer/eap_config.h       /^      u8 *client_cert;$/;"    m       struct:eap_peer_config
+client_cert    src/tls/tls.h   /^      const char *client_cert;$/;"    m       struct:tls_connection_params
+client_cert2   src/eap_peer/eap_config.h       /^      u8 *client_cert2;$/;"   m       struct:eap_peer_config
+client_cert_blob       src/tls/tls.h   /^      const u8 *client_cert_blob;$/;" m       struct:tls_connection_params
+client_cert_blob_len   src/tls/tls.h   /^      size_t client_cert_blob_len;$/;"        m       struct:tls_connection_params
+client_hello_ext       src/tls/tlsv1_client_i.h        /^      u8 *client_hello_ext;$/;"       m       struct:tlsv1_client
+client_hello_ext_len   src/tls/tlsv1_client_i.h        /^      size_t client_hello_ext_len;$/;"        m       struct:tlsv1_client
+client_random  src/tls/tls.h   /^      const u8 *client_random;$/;"    m       struct:tls_keys
+client_random  src/tls/tlsv1_client_i.h        /^      u8 client_random[TLS_RANDOM_LEN];$/;"   m       struct:tlsv1_client
+client_random  src/tls/tlsv1_server_i.h        /^      u8 client_random[TLS_RANDOM_LEN];$/;"   m       struct:tlsv1_server
+client_random_len      src/tls/tls.h   /^      size_t client_random_len;$/;"   m       struct:tls_keys
+client_rsa_key src/tls/tlsv1_server_i.h        /^      struct crypto_public_key *client_rsa_key;$/;"   m       struct:tlsv1_server     typeref:struct:tlsv1_server::crypto_public_key
+client_version src/tls/tlsv1_server_i.h        /^      u16 client_version;$/;" m       struct:tlsv1_server
+cm_timer       src/rsn_supp/wpa.h      /^    ETSTimer  cm_timer;$/;"   m       struct:wpa_sm
+cmk    src/eap_peer/eap_peap.c /^      u8 cmk[20];$/;" m       struct:eap_peap_data    file:
+code   src/eap_peer/eap_defs.h /^      u8 code;$/;"    m       struct:eap_hdr
+compound_mac   src/eap_peer/eap_tlv_common.h   /^      u8 compound_mac[20];$/;"        m       struct:eap_tlv_crypto_binding_tlv
+conf   src/ap/hostapd.h        /^      struct hostapd_bss_config *conf;$/;"    m       struct:hostapd_data     typeref:struct:hostapd_data::hostapd_bss_config
+conf   src/ap/wpa_auth_i.h     /^      struct wpa_auth_config conf;$/;"        m       struct:wpa_authenticator        typeref:struct:wpa_authenticator::wpa_auth_config
+config src/eap_peer/eap_i.h    /^      struct eap_peer_config config;$/;"      m       struct:eap_sm   typeref:struct:eap_sm::eap_peer_config
+config src/wps/wps.h   /^    wifi_sta_config_t config;$/;"     m       struct:wps_sm
+config_assoc_ie        src/rsn_supp/wpa.h      /^    void (*config_assoc_ie) (u8 proto, u8 *assoc_buf, u32 assoc_wpa_ie_len);$/;"      m       struct:wpa_sm
+config_error   src/wps/wps.h   /^              u16 config_error;$/;"   m       struct:wps_event_data::wps_event_fail
+config_error   src/wps/wps.h   /^              u16 config_error;$/;"   m       struct:wps_event_data::wps_event_m2d
+config_error   src/wps/wps_attr_parse.h        /^      const u8 *config_error; \/* 2 octets *\/$/;"    m       struct:wps_parse_attr
+config_error   src/wps/wps_i.h /^      u16 config_error;$/;"   m       struct:wps_data
+config_methods src/ap/ap_config.h      /^      char *config_methods;$/;"       m       struct:hostapd_bss_config
+config_methods src/wps/wps.h   /^              u16 config_methods;$/;" m       struct:wps_event_data::wps_event_er_enrollee
+config_methods src/wps/wps.h   /^              u16 config_methods;$/;" m       struct:wps_event_data::wps_event_m2d
+config_methods src/wps/wps.h   /^      u16 config_methods;$/;" m       struct:wps_context
+config_methods src/wps/wps.h   /^      u16 config_methods;$/;" m       struct:wps_device_data
+config_methods src/wps/wps_attr_parse.h        /^      const u8 *config_methods; \/* 2 octets *\/$/;"  m       struct:wps_parse_attr
+config_read_cb src/ap/hostapd.h        /^      struct hostapd_config * (*config_read_cb)(const char *config_fname);$/;"        m       struct:hapd_interfaces  typeref:struct:hapd_interfaces::config_read_cb
+conn   src/eap_peer/eap_tls_common.h   /^      struct tls_connection *conn;$/;"        m       struct:eap_ssl_data     typeref:struct:eap_ssl_data::tls_connection
+conn_type_flags        src/wps/wps_attr_parse.h        /^      const u8 *conn_type_flags; \/* 1 octet *\/$/;"  m       struct:wps_parse_attr
+constructed    src/tls/asn1.h  /^      u8 identifier, class, constructed;$/;"  m       struct:asn1_hdr typeref:class:asn1_hdr::
+control_chan   src/common/ieee802_11_defs.h    /^      u8 control_chan;$/;"    m       struct:ieee80211_ht_operation
+cookey src/crypto/des-internal.c       /^static void cookey(const u32 *raw1, u32 *keyout)$/;"  f       file:
+count  src/ap/hostapd.h        /^      size_t count;$/;"       m       struct:hapd_interfaces
+count  src/crypto/md4-internal.c       /^      u64 count;$/;"  m       struct:MD4Context       file:
+count  src/crypto/sha1_i.h     /^      u32 count[2];$/;"       m       struct:SHA1Context
+counter        src/ap/wpa_auth_i.h     /^              u8 counter[WPA_REPLAY_COUNTER_LEN];$/;" m       struct:wpa_state_machine::wpa_key_replay_counter
+countermeasures        src/rsn_supp/wpa.h      /^    int countermeasures; \/*TKIP countermeasures state flag, 1:in countermeasures state*\/$/;"        m       struct:wpa_sm
+country        src/ap/ap_config.h      /^      char country[3]; \/* first two octets: country code as described in$/;" m       struct:hostapd_config
+cred   src/tls/tlsv1_client_i.h        /^      struct tlsv1_credentials *cred;$/;"     m       struct:tlsv1_client     typeref:struct:tlsv1_client::tlsv1_credentials
+cred   src/tls/tlsv1_server_i.h        /^      struct tlsv1_credentials *cred;$/;"     m       struct:tlsv1_server     typeref:struct:tlsv1_server::tlsv1_credentials
+cred   src/wps/wps.h   /^              const struct wps_credential *cred;$/;"  m       struct:wps_event_data::wps_event_er_ap_settings typeref:struct:wps_event_data::wps_event_er_ap_settings::wps_credential
+cred   src/wps/wps_attr_parse.h        /^      const u8 *cred[MAX_CRED_COUNT];$/;"     m       struct:wps_parse_attr
+cred   src/wps/wps_i.h /^      struct wps_credential cred;$/;" m       struct:wps_data typeref:struct:wps_data::wps_credential
+cred_attr      src/wps/wps.h   /^      const u8 *cred_attr;$/;"        m       struct:wps_credential
+cred_attr_len  src/wps/wps.h   /^      size_t cred_attr_len;$/;"       m       struct:wps_credential
+cred_cb        src/wps/wps.h   /^      int (*cred_cb)(void *ctx, const struct wps_credential *cred);$/;"       m       struct:wps_context
+cred_len       src/wps/wps_attr_parse.h        /^      size_t cred_len[MAX_CRED_COUNT];$/;"    m       struct:wps_parse_attr
+crypto_bignum  test/test_crypto.c      /^typedef struct crypto_bignum crypto_bignum;$/;"       t       typeref:struct:crypto_bignum    file:
+crypto_bignum_add      src/crypto/crypto_mbedtls.c     /^int crypto_bignum_add(const struct crypto_bignum *a,$/;"      f
+crypto_bignum_bits     src/crypto/crypto_mbedtls.c     /^int crypto_bignum_bits(const struct crypto_bignum *a)$/;"     f
+crypto_bignum_cmp      src/crypto/crypto_mbedtls.c     /^int crypto_bignum_cmp(const struct crypto_bignum *a,$/;"      f
+crypto_bignum_deinit   src/crypto/crypto_mbedtls.c     /^void crypto_bignum_deinit(struct crypto_bignum *n, int clear)$/;"     f
+crypto_bignum_div      src/crypto/crypto_mbedtls.c     /^int crypto_bignum_div(const struct crypto_bignum *a,$/;"      f
+crypto_bignum_exptmod  src/crypto/crypto_mbedtls.c     /^int crypto_bignum_exptmod(const struct crypto_bignum *a,$/;"  f
+crypto_bignum_init     src/crypto/crypto_mbedtls.c     /^struct crypto_bignum *crypto_bignum_init(void)$/;"    f
+crypto_bignum_init_set src/crypto/crypto_mbedtls.c     /^struct crypto_bignum *crypto_bignum_init_set(const u8 *buf, size_t len)$/;"   f
+crypto_bignum_inverse  src/crypto/crypto_mbedtls.c     /^int crypto_bignum_inverse(const struct crypto_bignum *a,$/;"  f
+crypto_bignum_is_one   src/crypto/crypto_mbedtls.c     /^int crypto_bignum_is_one(const struct crypto_bignum *a)$/;"   f
+crypto_bignum_is_zero  src/crypto/crypto_mbedtls.c     /^int crypto_bignum_is_zero(const struct crypto_bignum *a)$/;"  f
+crypto_bignum_legendre src/crypto/crypto_mbedtls.c     /^int crypto_bignum_legendre(const struct crypto_bignum *a,$/;" f
+crypto_bignum_mod      src/crypto/crypto_mbedtls.c     /^int crypto_bignum_mod(const struct crypto_bignum *a,$/;"      f
+crypto_bignum_mulmod   src/crypto/crypto_mbedtls.c     /^int crypto_bignum_mulmod(const struct crypto_bignum *a,$/;"   f
+crypto_bignum_sub      src/crypto/crypto_mbedtls.c     /^int crypto_bignum_sub(const struct crypto_bignum *a,$/;"      f
+crypto_bignum_to_bin   src/crypto/crypto_mbedtls.c     /^int crypto_bignum_to_bin(const struct crypto_bignum *a,$/;"   f
+crypto_binding src/eap_peer/eap_peap.c /^      enum { NO_BINDING, OPTIONAL_BINDING, REQUIRE_BINDING } crypto_binding;$/;"      m       struct:eap_peap_data    typeref:enum:eap_peap_data::__anon7     file:
+crypto_binding_used    src/eap_peer/eap_peap.c /^      int crypto_binding_used;$/;"    m       struct:eap_peap_data    file:
+crypto_cipher  src/crypto/crypto_internal-cipher.c     /^struct crypto_cipher {$/;"    s       file:
+crypto_cipher_alg      include/crypto/crypto.h /^enum crypto_cipher_alg {$/;"  g
+crypto_cipher_decrypt  src/crypto/crypto_internal-cipher.c     /^int  crypto_cipher_decrypt(struct crypto_cipher *ctx, const u8 *crypt,$/;"    f
+crypto_cipher_deinit   src/crypto/crypto_internal-cipher.c     /^void  crypto_cipher_deinit(struct crypto_cipher *ctx)$/;"     f
+crypto_cipher_encrypt  src/crypto/crypto_internal-cipher.c     /^int  crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain,$/;"    f
+crypto_cipher_init     src/crypto/crypto_internal-cipher.c     /^struct crypto_cipher *  crypto_cipher_init(enum crypto_cipher_alg alg,$/;"    f
+crypto_ec      src/crypto/crypto_mbedtls.c     /^struct crypto_ec {$/;"        s       file:
+crypto_ec_deinit       src/crypto/crypto_mbedtls.c     /^void crypto_ec_deinit(struct crypto_ec *e)$/;"        f
+crypto_ec_get_order    src/crypto/crypto_mbedtls.c     /^const struct crypto_bignum *crypto_ec_get_order(struct crypto_ec *e)$/;"      f
+crypto_ec_get_prime    src/crypto/crypto_mbedtls.c     /^const struct crypto_bignum *crypto_ec_get_prime(struct crypto_ec *e)$/;"      f
+crypto_ec_init src/crypto/crypto_mbedtls.c     /^struct crypto_ec *crypto_ec_init(int group)$/;"       f
+crypto_ec_point_add    src/crypto/crypto_mbedtls.c     /^int crypto_ec_point_add(struct crypto_ec *e, const struct crypto_ec_point *a,$/;"     f
+crypto_ec_point_cmp    src/crypto/crypto_mbedtls.c     /^int crypto_ec_point_cmp(const struct crypto_ec *e,$/;"        f
+crypto_ec_point_compute_y_sqr  src/crypto/crypto_mbedtls.c     /^crypto_ec_point_compute_y_sqr(struct crypto_ec *e,$/;"        f
+crypto_ec_point_deinit src/crypto/crypto_mbedtls.c     /^void crypto_ec_point_deinit(struct crypto_ec_point *p, int clear)$/;" f
+crypto_ec_point_from_bin       src/crypto/crypto_mbedtls.c     /^struct crypto_ec_point *crypto_ec_point_from_bin(struct crypto_ec *e,$/;"     f
+crypto_ec_point_init   src/crypto/crypto_mbedtls.c     /^struct crypto_ec_point *crypto_ec_point_init(struct crypto_ec *e)$/;" f
+crypto_ec_point_invert src/crypto/crypto_mbedtls.c     /^int crypto_ec_point_invert(struct crypto_ec *e, struct crypto_ec_point *p)$/;"        f
+crypto_ec_point_is_at_infinity src/crypto/crypto_mbedtls.c     /^int crypto_ec_point_is_at_infinity(struct crypto_ec *e,$/;"   f
+crypto_ec_point_is_on_curve    src/crypto/crypto_mbedtls.c     /^int crypto_ec_point_is_on_curve(struct crypto_ec *e,$/;"      f
+crypto_ec_point_mul    src/crypto/crypto_mbedtls.c     /^int crypto_ec_point_mul(struct crypto_ec *e, const struct crypto_ec_point *p,$/;"     f
+crypto_ec_point_solve_y_coord  src/crypto/crypto_mbedtls.c     /^int crypto_ec_point_solve_y_coord(struct crypto_ec *e,$/;"    f
+crypto_ec_point_to_bin src/crypto/crypto_mbedtls.c     /^int crypto_ec_point_to_bin(struct crypto_ec *e,$/;"   f
+crypto_ec_prime_len    src/crypto/crypto_mbedtls.c     /^size_t crypto_ec_prime_len(struct crypto_ec *e)$/;"   f
+crypto_ec_prime_len_bits       src/crypto/crypto_mbedtls.c     /^size_t crypto_ec_prime_len_bits(struct crypto_ec *e)$/;"      f
+crypto_get_random      src/crypto/crypto_mbedtls.c     /^int crypto_get_random(void *buf, size_t len)$/;"      f
+crypto_global_deinit   src/crypto/crypto_internal.c    /^void  crypto_global_deinit(void)$/;"  f
+crypto_global_init     src/crypto/crypto_internal.c    /^int  crypto_global_init(void)$/;"     f
+crypto_hash    src/crypto/crypto_internal.c    /^struct crypto_hash {$/;"      s       file:
+crypto_hash_alg        include/crypto/crypto.h /^enum crypto_hash_alg {$/;"    g
+crypto_hash_finish     src/crypto/crypto_internal.c    /^int  crypto_hash_finish(struct crypto_hash *ctx, u8 *mac, size_t *len)$/;"    f
+crypto_hash_init       src/crypto/crypto_internal.c    /^struct crypto_hash *  crypto_hash_init(enum crypto_hash_alg alg, const u8 *key,$/;"   f
+crypto_hash_update     src/crypto/crypto_internal.c    /^void  crypto_hash_update(struct crypto_hash *ctx, const u8 *data, size_t len)$/;"     f
+crypto_mod_exp src/crypto/crypto_internal-modexp.c     /^crypto_mod_exp(const u8 *base, size_t base_len,$/;"   f
+crypto_private_key_decrypt_pkcs1_v15   src/crypto/crypto_internal-rsa.c        /^int  crypto_private_key_decrypt_pkcs1_v15(struct crypto_private_key *key,$/;" f
+crypto_private_key_free        src/crypto/crypto_internal-rsa.c        /^void  crypto_private_key_free(struct crypto_private_key *key)$/;"     f
+crypto_private_key_import      src/crypto/crypto_internal-rsa.c        /^struct crypto_private_key *  crypto_private_key_import(const u8 *key,$/;"     f
+crypto_private_key_sign_pkcs1  src/crypto/crypto_internal-rsa.c        /^int  crypto_private_key_sign_pkcs1(struct crypto_private_key *key,$/;"        f
+crypto_public_key_decrypt_pkcs1        src/crypto/crypto_internal-rsa.c        /^int  crypto_public_key_decrypt_pkcs1(struct crypto_public_key *key,$/;"       f
+crypto_public_key_encrypt_pkcs1_v15    src/crypto/crypto_internal-rsa.c        /^int  crypto_public_key_encrypt_pkcs1_v15(struct crypto_public_key *key,$/;"   f
+crypto_public_key_free src/crypto/crypto_internal-rsa.c        /^void  crypto_public_key_free(struct crypto_public_key *key)$/;"       f
+crypto_public_key_from_cert    src/crypto/crypto_internal-rsa.c        /^struct crypto_public_key *  crypto_public_key_from_cert(const u8 *buf,$/;"    f
+crypto_public_key_import       src/crypto/crypto_internal-rsa.c        /^struct crypto_public_key *  crypto_public_key_import(const u8 *key, size_t len)$/;"   f
+crypto_rsa_exptmod     src/tls/rsa.c   /^int crypto_rsa_exptmod(const u8 *in, size_t inlen, u8 *out, size_t *outlen,$/;"       f
+crypto_rsa_free        src/tls/rsa.c   /^void crypto_rsa_free(struct crypto_rsa_key *key)$/;"  f
+crypto_rsa_get_modulus_len     src/tls/rsa.c   /^size_t crypto_rsa_get_modulus_len(struct crypto_rsa_key *key)$/;"     f
+crypto_rsa_import_private_key  src/tls/rsa.c   /^crypto_rsa_import_private_key(const u8 *buf, size_t len)$/;"  f
+crypto_rsa_import_public_key   src/tls/rsa.c   /^crypto_rsa_import_public_key(const u8 *buf, size_t len)$/;"   f
+crypto_rsa_key src/tls/rsa.c   /^struct crypto_rsa_key {$/;"   s       file:
+crypto_rsa_parse_integer       src/tls/rsa.c   /^static const u8 * crypto_rsa_parse_integer(const u8 *pos, const u8 *end,$/;"  f       file:
+ctrl_iface_deinit      src/ap/hostapd.h        /^      void (*ctrl_iface_deinit)(struct hostapd_data *hapd);$/;"       m       struct:hapd_interfaces
+ctrl_iface_init        src/ap/hostapd.h        /^      int (*ctrl_iface_init)(struct hostapd_data *hapd);$/;"  m       struct:hapd_interfaces
+ctx    src/ap/hostapd.h        /^      void *ctx;$/;"  m       struct:hostapd_probereq_cb
+ctx    src/ap/wpa_auth.h       /^      void *ctx;$/;"  m       struct:wpa_auth_callbacks
+ctx_dec        src/crypto/crypto_internal-cipher.c     /^                      void *ctx_dec;$/;"      m       struct:crypto_cipher::__anon10::__anon12        file:
+ctx_dec        src/fast_crypto/fast_crypto_internal-cipher.c   /^            mbedtls_aes_context ctx_dec;$/;"  m       struct:fast_crypto_cipher::__anon56::__anon58   file:
+ctx_enc        src/crypto/crypto_internal-cipher.c     /^                      void *ctx_enc;$/;"      m       struct:crypto_cipher::__anon10::__anon12        file:
+ctx_enc        src/fast_crypto/fast_crypto_internal-cipher.c   /^            mbedtls_aes_context ctx_enc;$/;"  m       struct:fast_crypto_cipher::__anon56::__anon58   file:
+curlen src/crypto/sha256-internal.c    /^      u32 state[8], curlen;$/;"       m       struct:sha256_state     file:
+current_ap     src/common/ieee802_11_defs.h    /^                      u8 current_ap[6];$/;"   m       struct:ieee80211_mgmt::__anon66::__anon71
+current_identifier     src/eap_peer/eap_i.h    /^      u8 current_identifier;$/;"      m       struct:eap_sm
+current_identifier     src/wps/wps.h   /^    u8 current_identifier;$/;"        m       struct:wps_sm
+cw     src/common/ieee802_11_defs.h    /^      u8 cw; \/* ECWmin, ECWmax (CW = 2^ECW - 1) *\/$/;"      m       struct:wmm_ac_parameter
+d      src/tls/rsa.c   /^      struct bignum *d; \/* private exponent *\/$/;"  m       struct:crypto_rsa_key   typeref:struct:crypto_rsa_key::bignum   file:
+da     src/common/ieee802_11_defs.h    /^      u8 da[6];$/;"   m       struct:ieee80211_mgmt
+data   src/eap_peer/eap_config.h       /^      const u8 *data;$/;"     m       struct:wpa_config_blob
+data_length    src/ap/wpa_auth.h       /^      le16 data_length; \/* little endian length of data (44) *\/$/;" m       struct:ft_r0kh_r1kh_pull_frame
+data_length    src/ap/wpa_auth.h       /^      le16 data_length; \/* little endian length of data (76) *\/$/;" m       struct:ft_r0kh_r1kh_resp_frame
+data_length    src/ap/wpa_auth.h       /^      le16 data_length; \/* little endian length of data (88) *\/$/;" m       struct:ft_r0kh_r1kh_push_frame
+datarate       src/ap/hostapd.h        /^      u32 datarate;$/;"       m       struct:hostapd_frame_info
+deauth src/common/ieee802_11_defs.h    /^              } STRUCT_PACKED deauth;$/;"     m       union:ieee80211_mgmt::__anon66  typeref:struct:ieee80211_mgmt::__anon66::__anon68
+decision       src/eap_peer/eap_i.h    /^      EapDecision decision;$/;"       m       struct:eap_method_ret
+default_len    src/ap/ap_config.h      /^      size_t default_len; \/* key length used for dynamic key generation *\/$/;"      m       struct:hostapd_wep_keys
+deinit src/eap_peer/eap_i.h    /^      void (*deinit)(struct eap_sm *sm, void *priv);$/;"      m       struct:eap_method
+deinit src/utils/ext_password_i.h      /^      void (*deinit)(void *ctx);$/;"  m       struct:ext_password_backend
+deinit_for_reauth      src/eap_peer/eap_i.h    /^      void (*deinit_for_reauth)(struct eap_sm *sm, void *priv);$/;"   m       struct:eap_method
+delay_bound    src/common/ieee802_11_defs.h    /^      le32 delay_bound;$/;"   m       struct:wmm_tspec_element
+depth  src/tls/tls.h   /^              int depth;$/;"  m       struct:tls_event_data::__anon34
+depth  src/tls/tls.h   /^              int depth;$/;"  m       struct:tls_event_data::__anon35
+des    src/crypto/crypto_internal-cipher.c     /^              } des;$/;"      m       union:crypto_cipher::__anon10   typeref:struct:crypto_cipher::__anon10::__anon14        file:
+des    src/fast_crypto/fast_crypto_internal-cipher.c   /^      } des;$/;"      m       union:fast_crypto_cipher::__anon56      typeref:struct:fast_crypto_cipher::__anon56::__anon60   file:
+des3   src/crypto/crypto_internal-cipher.c     /^              } des3;$/;"     m       union:crypto_cipher::__anon10   typeref:struct:crypto_cipher::__anon10::__anon13        file:
+des3   src/fast_crypto/fast_crypto_internal-cipher.c   /^        } des3;$/;"   m       union:fast_crypto_cipher::__anon56      typeref:struct:fast_crypto_cipher::__anon56::__anon59   file:
+des3_key_s     src/crypto/des_i.h      /^struct des3_key_s {$/;"       s
+des_encrypt    src/crypto/des-internal.c       /^void des_encrypt(const u8 *clear, const u8 *key, u8 *cypher)$/;"      f
+descr_count    src/common/wpa_common.h /^      u8 descr_count;$/;"     m       struct:rsn_rdie
+description    src/tls/tls.h   /^              const char *description;$/;"    m       struct:tls_event_data::__anon36
+desfunc        src/crypto/des-internal.c       /^static void desfunc(u32 *block, const u32 *keys)$/;"  f       file:
+deskey src/crypto/des-internal.c       /^static void deskey(const u8 *key, int decrypt, u32 *keyout)$/;"       f       file:
+dev    src/wps/wps.h   /^      struct wps_device_data dev;$/;" m       struct:wps_context      typeref:struct:wps_context::wps_device_data
+dev    src/wps/wps.h   /^    struct wps_device_data *dev;$/;"  m       struct:wps_sm   typeref:struct:wps_sm::wps_device_data
+dev    src/wps/wps_registrar.c /^      struct wps_device_data dev;$/;" m       struct:wps_registrar_device     typeref:struct:wps_registrar_device::wps_device_data    file:
+dev_name       src/wps/wps.h   /^              const char *dev_name;$/;"       m       struct:wps_event_data::wps_event_er_enrollee
+dev_name       src/wps/wps.h   /^              const u8 *dev_name;$/;" m       struct:wps_event_data::wps_event_m2d
+dev_name       src/wps/wps_attr_parse.h        /^      const u8 *dev_name;$/;" m       struct:wps_parse_attr
+dev_name_len   src/wps/wps.h   /^              size_t dev_name_len;$/;"        m       struct:wps_event_data::wps_event_m2d
+dev_name_len   src/wps/wps_attr_parse.h        /^      size_t dev_name_len;$/;"        m       struct:wps_parse_attr
+dev_passwd_id  src/wps/wps.h   /^              u16 dev_passwd_id;$/;"  m       struct:wps_event_data::wps_event_er_enrollee
+dev_passwd_id  src/wps/wps.h   /^              u16 dev_passwd_id;$/;"  m       struct:wps_event_data::wps_event_er_set_selected_registrar
+dev_password   src/wps/wps_i.h /^      u8 *dev_password;$/;"   m       struct:wps_data
+dev_password_id        src/wps/wps.h   /^              u16 dev_password_id;$/;"        m       struct:wps_event_data::wps_event_m2d
+dev_password_id        src/wps/wps_attr_parse.h        /^      const u8 *dev_password_id; \/* 2 octets *\/$/;" m       struct:wps_parse_attr
+dev_password_len       src/wps/wps_i.h /^      size_t dev_password_len;$/;"    m       struct:wps_data
+dev_pw src/wps/wps_registrar.c /^      u8 dev_pw[WPS_OOB_DEVICE_PASSWORD_LEN];$/;"     m       struct:wps_nfc_pw_token file:
+dev_pw_id      src/wps/wps.h   /^      u16 dev_pw_id;$/;"      m       struct:wps_config
+dev_pw_id      src/wps/wps_i.h /^      u16 dev_pw_id;$/;"      m       struct:wps_data
+dev_pw_len     src/wps/wps_registrar.c /^      size_t dev_pw_len;$/;"  m       struct:wps_nfc_pw_token file:
+device_name    include/esp_supplicant/esp_wps.h        /^    char device_name[WPS_MAX_DEVICE_NAME_LEN];   \/*!< Device name, null-terminated string. The default device name is used if the string is empty *\/$/;"    m       struct:__anon89
+device_name    src/ap/ap_config.h      /^      char *device_name;$/;"  m       struct:hostapd_bss_config
+device_name    src/wps/wps.h   /^      char *device_name;$/;"  m       struct:wps_device_data
+device_type    src/ap/ap_config.h      /^      u8 device_type[WPS_DEV_TYPE_LEN];$/;"   m       struct:hostapd_bss_config
+devices        src/wps/wps_registrar.c /^      struct wps_registrar_device *devices;$/;"       m       struct:wps_registrar    typeref:struct:wps_registrar::wps_registrar_device      file:
+dh5_derive_shared      src/crypto/dh_group5.c  /^dh5_derive_shared(void *ctx, const struct wpabuf *peer_public,$/;"    f
+dh5_free       src/crypto/dh_group5.c  /^dh5_free(void *ctx)$/;"       f
+dh5_init       src/crypto/dh_group5.c  /^dh5_init(struct wpabuf **priv, struct wpabuf **publ)$/;"      f
+dh_blob        src/tls/tls.h   /^      const u8 *dh_blob;$/;"  m       struct:tls_connection_params
+dh_blob_len    src/tls/tls.h   /^      size_t dh_blob_len;$/;" m       struct:tls_connection_params
+dh_ctx src/wps/wps.h   /^      void *dh_ctx;$/;"       m       struct:wps_context
+dh_ctx src/wps/wps_i.h /^      void *dh_ctx;$/;"       m       struct:wps_data
+dh_derive_shared       src/crypto/dh_groups.c  /^dh_derive_shared(const struct wpabuf *peer_public,$/;"        f
+dh_file        src/tls/tls.h   /^      const char *dh_file;$/;"        m       struct:tls_connection_params
+dh_g   src/tls/tlsv1_client_i.h        /^      u8 *dh_g;$/;"   m       struct:tlsv1_client
+dh_g   src/tls/tlsv1_cred.h    /^      u8 *dh_g; \/* generator *\/$/;" m       struct:tlsv1_credentials
+dh_g_len       src/tls/tlsv1_client_i.h        /^      size_t dh_g_len;$/;"    m       struct:tlsv1_client
+dh_g_len       src/tls/tlsv1_cred.h    /^      size_t dh_g_len;$/;"    m       struct:tlsv1_credentials
+dh_group       include/crypto/dh_groups.h      /^struct dh_group {$/;" s
+dh_group14_generator   src/crypto/dh_groups.c  /^static const u8 dh_group14_generator[1] = { 0x02 };$/;"       v       file:
+dh_group14_prime       src/crypto/dh_groups.c  /^static const u8 dh_group14_prime[256] = {$/;" v       file:
+dh_group15_generator   src/crypto/dh_groups.c  /^static const u8 dh_group15_generator[1] = { 0x02 };$/;"       v       file:
+dh_group15_prime       src/crypto/dh_groups.c  /^static const u8 dh_group15_prime[384] = {$/;" v       file:
+dh_group16_generator   src/crypto/dh_groups.c  /^static const u8 dh_group16_generator[1] = { 0x02 };$/;"       v       file:
+dh_group16_prime       src/crypto/dh_groups.c  /^static const u8 dh_group16_prime[512] = {$/;" v       file:
+dh_group17_generator   src/crypto/dh_groups.c  /^static const u8 dh_group17_generator[1] = { 0x02 };$/;"       v       file:
+dh_group17_prime       src/crypto/dh_groups.c  /^static const u8 dh_group17_prime[768] = {$/;" v       file:
+dh_group18_generator   src/crypto/dh_groups.c  /^static const u8 dh_group18_generator[1] = { 0x02 };$/;"       v       file:
+dh_group18_prime       src/crypto/dh_groups.c  /^static const u8 dh_group18_prime[1024] = {$/;"        v       file:
+dh_group1_generator    src/crypto/dh_groups.c  /^static const u8 dh_group1_generator[1] = { 0x02 };$/;"        v       file:
+dh_group1_prime        src/crypto/dh_groups.c  /^static const u8 dh_group1_prime[96] = {$/;"   v       file:
+dh_group2_generator    src/crypto/dh_groups.c  /^static const u8 dh_group2_generator[1] = { 0x02 };$/;"        v       file:
+dh_group2_prime        src/crypto/dh_groups.c  /^static const u8 dh_group2_prime[128] = {$/;"  v       file:
+dh_group5_generator    src/crypto/dh_groups.c  /^static const u8 dh_group5_generator[1] = { 0x02 };$/;"        v       file:
+dh_group5_prime        src/crypto/dh_groups.c  /^static const u8 dh_group5_prime[192] = {$/;"  v       file:
+dh_groups      src/crypto/dh_groups.c  /^static struct dh_group dh_groups[] = {$/;"    v       typeref:struct:dh_group file:
+dh_groups_get  src/crypto/dh_groups.c  /^dh_groups_get(int id)$/;"     f
+dh_init        src/crypto/dh_groups.c  /^dh_init(const struct dh_group *dh, struct wpabuf **priv)$/;"  f
+dh_p   src/tls/tlsv1_client_i.h        /^      u8 *dh_p;$/;"   m       struct:tlsv1_client
+dh_p   src/tls/tlsv1_cred.h    /^      u8 *dh_p; \/* prime *\/$/;"     m       struct:tlsv1_credentials
+dh_p_len       src/tls/tlsv1_client_i.h        /^      size_t dh_p_len;$/;"    m       struct:tlsv1_client
+dh_p_len       src/tls/tlsv1_cred.h    /^      size_t dh_p_len;$/;"    m       struct:tlsv1_credentials
+dh_privkey     src/wps/wps.h   /^      struct wpabuf *dh_privkey;$/;"  m       struct:wps_context      typeref:struct:wps_context::wpabuf
+dh_privkey     src/wps/wps_i.h /^      struct wpabuf *dh_privkey;$/;"  m       struct:wps_data typeref:struct:wps_data::wpabuf
+dh_pubkey      src/wps/wps.h   /^      struct wpabuf *dh_pubkey;$/;"   m       struct:wps_context      typeref:struct:wps_context::wpabuf
+dh_pubkey_e    src/wps/wps_i.h /^      struct wpabuf *dh_pubkey_e;$/;" m       struct:wps_data typeref:struct:wps_data::wpabuf
+dh_pubkey_r    src/wps/wps_i.h /^      struct wpabuf *dh_pubkey_r;$/;" m       struct:wps_data typeref:struct:wps_data::wpabuf
+dh_secret      src/tls/tlsv1_server_i.h        /^      u8 *dh_secret;$/;"      m       struct:tlsv1_server
+dh_secret_len  src/tls/tlsv1_server_i.h        /^      size_t dh_secret_len;$/;"       m       struct:tlsv1_server
+dh_ys  src/tls/tlsv1_client_i.h        /^      u8 *dh_ys;$/;"  m       struct:tlsv1_client
+dh_ys_len      src/tls/tlsv1_client_i.h        /^      size_t dh_ys_len;$/;"   m       struct:tlsv1_client
+dialog_token   src/common/ieee802_11_defs.h    /^                                      u8 dialog_token;$/;"    m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon78
+dis_ap_list    src/wps/wps.h   /^    struct discard_ap_list_t dis_ap_list[WPS_MAX_DIS_AP_NUM];$/;"     m       struct:wps_sm   typeref:struct:wps_sm::discard_ap_list_t
+disable_auto_conf      src/wps/wps.h   /^      int disable_auto_conf;$/;"      m       struct:wps_registrar_config
+disable_auto_conf      src/wps/wps_registrar.c /^      int disable_auto_conf;$/;"      m       struct:wps_registrar    file:
+disable_dgaf   src/ap/ap_config.h      /^      int disable_dgaf;$/;"   m       struct:hostapd_bss_config
+disable_gtk    src/ap/wpa_auth.h       /^      int disable_gtk;$/;"    m       struct:wpa_auth_config
+disable_pmksa_caching  src/ap/wpa_auth.h       /^      int disable_pmksa_caching;$/;"  m       struct:wpa_auth_config
+disable_time_checks    src/tls/tlsv1_client_i.h        /^      unsigned int disable_time_checks:1;$/;" m       struct:tlsv1_client
+disassoc       src/common/ieee802_11_defs.h    /^              } STRUCT_PACKED disassoc;$/;"   m       union:ieee80211_mgmt::__anon66  typeref:struct:ieee80211_mgmt::__anon66::__anon72
+discard_ap_cnt src/wps/wps.h   /^    u8 discard_ap_cnt;$/;"    m       struct:wps_sm
+discard_ap_list_t      src/wps/wps.h   /^struct discard_ap_list_t{$/;" s
+disconnect     src/ap/wpa_auth.h       /^      void (*disconnect)(void *ctx, const u8 *addr, u16 reason);$/;"  m       struct:wpa_auth_callbacks
+discover_ssid_cnt      src/wps/wps.h   /^    u8 discover_ssid_cnt;$/;" m       struct:wps_sm
+dk     src/crypto/crypto_internal-cipher.c     /^                      u32 dk[32];$/;" m       struct:crypto_cipher::__anon10::__anon14        file:
+dk     src/crypto/des_i.h      /^      u32 dk[3][32];$/;"      m       struct:des3_key_s
+dk     src/fast_crypto/fast_crypto_internal-cipher.c   /^          uint32_t dk[32];$/;"        m       struct:fast_crypto_cipher::__anon56::__anon60   file:
+dl_list        src/utils/list.h        /^struct dl_list {$/;"  s
+dl_list_add    src/utils/list.h        /^static inline void dl_list_add(struct dl_list *list, struct dl_list *item)$/;"        f
+dl_list_add_tail       src/utils/list.h        /^static inline void dl_list_add_tail(struct dl_list *list, struct dl_list *item)$/;"   f
+dl_list_del    src/utils/list.h        /^static inline void dl_list_del(struct dl_list *item)$/;"      f
+dl_list_empty  src/utils/list.h        /^static inline int dl_list_empty(struct dl_list *list)$/;"     f
+dl_list_entry  src/utils/list.h        73;"    d
+dl_list_first  src/utils/list.h        76;"    d
+dl_list_for_each       src/utils/list.h        84;"    d
+dl_list_for_each_reverse       src/utils/list.h        95;"    d
+dl_list_for_each_safe  src/utils/list.h        89;"    d
+dl_list_init   src/utils/list.h        /^static inline void dl_list_init(struct dl_list *list)$/;"     f
+dl_list_last   src/utils/list.h        80;"    d
+dl_list_len    src/utils/list.h        /^static inline unsigned int dl_list_len(struct dl_list *list)$/;"      f
+dmp1   src/tls/rsa.c   /^      struct bignum *dmp1; \/* d mod (p - 1); CRT exponent *\/$/;"    m       struct:crypto_rsa_key   typeref:struct:crypto_rsa_key::bignum   file:
+dmq1   src/tls/rsa.c   /^      struct bignum *dmq1; \/* d mod (q - 1); CRT exponent *\/$/;"    m       struct:crypto_rsa_key   typeref:struct:crypto_rsa_key::bignum   file:
+dns    src/tls/x509v3.h        /^      char *dns; \/* dNSName *\/$/;"  m       struct:x509_name
+dot11RSNAConfigGroupUpdateCount        src/ap/wpa_auth.c       /^static const u32 dot11RSNAConfigGroupUpdateCount = 4;$/;"     v       file:
+dot11RSNAConfigPairwiseUpdateCount     src/ap/wpa_auth.c       /^static const u32 dot11RSNAConfigPairwiseUpdateCount = 4;$/;"  v       file:
+dot1x_enabled  src/wps/wps_attr_parse.h        /^      const u8 *dot1x_enabled; \/* 1 octet (Bool) *\/$/;"     m       struct:wps_parse_attr
+dp     src/crypto/libtommath.h /^    mp_digit *dp;$/;" m       struct:__anon8
+dp     src/tls/libtommath.h    /^    mp_digit *dp;$/;" m       struct:__anon40
+driver src/ap/ap_config.h      /^      const struct wpa_driver_ops *driver;$/;"        m       struct:hostapd_config   typeref:struct:hostapd_config::wpa_driver_ops
+driver_init    src/ap/hostapd.h        /^      int (*driver_init)(struct hostapd_iface *iface);$/;"    m       struct:hapd_interfaces
+dtim_period    src/ap/ap_config.h      /^      int dtim_period;$/;"    m       struct:hostapd_bss_config
+dualband       src/wps/wps.h   /^      int dualband;$/;"       m       struct:wps_registrar_config
+dualband       src/wps/wps_registrar.c /^      int dualband;$/;"       m       struct:wps_registrar    file:
+dump_msk_file  src/ap/ap_config.h      /^      char *dump_msk_file;$/;"        m       struct:hostapd_bss_config
+dup_binstr     src/utils/common.c      /^char * dup_binstr(const void *src, size_t len)$/;"    f
+duration       src/common/ieee802_11_defs.h    /^      le16 duration;$/;"      m       struct:ieee80211_mgmt
+duration_id    src/common/ieee802_11_defs.h    /^      le16 duration_id;$/;"   m       struct:ieee80211_hdr
+e      src/tls/rsa.c   /^      struct bignum *e; \/* public exponent *\/$/;"   m       struct:crypto_rsa_key   typeref:struct:crypto_rsa_key::bignum   file:
+e_hash1        src/wps/wps_attr_parse.h        /^      const u8 *e_hash1; \/* WPS_HASH_LEN (32) octets *\/$/;" m       struct:wps_parse_attr
+e_hash2        src/wps/wps_attr_parse.h        /^      const u8 *e_hash2; \/* WPS_HASH_LEN (32) octets *\/$/;" m       struct:wps_parse_attr
+e_snonce1      src/wps/wps_attr_parse.h        /^      const u8 *e_snonce1; \/* WPS_SECRET_NONCE_LEN (16) octets *\/$/;"       m       struct:wps_parse_attr
+e_snonce2      src/wps/wps_attr_parse.h        /^      const u8 *e_snonce2; \/* WPS_SECRET_NONCE_LEN (16) octets *\/$/;"       m       struct:wps_parse_attr
+eap    src/eap_peer/eap_tls_common.h   /^      struct eap_sm *eap;$/;" m       struct:eap_ssl_data     typeref:struct:eap_ssl_data::eap_sm
+eapKeyData     src/eap_peer/eap_i.h    /^      u8 *eapKeyData;$/;"     m       struct:eap_sm
+eapKeyDataLen  src/eap_peer/eap_i.h    /^      size_t eapKeyDataLen;$/;"       m       struct:eap_sm
+eap_allowed_phase2_type        src/eap_peer/eap.c      /^eap_allowed_phase2_type(int vendor, int type)$/;"     f       file:
+eap_deinit_prev_method src/eap_peer/eap.c      /^void eap_deinit_prev_method(struct eap_sm *sm, const char *txt)$/;"   f
+eap_expand     src/eap_peer/eap_defs.h /^struct eap_expand {$/;"       s
+eap_get_config src/eap_peer/eap.c      /^struct eap_peer_config * eap_get_config(struct eap_sm *sm)$/;"        f
+eap_get_config_blob    src/eap_peer/eap.c      /^const struct wpa_config_blob * eap_get_config_blob(struct eap_sm *sm,$/;"     f
+eap_get_config_identity        src/eap_peer/eap.c      /^const u8 * eap_get_config_identity(struct eap_sm *sm, size_t *len)$/;"        f
+eap_get_config_new_password    src/eap_peer/eap.c      /^const u8 * eap_get_config_new_password(struct eap_sm *sm, size_t *len)$/;"    f
+eap_get_config_password        src/eap_peer/eap.c      /^const u8 * eap_get_config_password(struct eap_sm *sm, size_t *len)$/;"        f
+eap_get_config_password2       src/eap_peer/eap.c      /^const u8 * eap_get_config_password2(struct eap_sm *sm, size_t *len, int *hash)$/;"    f
+eap_get_id     src/eap_peer/eap_common.c       /^u8 eap_get_id(const struct wpabuf *msg)$/;"   f
+eap_get_phase2_type    src/eap_peer/eap.c      /^u32 eap_get_phase2_type(const char *name, int *vendor)$/;"    f
+eap_get_phase2_types   src/eap_peer/eap.c      /^struct eap_method_type * eap_get_phase2_types(struct eap_peer_config *config,$/;"     f
+eap_get_type   src/eap_peer/eap_common.c       /^EapType eap_get_type(const struct wpabuf *msg)$/;"    f
+eap_hdr        src/eap_peer/eap_defs.h /^struct eap_hdr {$/;"  s
+eap_hdr_len_valid      src/eap_peer/eap_common.c       /^int eap_hdr_len_valid(const struct wpabuf *msg, size_t min_payload)$/;"       f
+eap_hdr_validate       src/eap_peer/eap_common.c       /^const u8 * eap_hdr_validate(int vendor, EapType eap_type,$/;" f
+eap_identity   src/wps/wps_attr_parse.h        /^      const u8 *eap_identity; \/* <= 64 octets *\/$/;"        m       struct:wps_parse_attr
+eap_identity_len       src/wps/wps_attr_parse.h        /^      size_t eap_identity_len;$/;"    m       struct:wps_parse_attr
+eap_len        src/eap_peer/eap_ttls.c /^      size_t eap_len;$/;"     m       struct:ttls_parse_avp   file:
+eap_method     src/eap_peer/eap_i.h    /^struct eap_method {$/;"       s
+eap_method_priv        src/eap_peer/eap_i.h    /^      void *eap_method_priv;$/;"      m       struct:eap_sm
+eap_method_ret src/eap_peer/eap_i.h    /^struct eap_method_ret {$/;"   s
+eap_method_type        src/eap_peer/eap.h      /^struct eap_method_type {$/;"  s
+eap_methods    src/eap_peer/eap.c      /^static struct eap_method *eap_methods = NULL;$/;"     v       typeref:struct:eap_method       file:
+eap_methods    src/eap_peer/eap_config.h       /^      struct eap_method_type *eap_methods;$/;"        m       struct:eap_peer_config  typeref:struct:eap_peer_config::eap_method_type
+eap_mschapv2_challenge src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_challenge($/;"   f       file:
+eap_mschapv2_challenge_reply   src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_challenge_reply($/;"     f       file:
+eap_mschapv2_change_password   src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_change_password($/;"     f       file:
+eap_mschapv2_check_config      src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_check_config(struct eap_sm *sm)$/;"      f       file:
+eap_mschapv2_check_mslen       src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_check_mslen(struct eap_sm *sm, size_t len,$/;"   f       file:
+eap_mschapv2_copy_challenge    src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_copy_challenge(struct eap_mschapv2_data *data,$/;"       f       file:
+eap_mschapv2_data      src/eap_peer/eap_mschapv2.c     /^struct eap_mschapv2_data {$/;"        s       file:
+eap_mschapv2_deinit    src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_deinit(struct eap_sm *sm, void *priv)$/;"        f       file:
+eap_mschapv2_failure   src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_failure(struct eap_sm *sm,$/;"   f       file:
+eap_mschapv2_failure_txt       src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_failure_txt(struct eap_sm *sm,$/;"       f       file:
+eap_mschapv2_getKey    src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_getKey(struct eap_sm *sm, void *priv, size_t *len)$/;"   f       file:
+eap_mschapv2_hdr       src/eap_peer/eap_mschapv2.c     /^struct eap_mschapv2_hdr {$/;" s       file:
+eap_mschapv2_init      src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_init(struct eap_sm *sm)$/;"      f       file:
+eap_mschapv2_isKeyAvailable    src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_isKeyAvailable(struct eap_sm *sm, void *priv)$/;"        f       file:
+eap_mschapv2_password_changed  src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_password_changed(struct eap_sm *sm,$/;"  f       file:
+eap_mschapv2_process   src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_process(struct eap_sm *sm, void *priv,$/;"       f       file:
+eap_mschapv2_success   src/eap_peer/eap_mschapv2.c     /^eap_mschapv2_success(struct eap_sm *sm,$/;"   f       file:
+eap_msg_alloc  src/eap_peer/eap_common.c       /^struct wpabuf * eap_msg_alloc(int vendor, EapType type, size_t payload_len,$/;"       f
+eap_peap_data  src/eap_peer/eap_peap.c /^struct eap_peap_data {$/;"    s       file:
+eap_peap_decrypt       src/eap_peer/eap_peap.c /^eap_peap_decrypt(struct eap_sm *sm, struct eap_peap_data *data,$/;"   f       file:
+eap_peap_deinit        src/eap_peer/eap_peap.c /^eap_peap_deinit(struct eap_sm *sm, void *priv)$/;"    f       file:
+eap_peap_deinit_for_reauth     src/eap_peer/eap_peap.c /^eap_peap_deinit_for_reauth(struct eap_sm *sm, void *priv)$/;" f       file:
+eap_peap_derive_cmk    src/eap_peer/eap_peap.c /^eap_peap_derive_cmk(struct eap_sm *sm, struct eap_peap_data *data)$/;"        f       file:
+eap_peap_getKey        src/eap_peer/eap_peap.c /^eap_peap_getKey(struct eap_sm *sm, void *priv, size_t *len)$/;"       f       file:
+eap_peap_get_isk       src/eap_peer/eap_peap.c /^eap_peap_get_isk(struct eap_sm *sm, struct eap_peap_data *data,$/;"   f       file:
+eap_peap_get_session_id        src/eap_peer/eap_peap.c /^eap_peap_get_session_id(struct eap_sm *sm, void *priv, size_t *len)$/;"       f       file:
+eap_peap_get_status    src/eap_peer/eap_peap.c /^eap_peap_get_status(struct eap_sm *sm, void *priv, char *buf,$/;"     f       file:
+eap_peap_has_reauth_data       src/eap_peer/eap_peap.c /^eap_peap_has_reauth_data(struct eap_sm *sm, void *priv)$/;"   f       file:
+eap_peap_init  src/eap_peer/eap_peap.c /^eap_peap_init(struct eap_sm *sm)$/;"  f       file:
+eap_peap_init_for_reauth       src/eap_peer/eap_peap.c /^eap_peap_init_for_reauth(struct eap_sm *sm, void *priv)$/;"   f       file:
+eap_peap_isKeyAvailable        src/eap_peer/eap_peap.c /^eap_peap_isKeyAvailable(struct eap_sm *sm, void *priv)$/;"    f       file:
+eap_peap_parse_phase1  src/eap_peer/eap_peap.c /^eap_peap_parse_phase1(struct eap_peap_data *data,$/;" f       file:
+eap_peap_phase2_request        src/eap_peer/eap_peap.c /^static int eap_peap_phase2_request(struct eap_sm *sm,$/;"     f       file:
+eap_peap_process       src/eap_peer/eap_peap.c /^eap_peap_process(struct eap_sm *sm, void *priv,$/;"   f       file:
+eap_peapv2_tlv_eap_payload     src/eap_peer/eap_peap.c /^eap_peapv2_tlv_eap_payload(struct wpabuf *buf)$/;"    f       file:
+eap_peer_blob_deinit   src/eap_peer/eap.c      /^void eap_peer_blob_deinit(struct eap_sm *sm)$/;"      f
+eap_peer_blob_init     src/eap_peer/eap.c      /^int eap_peer_blob_init(struct eap_sm *sm)$/;" f
+eap_peer_config        src/eap_peer/eap_config.h       /^struct eap_peer_config {$/;"  s
+eap_peer_config_deinit src/eap_peer/eap.c      /^void eap_peer_config_deinit(struct eap_sm *sm)$/;"    f
+eap_peer_config_init   src/eap_peer/eap.c      /^int eap_peer_config_init($/;" f
+eap_peer_get_eap_method        src/eap_peer/eap.c      /^const struct eap_method * eap_peer_get_eap_method(int vendor, EapType method)$/;"     f
+eap_peer_get_methods   src/eap_peer/eap.c      /^const struct eap_method * eap_peer_get_methods(size_t *count)$/;"     f
+eap_peer_get_type      src/eap_peer/eap.c      /^EapType eap_peer_get_type(const char *name, int *vendor)$/;"  f
+eap_peer_method_alloc  src/eap_peer/eap.c      /^struct eap_method * eap_peer_method_alloc(int vendor, EapType method,$/;"     f
+eap_peer_method_free   src/eap_peer/eap.c      /^void eap_peer_method_free(struct eap_method *method)$/;"      f
+eap_peer_method_register       src/eap_peer/eap.c      /^int eap_peer_method_register(struct eap_method *method)$/;"   f
+eap_peer_mschapv2_register     src/eap_peer/eap_mschapv2.c     /^eap_peer_mschapv2_register(void)$/;"  f
+eap_peer_peap_register src/eap_peer/eap_peap.c /^eap_peer_peap_register(void)$/;"      f
+eap_peer_register_methods      src/eap_peer/eap.c      /^int eap_peer_register_methods(void)$/;"       f
+eap_peer_select_phase2_methods src/eap_peer/eap_tls_common.c   /^int eap_peer_select_phase2_methods(struct eap_peer_config *config,$/;"        f
+eap_peer_sm_deinit     src/esp_supplicant/esp_wpa_enterprise.c /^static void eap_peer_sm_deinit(void)$/;"      f       file:
+eap_peer_sm_init       src/esp_supplicant/esp_wpa_enterprise.c /^static int eap_peer_sm_init(void)$/;" f       file:
+eap_peer_tls_build_ack src/eap_peer/eap_tls_common.c   /^struct wpabuf * eap_peer_tls_build_ack(u8 id, EapType eap_type,$/;"   f
+eap_peer_tls_data_reassemble   src/eap_peer/eap_tls_common.c   /^static const struct wpabuf * eap_peer_tls_data_reassemble($/;"        f       file:
+eap_peer_tls_decrypt   src/eap_peer/eap_tls_common.c   /^int eap_peer_tls_decrypt(struct eap_sm *sm, struct eap_ssl_data *data,$/;"    f
+eap_peer_tls_derive_key        src/eap_peer/eap_tls_common.c   /^u8 * eap_peer_tls_derive_key(struct eap_sm *sm, struct eap_ssl_data *data,$/;"        f
+eap_peer_tls_derive_session_id src/eap_peer/eap_tls_common.c   /^u8 * eap_peer_tls_derive_session_id(struct eap_sm *sm,$/;"    f
+eap_peer_tls_encrypt   src/eap_peer/eap_tls_common.c   /^int eap_peer_tls_encrypt(struct eap_sm *sm, struct eap_ssl_data *data,$/;"    f
+eap_peer_tls_phase2_nak        src/eap_peer/eap_tls_common.c   /^int eap_peer_tls_phase2_nak(struct eap_method_type *types, size_t num_types,$/;"      f
+eap_peer_tls_process_helper    src/eap_peer/eap_tls_common.c   /^int eap_peer_tls_process_helper(struct eap_sm *sm, struct eap_ssl_data *data,$/;"     f
+eap_peer_tls_process_init      src/eap_peer/eap_tls_common.c   /^const u8 * eap_peer_tls_process_init(struct eap_sm *sm,$/;"   f
+eap_peer_tls_reassemble_fragment       src/eap_peer/eap_tls_common.c   /^static int eap_peer_tls_reassemble_fragment(struct eap_ssl_data *data,$/;"    f       file:
+eap_peer_tls_reauth_init       src/eap_peer/eap_tls_common.c   /^int eap_peer_tls_reauth_init(struct eap_sm *sm, struct eap_ssl_data *data)$/;"        f
+eap_peer_tls_register  src/eap_peer/eap_tls.c  /^int eap_peer_tls_register(void)$/;"   f
+eap_peer_tls_reset_input       src/eap_peer/eap_tls_common.c   /^void eap_peer_tls_reset_input(struct eap_ssl_data *data)$/;"  f
+eap_peer_tls_reset_output      src/eap_peer/eap_tls_common.c   /^void eap_peer_tls_reset_output(struct eap_ssl_data *data)$/;" f
+eap_peer_tls_ssl_deinit        src/eap_peer/eap_tls_common.c   /^void eap_peer_tls_ssl_deinit(struct eap_sm *sm, struct eap_ssl_data *data)$/;"        f
+eap_peer_tls_ssl_init  src/eap_peer/eap_tls_common.c   /^int eap_peer_tls_ssl_init(struct eap_sm *sm, struct eap_ssl_data *data,$/;"   f
+eap_peer_tls_status    src/eap_peer/eap_tls_common.c   /^int eap_peer_tls_status(struct eap_sm *sm, struct eap_ssl_data *data,$/;"     f
+eap_peer_ttls_register src/eap_peer/eap_ttls.c /^int eap_peer_ttls_register(void)$/;"  f
+eap_peer_unregister_methods    src/eap_peer/eap.c      /^void eap_peer_unregister_methods(void)$/;"    f
+eap_sm src/eap_peer/eap_i.h    /^struct eap_sm {$/;"   s
+eap_sm_abort   src/eap_peer/eap.c      /^void eap_sm_abort(struct eap_sm *sm)$/;"      f
+eap_sm_build_identity_resp     src/eap_peer/eap.c      /^struct wpabuf * eap_sm_build_identity_resp(struct eap_sm *sm, u8 id, int encrypted)$/;"       f
+eap_sm_build_nak       src/eap_peer/eap.c      /^struct wpabuf * eap_sm_build_nak(struct eap_sm *sm, EapType type, u8 id)$/;"  f
+eap_sm_process_request src/esp_supplicant/esp_wpa_enterprise.c /^int eap_sm_process_request(struct eap_sm *sm, struct wpabuf *reqData)$/;"     f
+eap_sm_send_eapol      src/esp_supplicant/esp_wpa_enterprise.c /^int eap_sm_send_eapol(struct eap_sm *sm, struct wpabuf *resp)$/;"     f
+eap_ssl_data   src/eap_peer/eap_tls_common.h   /^struct eap_ssl_data {$/;"     s
+eap_tls_check_blob     src/eap_peer/eap_tls_common.c   /^static int eap_tls_check_blob(struct eap_sm *sm, const char **name,$/;"       f       file:
+eap_tls_data   src/eap_peer/eap_tls.c  /^struct eap_tls_data {$/;"     s       file:
+eap_tls_deinit src/eap_peer/eap_tls.c  /^static void eap_tls_deinit(struct eap_sm *sm, void *priv)$/;" f       file:
+eap_tls_failure        src/eap_peer/eap_tls.c  /^static struct wpabuf * eap_tls_failure(struct eap_sm *sm,$/;" f       file:
+eap_tls_getKey src/eap_peer/eap_tls.c  /^static u8 * eap_tls_getKey(struct eap_sm *sm, void *priv, size_t *len)$/;"    f       file:
+eap_tls_init   src/eap_peer/eap_tls.c  /^static void * eap_tls_init(struct eap_sm *sm)$/;"     f       file:
+eap_tls_init_connection        src/eap_peer/eap_tls_common.c   /^static int eap_tls_init_connection(struct eap_sm *sm,$/;"     f       file:
+eap_tls_isKeyAvailable src/eap_peer/eap_tls.c  /^static bool eap_tls_isKeyAvailable(struct eap_sm *sm, void *priv)$/;" f       file:
+eap_tls_msg_alloc      src/eap_peer/eap_tls_common.c   /^static struct wpabuf * eap_tls_msg_alloc(EapType type, size_t payload_len,$/;"        f       file:
+eap_tls_params_flags   src/eap_peer/eap_tls_common.c   /^static void eap_tls_params_flags(struct tls_connection_params *params,$/;"    f       file:
+eap_tls_params_from_conf       src/eap_peer/eap_tls_common.c   /^static int eap_tls_params_from_conf(struct eap_sm *sm,$/;"    f       file:
+eap_tls_params_from_conf1      src/eap_peer/eap_tls_common.c   /^static void eap_tls_params_from_conf1(struct tls_connection_params *params,$/;"       f       file:
+eap_tls_process        src/eap_peer/eap_tls.c  /^static struct wpabuf * eap_tls_process(struct eap_sm *sm, void *priv,$/;"     f       file:
+eap_tls_process_input  src/eap_peer/eap_tls_common.c   /^static int eap_tls_process_input(struct eap_sm *sm, struct eap_ssl_data *data,$/;"    f       file:
+eap_tls_process_output src/eap_peer/eap_tls_common.c   /^static int eap_tls_process_output(struct eap_ssl_data *data, EapType eap_type,$/;"    f       file:
+eap_tls_success        src/eap_peer/eap_tls.c  /^static void eap_tls_success(struct eap_sm *sm, struct eap_tls_data *data,$/;" f       file:
+eap_tlv_add_cryptobinding      src/eap_peer/eap_peap.c /^eap_tlv_add_cryptobinding(struct eap_sm *sm,$/;"      f       file:
+eap_tlv_build_nak      src/eap_peer/eap_peap.c /^eap_tlv_build_nak(int id, u16 nak_type)$/;"   f       file:
+eap_tlv_build_result   src/eap_peer/eap_peap.c /^eap_tlv_build_result(struct eap_sm *sm,$/;"   f       file:
+eap_tlv_crypto_binding_tlv     src/eap_peer/eap_tlv_common.h   /^struct eap_tlv_crypto_binding_tlv {$/;"       s
+eap_tlv_hdr    src/eap_peer/eap_tlv_common.h   /^struct eap_tlv_hdr {$/;"      s
+eap_tlv_intermediate_result_tlv        src/eap_peer/eap_tlv_common.h   /^struct eap_tlv_intermediate_result_tlv {$/;"  s
+eap_tlv_nak_tlv        src/eap_peer/eap_tlv_common.h   /^struct eap_tlv_nak_tlv {$/;"  s
+eap_tlv_pac_ack_tlv    src/eap_peer/eap_tlv_common.h   /^struct eap_tlv_pac_ack_tlv {$/;"      s
+eap_tlv_pac_type_tlv   src/eap_peer/eap_tlv_common.h   /^struct eap_tlv_pac_type_tlv {$/;"     s
+eap_tlv_process        src/eap_peer/eap_peap.c /^eap_tlv_process(struct eap_sm *sm, struct eap_peap_data *data,$/;"    f       file:
+eap_tlv_request_action_tlv     src/eap_peer/eap_tlv_common.h   /^struct eap_tlv_request_action_tlv {$/;"       s
+eap_tlv_result_tlv     src/eap_peer/eap_tlv_common.h   /^struct eap_tlv_result_tlv {$/;"       s
+eap_tlv_validate_cryptobinding src/eap_peer/eap_peap.c /^eap_tlv_validate_cryptobinding(struct eap_sm *sm,$/;" f       file:
+eap_ttls_avp_add       src/eap_peer/eap_ttls.c /^static u8 * eap_ttls_avp_add(u8 *start, u8 *avphdr, u32 avp_code,$/;" f       file:
+eap_ttls_avp_hdr       src/eap_peer/eap_ttls.c /^static u8 * eap_ttls_avp_hdr(u8 *avphdr, u32 avp_code, u32 vendor_id,$/;"     f       file:
+eap_ttls_check_auth_status     src/eap_peer/eap_ttls.c /^static void eap_ttls_check_auth_status(struct eap_sm *sm, $/;"        f       file:
+eap_ttls_data  src/eap_peer/eap_ttls.c /^struct eap_ttls_data {$/;"    s       file:
+eap_ttls_decrypt       src/eap_peer/eap_ttls.c /^static int eap_ttls_decrypt(struct eap_sm *sm, struct eap_ttls_data *data,$/;"        f       file:
+eap_ttls_deinit        src/eap_peer/eap_ttls.c /^static void eap_ttls_deinit(struct eap_sm *sm, void *priv)$/;"        f       file:
+eap_ttls_deinit_for_reauth     src/eap_peer/eap_ttls.c /^static void eap_ttls_deinit_for_reauth(struct eap_sm *sm, void *priv)$/;"     f       file:
+eap_ttls_encrypt_response      src/eap_peer/eap_ttls.c /^static int eap_ttls_encrypt_response(struct eap_sm *sm,$/;"   f       file:
+eap_ttls_fake_identity_request src/eap_peer/eap_ttls.c /^static u8 * eap_ttls_fake_identity_request(void)$/;"  f       file:
+eap_ttls_getKey        src/eap_peer/eap_ttls.c /^static u8 * eap_ttls_getKey(struct eap_sm *sm, void *priv, size_t *len)$/;"   f       file:
+eap_ttls_get_session_id        src/eap_peer/eap_ttls.c /^static u8 * eap_ttls_get_session_id(struct eap_sm *sm, void *priv, size_t *len)$/;"   f       file:
+eap_ttls_get_status    src/eap_peer/eap_ttls.c /^static int eap_ttls_get_status(struct eap_sm *sm, void *priv, char *buf,$/;"  f       file:
+eap_ttls_has_reauth_data       src/eap_peer/eap_ttls.c /^static bool eap_ttls_has_reauth_data(struct eap_sm *sm, void *priv)$/;"       f       file:
+eap_ttls_implicit_challenge    src/eap_peer/eap_ttls.c /^static u8 * eap_ttls_implicit_challenge(struct eap_sm *sm,$/;"        f       file:
+eap_ttls_implicit_identity_request     src/eap_peer/eap_ttls.c /^static int eap_ttls_implicit_identity_request(struct eap_sm *sm,$/;"  f       file:
+eap_ttls_init  src/eap_peer/eap_ttls.c /^static void * eap_ttls_init(struct eap_sm *sm)$/;"    f       file:
+eap_ttls_init_for_reauth       src/eap_peer/eap_ttls.c /^static void * eap_ttls_init_for_reauth(struct eap_sm *sm, void *priv)$/;"     f       file:
+eap_ttls_isKeyAvailable        src/eap_peer/eap_ttls.c /^static bool eap_ttls_isKeyAvailable(struct eap_sm *sm, void *priv)$/;"        f       file:
+eap_ttls_parse_attr_eap        src/eap_peer/eap_ttls.c /^static int eap_ttls_parse_attr_eap(const u8 *dpos, size_t dlen,$/;"   f       file:
+eap_ttls_parse_avp     src/eap_peer/eap_ttls.c /^static int eap_ttls_parse_avp(u8 *pos, size_t left,$/;"       f       file:
+eap_ttls_parse_avps    src/eap_peer/eap_ttls.c /^static int eap_ttls_parse_avps(struct wpabuf *in_decrypted,$/;"       f       file:
+eap_ttls_phase2_eap_deinit     src/eap_peer/eap_ttls.c /^static void eap_ttls_phase2_eap_deinit(struct eap_sm *sm,$/;" f       file:
+eap_ttls_phase2_request        src/eap_peer/eap_ttls.c /^static int eap_ttls_phase2_request(struct eap_sm *sm,$/;"     f       file:
+eap_ttls_phase2_request_mschapv2       src/eap_peer/eap_ttls.c /^static int eap_ttls_phase2_request_mschapv2(struct eap_sm *sm,$/;"    f       file:
+eap_ttls_phase2_start  src/eap_peer/eap_ttls.c /^static int eap_ttls_phase2_start(struct eap_sm *sm, struct eap_ttls_data *data,$/;"   f       file:
+eap_ttls_process       src/eap_peer/eap_ttls.c /^static struct wpabuf * eap_ttls_process(struct eap_sm *sm, void *priv,$/;"    f       file:
+eap_ttls_process_decrypted     src/eap_peer/eap_ttls.c /^static int eap_ttls_process_decrypted(struct eap_sm *sm,$/;"  f       file:
+eap_ttls_process_handshake     src/eap_peer/eap_ttls.c /^static int eap_ttls_process_handshake(struct eap_sm *sm,$/;"  f       file:
+eap_ttls_process_phase2_mschapv2       src/eap_peer/eap_ttls.c /^static int eap_ttls_process_phase2_mschapv2(struct eap_sm *sm,$/;"    f       file:
+eap_ttls_process_tnc_start     src/eap_peer/eap_ttls.c /^static int eap_ttls_process_tnc_start(struct eap_sm *sm,$/;"  f       file:
+eap_ttls_v0_derive_key src/eap_peer/eap_ttls.c /^static int eap_ttls_v0_derive_key(struct eap_sm *sm,$/;"      f       file:
+eap_type       src/eap_peer/eap_tls.c  /^      u8 eap_type;$/;"        m       struct:eap_tls_data     file:
+eap_type       src/eap_peer/eap_tls_common.h   /^      u8 eap_type;$/;"        m       struct:eap_ssl_data
+eap_type       src/wps/wps_attr_parse.h        /^      const u8 *eap_type; \/* <= 8 octets *\/$/;"     m       struct:wps_parse_attr
+eap_type_len   src/wps/wps_attr_parse.h        /^      size_t eap_type_len;$/;"        m       struct:wps_parse_attr
+eap_update_len src/eap_peer/eap_common.c       /^void eap_update_len(struct wpabuf *msg)$/;"   f
+eapdata        src/eap_peer/eap_ttls.c /^      u8 *eapdata;$/;"        m       struct:ttls_parse_avp   file:
+eapol_key_timeout_first        src/ap/wpa_auth.c       /^static const u32 eapol_key_timeout_first = 100; \/* ms *\/$/;"        v       file:
+eapol_key_timeout_first_group  src/ap/wpa_auth.c       /^static const u32 eapol_key_timeout_first_group = 500; \/* ms *\/$/;"  v       file:
+eapol_key_timeout_subseq       src/ap/wpa_auth.c       /^static const u32 eapol_key_timeout_subseq = 1000; \/* ms *\/$/;"      v       file:
+eapol_sm_notify_eap_success    src/rsn_supp/wpa.c      /^void   eapol_sm_notify_eap_success(Boolean success)$/;"       f
+eapol_txcb     src/rsn_supp/wpa.c      /^void eapol_txcb(void *eb)$/;" f
+eapol_version  src/ap/ap_config.h      /^      int eapol_version;$/;"  m       struct:hostapd_bss_config
+eapol_version  src/ap/wpa_auth.h       /^      int eapol_version;$/;"  m       struct:wpa_auth_config
+eapol_version  src/rsn_supp/wpa.h      /^    u8 eapol_version;$/;"     m       struct:wpa_sm
+eapol_version  src/wps/wps.h   /^    u8 eapol_version;$/;"     m       struct:wps_sm
+ecp_mpi_load   test/test_crypto.c      /^static inline void ecp_mpi_load( mbedtls_mpi *X, const mbedtls_mpi_uint *p, size_t len )$/;"  f       file:
+ecp_opp        src/crypto/crypto_mbedtls.c     /^static int ecp_opp( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R, const mbedtls_ecp_point *P)$/;"       f       file:
+ecw2cw src/ap/ap_config.c      100;"   d       file:
+ecw2cw src/ap/ap_config.c      124;"   d       file:
+eid    src/common/ieee802_11_defs.h    /^      u8 eid; \/* 221 = 0xdd *\/$/;"  m       struct:wmm_tspec_element
+ek     src/crypto/crypto_internal-cipher.c     /^                      u32 ek[32];$/;" m       struct:crypto_cipher::__anon10::__anon14        file:
+ek     src/crypto/des_i.h      /^      u32 ek[3][32];$/;"      m       struct:des3_key_s
+ek     src/fast_crypto/fast_crypto_internal-cipher.c   /^          uint32_t ek[32];$/;"        m       struct:fast_crypto_cipher::__anon56::__anon60   file:
+elem_id        src/common/wpa_common.h /^      u8 elem_id; \/* WLAN_EID_RSN *\/$/;"    m       struct:rsn_ie_hdr
+elem_id        src/common/wpa_common.h /^      u8 elem_id;$/;" m       struct:wpa_ie_hdr
+element_id     src/common/ieee802_11_defs.h    /^                                      u8 element_id;$/;"      m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon79
+eloop_cancel_timeout   src/utils/wpa_debug.c   /^int  eloop_cancel_timeout(eloop_timeout_handler handler,$/;"  f
+eloop_register_timeout src/utils/wpa_debug.c   /^int  eloop_register_timeout(unsigned int secs, unsigned int usecs,$/;"        f
+eloop_timeout_handler  include/utils/wpa_debug.h       /^typedef void (*eloop_timeout_handler)(void *eloop_data, void *user_ctx);$/;"  t
+email  src/tls/x509v3.h        /^      char *email; \/* emailAddress *\/$/;"   m       struct:x509_name
+emsk   src/wps/wps_i.h /^      u8 emsk[WPS_EMSK_LEN];$/;"      m       struct:wps_data
+encr_hash      src/eap_peer/eap_mschapv2.c     /^      u8 encr_hash[16];$/;"   m       struct:ms_change_password       file:
+encr_password  src/eap_peer/eap_mschapv2.c     /^      u8 encr_password[516];$/;"      m       struct:ms_change_password       file:
+encr_settings  src/wps/wps_attr_parse.h        /^      const u8 *encr_settings;$/;"    m       struct:wps_parse_attr
+encr_settings_len      src/wps/wps_attr_parse.h        /^      size_t encr_settings_len;$/;"   m       struct:wps_parse_attr
+encr_type      src/wps/wps.h   /^      u16 encr_type;$/;"      m       struct:wps_credential
+encr_type      src/wps/wps_attr_parse.h        /^      const u8 *encr_type; \/* 2 octets *\/$/;"       m       struct:wps_parse_attr
+encr_type      src/wps/wps_i.h /^      u16 encr_type;$/;"      m       struct:wps_data
+encr_type_flags        src/wps/wps_attr_parse.h        /^      const u8 *encr_type_flags; \/* 2 octets *\/$/;" m       struct:wps_parse_attr
+encr_types     src/wps/wps.h   /^      u16 encr_types;$/;"     m       struct:wps_context
+encrypt_pw_block_with_password_hash    src/crypto/ms_funcs.c   /^int encrypt_pw_block_with_password_hash($/;"  f
+engine src/tls/tls.h   /^      int engine;$/;" m       struct:tls_connection_params
+engine_id      src/tls/tls.h   /^      const char *engine_id;$/;"      m       struct:tls_connection_params
+enrollee       src/wps/wps.h   /^              int enrollee;$/;"       m       struct:wps_event_data::wps_event_pwd_auth_fail
+enrollee       src/wps/wps.h   /^      } enrollee;$/;" m       union:wps_event_data    typeref:struct:wps_event_data::wps_event_er_enrollee
+enrollee_addr  src/wps/wps_registrar.c /^      u8 enrollee_addr[ETH_ALEN];$/;" m       struct:wps_uuid_pin     file:
+enrollee_nonce src/wps/wps_attr_parse.h        /^      const u8 *enrollee_nonce; \/* WPS_NONCE_LEN (16) octets *\/$/;" m       struct:wps_parse_attr
+enrollee_seen_cb       src/wps/wps.h   /^      void (*enrollee_seen_cb)(void *ctx, const u8 *addr, const u8 *uuid_e,$/;"       m       struct:wps_registrar_config
+enrollee_seen_cb       src/wps/wps_registrar.c /^      void (*enrollee_seen_cb)(void *ctx, const u8 *addr, const u8 *uuid_e,$/;"       m       struct:wps_registrar    file:
+er     src/wps/wps_i.h /^      int er;$/;"     m       struct:wps_data
+error  src/ap/wpa_auth_ie.h    /^      const u8 *error;$/;"    m       struct:wpa_eapol_ie_parse
+error  src/rsn_supp/wpa_ie.h   /^      const u8 *error;$/;"    m       struct:wpa_eapol_ie_parse
+error_indication       src/wps/wps.h   /^              u16 error_indication;$/;"       m       struct:wps_event_data::wps_event_fail
+error_indication       src/wps/wps_i.h /^      u16 error_indication;$/;"       m       struct:wps_data
+error_len      src/ap/wpa_auth_ie.h    /^      size_t error_len;$/;"   m       struct:wpa_eapol_ie_parse
+error_len      src/rsn_supp/wpa_ie.h   /^      size_t error_len;$/;"   m       struct:wpa_eapol_ie_parse
+error_type     src/common/wpa_common.h /^      be16 error_type;$/;"    m       struct:rsn_error_kde
+esp_supplicant_init    src/esp_supplicant/esp_wpa_main.c       /^int esp_supplicant_init(void)$/;"     f
+esp_wifi_sta_wpa2_ent_clear_ca_cert    src/esp_supplicant/esp_wpa_enterprise.c /^void esp_wifi_sta_wpa2_ent_clear_ca_cert(void)$/;"    f
+esp_wifi_sta_wpa2_ent_clear_cert_key   src/esp_supplicant/esp_wpa_enterprise.c /^void esp_wifi_sta_wpa2_ent_clear_cert_key(void)$/;"   f
+esp_wifi_sta_wpa2_ent_clear_identity   src/esp_supplicant/esp_wpa_enterprise.c /^void esp_wifi_sta_wpa2_ent_clear_identity(void)$/;"   f
+esp_wifi_sta_wpa2_ent_clear_new_password       src/esp_supplicant/esp_wpa_enterprise.c /^void esp_wifi_sta_wpa2_ent_clear_new_password(void)$/;"       f
+esp_wifi_sta_wpa2_ent_clear_password   src/esp_supplicant/esp_wpa_enterprise.c /^void esp_wifi_sta_wpa2_ent_clear_password(void)$/;"   f
+esp_wifi_sta_wpa2_ent_clear_username   src/esp_supplicant/esp_wpa_enterprise.c /^void esp_wifi_sta_wpa2_ent_clear_username(void)$/;"   f
+esp_wifi_sta_wpa2_ent_disable  src/esp_supplicant/esp_wpa_enterprise.c /^esp_err_t esp_wifi_sta_wpa2_ent_disable(void)$/;"     f
+esp_wifi_sta_wpa2_ent_disable_fn       src/esp_supplicant/esp_wpa_enterprise.c /^esp_err_t esp_wifi_sta_wpa2_ent_disable_fn(void *param)$/;"   f
+esp_wifi_sta_wpa2_ent_enable   src/esp_supplicant/esp_wpa_enterprise.c /^esp_err_t esp_wifi_sta_wpa2_ent_enable(const esp_wpa2_config_t *config)$/;"   f
+esp_wifi_sta_wpa2_ent_enable_fn        src/esp_supplicant/esp_wpa_enterprise.c /^esp_err_t esp_wifi_sta_wpa2_ent_enable_fn(const esp_wpa2_config_t *config)$/;"        f
+esp_wifi_sta_wpa2_ent_get_disable_time_check   src/esp_supplicant/esp_wpa_enterprise.c /^esp_err_t esp_wifi_sta_wpa2_ent_get_disable_time_check(bool *disable)$/;"     f
+esp_wifi_sta_wpa2_ent_set_ca_cert      src/esp_supplicant/esp_wpa_enterprise.c /^esp_err_t esp_wifi_sta_wpa2_ent_set_ca_cert(const unsigned char *ca_cert, int ca_cert_len)$/;"        f
+esp_wifi_sta_wpa2_ent_set_cert_key     src/esp_supplicant/esp_wpa_enterprise.c /^esp_err_t esp_wifi_sta_wpa2_ent_set_cert_key(const unsigned char *client_cert, int client_cert_len, const unsigned char *private_key, int private_key_len, const unsigned char *private_key_passwd, int private_key_passwd_len)$/;"   f
+esp_wifi_sta_wpa2_ent_set_disable_time_check   src/esp_supplicant/esp_wpa_enterprise.c /^esp_err_t esp_wifi_sta_wpa2_ent_set_disable_time_check(bool disable)$/;"      f
+esp_wifi_sta_wpa2_ent_set_identity     src/esp_supplicant/esp_wpa_enterprise.c /^esp_err_t esp_wifi_sta_wpa2_ent_set_identity(const unsigned char *identity, int len)$/;"      f
+esp_wifi_sta_wpa2_ent_set_new_password src/esp_supplicant/esp_wpa_enterprise.c /^esp_err_t esp_wifi_sta_wpa2_ent_set_new_password(const unsigned char *new_password, int len)$/;"      f
+esp_wifi_sta_wpa2_ent_set_password     src/esp_supplicant/esp_wpa_enterprise.c /^esp_err_t esp_wifi_sta_wpa2_ent_set_password(const unsigned char *password, int len)$/;"      f
+esp_wifi_sta_wpa2_ent_set_username     src/esp_supplicant/esp_wpa_enterprise.c /^esp_err_t esp_wifi_sta_wpa2_ent_set_username(const unsigned char *username, int len)$/;"      f
+esp_wifi_wps_disable   src/esp_supplicant/esp_wps.c    /^int esp_wifi_wps_disable(void)$/;"    f
+esp_wifi_wps_enable    src/esp_supplicant/esp_wps.c    /^int esp_wifi_wps_enable(const esp_wps_config_t *config)$/;"   f
+esp_wifi_wps_start     src/esp_supplicant/esp_wps.c    /^int esp_wifi_wps_start(int timeout_ms)$/;"    f
+esp_wpa2_config_t      include/esp_supplicant/esp_wpa_enterprise.h     /^}esp_wpa2_config_t;$/;"       t       typeref:struct:__anon88
+esp_wps_config_t       include/esp_supplicant/esp_wps.h        /^} esp_wps_config_t;$/;"       t       typeref:struct:__anon90
+event_cb       src/tls/tls.h   /^      void (*event_cb)(void *ctx, enum tls_event ev,$/;"      m       struct:tls_config
+event_cb       src/wps/wps.h   /^      void (*event_cb)(void *ctx, enum wps_event event,$/;"   m       struct:wps_context
+expanded_key_material  src/tls/tlsv1_common.h  /^      size_t expanded_key_material;$/;"       m       struct:tls_cipher_data
+expiration     src/wps/wps_registrar.c /^      struct os_time expiration;$/;"  m       struct:wps_uuid_pin     typeref:struct:wps_uuid_pin::os_time    file:
+ext_data       include/utils/wpabuf.h  /^      u8 *ext_data; \/* pointer to external data; NULL if data follows$/;"    m       struct:wpabuf
+ext_password_alloc     src/utils/ext_password.c        /^struct wpabuf * ext_password_alloc(size_t len)$/;"    f
+ext_password_backend   src/utils/ext_password_i.h      /^struct ext_password_backend {$/;"     s
+ext_password_data      src/utils/ext_password.c        /^struct ext_password_data {$/;"        s       file:
+ext_password_deinit    src/utils/ext_password.c        /^void ext_password_deinit(struct ext_password_data *data)$/;"  f
+ext_password_deinit    src/utils/ext_password.h        27;"    d
+ext_password_free      src/utils/ext_password.c        /^void ext_password_free(struct wpabuf *pw)$/;" f
+ext_password_free      src/utils/ext_password.h        29;"    d
+ext_password_get       src/utils/ext_password.c        /^struct wpabuf * ext_password_get(struct ext_password_data *data,$/;"  f
+ext_password_get       src/utils/ext_password.h        28;"    d
+ext_password_init      src/utils/ext_password.c        /^struct ext_password_data * ext_password_init(const char *backend,$/;" f
+ext_password_init      src/utils/ext_password.h        26;"    d
+ext_reg        src/wps/wps_i.h /^      int ext_reg;$/;"        m       struct:wps_data
+extensions_present     src/tls/x509v3.h        /^      unsigned int extensions_present;$/;"    m       struct:x509_certificate
+extra_cred     src/ap/ap_config.h      /^      u8 *extra_cred;$/;"     m       struct:hostapd_bss_config
+extra_cred     src/wps/wps.h   /^      const u8 *extra_cred;$/;"       m       struct:wps_registrar_config
+extra_cred     src/wps/wps_registrar.c /^      struct wpabuf *extra_cred;$/;"  m       struct:wps_registrar    typeref:struct:wps_registrar::wpabuf    file:
+extra_cred_len src/ap/ap_config.h      /^      size_t extra_cred_len;$/;"      m       struct:hostapd_bss_config
+extra_cred_len src/wps/wps.h   /^      size_t extra_cred_len;$/;"      m       struct:wps_registrar_config
+factory_info   include/esp_supplicant/esp_wps.h        /^    wps_factory_information_t factory_info;$/;"       m       struct:__anon90
+fail   src/wps/wps.h   /^      } fail;$/;"     m       union:wps_event_data    typeref:struct:wps_event_data::wps_event_fail
+fast_aes_128_cbc_decrypt       src/fast_crypto/fast_aes-cbc.c  /^fast_aes_128_cbc_decrypt(const uint8_t *key, const uint8_t *iv, uint8_t *data, size_t data_len)$/;"   f
+fast_aes_128_cbc_encrypt       src/fast_crypto/fast_aes-cbc.c  /^fast_aes_128_cbc_encrypt(const uint8_t *key, const uint8_t *iv, uint8_t *data, size_t data_len)$/;"   f
+fast_aes_unwrap        src/fast_crypto/fast_aes-unwrap.c       /^fast_aes_unwrap(const uint8_t *kek, int n, const uint8_t *cipher, uint8_t *plain)$/;" f
+fast_aes_wrap  src/fast_crypto/fast_aes-wrap.c /^int fast_aes_wrap(const uint8_t *kek, int n, const uint8_t *plain, uint8_t *cipher)$/;"       f
+fast_crypto_cipher     src/fast_crypto/fast_crypto_internal-cipher.c   /^struct fast_crypto_cipher {$/;"       s       file:
+fast_crypto_cipher_decrypt     src/fast_crypto/fast_crypto_internal-cipher.c   /^int  fast_crypto_cipher_decrypt(struct crypto_cipher *ctx, const uint8_t *crypt,$/;"  f
+fast_crypto_cipher_deinit      src/fast_crypto/fast_crypto_internal-cipher.c   /^void  fast_crypto_cipher_deinit(struct crypto_cipher *ctx)$/;"        f
+fast_crypto_cipher_encrypt     src/fast_crypto/fast_crypto_internal-cipher.c   /^int  fast_crypto_cipher_encrypt(struct crypto_cipher *ctx, const uint8_t *plain,$/;"  f
+fast_crypto_cipher_init        src/fast_crypto/fast_crypto_internal-cipher.c   /^struct crypto_cipher *  fast_crypto_cipher_init(enum crypto_cipher_alg alg,$/;"       f
+fast_crypto_hash       src/fast_crypto/fast_crypto_internal.c  /^struct fast_crypto_hash {$/;" s       file:
+fast_crypto_hash_finish        src/fast_crypto/fast_crypto_internal.c  /^int  fast_crypto_hash_finish(struct crypto_hash *ctx, u8 *mac, size_t *len)$/;"       f
+fast_crypto_hash_init  src/fast_crypto/fast_crypto_internal.c  /^struct crypto_hash *  fast_crypto_hash_init(enum crypto_hash_alg alg, const u8 *key,$/;"      f
+fast_crypto_hash_update        src/fast_crypto/fast_crypto_internal.c  /^void  fast_crypto_hash_update(struct crypto_hash *ctx, const u8 *data, size_t len)$/;"        f
+fast_crypto_mod_exp    src/fast_crypto/fast_crypto_internal-modexp.c   /^fast_crypto_mod_exp(const uint8_t *base, size_t base_len,$/;" f
+fast_hmac_sha256       src/fast_crypto/fast_sha256.c   /^fast_hmac_sha256(const uint8_t *key, size_t key_len, const uint8_t *data,$/;" f
+fast_hmac_sha256_vector        src/fast_crypto/fast_sha256.c   /^fast_hmac_sha256_vector(const uint8_t *key, size_t key_len, size_t num_elem,$/;"      f
+fast_mp_montgomery_reduce      src/crypto/libtommath.h /^fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)$/;"  f
+fast_mp_montgomery_reduce      src/tls/libtommath.h    /^fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)$/;"  f
+fast_s_mp_mul_digs     src/crypto/libtommath.h /^fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)$/;" f
+fast_s_mp_mul_digs     src/tls/libtommath.h    /^fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)$/;" f
+fast_s_mp_sqr  src/crypto/libtommath.h /^fast_s_mp_sqr (mp_int * a, mp_int * b)$/;"    f
+fast_s_mp_sqr  src/tls/libtommath.h    /^fast_s_mp_sqr (mp_int * a, mp_int * b)$/;"    f
+fast_sha256_prf        src/fast_crypto/fast_sha256.c   /^fast_sha256_prf(const uint8_t *key, size_t key_len, const char *label,$/;"    f
+fast_sha256_vector     src/fast_crypto/fast_sha256-internal.c  /^fast_sha256_vector(size_t num_elem, const uint8_t *addr[], const size_t *len,$/;"     f
+finish_state   src/eap_peer/eap_i.h    /^      u8 finish_state;$/;"    m       struct:eap_sm
+fips_mode      src/tls/tls.h   /^      int fips_mode;$/;"      m       struct:tls_config
+first_sta_seen src/ap/wpa_auth_i.h     /^      Boolean first_sta_seen;$/;"     m       struct:wpa_group
+flags  src/ap/hostapd.h        /^      int flags; \/* HOSTAPD_RATE_ flags *\/$/;"      m       struct:hostapd_rate_data
+flags  src/ap/sta_info.h       /^      u32 flags; \/* Bitfield of WLAN_STA_* *\/$/;"   m       struct:sta_info
+flags  src/eap_peer/eap_config.h       /^      u32 flags;$/;"  m       struct:eap_peer_config
+flags  src/eap_peer/eap_mschapv2.c     /^      u8 flags;$/;"   m       struct:ms_response      file:
+flags  src/eap_peer/eap_mschapv2.c     /^      u8 flags[2];$/;"        m       struct:ms_change_password       file:
+flags  src/tls/tls.h   /^      unsigned int flags;$/;" m       struct:tls_connection_params
+flags  src/wps/wps_registrar.c /^      int flags;$/;"  m       struct:wps_uuid_pin     file:
+fn     src/esp_supplicant/esp_wifi_driver.h    /^    wifi_ipc_fn_t fn;$/;"     m       struct:__anon32
+fn     src/esp_supplicant/esp_wifi_driver.h    /^    wifi_wpa2_fn_t   fn;$/;"  m       struct:__anon31
+for_each_auth  src/ap/wpa_auth.h       /^      int (*for_each_auth)(void *ctx, int (*cb)(struct wpa_authenticator *a,$/;"      m       struct:wpa_auth_callbacks
+for_each_interface     src/ap/hostapd.h        /^      int (*for_each_interface)(struct hapd_interfaces *interfaces,$/;"       m       struct:hapd_interfaces
+for_each_sta   src/ap/wpa_auth.h       /^      int (*for_each_sta)(void *ctx, int (*cb)(struct wpa_state_machine *sm,$/;"      m       struct:wpa_auth_callbacks
+force_new_label        src/eap_peer/eap_peap.c /^      int peap_version, force_peap_version, force_new_label;$/;"      m       struct:eap_peap_data    file:
+force_pbc_overlap      src/wps/wps_registrar.c /^      int force_pbc_overlap;$/;"      m       struct:wps_registrar    file:
+force_peap_version     src/eap_peer/eap_peap.c /^      int peap_version, force_peap_version, force_new_label;$/;"      m       struct:eap_peap_data    file:
+fragm_threshold        src/ap/ap_config.h      /^      int fragm_threshold;$/;"        m       struct:hostapd_config
+fragment_size  src/eap_peer/eap_config.h       /^      int fragment_size;$/;"  m       struct:eap_peer_config
+frame_control  src/common/ieee802_11_defs.h    /^      le16 frame_control;$/;" m       struct:ieee80211_hdr
+frame_control  src/common/ieee802_11_defs.h    /^      le16 frame_control;$/;" m       struct:ieee80211_mgmt
+frame_type     src/ap/wpa_auth.h       /^      u8 frame_type; \/* RSN_REMOTE_FRAME_TYPE_FT_RRB *\/$/;" m       struct:ft_r0kh_r1kh_pull_frame
+frame_type     src/ap/wpa_auth.h       /^      u8 frame_type; \/* RSN_REMOTE_FRAME_TYPE_FT_RRB *\/$/;" m       struct:ft_r0kh_r1kh_push_frame
+frame_type     src/ap/wpa_auth.h       /^      u8 frame_type; \/* RSN_REMOTE_FRAME_TYPE_FT_RRB *\/$/;" m       struct:ft_r0kh_r1kh_resp_frame
+frame_type     src/ap/wpa_auth.h       /^      u8 frame_type; \/* RSN_REMOTE_FRAME_TYPE_FT_RRB *\/$/;" m       struct:ft_rrb_frame
+free   src/eap_peer/eap_i.h    /^      void (*free)(struct eap_method *method);$/;"    m       struct:eap_method
+friendly_name  src/ap/ap_config.h      /^      char *friendly_name;$/;"        m       struct:hostapd_bss_config
+friendly_name  src/wps/wps.h   /^              const char *friendly_name;$/;"  m       struct:wps_event_data::wps_event_er_ap
+friendly_name  src/wps/wps.h   /^      char *friendly_name;$/;"        m       struct:wps_context
+ft_action_req  src/common/ieee802_11_defs.h    /^                              } STRUCT_PACKED ft_action_req;$/;"      m       union:ieee80211_mgmt::__anon66::__anon76::__anon77      typeref:struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon80
+ft_action_resp src/common/ieee802_11_defs.h    /^                              } STRUCT_PACKED ft_action_resp;$/;"     m       union:ieee80211_mgmt::__anon66::__anon76::__anon77      typeref:struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon81
+ft_capab       src/common/wpa_common.h /^      u8 ft_capab;$/;"        m       struct:rsn_mdie
+ft_check_msg_2_of_4    src/ap/wpa_auth.c       /^static int ICACHE_FLASH_ATTR ft_check_msg_2_of_4(struct wpa_authenticator *wpa_auth,$/;"      f       file:
+ft_completed   src/ap/wpa_auth_i.h     /^      unsigned int ft_completed:1;$/;"        m       struct:wpa_state_machine
+ft_over_ds     src/ap/ap_config.h      /^      int ft_over_ds;$/;"     m       struct:hostapd_bss_config
+ft_over_ds     src/ap/wpa_auth.h       /^      int ft_over_ds;$/;"     m       struct:wpa_auth_config
+ft_r0kh_r1kh_pull_frame        src/ap/wpa_auth.h       /^struct ft_r0kh_r1kh_pull_frame {$/;"  s
+ft_r0kh_r1kh_push_frame        src/ap/wpa_auth.h       /^struct ft_r0kh_r1kh_push_frame {$/;"  s
+ft_r0kh_r1kh_resp_frame        src/ap/wpa_auth.h       /^struct ft_r0kh_r1kh_resp_frame {$/;"  s
+ft_remote_r0kh src/ap/wpa_auth.h       /^struct ft_remote_r0kh {$/;"   s
+ft_remote_r1kh src/ap/wpa_auth.h       /^struct ft_remote_r1kh {$/;"   s
+ft_rrb_frame   src/ap/wpa_auth.h       /^struct ft_rrb_frame {$/;"     s
+ftie   src/ap/wpa_auth_ie.h    /^      const u8 *ftie;$/;"     m       struct:wpa_eapol_ie_parse
+ftie   src/rsn_supp/wpa_ie.h   /^      const u8 *ftie;$/;"     m       struct:wpa_eapol_ie_parse
+ftie_len       src/ap/wpa_auth_ie.h    /^      size_t ftie_len;$/;"    m       struct:wpa_eapol_ie_parse
+ftie_len       src/rsn_supp/wpa_ie.h   /^      size_t ftie_len;$/;"    m       struct:wpa_eapol_ie_parse
+full_dynamic_vlan      src/ap/hostapd.h        /^      struct full_dynamic_vlan *full_dynamic_vlan;$/;"        m       struct:hostapd_data     typeref:struct:hostapd_data::full_dynamic_vlan
+gEapSm src/esp_supplicant/esp_wpa_enterprise.c /^static struct eap_sm *gEapSm = NULL;$/;"      v       typeref:struct:eap_sm   file:
+gWpaSm src/rsn_supp/wpa.c      /^  struct wpa_sm gWpaSm;$/;"   v       typeref:struct:wpa_sm
+gWpsSm src/esp_supplicant/esp_wps.c    /^struct wps_sm *gWpsSm = NULL;$/;"     v       typeref:struct:wps_sm
+g_wifi_wpa2_sync_sem   src/esp_supplicant/esp_wpa_enterprise.c /^static void *g_wifi_wpa2_sync_sem = NULL;$/;" v       file:
+g_wpa2_api_lock        src/esp_supplicant/esp_wpa_enterprise.c /^static void *g_wpa2_api_lock = NULL;$/;"      v       file:
+g_wpa2_state   src/esp_supplicant/esp_wpa_enterprise.c /^static wpa2_state_t g_wpa2_state = WPA2_STATE_DISABLED;$/;"   v       file:
+g_wpa_anonymous_identity       src/eap_peer/eap.h      /^u8 *g_wpa_anonymous_identity;$/;"     v
+g_wpa_anonymous_identity_len   src/eap_peer/eap.h      /^int g_wpa_anonymous_identity_len;$/;" v
+g_wpa_ca_cert  src/eap_peer/eap.h      /^const u8 *g_wpa_ca_cert;$/;"  v
+g_wpa_ca_cert_len      src/eap_peer/eap.h      /^int g_wpa_ca_cert_len;$/;"    v
+g_wpa_client_cert      src/eap_peer/eap.h      /^const u8 *g_wpa_client_cert;$/;"      v
+g_wpa_client_cert_len  src/eap_peer/eap.h      /^int g_wpa_client_cert_len;$/;"        v
+g_wpa_new_password     src/eap_peer/eap.h      /^u8 *g_wpa_new_password;$/;"   v
+g_wpa_new_password_len src/eap_peer/eap.h      /^int g_wpa_new_password_len;$/;"       v
+g_wpa_password src/eap_peer/eap.h      /^u8 *g_wpa_password;$/;"       v
+g_wpa_password_len     src/eap_peer/eap.h      /^int g_wpa_password_len;$/;"   v
+g_wpa_private_key      src/eap_peer/eap.h      /^const u8 *g_wpa_private_key;$/;"      v
+g_wpa_private_key_len  src/eap_peer/eap.h      /^int g_wpa_private_key_len;$/;"        v
+g_wpa_private_key_passwd       src/eap_peer/eap.h      /^const u8 *g_wpa_private_key_passwd;$/;"       v
+g_wpa_private_key_passwd_len   src/eap_peer/eap.h      /^int g_wpa_private_key_passwd_len;$/;" v
+g_wpa_username src/eap_peer/eap.h      /^u8 *g_wpa_username;$/;"       v
+g_wpa_username_len     src/eap_peer/eap.h      /^int g_wpa_username_len;$/;"   v
+gas_dialog     src/ap/sta_info.h       /^      struct gas_dialog_info *gas_dialog;$/;" m       struct:sta_info typeref:struct:sta_info::gas_dialog_info
+gas_dialog_next        src/ap/sta_info.h       /^      u8 gas_dialog_next;$/;" m       struct:sta_info
+gas_frag_limit src/ap/hostapd.h        /^      size_t gas_frag_limit;$/;"      m       struct:hostapd_data
+gd     src/rsn_supp/wpa.h      /^    struct wpa_gtk_data gd; \/\/used for calllback save param$/;"     m       struct:wpa_sm   typeref:struct:wpa_sm::wpa_gtk_data
+generate_authenticator_response        src/crypto/ms_funcs.c   /^int generate_authenticator_response(const u8 *password, size_t password_len,$/;"      f
+generate_authenticator_response_pwhash src/crypto/ms_funcs.c   /^int generate_authenticator_response_pwhash($/;"       f
+generate_nt_response   src/crypto/ms_funcs.c   /^int generate_nt_response(const u8 *auth_challenge, const u8 *peer_challenge,$/;"      f
+generate_nt_response_pwhash    src/crypto/ms_funcs.c   /^int generate_nt_response_pwhash(const u8 *auth_challenge,$/;" f
+generator      include/crypto/dh_groups.h      /^      const u8 *generator;$/;"        m       struct:dh_group
+generator_len  include/crypto/dh_groups.h      /^      size_t generator_len;$/;"       m       struct:dh_group
+get    src/utils/ext_password_i.h      /^      struct wpabuf * (*get)(void *ctx, const char *name);$/;"        m       struct:ext_password_backend     typeref:struct:ext_password_backend::get
+getKey src/eap_peer/eap_i.h    /^      u8 * (*getKey)(struct eap_sm *sm, void *priv, size_t *len);$/;" m       struct:eap_method
+getSessionId   src/eap_peer/eap_i.h    /^      u8 * (*getSessionId)(struct eap_sm *sm, void *priv, size_t *len);$/;"   m       struct:eap_method
+get_asymetric_start_key        src/crypto/ms_funcs.c   /^int get_asymetric_start_key(const u8 *master_key, u8 *session_key,$/;"        f
+get_eapol      src/ap/wpa_auth.h       /^      int (*get_eapol)(void *ctx, const u8 *addr, wpa_eapol_variable var);$/;"        m       struct:wpa_auth_callbacks
+get_identity   src/eap_peer/eap_i.h    /^      const u8 * (*get_identity)(struct eap_sm *sm, void *priv, size_t *len);$/;"     m       struct:eap_method
+get_master_key src/crypto/ms_funcs.c   /^int get_master_key(const u8 *password_hash_hash, const u8 *nt_response,$/;"   f
+get_msk        src/ap/wpa_auth.h       /^      int (*get_msk)(void *ctx, const u8 *addr, u8 *msk, size_t *len);$/;"    m       struct:wpa_auth_callbacks
+get_ppkey      src/rsn_supp/wpa.h      /^    int (*get_ppkey) (uint8_t *ifx, int *alg, uint8_t *addr, int *key_idx,$/;"        m       struct:wpa_sm
+get_psk        src/ap/wpa_auth.h       /^      const u8 * (*get_psk)(void *ctx, const u8 *addr, const u8 *prev_psk);$/;"       m       struct:wpa_auth_callbacks
+get_seqnum     src/ap/wpa_auth.h       /^      int (*get_seqnum)(void *ctx, const u8 *addr, int idx, u8 *seq);$/;"     m       struct:wpa_auth_callbacks
+get_status     src/eap_peer/eap_i.h    /^      int (*get_status)(struct eap_sm *sm, void *priv, char *buf,$/;" m       struct:eap_method
+gl_disable_time_check  src/esp_supplicant/esp_wpa_enterprise.c /^static bool gl_disable_time_check = true;$/;" v       file:
+global_ctrl_sock       src/ap/hostapd.h        /^      int global_ctrl_sock;$/;"       m       struct:hapd_interfaces
+global_iface_name      src/ap/hostapd.h        /^      char *global_iface_name;$/;"    m       struct:hapd_interfaces
+global_iface_path      src/ap/hostapd.h        /^      char *global_iface_path;$/;"    m       struct:hapd_interfaces
+group  src/ap/ap_config.h      /^      int group;$/;"  m       struct:hostapd_wpa_psk
+group  src/ap/wpa_auth_i.h     /^      struct wpa_group *group;$/;"    m       struct:wpa_authenticator        typeref:struct:wpa_authenticator::wpa_group
+group  src/ap/wpa_auth_i.h     /^      struct wpa_group *group;$/;"    m       struct:wpa_state_machine        typeref:struct:wpa_state_machine::wpa_group
+group  src/crypto/crypto_mbedtls.c     /^    mbedtls_ecp_group group;$/;"      m       struct:crypto_ec        file:
+group_cipher   src/common/wpa_common.h /^      int group_cipher;$/;"   m       struct:wpa_ie_data
+group_cipher   src/rsn_supp/wpa.h      /^    unsigned int group_cipher;$/;"    m       struct:wpa_sm
+gtk    src/ap/wpa_auth_ie.h    /^      const u8 *gtk;$/;"      m       struct:wpa_eapol_ie_parse
+gtk    src/common/wpa_common.h /^      u8 gtk[32];$/;" m       struct:wpa_gtk_data
+gtk    src/rsn_supp/wpa_ie.h   /^      const u8 *gtk;$/;"      m       struct:wpa_eapol_ie_parse
+gtk_len        src/ap/wpa_auth_ie.h    /^      size_t gtk_len;$/;"     m       struct:wpa_eapol_ie_parse
+gtk_len        src/common/wpa_common.h /^      int gtk_len;$/;"        m       struct:wpa_gtk_data
+gtk_len        src/rsn_supp/wpa_ie.h   /^      size_t gtk_len;$/;"     m       struct:wpa_eapol_ie_parse
+h_dest src/rsn_supp/wpa.h      /^    u8 h_dest[ETH_ALEN];$/;"  m       struct:l2_ethhdr
+h_proto        src/rsn_supp/wpa.h      /^    be16 h_proto;$/;" m       struct:l2_ethhdr
+h_source       src/rsn_supp/wpa.h      /^    u8 h_source[ETH_ALEN];$/;"        m       struct:l2_ethhdr
+hapd_interfaces        src/ap/hostapd.h        /^struct hapd_interfaces {$/;"  s
+has_GTK        src/ap/wpa_auth_i.h     /^      Boolean has_GTK;$/;"    m       struct:wpa_state_machine
+has_reauth_data        src/eap_peer/eap_i.h    /^      bool (*has_reauth_data)(struct eap_sm *sm, void *priv);$/;"     m       struct:eap_method
+hash   src/tls/tls.h   /^              const u8 *hash;$/;"     m       struct:tls_event_data::__anon35
+hash   src/tls/tlsv1_common.h  /^      tls_hash hash;$/;"      m       struct:tls_cipher_suite
+hash_alg       src/tls/tlsv1_record.h  /^      enum crypto_hash_alg hash_alg;$/;"      m       struct:tlsv1_record_layer       typeref:enum:tlsv1_record_layer::crypto_hash_alg
+hash_len       src/tls/tls.h   /^              size_t hash_len;$/;"    m       struct:tls_event_data::__anon35
+hash_nt_password_hash  src/crypto/ms_funcs.c   /^int hash_nt_password_hash(const u8 *password_hash, u8 *password_hash_hash)$/;"        f
+hash_size      src/tls/tlsv1_record.h  /^      size_t hash_size;$/;"   m       struct:tlsv1_record_layer
+hex2byte       src/utils/common.c      /^int hex2byte(const char *hex)$/;"     f
+hex2num        src/utils/common.c      /^static int hex2num(char c)$/;"        f       file:
+hexstr2bin     src/utils/common.c      /^int hexstr2bin(const char *hex, u8 *buf, size_t len)$/;"      f
+hmac_md5       src/crypto/md5.c        /^hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len,$/;"  f
+hmac_md5_non_fips_allow        include/crypto/md5.h    32;"    d
+hmac_md5_vector        src/crypto/md5.c        /^hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem,$/;"   f
+hmac_md5_vector_non_fips_allow include/crypto/md5.h    31;"    d
+hmac_sha1      src/crypto/sha1.c       /^hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len,$/;" f
+hmac_sha1_vector       src/crypto/sha1.c       /^hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem,$/;"  f
+hmac_sha256    src/crypto/sha256.c     /^hmac_sha256(const u8 *key, size_t key_len, const u8 *data,$/;"        f
+hmac_sha256_vector     src/crypto/sha256.c     /^hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,$/;"        f
+hnext  src/ap/sta_info.h       /^      struct sta_info *hnext; \/* next entry in hash table list *\/$/;"       m       struct:sta_info typeref:struct:sta_info::sta_info
+host_to_be16   include/utils/common.h  107;"   d
+host_to_be16   include/utils/common.h  66;"    d
+host_to_be16   include/utils/common.h  94;"    d
+host_to_be32   include/utils/common.h  110;"   d
+host_to_be32   include/utils/common.h  69;"    d
+host_to_be32   include/utils/common.h  98;"    d
+host_to_be64   include/utils/common.h  102;"   d
+host_to_be64   include/utils/common.h  114;"   d
+host_to_le16   include/utils/common.h  105;"   d
+host_to_le16   include/utils/common.h  64;"    d
+host_to_le16   include/utils/common.h  92;"    d
+host_to_le32   include/utils/common.h  96;"    d
+host_to_le64   include/utils/common.h  100;"   d
+host_to_le64   include/utils/common.h  112;"   d
+hostap_deinit  src/esp_supplicant/esp_hostap.c /^bool hostap_deinit(void *data)$/;"    f
+hostap_eapol_resend_process    src/ap/wpa_auth.c       /^void hostap_eapol_resend_process(void *timeout_ctx)$/;"       f
+hostap_init    src/esp_supplicant/esp_hostap.c /^void* hostap_init(void)$/;"   f
+hostap_security_policy src/ap/ap_config.h      /^typedef enum hostap_security_policy {$/;"     g
+hostapd_bss_config     src/ap/ap_config.h      /^struct hostapd_bss_config {$/;"       s
+hostapd_config src/ap/ap_config.h      /^struct hostapd_config {$/;"   s
+hostapd_config_defaults        src/ap/ap_config.c      /^struct hostapd_config * hostapd_config_defaults(void)$/;"     f
+hostapd_config_defaults_bss    src/ap/ap_config.c      /^void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)$/;"  f
+hostapd_data   src/ap/hostapd.h        /^struct hostapd_data {$/;"     s
+hostapd_derive_psk     src/ap/ap_config.c      /^static int hostapd_derive_psk(struct hostapd_ssid *ssid)$/;"  f       file:
+hostapd_frame_info     src/ap/hostapd.h        /^struct hostapd_frame_info {$/;"       s
+hostapd_get_psk        src/ap/ap_config.c      /^const u8 * hostapd_get_psk(const struct hostapd_bss_config *conf,$/;" f
+hostapd_hw_mode        src/common/defs.h       /^enum hostapd_hw_mode {$/;"    g
+hostapd_mac_comp       src/ap/ap_config.c      /^int hostapd_mac_comp(const void *a, const void *b)$/;"        f
+hostapd_mac_comp_empty src/ap/ap_config.c      /^int hostapd_mac_comp_empty(const void *a)$/;" f
+hostapd_maclist_found  src/ap/ap_config.c      /^int hostapd_maclist_found(struct mac_acl_entry *list, int num_entries,$/;"    f
+hostapd_probereq_cb    src/ap/hostapd.h        /^struct hostapd_probereq_cb {$/;"      s
+hostapd_rate_data      src/ap/hostapd.h        /^struct hostapd_rate_data {$/;"        s
+hostapd_rate_found     src/ap/ap_config.c      /^int hostapd_rate_found(int *list, int rate)$/;"       f
+hostapd_setup_wpa_psk  src/ap/ap_config.c      /^int hostapd_setup_wpa_psk(struct hostapd_bss_config *conf)$/;"        f
+hostapd_ssid   src/ap/ap_config.h      /^struct hostapd_ssid {$/;"     s
+hostapd_sta_wpa_psk_short      src/ap/ap_config.h      /^struct hostapd_sta_wpa_psk_short {$/;"        s
+hostapd_wep_key_cmp    src/ap/ap_config.c      /^int hostapd_wep_key_cmp(struct hostapd_wep_keys *a, struct hostapd_wep_keys *b)$/;"   f
+hostapd_wep_keys       src/ap/ap_config.h      /^struct hostapd_wep_keys {$/;" s
+hostapd_wpa_psk        src/ap/ap_config.h      /^struct hostapd_wpa_psk {$/;"  s
+hs20   src/ap/ap_config.h      /^      int hs20;$/;"   m       struct:hostapd_bss_config
+hs20_connection_capability     src/ap/ap_config.h      /^      u8 *hs20_connection_capability;$/;"     m       struct:hostapd_bss_config
+hs20_connection_capability_len src/ap/ap_config.h      /^      size_t hs20_connection_capability_len;$/;"      m       struct:hostapd_bss_config
+hs20_oper_friendly_name        src/ap/ap_config.h      /^      struct hostapd_lang_string *hs20_oper_friendly_name;$/;"        m       struct:hostapd_bss_config       typeref:struct:hostapd_bss_config::hostapd_lang_string
+hs20_oper_friendly_name_count  src/ap/ap_config.h      /^      unsigned int hs20_oper_friendly_name_count;$/;" m       struct:hostapd_bss_config
+hs20_operating_class   src/ap/ap_config.h      /^      u8 *hs20_operating_class;$/;"   m       struct:hostapd_bss_config
+hs20_operating_class_len       src/ap/ap_config.h      /^      u8 hs20_operating_class_len;$/;"        m       struct:hostapd_bss_config
+hs20_wan_metrics       src/ap/ap_config.h      /^      u8 *hs20_wan_metrics;$/;"       m       struct:hostapd_bss_config
+ht_capab       src/ap/ap_config.h      /^      u16 ht_capab;$/;"       m       struct:hostapd_config
+ht_capabilities_info   src/common/ieee802_11_defs.h    /^      le16 ht_capabilities_info;$/;"  m       struct:ieee80211_ht_capabilities
+ht_extended_capabilities       src/common/ieee802_11_defs.h    /^      le16 ht_extended_capabilities;$/;"      m       struct:ieee80211_ht_capabilities
+ht_op_mode_fixed       src/ap/ap_config.h      /^      int ht_op_mode_fixed;$/;"       m       struct:hostapd_config
+ht_param       src/common/ieee802_11_defs.h    /^      u8 ht_param;$/;"        m       struct:ieee80211_ht_operation
+htobe16        port/include/endian.h   102;"   d
+htobe16        port/include/endian.h   87;"    d
+htobe32        port/include/endian.h   103;"   d
+htobe32        port/include/endian.h   88;"    d
+htobe64        port/include/endian.h   104;"   d
+htobe64        port/include/endian.h   89;"    d
+htole16        port/include/endian.h   105;"   d
+htole16        port/include/endian.h   90;"    d
+htole32        port/include/endian.h   106;"   d
+htole32        port/include/endian.h   91;"    d
+htole64        port/include/endian.h   107;"   d
+htole64        port/include/endian.h   92;"    d
+hw_mode        src/ap/ap_config.h      /^      enum hostapd_hw_mode hw_mode; \/* HOSTAPD_MODE_IEEE80211A, .. *\/$/;"   m       struct:hostapd_config   typeref:enum:hostapd_config::hostapd_hw_mode
+ic_cipher      src/esp_supplicant/esp_wifi_driver.h    /^    u_int   ic_cipher;              \/* WIFI_CIPHER_* *\/$/;" m       struct:wifi_cipher
+ic_decap       src/esp_supplicant/esp_wifi_driver.h    /^    int     (*ic_decap)(struct wifi_key *, void *, int);$/;"  m       struct:wifi_cipher
+ic_encap       src/esp_supplicant/esp_wifi_driver.h    /^    int     (*ic_encap)(struct wifi_key *, void *, uint8_t);$/;"      m       struct:wifi_cipher
+ic_header      src/esp_supplicant/esp_wifi_driver.h    /^    u_int   ic_header;              \/* size of privacy header (bytes) *\/$/;"        m       struct:wifi_cipher
+ic_miclen      src/esp_supplicant/esp_wifi_driver.h    /^    u_int   ic_miclen;              \/* size of mic trailer (bytes) *\/$/;"   m       struct:wifi_cipher
+ic_trailer     src/esp_supplicant/esp_wifi_driver.h    /^    u_int   ic_trailer;             \/* size of privacy trailer (bytes) *\/$/;"       m       struct:wifi_cipher
+iconf  src/ap/hostapd.h        /^      struct hostapd_config *iconf;$/;"       m       struct:hostapd_data     typeref:struct:hostapd_data::hostapd_config
+id     include/crypto/dh_groups.h      /^      int id;$/;"     m       struct:dh_group
+id     src/ap/wpa_auth.h       /^      u8 id[FT_R0KH_ID_MAX_LEN];$/;"  m       struct:ft_remote_r0kh
+id     src/ap/wpa_auth.h       /^      u8 id[FT_R1KH_ID_LEN];$/;"      m       struct:ft_remote_r1kh
+id     src/common/wpa_common.h /^      u8 id;$/;"      m       struct:rsn_rdie
+id_len src/ap/wpa_auth.h       /^      size_t id_len;$/;"      m       struct:ft_remote_r0kh
+id_len src/eap_peer/eap_peap.c /^      size_t id_len;$/;"      m       struct:eap_peap_data    file:
+id_len src/eap_peer/eap_tls.c  /^      size_t id_len;$/;"      m       struct:eap_tls_data     file:
+id_len src/eap_peer/eap_ttls.c /^      size_t id_len;$/;"      m       struct:eap_ttls_data    file:
+ident  src/eap_peer/eap_ttls.c /^      u8 ident;$/;"   m       struct:eap_ttls_data    file:
+identifier     src/eap_peer/eap_defs.h /^      u8 identifier;$/;"      m       struct:eap_hdr
+identifier     src/tls/asn1.h  /^      u8 identifier, class, constructed;$/;"  m       struct:asn1_hdr
+identity       src/eap_peer/eap_config.h       /^      u8 *identity;$/;"       m       struct:eap_peer_config
+identity       src/wps/wps.h   /^    char identity[32];$/;"    m       struct:wps_sm
+identity_len   src/eap_peer/eap_config.h       /^      size_t identity_len;$/;"        m       struct:eap_peer_config
+identity_len   src/wps/wps.h   /^    u8 identity_len;$/;"      m       struct:wps_sm
+idx    src/ap/ap_config.h      /^      u8 idx;$/;"     m       struct:hostapd_wep_keys
+ie_data        src/esp_supplicant/esp_wifi_driver.h    /^    uint8_t    ie_data[];$/;" m       struct:wifi_appie
+ie_len src/esp_supplicant/esp_wifi_driver.h    /^    uint16_t   ie_len;$/;"    m       struct:wifi_appie
+ieee80211_hdr  src/common/ieee802_11_defs.h    /^struct ieee80211_hdr {$/;"    s
+ieee80211_ht_capabilities      src/common/ieee802_11_defs.h    /^struct ieee80211_ht_capabilities {$/;"        s
+ieee80211_ht_operation src/common/ieee802_11_defs.h    /^struct ieee80211_ht_operation {$/;"   s
+ieee80211_mgmt src/common/ieee802_11_defs.h    /^struct ieee80211_mgmt {$/;"   s
+ieee80211ac    src/ap/ap_config.h      /^      int ieee80211ac;$/;"    m       struct:hostapd_config
+ieee80211d     src/ap/ap_config.h      /^      int ieee80211d;$/;"     m       struct:hostapd_config
+ieee80211n     src/ap/ap_config.h      /^      int ieee80211n;$/;"     m       struct:hostapd_config
+ieee80211w     src/ap/ap_config.h      /^      enum mfp_options ieee80211w;$/;"        m       struct:hostapd_bss_config       typeref:enum:hostapd_bss_config::mfp_options
+ieee80211w     src/ap/wpa_auth.h       /^      enum mfp_options ieee80211w;$/;"        m       struct:wpa_auth_config  typeref:enum:wpa_auth_config::mfp_options
+ieee80211w_kde_add     src/ap/wpa_auth.c       /^static u8 * ieee80211w_kde_add(struct wpa_state_machine *sm, u8 *pos)$/;"     f       file:
+ieee80211w_kde_len     src/ap/wpa_auth.c       /^static int ieee80211w_kde_len(struct wpa_state_machine *sm)$/;"       f       file:
+ieee80211w_set_keys    src/rsn_supp/wpa.c      /^int   ieee80211w_set_keys(struct wpa_sm *sm,$/;"      f
+ieee802_1x     src/ap/ap_config.h      /^      int ieee802_1x; \/* use IEEE 802.1X *\/$/;"     m       struct:hostapd_bss_config
+ieee802_1x_eapol_key   src/common/eapol_common.h       /^struct ieee802_1x_eapol_key {$/;"     s
+ieee802_1x_hdr src/common/eapol_common.h       /^struct ieee802_1x_hdr {$/;"   s
+ieee802_1x_receive     src/ap/ieee802_1x.c     /^void ieee802_1x_receive(struct hostapd_data *hapd, const u8 *sa, const u8 *buf,$/;"   f
+iface  src/ap/hostapd.h        /^      struct hostapd_iface **iface;$/;"       m       struct:hapd_interfaces  typeref:struct:hapd_interfaces::hostapd_iface
+ignore src/eap_peer/eap_i.h    /^      Boolean ignore;$/;"     m       struct:eap_method_ret
+ignore_broadcast_ssid  src/ap/ap_config.h      /^      int ignore_broadcast_ssid;$/;"  m       struct:hostapd_bss_config
+ignore_sel_reg src/wps/wps.h   /^    bool ignore_sel_reg;$/;"  m       struct:wps_sm
+igtk   src/ap/wpa_auth_ie.h    /^      const u8 *igtk;$/;"     m       struct:wpa_eapol_ie_parse
+igtk   src/common/wpa_common.h /^      u8 igtk[WPA_IGTK_LEN];$/;"      m       struct:wpa_igtk_kde
+igtk   src/rsn_supp/wpa_ie.h   /^      const u8 *igtk;$/;"     m       struct:wpa_eapol_ie_parse
+igtk_len       src/ap/wpa_auth_ie.h    /^      size_t igtk_len;$/;"    m       struct:wpa_eapol_ie_parse
+igtk_len       src/rsn_supp/wpa_ie.h   /^      size_t igtk_len;$/;"    m       struct:wpa_eapol_ie_parse
+in     src/crypto/md5_i.h      /^      u8 in[64];$/;"  m       struct:MD5Context
+in_step_loop   src/ap/wpa_auth_i.h     /^      unsigned int in_step_loop:1;$/;"        m       struct:wpa_state_machine
+inactivity_interval    src/common/ieee802_11_defs.h    /^      le32 inactivity_interval;$/;"   m       struct:wmm_tspec_element
+inc_byte_array src/utils/common.c      /^void inc_byte_array(u8 *counter, size_t len)$/;"      f
+include_tls_length     src/eap_peer/eap_tls_common.h   /^      int include_tls_length;$/;"     m       struct:eap_ssl_data
+index  src/ap/wpa_auth_i.h     /^      u32 index;$/;"  m       struct:wpa_state_machine
+init   src/eap_peer/eap_i.h    /^      void * (*init)(struct eap_sm *sm);$/;"  m       struct:eap_method
+init   src/utils/ext_password_i.h      /^      void * (*init)(const char *params);$/;" m       struct:ext_password_backend
+init_for_reauth        src/eap_peer/eap_i.h    /^      void * (*init_for_reauth)(struct eap_sm *sm, void *priv);$/;"   m       struct:eap_method
+init_phase2    src/eap_peer/eap_i.h    /^      int init_phase2;$/;"    m       struct:eap_sm
+initiator      src/ap/wpa_auth_i.h     /^      u8 initiator[ETH_ALEN];$/;"     m       struct:wpa_stsl_negotiation
+inline include/utils/common.h  228;"   d
+inline include/utils/common.h  230;"   d
+install_gtk    src/rsn_supp/wpa.h      /^    struct install_key install_gtk;$/;"       m       struct:wpa_sm   typeref:struct:wpa_sm::install_key
+install_key    src/rsn_supp/wpa.h      /^struct install_key {$/;"      s
+install_ppkey  src/rsn_supp/wpa.h      /^    void (*install_ppkey) (enum wpa_alg alg, u8 *addr, int key_idx, int set_tx,$/;"   m       struct:wpa_sm
+install_ptk    src/rsn_supp/wpa.h      /^    struct install_key install_ptk;$/;"       m       struct:wpa_sm   typeref:struct:wpa_sm::install_key
+int_reg        src/wps/wps_i.h /^      int int_reg;$/;"        m       struct:wps_data
+interface_added        src/ap/hostapd.h        /^      int interface_added; \/* virtual interface added for this BSS *\/$/;"   m       struct:hostapd_data
+ip     src/tls/x509v3.h        /^      u8 *ip; \/* iPAddress *\/$/;"   m       struct:x509_name
+ip_len src/tls/x509v3.h        /^      size_t ip_len; \/* IPv4: 4, IPv6: 16 *\/$/;"    m       struct:x509_name
+ipmk   src/eap_peer/eap_peap.c /^      u8 ipmk[40];$/;"        m       struct:eap_peap_data    file:
+iqmp   src/tls/rsa.c   /^      struct bignum *iqmp; \/* 1 \/ q mod p; CRT coefficient *\/$/;"  m       struct:crypto_rsa_key   typeref:struct:crypto_rsa_key::bignum   file:
+isKeyAvailable src/eap_peer/eap_i.h    /^      bool (*isKeyAvailable)(struct eap_sm *sm, void *priv);$/;"      m       struct:eap_method
+is_local       src/tls/tls.h   /^              int is_local;$/;"       m       struct:tls_event_data::__anon36
+is_nil_uuid    src/utils/uuid.c        /^int is_nil_uuid(const u8 *uuid)$/;"   f
+is_selected_pin_registrar      src/wps/wps.c   /^static int is_selected_pin_registrar(struct wps_parse_attr *attr, u8 *bssid)$/;"      f       file:
+is_wnmsleep    src/ap/wpa_auth_i.h     /^      unsigned int is_wnmsleep:1;$/;" m       struct:wpa_state_machine
+is_wps_scan    src/wps/wps.h   /^    bool is_wps_scan;$/;"     m       struct:wps_sm
+is_zero_ether_addr     include/utils/common.h  /^static inline int is_zero_ether_addr(const u8 *a)$/;" f
+issuer src/tls/x509v3.h        /^      struct x509_name issuer;$/;"    m       struct:x509_certificate typeref:struct:x509_certificate::x509_name
+iter_count     src/tls/pkcs5.c /^      unsigned int iter_count;$/;"    m       struct:pkcs5_params     file:
+iv_size        src/tls/tlsv1_record.h  /^      size_t iv_size; \/* also block_size *\/$/;"     m       struct:tlsv1_record_layer
+kck    src/common/wpa_common.h /^      u8 kck[16]; \/* EAPOL-Key Key Confirmation Key (KCK) *\/$/;"    m       struct:wpa_ptk
+kek    src/common/wpa_common.h /^      u8 kek[16]; \/* EAPOL-Key Key Encryption Key (KEK) *\/$/;"      m       struct:wpa_ptk
+key    src/ap/ap_config.h      /^      u8 *key[NUM_WEP_KEYS];$/;"      m       struct:hostapd_wep_keys
+key    src/ap/wpa_auth.h       /^      u8 key[16];$/;" m       struct:ft_remote_r0kh
+key    src/ap/wpa_auth.h       /^      u8 key[16];$/;" m       struct:ft_remote_r1kh
+key    src/crypto/crypto_internal-cipher.c     /^                      struct des3_key_s key;$/;"      m       struct:crypto_cipher::__anon10::__anon13        typeref:struct:crypto_cipher::__anon10::__anon13::des3_key_s    file:
+key    src/crypto/crypto_internal-cipher.c     /^                      u8 key[16];$/;" m       struct:crypto_cipher::__anon10::__anon11        file:
+key    src/crypto/crypto_internal.c    /^      u8 key[64];$/;" m       struct:crypto_hash      file:
+key    src/fast_crypto/fast_crypto_internal-cipher.c   /^            struct des3_key_s key;$/;"        m       struct:fast_crypto_cipher::__anon56::__anon59   typeref:struct:fast_crypto_cipher::__anon56::__anon59::des3_key_s       file:
+key    src/fast_crypto/fast_crypto_internal-cipher.c   /^            uint8_t key[16];$/;"      m       struct:fast_crypto_cipher::__anon56::__anon57   file:
+key    src/fast_crypto/fast_crypto_internal.c  /^      u8 key[64];$/;" m       struct:fast_crypto_hash file:
+key    src/rsn_supp/wpa.h      /^    u8 key[32];$/;"   m       struct:install_key
+key    src/tls/tlsv1_cred.h    /^      struct crypto_private_key *key;$/;"     m       struct:tlsv1_credentials        typeref:struct:tlsv1_credentials::crypto_private_key
+key    src/wps/wps.h   /^      u8 key[64];$/;" m       struct:wps_credential
+key    src/wps/wps.h   /^    char key[64];$/;" m       struct:wps_sm
+key_data       src/eap_peer/eap_peap.c /^      u8 *key_data;$/;"       m       struct:eap_peap_data    file:
+key_data       src/eap_peer/eap_tls.c  /^      u8 *key_data;$/;"       m       struct:eap_tls_data     file:
+key_data       src/eap_peer/eap_ttls.c /^      u8 *key_data;$/;"       m       struct:eap_ttls_data    file:
+key_data_length        src/common/wpa_common.h /^      u8 key_data_length[2]; \/* big endian *\/$/;"   m       struct:wpa_eapol_key
+key_entry_valid        src/rsn_supp/wpa.h      /^    int  key_entry_valid;   \/\/present current avaliable entry for bssid, for pairkey:0,5,10,15,20, gtk: pairkey_no+i (i:1~4)$/;"    m       struct:wpa_sm
+key_exchange   src/tls/tlsv1_common.h  /^      tls_key_exchange key_exchange;$/;"      m       struct:tls_cipher_suite
+key_id src/common/wpa_common.h /^      u8 key_id[8]; \/* Reserved in IEEE 802.11i\/RSN *\/$/;" m       struct:wpa_eapol_key
+key_id src/tls/tls.h   /^      const char *key_id;$/;" m       struct:tls_connection_params
+key_idx        src/rsn_supp/wpa.h      /^    int key_idx;$/;"  m       struct:install_key
+key_idx        src/wps/wps.h   /^      u8 key_idx;$/;" m       struct:wps_credential
+key_index      src/common/eapol_common.h       /^      u8 key_index; \/* key flag in the most significant bit:$/;"     m       struct:ieee802_1x_eapol_key
+key_info       src/common/wpa_common.h /^      u8 key_info[2]; \/* big endian *\/$/;"  m       struct:wpa_eapol_key
+key_info       src/rsn_supp/wpa.h      /^    u16 key_info;     \/\/used for txcallback param    $/;"   m       struct:wpa_sm
+key_install    src/rsn_supp/wpa.h      /^    bool key_install;$/;"     m       struct:wpa_sm
+key_iv src/common/eapol_common.h       /^      u8 key_iv[IEEE8021X_KEY_IV_LEN]; \/* cryptographically random number *\/$/;"    m       struct:ieee802_1x_eapol_key
+key_iv src/common/wpa_common.h /^      u8 key_iv[16];$/;"      m       struct:wpa_eapol_key
+key_len        src/crypto/crypto_internal.c    /^      size_t key_len;$/;"     m       struct:crypto_hash      file:
+key_len        src/fast_crypto/fast_crypto_internal.c  /^      size_t key_len;$/;"     m       struct:fast_crypto_hash file:
+key_len        src/wps/wps.h   /^      size_t key_len;$/;"     m       struct:wps_credential
+key_len        src/wps/wps.h   /^    u8 key_len;$/;"   m       struct:wps_sm
+key_length     src/common/eapol_common.h       /^      u8 key_length[2];$/;"   m       struct:ieee802_1x_eapol_key
+key_length     src/common/wpa_common.h /^      u8 key_length[2]; \/* big endian *\/$/;"        m       struct:wpa_eapol_key
+key_lifetime   src/rsn_supp/wpa_ie.h   /^      const u8 *key_lifetime;$/;"     m       struct:wpa_eapol_ie_parse
+key_material   src/tls/tlsv1_common.h  /^      size_t key_material;$/;"        m       struct:tls_cipher_data
+key_material_len       src/tls/tlsv1_record.h  /^      size_t key_material_len;$/;"    m       struct:tlsv1_record_layer
+key_mgmt       src/common/wpa_common.h /^      int key_mgmt;$/;"       m       struct:wpa_ie_data
+key_mgmt       src/rsn_supp/wpa.h      /^    unsigned int key_mgmt;$/;"        m       struct:wpa_sm
+key_mic        src/common/wpa_common.h /^      u8 key_mic[16];$/;"     m       struct:wpa_eapol_key
+key_nonce      src/common/wpa_common.h /^      u8 key_nonce[WPA_NONCE_LEN];$/;"        m       struct:wpa_eapol_key
+key_prov_auto  src/wps/wps_attr_parse.h        /^      const u8 *key_prov_auto; \/* 1 octet (Bool) *\/$/;"     m       struct:wps_parse_attr
+key_replay     src/ap/wpa_auth_i.h     /^      } key_replay[RSNA_MAX_EAPOL_RETRIES],$/;"       m       struct:wpa_state_machine        typeref:struct:wpa_state_machine::wpa_key_replay_counter
+key_rsc        src/common/wpa_common.h /^      u8 key_rsc[WPA_KEY_RSC_LEN];$/;"        m       struct:wpa_eapol_key
+key_rsc_len    src/common/wpa_common.h /^      int tx, key_rsc_len, keyidx;$/;"        m       struct:wpa_gtk_data
+key_signature  src/common/eapol_common.h       /^      u8 key_signature[IEEE8021X_KEY_SIGN_LEN];$/;"   m       struct:ieee802_1x_eapol_key
+key_usage      src/tls/x509v3.h        /^      unsigned long key_usage;$/;"    m       struct:x509_certificate
+key_wrap_auth  src/wps/wps_attr_parse.h        /^      const u8 *key_wrap_auth; \/* WPS_KWA_LEN (8) octets *\/$/;"     m       struct:wps_parse_attr
+key_wrap_extra src/ap/wpa_auth.h       /^      u8 key_wrap_extra[8];$/;"       m       struct:ft_r0kh_r1kh_pull_frame
+key_wrap_extra src/ap/wpa_auth.h       /^      u8 key_wrap_extra[8];$/;"       m       struct:ft_r0kh_r1kh_push_frame
+key_wrap_extra src/ap/wpa_auth.h       /^      u8 key_wrap_extra[8];$/;"       m       struct:ft_r0kh_r1kh_resp_frame
+keycount       src/ap/wpa_auth_i.h     /^      int keycount;$/;"       m       struct:wpa_state_machine
+keyid  src/common/wpa_common.h /^      u8 keyid[2];$/;"        m       struct:wpa_igtk_kde
+keyidx src/common/wpa_common.h /^      int tx, key_rsc_len, keyidx;$/;"        m       struct:wpa_gtk_data
+keylen src/crypto/crypto_internal-cipher.c     /^                      size_t keylen;$/;"      m       struct:crypto_cipher::__anon10::__anon11        file:
+keylen src/fast_crypto/fast_crypto_internal-cipher.c   /^            size_t keylen;$/;"        m       struct:fast_crypto_cipher::__anon56::__anon57   file:
+keys_cleared   src/rsn_supp/wpa.h      /^    int keys_cleared;$/;"     m       struct:install_key
+keys_set       src/ap/ap_config.h      /^      int keys_set;$/;"       m       struct:hostapd_wep_keys
+keywrapkey     src/wps/wps_i.h /^      u8 keywrapkey[WPS_KEYWRAPKEY_LEN];$/;"  m       struct:wps_data
+l2_ethhdr      src/rsn_supp/wpa.h      /^struct l2_ethhdr {$/;"        s
+lastRespData   src/eap_peer/eap_i.h    /^      struct wpabuf *lastRespData;$/;"        m       struct:eap_sm   typeref:struct:eap_sm::wpabuf
+last_bss       src/ap/ap_config.h      /^      struct hostapd_bss_config *bss, *last_bss;$/;"  m       struct:hostapd_config   typeref:struct:hostapd_config::
+last_msg       src/wps/wps_i.h /^      struct wpabuf *last_msg;$/;"    m       struct:wps_data typeref:struct:wps_data::wpabuf
+last_rx_eapol_key      src/ap/wpa_auth_i.h     /^      u8 *last_rx_eapol_key; \/* starting from IEEE 802.1X header *\/$/;"     m       struct:wpa_state_machine
+last_rx_eapol_key_len  src/ap/wpa_auth_i.h     /^      size_t last_rx_eapol_key_len;$/;"       m       struct:wpa_state_machine
+le16   include/utils/common.h  /^typedef u16 __bitwise le16;$/;"       t
+le16dec        port/include/endian.h   /^le16dec(const void *pp)$/;"   f
+le16enc        port/include/endian.h   /^le16enc(void *pp, uint16_t u)$/;"     f
+le16toh        port/include/endian.h   112;"   d
+le16toh        port/include/endian.h   97;"    d
+le32   include/utils/common.h  /^typedef u32 __bitwise le32;$/;"       t
+le32dec        port/include/endian.h   /^le32dec(const void *pp)$/;"   f
+le32enc        port/include/endian.h   /^le32enc(void *pp, uint32_t u)$/;"     f
+le32toh        port/include/endian.h   113;"   d
+le32toh        port/include/endian.h   98;"    d
+le64   include/utils/common.h  /^typedef u64 __bitwise le64;$/;"       t
+le64dec        port/include/endian.h   /^le64dec(const void *pp)$/;"   f
+le64enc        port/include/endian.h   /^le64enc(void *pp, uint64_t u)$/;"     f
+le64toh        port/include/endian.h   114;"   d
+le64toh        port/include/endian.h   99;"    d
+le_to_host16   include/utils/common.h  104;"   d
+le_to_host16   include/utils/common.h  63;"    d
+le_to_host16   include/utils/common.h  91;"    d
+le_to_host32   include/utils/common.h  108;"   d
+le_to_host32   include/utils/common.h  67;"    d
+le_to_host32   include/utils/common.h  95;"    d
+le_to_host64   include/utils/common.h  111;"   d
+le_to_host64   include/utils/common.h  99;"    d
+len    src/ap/ap_config.h      /^      size_t len[NUM_WEP_KEYS];$/;"   m       struct:hostapd_wep_keys
+len    src/common/wpa_common.h /^      u8 len;$/;"     m       struct:rsn_ie_hdr
+len    src/common/wpa_common.h /^      u8 len;$/;"     m       struct:wpa_ie_hdr
+len    src/eap_peer/eap_config.h       /^      size_t len;$/;" m       struct:wpa_config_blob
+len    src/esp_supplicant/esp_wifi_driver.h    /^    int len;$/;"      m       struct:wifi_ssid
+len    src/esp_supplicant/esp_wpa_enterprise.c /^    int len;$/;"      m       struct:wpa2_rx_param    file:
+len    src/esp_supplicant/esp_wps.c    /^    int len;$/;"      m       struct:wps_rx_param     file:
+len    src/tls/asn1.h  /^      size_t len;$/;" m       struct:asn1_oid
+length src/common/eapol_common.h       /^      be16 length;$/;"        m       struct:ieee802_1x_hdr
+length src/common/ieee802_11_defs.h    /^                                      u8 length;$/;"  m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon79
+length src/common/ieee802_11_defs.h    /^      u8 length; \/* 6 + 55 = 61 *\/$/;"      m       struct:wmm_tspec_element
+length src/crypto/sha256-internal.c    /^      u64 length;$/;" m       struct:sha256_state     file:
+length src/eap_peer/eap_defs.h /^      be16 length; \/* including code and identifier; network byte order *\/$/;"      m       struct:eap_hdr
+length src/eap_peer/eap_tlv_common.h   /^      be16 length;$/;"        m       struct:eap_tlv_crypto_binding_tlv
+length src/eap_peer/eap_tlv_common.h   /^      be16 length;$/;"        m       struct:eap_tlv_hdr
+length src/eap_peer/eap_tlv_common.h   /^      be16 length;$/;"        m       struct:eap_tlv_intermediate_result_tlv
+length src/eap_peer/eap_tlv_common.h   /^      be16 length;$/;"        m       struct:eap_tlv_nak_tlv
+length src/eap_peer/eap_tlv_common.h   /^      be16 length;$/;"        m       struct:eap_tlv_pac_ack_tlv
+length src/eap_peer/eap_tlv_common.h   /^      be16 length;$/;"        m       struct:eap_tlv_pac_type_tlv
+length src/eap_peer/eap_tlv_common.h   /^      be16 length;$/;"        m       struct:eap_tlv_request_action_tlv
+length src/eap_peer/eap_tlv_common.h   /^      be16 length;$/;"        m       struct:eap_tlv_result_tlv
+length src/tls/asn1.h  /^      unsigned int tag, length;$/;"   m       struct:asn1_hdr
+lifetime       src/ap/wpa_auth_ie.h    /^      const u8 *lifetime;$/;" m       struct:wpa_eapol_ie_parse
+lifetime       src/rsn_supp/wpa_ie.h   /^      const u8 *lifetime;$/;" m       struct:wpa_eapol_ie_parse
+lifetime_len   src/ap/wpa_auth_ie.h    /^      size_t lifetime_len;$/;"        m       struct:wpa_eapol_ie_parse
+lifetime_len   src/rsn_supp/wpa_ie.h   /^      size_t lifetime_len;$/;"        m       struct:wpa_eapol_ie_parse
+list   src/wps/wps_registrar.c /^      struct dl_list list;$/;"        m       struct:wps_nfc_pw_token typeref:struct:wps_nfc_pw_token::dl_list        file:
+list   src/wps/wps_registrar.c /^      struct dl_list list;$/;"        m       struct:wps_uuid_pin     typeref:struct:wps_uuid_pin::dl_list    file:
+listen_interval        src/ap/sta_info.h       /^      u16 listen_interval; \/* or beacon_int for APs *\/$/;"  m       struct:sta_info
+listen_interval        src/common/ieee802_11_defs.h    /^                      le16 listen_interval;$/;"       m       struct:ieee80211_mgmt::__anon66::__anon69
+listen_interval        src/common/ieee802_11_defs.h    /^                      le16 listen_interval;$/;"       m       struct:ieee80211_mgmt::__anon66::__anon71
+logger src/ap/wpa_auth.h       /^      void (*logger)(void *ctx, const u8 *addr, logger_level level,$/;"       m       struct:wpa_auth_callbacks
+logger_level   src/ap/wpa_auth.h       /^} logger_level;$/;"   t       typeref:enum:__anon20
+m      src/eap_peer/eap_i.h    /^      const struct eap_method *m;$/;" m       struct:eap_sm   typeref:struct:eap_sm::eap_method
+m1_received    src/wps/wps.h   /^              int m1_received;$/;"    m       struct:wps_event_data::wps_event_er_enrollee
+m2d    src/wps/wps.h   /^      } m2d;$/;"      m       union:wps_event_data    typeref:struct:wps_event_data::wps_event_m2d
+mac_acl_entry  src/ap/ap_config.h      /^struct mac_acl_entry {$/;"    s
+mac_addr       src/ap/wpa_auth_ie.h    /^      const u8 *mac_addr;$/;" m       struct:wpa_eapol_ie_parse
+mac_addr       src/rsn_supp/wpa_ie.h   /^      const u8 *mac_addr;$/;" m       struct:wpa_eapol_ie_parse
+mac_addr       src/wps/wps.h   /^              const u8 *mac_addr;$/;" m       struct:wps_event_data::wps_event_er_ap
+mac_addr       src/wps/wps.h   /^              const u8 *mac_addr;$/;" m       struct:wps_event_data::wps_event_er_enrollee
+mac_addr       src/wps/wps.h   /^      u8 mac_addr[ETH_ALEN];$/;"      m       struct:wps_credential
+mac_addr       src/wps/wps.h   /^      u8 mac_addr[ETH_ALEN];$/;"      m       struct:wps_device_data
+mac_addr       src/wps/wps_attr_parse.h        /^      const u8 *mac_addr; \/* ETH_ALEN (6) octets *\/$/;"     m       struct:wps_parse_attr
+mac_addr_e     src/wps/wps_i.h /^      u8 mac_addr_e[ETH_ALEN];$/;"    m       struct:wps_data
+mac_addr_len   src/ap/wpa_auth_ie.h    /^      size_t mac_addr_len;$/;"        m       struct:wpa_eapol_ie_parse
+mac_addr_len   src/rsn_supp/wpa_ie.h   /^      size_t mac_addr_len;$/;"        m       struct:wpa_eapol_ie_parse
+macaddr        src/ap/ap_config.h      /^typedef u8 macaddr[ETH_ALEN];$/;"     t
+macaddr_acl    src/ap/ap_config.h      /^      } macaddr_acl;$/;"      m       struct:hostapd_bss_config       typeref:enum:hostapd_bss_config::__anon17
+magic  src/utils/wpabuf.c      /^      unsigned int magic;$/;" m       struct:wpabuf_trace     file:
+manufacturer   include/esp_supplicant/esp_wps.h        /^    char manufacturer[WPS_MAX_MANUFACTURER_LEN]; \/*!< Manufacturer, null-terminated string. The default manufcturer is used if the string is empty *\/$/;"   m       struct:__anon89
+manufacturer   src/ap/ap_config.h      /^      char *manufacturer;$/;" m       struct:hostapd_bss_config
+manufacturer   src/wps/wps.h   /^              const char *manufacturer;$/;"   m       struct:wps_event_data::wps_event_er_ap
+manufacturer   src/wps/wps.h   /^              const char *manufacturer;$/;"   m       struct:wps_event_data::wps_event_er_enrollee
+manufacturer   src/wps/wps.h   /^              const u8 *manufacturer;$/;"     m       struct:wps_event_data::wps_event_m2d
+manufacturer   src/wps/wps.h   /^      char *manufacturer;$/;" m       struct:wps_device_data
+manufacturer   src/wps/wps_attr_parse.h        /^      const u8 *manufacturer;$/;"     m       struct:wps_parse_attr
+manufacturer_len       src/wps/wps.h   /^              size_t manufacturer_len;$/;"    m       struct:wps_event_data::wps_event_m2d
+manufacturer_len       src/wps/wps_attr_parse.h        /^      size_t manufacturer_len;$/;"    m       struct:wps_parse_attr
+manufacturer_url       src/ap/ap_config.h      /^      char *manufacturer_url;$/;"     m       struct:hostapd_bss_config
+manufacturer_url       src/wps/wps.h   /^              const char *manufacturer_url;$/;"       m       struct:wps_event_data::wps_event_er_ap
+manufacturer_url       src/wps/wps.h   /^      char *manufacturer_url;$/;"     m       struct:wps_context
+master_key     src/eap_peer/eap_mschapv2.c     /^      u8 master_key[MSCHAPV2_MASTER_KEY_LEN];$/;"     m       struct:eap_mschapv2_data        file:
+master_key     src/eap_peer/eap_ttls.c /^      u8 master_key[MSCHAPV2_MASTER_KEY_LEN]; \/* MSCHAPv2 master key *\/$/;" m       struct:eap_ttls_data    file:
+master_key     src/tls/tls.h   /^      const u8 *master_key; \/* TLS master secret *\/$/;"     m       struct:tls_keys
+master_key_len src/tls/tls.h   /^      size_t master_key_len;$/;"      m       struct:tls_keys
+master_key_valid       src/eap_peer/eap_mschapv2.c     /^      int master_key_valid;$/;"       m       struct:eap_mschapv2_data        file:
+master_secret  src/tls/tlsv1_client_i.h        /^      u8 master_secret[TLS_MASTER_SECRET_LEN];$/;"    m       struct:tlsv1_client
+master_secret  src/tls/tlsv1_server_i.h        /^      u8 master_secret[TLS_MASTER_SECRET_LEN];$/;"    m       struct:tlsv1_server
+max_listen_interval    src/ap/ap_config.h      /^      u16 max_listen_interval;$/;"    m       struct:hostapd_bss_config
+max_num_sta    src/ap/ap_config.h      /^      int max_num_sta; \/* maximum number of STAs in station table *\/$/;"    m       struct:hostapd_bss_config
+maximum_burst_size     src/common/ieee802_11_defs.h    /^      le32 maximum_burst_size;$/;"    m       struct:wmm_tspec_element
+maximum_msdu_size      src/common/ieee802_11_defs.h    /^      le16 maximum_msdu_size;$/;"     m       struct:wmm_tspec_element
+maximum_service_interval       src/common/ieee802_11_defs.h    /^      le32 maximum_service_interval;$/;"      m       struct:wmm_tspec_element
+md4_vector     src/crypto/md4-internal.c       /^int md4_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)$/;"     f
+md5    src/crypto/crypto_internal.c    /^              struct MD5Context md5;$/;"      m       union:crypto_hash::__anon9      typeref:struct:crypto_hash::__anon9::MD5Context file:
+md5    src/fast_crypto/fast_crypto_internal.c  /^              struct MD5Context md5;$/;"      m       union:fast_crypto_hash::__anon61        typeref:struct:fast_crypto_hash::__anon61::MD5Context   file:
+md5_cert       src/tls/tlsv1_common.h  /^      struct crypto_hash *md5_cert;$/;"       m       struct:tls_verify_hash  typeref:struct:tls_verify_hash::crypto_hash
+md5_client     src/tls/tlsv1_common.h  /^      struct crypto_hash *md5_client;$/;"     m       struct:tls_verify_hash  typeref:struct:tls_verify_hash::crypto_hash
+md5_server     src/tls/tlsv1_common.h  /^      struct crypto_hash *md5_server;$/;"     m       struct:tls_verify_hash  typeref:struct:tls_verify_hash::crypto_hash
+md5_vector     src/crypto/md5-internal.c       /^md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)$/;" f
+md5_vector_non_fips_allow      include/crypto/crypto.h 64;"    d
+mdie   src/ap/wpa_auth_ie.h    /^      const u8 *mdie;$/;"     m       struct:wpa_eapol_ie_parse
+mdie   src/rsn_supp/wpa_ie.h   /^      const u8 *mdie;$/;"     m       struct:wpa_eapol_ie_parse
+mdie_len       src/ap/wpa_auth_ie.h    /^      size_t mdie_len;$/;"    m       struct:wpa_eapol_ie_parse
+mdie_len       src/rsn_supp/wpa_ie.h   /^      size_t mdie_len;$/;"    m       struct:wpa_eapol_ie_parse
+mean_data_rate src/common/ieee802_11_defs.h    /^      le32 mean_data_rate;$/;"        m       struct:wmm_tspec_element
+medium_time    src/common/ieee802_11_defs.h    /^      le16 medium_time;$/;"   m       struct:wmm_tspec_element
+method src/eap_peer/eap.h      /^      EapType method;$/;"     m       struct:eap_method_type
+method src/eap_peer/eap_i.h    /^      EapType method; $/;"    m       struct:eap_method
+methodState    src/eap_peer/eap_i.h    /^      EapMethodState methodState;$/;" m       struct:eap_method_ret
+mgmt_frame_prot        src/ap/wpa_auth_i.h     /^      unsigned int mgmt_frame_prot:1;$/;"     m       struct:wpa_state_machine
+mgmt_group_cipher      src/common/wpa_common.h /^      int mgmt_group_cipher;$/;"      m       struct:wpa_ie_data
+mgmt_group_cipher      src/rsn_supp/wpa.h      /^    unsigned int mgmt_group_cipher;$/;"       m       struct:wpa_sm
+mic    src/common/wpa_common.h /^      u8 mic[16];$/;" m       struct:rsn_ftie
+mic_control    src/common/wpa_common.h /^      u8 mic_control[2];$/;"  m       struct:rsn_ftie
+mic_errors_seen        src/rsn_supp/wpa.h      /^    int mic_errors_seen; \/* Michael MIC errors with the current PTK *\/$/;"  m       struct:install_key
+mic_failure_report     src/ap/wpa_auth.h       /^      int (*mic_failure_report)(void *ctx, const u8 *addr);$/;"       m       struct:wpa_auth_callbacks
+minimum_data_rate      src/common/ieee802_11_defs.h    /^      le32 minimum_data_rate;$/;"     m       struct:wmm_tspec_element
+minimum_phy_rate       src/common/ieee802_11_defs.h    /^      le32 minimum_phy_rate;$/;"      m       struct:wmm_tspec_element
+minimum_service_interval       src/common/ieee802_11_defs.h    /^      le32 minimum_service_interval;$/;"      m       struct:wmm_tspec_element
+mobility_domain        src/ap/ap_config.h      /^      u8 mobility_domain[MOBILITY_DOMAIN_ID_LEN];$/;" m       struct:hostapd_bss_config
+mobility_domain        src/ap/wpa_auth.h       /^      u8 mobility_domain[MOBILITY_DOMAIN_ID_LEN];$/;" m       struct:wpa_auth_config
+mobility_domain        src/common/wpa_common.h /^      u8 mobility_domain[MOBILITY_DOMAIN_ID_LEN];$/;" m       struct:rsn_mdie
+model_description      src/ap/ap_config.h      /^      char *model_description;$/;"    m       struct:hostapd_bss_config
+model_description      src/wps/wps.h   /^              const char *model_description;$/;"      m       struct:wps_event_data::wps_event_er_ap
+model_description      src/wps/wps.h   /^      char *model_description;$/;"    m       struct:wps_context
+model_name     include/esp_supplicant/esp_wps.h        /^    char model_name[WPS_MAX_MODEL_NAME_LEN];     \/*!< Model name, null-terminated string. The default model name is used if the string is empty *\/$/;"      m       struct:__anon89
+model_name     src/ap/ap_config.h      /^      char *model_name;$/;"   m       struct:hostapd_bss_config
+model_name     src/wps/wps.h   /^              const char *model_name;$/;"     m       struct:wps_event_data::wps_event_er_ap
+model_name     src/wps/wps.h   /^              const char *model_name;$/;"     m       struct:wps_event_data::wps_event_er_enrollee
+model_name     src/wps/wps.h   /^              const u8 *model_name;$/;"       m       struct:wps_event_data::wps_event_m2d
+model_name     src/wps/wps.h   /^      char *model_name;$/;"   m       struct:wps_device_data
+model_name     src/wps/wps_attr_parse.h        /^      const u8 *model_name;$/;"       m       struct:wps_parse_attr
+model_name_len src/wps/wps.h   /^              size_t model_name_len;$/;"      m       struct:wps_event_data::wps_event_m2d
+model_name_len src/wps/wps_attr_parse.h        /^      size_t model_name_len;$/;"      m       struct:wps_parse_attr
+model_number   include/esp_supplicant/esp_wps.h        /^    char model_number[WPS_MAX_MODEL_NUMBER_LEN]; \/*!< Model number, null-terminated string. The default model number is used if the string is empty *\/$/;"  m       struct:__anon89
+model_number   src/ap/ap_config.h      /^      char *model_number;$/;" m       struct:hostapd_bss_config
+model_number   src/wps/wps.h   /^              const char *model_number;$/;"   m       struct:wps_event_data::wps_event_er_ap
+model_number   src/wps/wps.h   /^              const char *model_number;$/;"   m       struct:wps_event_data::wps_event_er_enrollee
+model_number   src/wps/wps.h   /^              const u8 *model_number;$/;"     m       struct:wps_event_data::wps_event_m2d
+model_number   src/wps/wps.h   /^      char *model_number;$/;" m       struct:wps_device_data
+model_number   src/wps/wps_attr_parse.h        /^      const u8 *model_number;$/;"     m       struct:wps_parse_attr
+model_number_len       src/wps/wps.h   /^              size_t model_number_len;$/;"    m       struct:wps_event_data::wps_event_m2d
+model_number_len       src/wps/wps_attr_parse.h        /^      size_t model_number_len;$/;"    m       struct:wps_parse_attr
+model_url      src/ap/ap_config.h      /^      char *model_url;$/;"    m       struct:hostapd_bss_config
+model_url      src/wps/wps.h   /^              const char *model_url;$/;"      m       struct:wps_event_data::wps_event_er_ap
+model_url      src/wps/wps.h   /^      char *model_url;$/;"    m       struct:wps_context
+mp_2expt       src/crypto/libtommath.h /^mp_2expt (mp_int * a, int b)$/;"      f
+mp_2expt       src/tls/libtommath.h    /^mp_2expt (mp_int * a, int b)$/;"      f
+mp_abs src/crypto/libtommath.h /^mp_abs (mp_int * a, mp_int * b)$/;"   f
+mp_abs src/tls/libtommath.h    /^mp_abs (mp_int * a, mp_int * b)$/;"   f
+mp_add src/crypto/libtommath.h /^mp_add (mp_int * a, mp_int * b, mp_int * c)$/;"       f
+mp_add src/tls/libtommath.h    /^mp_add (mp_int * a, mp_int * b, mp_int * c)$/;"       f
+mp_clamp       src/crypto/libtommath.h /^mp_clamp (mp_int * a)$/;"     f
+mp_clamp       src/tls/libtommath.h    /^mp_clamp (mp_int * a)$/;"     f
+mp_clear       src/crypto/libtommath.h /^mp_clear (mp_int * a)$/;"     f
+mp_clear       src/tls/libtommath.h    /^mp_clear (mp_int * a)$/;"     f
+mp_clear_multi src/crypto/libtommath.h /^mp_clear_multi(mp_int *mp, ...) $/;"  f
+mp_clear_multi src/tls/libtommath.h    /^mp_clear_multi(mp_int *mp, ...) $/;"  f
+mp_cmp src/crypto/libtommath.h /^mp_cmp (mp_int * a, mp_int * b)$/;"   f
+mp_cmp src/tls/libtommath.h    /^mp_cmp (mp_int * a, mp_int * b)$/;"   f
+mp_cmp_d       src/crypto/libtommath.h /^mp_cmp_d(mp_int * a, mp_digit b)$/;"  f
+mp_cmp_d       src/tls/libtommath.h    /^mp_cmp_d(mp_int * a, mp_digit b)$/;"  f
+mp_cmp_mag     src/crypto/libtommath.h /^mp_cmp_mag (mp_int * a, mp_int * b)$/;"       f
+mp_cmp_mag     src/tls/libtommath.h    /^mp_cmp_mag (mp_int * a, mp_int * b)$/;"       f
+mp_copy        src/crypto/libtommath.h /^mp_copy (mp_int * a, mp_int * b)$/;"  f
+mp_copy        src/tls/libtommath.h    /^mp_copy (mp_int * a, mp_int * b)$/;"  f
+mp_count_bits  src/crypto/libtommath.h /^mp_count_bits (mp_int * a)$/;"        f
+mp_count_bits  src/tls/libtommath.h    /^mp_count_bits (mp_int * a)$/;"        f
+mp_digit       src/crypto/libtommath.h /^typedef unsigned long mp_digit;$/;"   t
+mp_digit       src/tls/libtommath.h    /^typedef unsigned long mp_digit;$/;"   t
+mp_div src/crypto/libtommath.h /^mp_div (mp_int * a, mp_int * b, mp_int * c, mp_int * d)$/;"   f
+mp_div src/crypto/libtommath.h /^mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d)$/;"    f
+mp_div src/tls/libtommath.h    /^mp_div (mp_int * a, mp_int * b, mp_int * c, mp_int * d)$/;"   f
+mp_div src/tls/libtommath.h    /^mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d)$/;"    f
+mp_div_2       src/crypto/libtommath.h /^mp_div_2(mp_int * a, mp_int * b)$/;"  f
+mp_div_2       src/tls/libtommath.h    /^mp_div_2(mp_int * a, mp_int * b)$/;"  f
+mp_div_2d      src/crypto/libtommath.h /^mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d)$/;"     f
+mp_div_2d      src/tls/libtommath.h    /^mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d)$/;"     f
+mp_err src/crypto/libtommath.h /^typedef int           mp_err;$/;"     t
+mp_err src/tls/libtommath.h    /^typedef int           mp_err;$/;"     t
+mp_exch        src/crypto/libtommath.h /^mp_exch (mp_int * a, mp_int * b)$/;"  f
+mp_exch        src/tls/libtommath.h    /^mp_exch (mp_int * a, mp_int * b)$/;"  f
+mp_exptmod     src/crypto/libtommath.h /^mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y)$/;"       f
+mp_exptmod     src/tls/libtommath.h    /^mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y)$/;"       f
+mp_exptmod_fast        src/crypto/libtommath.h /^mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode)$/;"     f
+mp_exptmod_fast        src/tls/libtommath.h    /^mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode)$/;"     f
+mp_grow        src/crypto/libtommath.h /^mp_grow (mp_int * a, int size)$/;"    f
+mp_grow        src/tls/libtommath.h    /^mp_grow (mp_int * a, int size)$/;"    f
+mp_init        src/crypto/libtommath.h /^mp_init (mp_int * a)$/;"      f
+mp_init        src/tls/libtommath.h    /^mp_init (mp_int * a)$/;"      f
+mp_init_copy   src/crypto/libtommath.h /^mp_init_copy (mp_int * a, mp_int * b)$/;"     f
+mp_init_copy   src/tls/libtommath.h    /^mp_init_copy (mp_int * a, mp_int * b)$/;"     f
+mp_init_multi  src/crypto/libtommath.h /^mp_init_multi(mp_int *mp, ...) $/;"   f
+mp_init_multi  src/tls/libtommath.h    /^mp_init_multi(mp_int *mp, ...) $/;"   f
+mp_init_size   src/crypto/libtommath.h /^mp_init_size (mp_int * a, int size)$/;"       f
+mp_init_size   src/tls/libtommath.h    /^mp_init_size (mp_int * a, int size)$/;"       f
+mp_int src/crypto/libtommath.h /^} mp_int;$/;" t       typeref:struct:__anon8
+mp_int src/tls/libtommath.h    /^} mp_int;$/;" t       typeref:struct:__anon40
+mp_invmod      src/crypto/libtommath.h /^mp_invmod (mp_int * a, mp_int * b, mp_int * c)$/;"    f
+mp_invmod      src/tls/libtommath.h    /^mp_invmod (mp_int * a, mp_int * b, mp_int * c)$/;"    f
+mp_invmod_slow src/crypto/libtommath.h /^mp_invmod_slow (mp_int * a, mp_int * b, mp_int * c)$/;"       f
+mp_invmod_slow src/tls/libtommath.h    /^mp_invmod_slow (mp_int * a, mp_int * b, mp_int * c)$/;"       f
+mp_iseven      src/crypto/libtommath.h 127;"   d
+mp_iseven      src/tls/libtommath.h    129;"   d
+mp_isodd       src/crypto/libtommath.h 128;"   d
+mp_isodd       src/tls/libtommath.h    130;"   d
+mp_iszero      src/crypto/libtommath.h 126;"   d
+mp_iszero      src/tls/libtommath.h    128;"   d
+mp_lshd        src/crypto/libtommath.h /^mp_lshd (mp_int * a, int b)$/;"       f
+mp_lshd        src/tls/libtommath.h    /^mp_lshd (mp_int * a, int b)$/;"       f
+mp_mod src/crypto/libtommath.h /^mp_mod (mp_int * a, mp_int * b, mp_int * c)$/;"       f
+mp_mod src/tls/libtommath.h    /^mp_mod (mp_int * a, mp_int * b, mp_int * c)$/;"       f
+mp_mod_2d      src/crypto/libtommath.h /^mp_mod_2d (mp_int * a, int b, mp_int * c)$/;" f
+mp_mod_2d      src/tls/libtommath.h    /^mp_mod_2d (mp_int * a, int b, mp_int * c)$/;" f
+mp_montgomery_calc_normalization       src/crypto/libtommath.h /^mp_montgomery_calc_normalization (mp_int * a, mp_int * b)$/;" f
+mp_montgomery_calc_normalization       src/tls/libtommath.h    /^mp_montgomery_calc_normalization (mp_int * a, mp_int * b)$/;" f
+mp_montgomery_setup    src/crypto/libtommath.h /^mp_montgomery_setup (mp_int * n, mp_digit * rho)$/;"  f
+mp_montgomery_setup    src/tls/libtommath.h    /^mp_montgomery_setup (mp_int * n, mp_digit * rho)$/;"  f
+mp_mul src/crypto/libtommath.h /^mp_mul (mp_int * a, mp_int * b, mp_int * c)$/;"       f
+mp_mul src/tls/libtommath.h    /^mp_mul (mp_int * a, mp_int * b, mp_int * c)$/;"       f
+mp_mul_2       src/crypto/libtommath.h /^mp_mul_2(mp_int * a, mp_int * b)$/;"  f
+mp_mul_2       src/tls/libtommath.h    /^mp_mul_2(mp_int * a, mp_int * b)$/;"  f
+mp_mul_2d      src/crypto/libtommath.h /^mp_mul_2d (mp_int * a, int b, mp_int * c)$/;" f
+mp_mul_2d      src/tls/libtommath.h    /^mp_mul_2d (mp_int * a, int b, mp_int * c)$/;" f
+mp_mul_d       src/crypto/libtommath.h /^mp_mul_d (mp_int * a, mp_digit b, mp_int * c)$/;"     f
+mp_mul_d       src/tls/libtommath.h    /^mp_mul_d (mp_int * a, mp_digit b, mp_int * c)$/;"     f
+mp_mulmod      src/crypto/libtommath.h /^mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)$/;"        f
+mp_mulmod      src/tls/libtommath.h    /^mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)$/;"        f
+mp_read_unsigned_bin   src/crypto/libtommath.h /^mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c)$/;"  f
+mp_read_unsigned_bin   src/tls/libtommath.h    /^mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c)$/;"  f
+mp_reduce      src/crypto/libtommath.h /^mp_reduce (mp_int * x, mp_int * m, mp_int * mu)$/;"   f
+mp_reduce      src/tls/libtommath.h    /^mp_reduce (mp_int * x, mp_int * m, mp_int * mu)$/;"   f
+mp_reduce_2k_l src/crypto/libtommath.h /^mp_reduce_2k_l(mp_int *a, mp_int *n, mp_int *d)$/;"   f
+mp_reduce_2k_l src/tls/libtommath.h    /^mp_reduce_2k_l(mp_int *a, mp_int *n, mp_int *d)$/;"   f
+mp_reduce_2k_setup_l   src/crypto/libtommath.h /^mp_reduce_2k_setup_l(mp_int *a, mp_int *d)$/;"        f
+mp_reduce_2k_setup_l   src/tls/libtommath.h    /^mp_reduce_2k_setup_l(mp_int *a, mp_int *d)$/;"        f
+mp_reduce_setup        src/crypto/libtommath.h /^mp_reduce_setup (mp_int * a, mp_int * b)$/;"  f
+mp_reduce_setup        src/tls/libtommath.h    /^mp_reduce_setup (mp_int * a, mp_int * b)$/;"  f
+mp_rshd        src/crypto/libtommath.h /^mp_rshd (mp_int * a, int b)$/;"       f
+mp_rshd        src/tls/libtommath.h    /^mp_rshd (mp_int * a, int b)$/;"       f
+mp_set src/crypto/libtommath.h /^mp_set (mp_int * a, mp_digit b)$/;"   f
+mp_set src/tls/libtommath.h    /^mp_set (mp_int * a, mp_digit b)$/;"   f
+mp_sqr src/crypto/libtommath.h /^mp_sqr (mp_int * a, mp_int * b)$/;"   f
+mp_sqr src/tls/libtommath.h    /^mp_sqr (mp_int * a, mp_int * b)$/;"   f
+mp_sub src/crypto/libtommath.h /^mp_sub (mp_int * a, mp_int * b, mp_int * c)$/;"       f
+mp_sub src/tls/libtommath.h    /^mp_sub (mp_int * a, mp_int * b, mp_int * c)$/;"       f
+mp_to_unsigned_bin     src/crypto/libtommath.h /^mp_to_unsigned_bin (mp_int * a, unsigned char *b)$/;" f
+mp_to_unsigned_bin     src/tls/libtommath.h    /^mp_to_unsigned_bin (mp_int * a, unsigned char *b)$/;" f
+mp_unsigned_bin_size   src/crypto/libtommath.h /^mp_unsigned_bin_size (mp_int * a)$/;" f
+mp_unsigned_bin_size   src/tls/libtommath.h    /^mp_unsigned_bin_size (mp_int * a)$/;" f
+mp_word        src/crypto/libtommath.h /^typedef u64 mp_word;$/;"      t
+mp_word        src/tls/libtommath.h    /^typedef u64 mp_word;$/;"      t
+mp_zero        src/crypto/libtommath.h /^mp_zero (mp_int * a)$/;"      f
+mp_zero        src/tls/libtommath.h    /^mp_zero (mp_int * a)$/;"      f
+ms_change_password     src/eap_peer/eap_mschapv2.c     /^struct ms_change_password {$/;"       s       file:
+ms_length      src/eap_peer/eap_mschapv2.c     /^      u8 ms_length[2];$/;"    m       struct:eap_mschapv2_hdr file:
+ms_response    src/eap_peer/eap_mschapv2.c     /^struct ms_response {$/;"      s       file:
+mschapv2       src/eap_peer/eap_ttls.c /^      u8 *mschapv2;$/;"       m       struct:ttls_parse_avp   file:
+mschapv2_derive_response       src/eap_peer/mschapv2.c /^int mschapv2_derive_response(const u8 *identity, size_t identity_len,$/;"     f
+mschapv2_error src/eap_peer/eap_ttls.c /^      int mschapv2_error;$/;" m       struct:ttls_parse_avp   file:
+mschapv2_id    src/eap_peer/eap_mschapv2.c     /^      u8 mschapv2_id;$/;"     m       struct:eap_mschapv2_hdr file:
+mschapv2_remove_domain src/eap_peer/mschapv2.c /^const u8 * mschapv2_remove_domain(const u8 *username, size_t *len)$/;"        f
+mschapv2_retry src/eap_peer/eap_config.h       /^      int mschapv2_retry;$/;" m       struct:eap_peer_config
+mschapv2_verify_auth_response  src/eap_peer/mschapv2.c /^int mschapv2_verify_auth_response(const u8 *auth_response,$/;"        f
+msg    src/wps/wps.h   /^              int msg;$/;"    m       struct:wps_event_data::wps_event_fail
+msg    src/wps/wps.h   /^      struct wpabuf *msg;$/;" m       struct:upnp_pending_message     typeref:struct:upnp_pending_message::wpabuf
+msg_type       src/wps/wps_attr_parse.h        /^      const u8 *msg_type; \/* 1 octet *\/$/;" m       struct:wps_parse_attr
+mui    src/common/wpa_common.h /^      be16 mui;$/;"   m       struct:rsn_error_kde
+n      src/tls/rsa.c   /^      struct bignum *n; \/* modulus (p * q) *\/$/;"   m       struct:crypto_rsa_key   typeref:struct:crypto_rsa_key::bignum   file:
+nak_type       src/eap_peer/eap_tlv_common.h   /^      be16 nak_type;$/;"      m       struct:eap_tlv_nak_tlv
+name   src/eap_peer/eap_config.h       /^      char *name;$/;" m       struct:wpa_config_blob
+name   src/eap_peer/eap_i.h    /^      const char *name;$/;"   m       struct:eap_method
+name   src/utils/ext_password_i.h      /^      const char *name;$/;"   m       struct:ext_password_backend
+network_idx    src/wps/wps_attr_parse.h        /^      const u8 *network_idx; \/* 1 octet *\/$/;"      m       struct:wps_parse_attr
+network_key    src/wps/wps.h   /^      u8 *network_key;$/;"    m       struct:wps_context
+network_key    src/wps/wps_attr_parse.h        /^      const u8 *network_key; \/* <= 64 octets *\/$/;" m       struct:wps_parse_attr
+network_key_idx        src/wps/wps_attr_parse.h        /^      const u8 *network_key_idx; \/* 1 octet *\/$/;"  m       struct:wps_parse_attr
+network_key_len        src/wps/wps.h   /^      size_t network_key_len;$/;"     m       struct:wps_context
+network_key_len        src/wps/wps_attr_parse.h        /^      size_t network_key_len;$/;"     m       struct:wps_parse_attr
+network_key_shareable  src/wps/wps_attr_parse.h        /^      const u8 *network_key_shareable; \/* 1 octet (Bool) *\/$/;"     m       struct:wps_parse_attr
+new_ap_settings        src/wps/wps.h   /^      const struct wps_credential *new_ap_settings;$/;"       m       struct:wps_config       typeref:struct:wps_config::wps_credential
+new_ap_settings        src/wps/wps_i.h /^      struct wps_credential *new_ap_settings;$/;"     m       struct:wps_data typeref:struct:wps_data::wps_credential
+new_chan       src/common/ieee802_11_defs.h    /^                                      u8 new_chan;$/;"        m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon79
+new_password   src/eap_peer/eap_config.h       /^      u8 *new_password;$/;"   m       struct:eap_peer_config
+new_password_encrypted_with_old_nt_password_hash       src/crypto/ms_funcs.c   /^int new_password_encrypted_with_old_nt_password_hash($/;"     f
+new_password_len       src/eap_peer/eap_config.h       /^      size_t new_password_len;$/;"    m       struct:eap_peer_config
+new_psk        src/wps/wps_i.h /^      u8 *new_psk;$/;"        m       struct:wps_data
+new_psk_cb     src/wps/wps.h   /^      int (*new_psk_cb)(void *ctx, const u8 *mac_addr, const u8 *psk,$/;"     m       struct:wps_registrar_config
+new_psk_cb     src/wps/wps_registrar.c /^      int (*new_psk_cb)(void *ctx, const u8 *mac_addr, const u8 *psk,$/;"     m       struct:wps_registrar    file:
+new_psk_len    src/wps/wps_i.h /^      size_t new_psk_len;$/;" m       struct:wps_data
+next   src/ap/ap_config.h      /^      struct hostapd_sta_wpa_psk_short *next;$/;"     m       struct:hostapd_sta_wpa_psk_short        typeref:struct:hostapd_sta_wpa_psk_short::hostapd_sta_wpa_psk_short
+next   src/ap/ap_config.h      /^      struct hostapd_wpa_psk *next;$/;"       m       struct:hostapd_wpa_psk  typeref:struct:hostapd_wpa_psk::hostapd_wpa_psk
+next   src/ap/sta_info.h       /^      struct sta_info *next; \/* next entry in sta list *\/$/;"       m       struct:sta_info typeref:struct:sta_info::sta_info
+next   src/ap/wpa_auth.h       /^      struct ft_remote_r0kh *next;$/;"        m       struct:ft_remote_r0kh   typeref:struct:ft_remote_r0kh::ft_remote_r0kh
+next   src/ap/wpa_auth.h       /^      struct ft_remote_r1kh *next;$/;"        m       struct:ft_remote_r1kh   typeref:struct:ft_remote_r1kh::ft_remote_r1kh
+next   src/ap/wpa_auth_i.h     /^      struct wpa_group *next;$/;"     m       struct:wpa_group        typeref:struct:wpa_group::wpa_group
+next   src/ap/wpa_auth_i.h     /^      struct wpa_stsl_negotiation *next;$/;"  m       struct:wpa_stsl_negotiation     typeref:struct:wpa_stsl_negotiation::wpa_stsl_negotiation
+next   src/eap_peer/eap_config.h       /^      struct wpa_config_blob *next;$/;"       m       struct:wpa_config_blob  typeref:struct:wpa_config_blob::wpa_config_blob
+next   src/eap_peer/eap_i.h    /^      struct eap_method *next;$/;"    m       struct:eap_method       typeref:struct:eap_method::eap_method
+next   src/tls/x509v3.h        /^      struct x509_certificate *next;$/;"      m       struct:x509_certificate typeref:struct:x509_certificate::x509_certificate
+next   src/utils/list.h        /^      struct dl_list *next;$/;"       m       struct:dl_list  typeref:struct:dl_list::dl_list
+next   src/wps/wps.h   /^      struct upnp_pending_message *next;$/;"  m       struct:upnp_pending_message     typeref:struct:upnp_pending_message::upnp_pending_message
+next   src/wps/wps_registrar.c /^      struct wps_pbc_session *next;$/;"       m       struct:wps_pbc_session  typeref:struct:wps_pbc_session::wps_pbc_session file:
+next   src/wps/wps_registrar.c /^      struct wps_registrar_device *next;$/;"  m       struct:wps_registrar_device     typeref:struct:wps_registrar_device::wps_registrar_device       file:
+nfc_pw_token   src/wps/wps_i.h /^      struct wps_nfc_pw_token *nfc_pw_token;$/;"      m       struct:wps_data typeref:struct:wps_data::wps_nfc_pw_token
+nfc_pw_tokens  src/wps/wps_registrar.c /^      struct dl_list nfc_pw_tokens;$/;"       m       struct:wps_registrar    typeref:struct:wps_registrar::dl_list   file:
+noa_duration   src/ap/hostapd.h        /^      int noa_duration;$/;"   m       struct:hostapd_data
+noa_enabled    src/ap/hostapd.h        /^      int noa_enabled;$/;"    m       struct:hostapd_data
+noa_start      src/ap/hostapd.h        /^      int noa_start;$/;"      m       struct:hostapd_data
+nominal_msdu_size      src/common/ieee802_11_defs.h    /^      le16 nominal_msdu_size;$/;"     m       struct:wmm_tspec_element
+nonce  src/ap/wpa_auth.h       /^      u8 nonce[16]; \/* copied from pull *\/$/;"      m       struct:ft_r0kh_r1kh_resp_frame
+nonce  src/ap/wpa_auth.h       /^      u8 nonce[16];$/;"       m       struct:ft_r0kh_r1kh_pull_frame
+nonce  src/ap/wpa_auth_ie.h    /^      const u8 *nonce;$/;"    m       struct:wpa_eapol_ie_parse
+nonce  src/eap_peer/eap_tlv_common.h   /^      u8 nonce[32];$/;"       m       struct:eap_tlv_crypto_binding_tlv
+nonce  src/rsn_supp/wpa_ie.h   /^      const u8 *nonce;$/;"    m       struct:wpa_eapol_ie_parse
+nonce_e        src/wps/wps_i.h /^      u8 nonce_e[WPS_NONCE_LEN];$/;"  m       struct:wps_data
+nonce_len      src/ap/wpa_auth_ie.h    /^      size_t nonce_len;$/;"   m       struct:wpa_eapol_ie_parse
+nonce_len      src/rsn_supp/wpa_ie.h   /^      size_t nonce_len;$/;"   m       struct:wpa_eapol_ie_parse
+nonce_r        src/wps/wps_i.h /^      u8 nonce_r[WPS_NONCE_LEN];$/;"  m       struct:wps_data
+not_after      src/tls/x509v3.h        /^      os_time_t not_after;$/;"        m       struct:x509_certificate
+not_before     src/tls/x509v3.h        /^      os_time_t not_before;$/;"       m       struct:x509_certificate
+nt_challenge_response  src/crypto/ms_funcs.c   /^int nt_challenge_response(const u8 *challenge, const u8 *password,$/;"        f
+nt_password_hash       src/crypto/ms_funcs.c   /^int nt_password_hash(const u8 *password, size_t password_len,$/;"     f
+nt_password_hash_encrypted_with_block  src/crypto/ms_funcs.c   /^void nt_password_hash_encrypted_with_block(const u8 *password_hash,$/;"       f
+nt_response    src/eap_peer/eap_mschapv2.c     /^      u8 nt_response[MSCHAPV2_NT_RESPONSE_LEN];$/;"   m       struct:ms_change_password       file:
+nt_response    src/eap_peer/eap_mschapv2.c     /^      u8 nt_response[MSCHAPV2_NT_RESPONSE_LEN];$/;"   m       struct:ms_response      file:
+num_attr       src/tls/x509v3.h        /^      size_t num_attr;$/;"    m       struct:x509_name
+num_bits_set   src/wps/wps_validate.c  /^static int num_bits_set(u16 val)$/;"  f       file:
+num_bss        src/ap/ap_config.h      /^      size_t num_bss;$/;"     m       struct:hostapd_config
+num_cipher_suites      src/tls/tlsv1_client_i.h        /^      size_t num_cipher_suites;$/;"   m       struct:tlsv1_client
+num_cipher_suites      src/tls/tlsv1_server_i.h        /^      size_t num_cipher_suites;$/;"   m       struct:tlsv1_server
+num_cred       src/wps/wps_attr_parse.h        /^      size_t num_cred;$/;"    m       struct:wps_parse_attr
+num_phase2_eap_types   src/eap_peer/eap_ttls.c /^      size_t num_phase2_eap_types;$/;"        m       struct:eap_ttls_data    file:
+num_phase2_types       src/eap_peer/eap_peap.c /^      size_t num_phase2_types;$/;"    m       struct:eap_peap_data    file:
+num_pmkid      src/common/wpa_common.h /^      size_t num_pmkid;$/;"   m       struct:wpa_ie_data
+num_req_dev_type       src/wps/wps_attr_parse.h        /^      size_t num_req_dev_type;$/;"    m       struct:wps_parse_attr
+num_sec_dev_types      src/wps/wps.h   /^      u8 num_sec_dev_types;$/;"       m       struct:wps_device_data
+num_sta        src/ap/hostapd.h        /^      int num_sta; \/* number of entries in sta_list *\/$/;"  m       struct:hostapd_data
+num_sta_no_p2p src/ap/hostapd.h        /^      int num_sta_no_p2p;$/;" m       struct:hostapd_data
+num_vendor_ext src/wps/wps_attr_parse.h        /^      size_t num_vendor_ext;$/;"      m       struct:wps_parse_attr
+ocsp   src/eap_peer/eap_config.h       /^      int ocsp;$/;"   m       struct:eap_peer_config
+ocsp_stapling_response src/tls/tls.h   /^      const char *ocsp_stapling_response;$/;" m       struct:tls_connection_params
+offsetof       src/utils/list.h        70;"    d
+oid    src/tls/asn1.h  /^      unsigned long oid[ASN1_MAX_OID_LEN];$/;"        m       struct:asn1_oid
+oid    src/tls/x509v3.h        /^      struct asn1_oid oid;$/;"        m       struct:x509_algorithm_identifier        typeref:struct:x509_algorithm_identifier::asn1_oid
+okc    src/ap/wpa_auth.h       /^      int okc;$/;"    m       struct:wpa_auth_config
+old_nt_password_hash_encrypted_with_new_nt_password_hash       src/crypto/ms_funcs.c   /^int old_nt_password_hash_encrypted_with_new_nt_password_hash($/;"     f
+oob_dev_password       src/wps/wps_attr_parse.h        /^      const u8 *oob_dev_password; \/* 38..54 octets *\/$/;"   m       struct:wps_parse_attr
+oob_dev_password_len   src/wps/wps_attr_parse.h        /^      size_t oob_dev_password_len;$/;"        m       struct:wps_parse_attr
+op_code        src/eap_peer/eap_mschapv2.c     /^      u8 op_code;$/;" m       struct:eap_mschapv2_hdr file:
+opcode src/eap_peer/eap_defs.h /^    u8 opcode;$/;"    m       struct:eap_expand
+opensc_engine_path     src/tls/tls.h   /^      const char *opensc_engine_path;$/;"     m       struct:tls_config
+operation_mode src/common/ieee802_11_defs.h    /^      le16 operation_mode;$/;"        m       struct:ieee80211_ht_operation
+os_bzero       port/include/os.h       206;"   d
+os_free        port/include/os.h       202;"   d
+os_get_random  port/os_xtensa.c        /^int os_get_random(unsigned char *buf, size_t len)$/;" f
+os_get_time    port/os_xtensa.c        /^int os_get_time(struct os_time *t)$/;"        f
+os_malloc      port/include/os.h       193;"   d
+os_memcmp      port/include/os.h       229;"   d
+os_memcpy      port/include/os.h       220;"   d
+os_memmove     port/include/os.h       223;"   d
+os_memset      port/include/os.h       226;"   d
+os_random      port/os_xtensa.c        /^unsigned long os_random(void)$/;"     f
+os_realloc     port/include/os.h       196;"   d
+os_snprintf    port/include/os.h       271;"   d
+os_snprintf    port/include/os.h       273;"   d
+os_strcasecmp  port/include/os.h       237;"   d
+os_strcasecmp  port/include/os.h       239;"   d
+os_strchr      port/include/os.h       250;"   d
+os_strcmp      port/include/os.h       253;"   d
+os_strdup      port/include/os.h       212;"   d
+os_strdup      port/include/os.h       214;"   d
+os_strlen      port/include/os.h       233;"   d
+os_strncasecmp port/include/os.h       244;"   d
+os_strncasecmp port/include/os.h       246;"   d
+os_strncmp     port/include/os.h       256;"   d
+os_strncpy     port/include/os.h       259;"   d
+os_strrchr     port/include/os.h       263;"   d
+os_strstr      port/include/os.h       266;"   d
+os_time        port/include/os.h       /^struct os_time {$/;"  s
+os_time_before port/include/os.h       48;"    d
+os_time_sub    port/include/os.h       52;"    d
+os_time_t      port/include/os.h       /^typedef long os_time_t;$/;"   t
+os_version     src/ap/ap_config.h      /^      u8 os_version[4];$/;"   m       struct:hostapd_bss_config
+os_version     src/wps/wps.h   /^      u32 os_version;$/;"     m       struct:wps_device_data
+os_version     src/wps/wps_attr_parse.h        /^      const u8 *os_version; \/* 4 octets *\/$/;"      m       struct:wps_parse_attr
+os_zalloc      port/include/os.h       199;"   d
+oui    src/common/ieee802_11_defs.h    /^      u8 oui[3]; \/* 00:50:f2 *\/$/;" m       struct:wmm_information_element
+oui    src/common/ieee802_11_defs.h    /^      u8 oui[3]; \/* 00:50:f2 *\/$/;" m       struct:wmm_parameter_element
+oui    src/common/ieee802_11_defs.h    /^      u8 oui[3]; \/* 00:50:f2 *\/$/;" m       struct:wmm_tspec_element
+oui    src/common/wpa_common.h /^      u8 oui[4]; \/* 24-bit OUI followed by 8-bit OUI type *\/$/;"    m       struct:wpa_ie_hdr
+oui_subtype    src/common/ieee802_11_defs.h    /^      u8 oui_subtype; \/* 0 *\/$/;"   m       struct:wmm_information_element
+oui_subtype    src/common/ieee802_11_defs.h    /^      u8 oui_subtype; \/* 1 *\/$/;"   m       struct:wmm_parameter_element
+oui_subtype    src/common/ieee802_11_defs.h    /^      u8 oui_subtype; \/* 2 *\/$/;"   m       struct:wmm_tspec_element
+oui_type       src/common/ieee802_11_defs.h    /^      u8 oui_type; \/* 2 *\/$/;"      m       struct:wmm_information_element
+oui_type       src/common/ieee802_11_defs.h    /^      u8 oui_type; \/* 2 *\/$/;"      m       struct:wmm_parameter_element
+oui_type       src/common/ieee802_11_defs.h    /^      u8 oui_type; \/* 2 *\/$/;"      m       struct:wmm_tspec_element
+outbuf src/eap_peer/eap_i.h    /^        struct pbuf *outbuf;$/;"      m       struct:eap_sm   typeref:struct:eap_sm::pbuf
+own_addr       src/ap/hostapd.h        /^      u8 own_addr[ETH_ALEN];$/;"      m       struct:hostapd_data
+own_addr       src/rsn_supp/wpa.h      /^    u8 own_addr[ETH_ALEN];$/;"        m       struct:wpa_sm
+ownaddr        src/eap_peer/eap_i.h    /^      u8 ownaddr[ETH_ALEN];$/;"       m       struct:eap_sm
+ownaddr        src/wps/wps.h   /^    u8 ownaddr[ETH_ALEN];$/;" m       struct:wps_sm
+p      src/tls/rsa.c   /^      struct bignum *p; \/* prime p (factor of n) *\/$/;"     m       struct:crypto_rsa_key   typeref:struct:crypto_rsa_key::bignum   file:
+p2p    src/ap/hostapd.h        /^      struct p2p_data *p2p;$/;"       m       struct:hostapd_data     typeref:struct:hostapd_data::p2p_data
+p2p    src/wps/wps.h   /^      int p2p;$/;"    m       struct:wps_device_data
+p2p_beacon_ie  src/ap/hostapd.h        /^      struct wpabuf *p2p_beacon_ie;$/;"       m       struct:hostapd_data     typeref:struct:hostapd_data::wpabuf
+p2p_dev_addr   src/wps/wps.h   /^      const u8 *p2p_dev_addr;$/;"     m       struct:wps_config
+p2p_dev_addr   src/wps/wps_i.h /^      u8 p2p_dev_addr[ETH_ALEN]; \/* P2P Device Address of the client or$/;"  m       struct:wps_data
+p2p_dev_addr   src/wps/wps_registrar.c /^      u8 p2p_dev_addr[ETH_ALEN];$/;"  m       struct:wps_registrar    file:
+p2p_group      src/ap/hostapd.h        /^      struct p2p_group *p2p_group;$/;"        m       struct:hostapd_data     typeref:struct:hostapd_data::p2p_group
+p2p_probe_resp_ie      src/ap/hostapd.h        /^      struct wpabuf *p2p_probe_resp_ie;$/;"   m       struct:hostapd_data     typeref:struct:hostapd_data::wpabuf
+pac_len        src/eap_peer/eap_tlv_common.h   /^      be16 pac_len;$/;"       m       struct:eap_tlv_pac_ack_tlv
+pac_type       src/eap_peer/eap_tlv_common.h   /^      be16 pac_type;$/;"      m       struct:eap_tlv_pac_ack_tlv
+pac_type       src/eap_peer/eap_tlv_common.h   /^      be16 pac_type;$/;"      m       struct:eap_tlv_pac_type_tlv
+packet_type    src/ap/wpa_auth.h       /^      u8 packet_type; \/* FT_PACKET_R0KH_R1KH_PULL *\/$/;"    m       struct:ft_r0kh_r1kh_pull_frame
+packet_type    src/ap/wpa_auth.h       /^      u8 packet_type; \/* FT_PACKET_R0KH_R1KH_PUSH *\/$/;"    m       struct:ft_r0kh_r1kh_push_frame
+packet_type    src/ap/wpa_auth.h       /^      u8 packet_type; \/* FT_PACKET_R0KH_R1KH_RESP *\/$/;"    m       struct:ft_r0kh_r1kh_resp_frame
+packet_type    src/ap/wpa_auth.h       /^      u8 packet_type; \/* FT_PACKET_REQUEST\/FT_PACKET_RESPONSE *\/$/;"       m       struct:ft_rrb_frame
+pad    src/ap/wpa_auth.h       /^      u8 pad[2]; \/* 8-octet boundary for AES key wrap *\/$/;"        m       struct:ft_r0kh_r1kh_resp_frame
+pad    src/ap/wpa_auth.h       /^      u8 pad[4]; \/* 8-octet boundary for AES key wrap *\/$/;"        m       struct:ft_r0kh_r1kh_pull_frame
+pad    src/ap/wpa_auth.h       /^      u8 pad[6]; \/* 8-octet boundary for AES key wrap *\/$/;"        m       struct:ft_r0kh_r1kh_push_frame
+pairwise       src/ap/wpa_auth.h       /^      le16 pairwise;$/;"      m       struct:ft_r0kh_r1kh_push_frame
+pairwise       src/ap/wpa_auth.h       /^      le16 pairwise;$/;"      m       struct:ft_r0kh_r1kh_resp_frame
+pairwise       src/ap/wpa_auth_i.h     /^      int pairwise; \/* Pairwise cipher suite, WPA_CIPHER_* *\/$/;"   m       struct:wpa_state_machine
+pairwise_cipher        src/common/wpa_common.h /^      int pairwise_cipher;$/;"        m       struct:wpa_ie_data
+pairwise_cipher        src/rsn_supp/wpa.h      /^    unsigned int pairwise_cipher;$/;" m       struct:wpa_sm
+pairwise_set   src/ap/wpa_auth_i.h     /^      Boolean pairwise_set;$/;"       m       struct:wpa_state_machine
+param  src/esp_supplicant/esp_wifi_driver.h    /^    void    *param;$/;"       m       struct:__anon31
+part   src/wps/wps.h   /^              int part;$/;"   m       struct:wps_event_data::wps_event_pwd_auth_fail
+partial_input  src/tls/tlsv1_client_i.h        /^      struct wpabuf *partial_input;$/;"       m       struct:tlsv1_client     typeref:struct:tlsv1_client::wpabuf
+passwd_change_challenge        src/eap_peer/eap_mschapv2.c     /^      u8 passwd_change_challenge[PASSWD_CHANGE_CHAL_LEN];$/;" m       struct:eap_mschapv2_data        file:
+passwd_change_challenge_valid  src/eap_peer/eap_mschapv2.c     /^      int passwd_change_challenge_valid;$/;"  m       struct:eap_mschapv2_data        file:
+passwd_change_version  src/eap_peer/eap_mschapv2.c     /^      int passwd_change_version;$/;"  m       struct:eap_mschapv2_data        file:
+password       src/eap_peer/eap_config.h       /^      u8 *password;$/;"       m       struct:eap_peer_config
+password_len   src/eap_peer/eap_config.h       /^      size_t password_len;$/;"        m       struct:eap_peer_config
+path_len_constraint    src/tls/x509v3.h        /^      unsigned long path_len_constraint; \/* pathLenConstraint *\/$/;"        m       struct:x509_certificate
+payload        src/tls/asn1.h  /^      const u8 *payload;$/;"  m       struct:asn1_hdr
+pbc    src/wps/wps.h   /^      int pbc;$/;"    m       struct:wps_config
+pbc    src/wps/wps_i.h /^      int pbc;$/;"    m       struct:wps_data
+pbc    src/wps/wps_registrar.c /^      int pbc;$/;"    m       struct:wps_registrar    file:
+pbc_ignore_start       src/wps/wps_registrar.c /^      struct os_time pbc_ignore_start;$/;"    m       struct:wps_registrar    typeref:struct:wps_registrar::os_time   file:
+pbc_ignore_uuid        src/wps/wps_registrar.c /^      u8 pbc_ignore_uuid[WPS_UUID_LEN];$/;"   m       struct:wps_registrar    file:
+pbc_in_m1      src/wps/wps.h   /^      int pbc_in_m1;$/;"      m       struct:wps_config
+pbc_in_m1      src/wps/wps_i.h /^      int pbc_in_m1;$/;"      m       struct:wps_data
+pbc_sessions   src/wps/wps_registrar.c /^      struct wps_pbc_session *pbc_sessions;$/;"       m       struct:wps_registrar    typeref:struct:wps_registrar::wps_pbc_session   file:
+pbkdf2_sha1    src/crypto/sha1-pbkdf2.c        /^pbkdf2_sha1(const char *passphrase, const char *ssid, size_t ssid_len,$/;"    f
+pbkdf2_sha1_f  src/crypto/sha1-pbkdf2.c        /^pbkdf2_sha1_f(const char *passphrase, const char *ssid,$/;"   f       file:
+pc1    src/crypto/des-internal.c       /^static const u8 pc1[56] = {$/;"       v       file:
+pc2    src/crypto/des-internal.c       /^static const u8 pc2[48] = {$/;"       v       file:
+peak_data_rate src/common/ieee802_11_defs.h    /^      le32 peak_data_rate;$/;"        m       struct:wmm_tspec_element
+peap_done      src/eap_peer/eap_i.h    /^      bool peap_done;$/;"     m       struct:eap_sm
+peap_outer_success     src/eap_peer/eap_peap.c /^      int peap_outer_success; \/* 0 = PEAP terminated on Phase 2 inner$/;"    m       struct:eap_peap_data    file:
+peap_prfplus   src/eap_peer/eap_peap_common.c  /^peap_prfplus(int version, const u8 *key, size_t key_len,$/;"  f
+peap_version   src/eap_peer/eap_peap.c /^      int peap_version, force_peap_version, force_new_label;$/;"      m       struct:eap_peap_data    file:
+peer   src/ap/wpa_auth_i.h     /^      u8 peer[ETH_ALEN];$/;"  m       struct:wpa_stsl_negotiation
+peer_addr      src/wps/wps.h   /^      const u8 *peer_addr;$/;"        m       struct:wps_config
+peer_cert      src/tls/tls.h   /^      } peer_cert;$/;"        m       union:tls_event_data    typeref:struct:tls_event_data::__anon35
+peer_challenge src/eap_peer/eap_mschapv2.c     /^      u8 *peer_challenge;$/;" m       struct:eap_mschapv2_data        file:
+peer_challenge src/eap_peer/eap_mschapv2.c     /^      u8 peer_challenge[MSCHAPV2_CHAL_LEN];$/;"       m       struct:ms_change_password       file:
+peer_challenge src/eap_peer/eap_mschapv2.c     /^      u8 peer_challenge[MSCHAPV2_CHAL_LEN];$/;"       m       struct:ms_response      file:
+peer_dev       src/wps/wps_i.h /^      struct wps_device_data peer_dev;$/;"    m       struct:wps_data typeref:struct:wps_data::wps_device_data
+peer_hash1     src/wps/wps_i.h /^      u8 peer_hash1[WPS_HASH_LEN];$/;"        m       struct:wps_data
+peer_hash2     src/wps/wps_i.h /^      u8 peer_hash2[WPS_HASH_LEN];$/;"        m       struct:wps_data
+peerkey        src/ap/ap_config.h      /^      int peerkey;$/;"        m       struct:hostapd_bss_config
+peerkey        src/ap/wpa_auth.h       /^      int peerkey;$/;"        m       struct:wpa_auth_config
+pem_cert_begin src/tls/tlsv1_cred.c    /^static const char *pem_cert_begin = "-----BEGIN CERTIFICATE-----";$/;"        v       file:
+pem_cert_end   src/tls/tlsv1_cred.c    /^static const char *pem_cert_end = "-----END CERTIFICATE-----";$/;"    v       file:
+pem_dhparams_begin     src/tls/tlsv1_cred.c    /^static const char *pem_dhparams_begin = "-----BEGIN DH PARAMETERS-----";$/;"  v       file:
+pem_dhparams_end       src/tls/tlsv1_cred.c    /^static const char *pem_dhparams_end = "-----END DH PARAMETERS-----";$/;"      v       file:
+pem_key2_begin src/tls/tlsv1_cred.c    /^static const char *pem_key2_begin = "-----BEGIN PRIVATE KEY-----";$/;"        v       file:
+pem_key2_end   src/tls/tlsv1_cred.c    /^static const char *pem_key2_end = "-----END PRIVATE KEY-----";$/;"    v       file:
+pem_key_begin  src/tls/tlsv1_cred.c    /^static const char *pem_key_begin = "-----BEGIN RSA PRIVATE KEY-----";$/;"     v       file:
+pem_key_enc_begin      src/tls/tlsv1_cred.c    /^static const char *pem_key_enc_begin = "-----BEGIN ENCRYPTED PRIVATE KEY-----";$/;"   v       file:
+pem_key_enc_end        src/tls/tlsv1_cred.c    /^static const char *pem_key_enc_end = "-----END ENCRYPTED PRIVATE KEY-----";$/;"       v       file:
+pem_key_end    src/tls/tlsv1_cred.c    /^static const char *pem_key_end = "-----END RSA PRIVATE KEY-----";$/;" v       file:
+pending_1_of_4_timeout src/ap/wpa_auth_i.h     /^      int pending_1_of_4_timeout;$/;" m       struct:wpa_state_machine
+pending_deinit src/ap/wpa_auth_i.h     /^      unsigned int pending_deinit:1;$/;"      m       struct:wpa_state_machine
+pending_phase2_req     src/eap_peer/eap_peap.c /^      struct wpabuf *pending_phase2_req;$/;"  m       struct:eap_peap_data    typeref:struct:eap_peap_data::wpabuf    file:
+pending_phase2_req     src/eap_peer/eap_ttls.c /^      struct wpabuf *pending_phase2_req;$/;"  m       struct:eap_ttls_data    typeref:struct:eap_ttls_data::wpabuf    file:
+phase1 src/eap_peer/eap_config.h       /^      char *phase1;$/;"       m       struct:eap_peer_config
+phase2 src/eap_peer/eap_config.h       /^      char *phase2;$/;"       m       struct:eap_peer_config
+phase2 src/eap_peer/eap_mschapv2.c     /^      int phase2;$/;" m       struct:eap_mschapv2_data        file:
+phase2 src/eap_peer/eap_tls_common.h   /^      int phase2;$/;" m       struct:eap_ssl_data
+phase2_eap_started     src/eap_peer/eap_peap.c /^      int phase2_eap_started;$/;"     m       struct:eap_peap_data    file:
+phase2_eap_success     src/eap_peer/eap_peap.c /^      int phase2_eap_success;$/;"     m       struct:eap_peap_data    file:
+phase2_eap_type        src/eap_peer/eap_ttls.c /^      struct eap_method_type phase2_eap_type;$/;"     m       struct:eap_ttls_data    typeref:struct:eap_ttls_data::eap_method_type   file:
+phase2_eap_types       src/eap_peer/eap_ttls.c /^      struct eap_method_type *phase2_eap_types;$/;"   m       struct:eap_ttls_data    typeref:struct:eap_ttls_data::eap_method_type   file:
+phase2_method  src/eap_peer/eap_peap.c /^      const struct eap_method *phase2_method;$/;"     m       struct:eap_peap_data    typeref:struct:eap_peap_data::eap_method        file:
+phase2_method  src/eap_peer/eap_ttls.c /^      const struct eap_method *phase2_method;$/;"     m       struct:eap_ttls_data    typeref:struct:eap_ttls_data::eap_method        file:
+phase2_priv    src/eap_peer/eap_peap.c /^      void *phase2_priv;$/;"  m       struct:eap_peap_data    file:
+phase2_priv    src/eap_peer/eap_ttls.c /^      void *phase2_priv;$/;"  m       struct:eap_ttls_data    file:
+phase2_start   src/eap_peer/eap_ttls.c /^      int phase2_start;$/;"   m       struct:eap_ttls_data    file:
+phase2_success src/eap_peer/eap_peap.c /^      int phase2_success;$/;" m       struct:eap_peap_data    file:
+phase2_success src/eap_peer/eap_ttls.c /^      int phase2_success;$/;" m       struct:eap_ttls_data    file:
+phase2_type    src/eap_peer/eap_peap.c /^      struct eap_method_type phase2_type;$/;" m       struct:eap_peap_data    typeref:struct:eap_peap_data::eap_method_type   file:
+phase2_type    src/eap_peer/eap_ttls.c /^      } phase2_type;$/;"      m       struct:eap_ttls_data    typeref:enum:eap_ttls_data::phase2_types        file:
+phase2_types   src/eap_peer/eap_peap.c /^      struct eap_method_type *phase2_types;$/;"       m       struct:eap_peap_data    typeref:struct:eap_peap_data::eap_method_type   file:
+phase2_types   src/eap_peer/eap_ttls.c /^      enum phase2_types {$/;" g       struct:eap_ttls_data    file:
+pin    src/eap_peer/eap_config.h       /^      char *pin;$/;"  m       struct:eap_peer_config
+pin    src/tls/tls.h   /^      const char *pin;$/;"    m       struct:tls_connection_params
+pin    src/wps/wps.h   /^      const u8 *pin;$/;"      m       struct:wps_config
+pin    src/wps/wps_registrar.c /^      u8 *pin;$/;"    m       struct:wps_uuid_pin     file:
+pin_len        src/wps/wps.h   /^      size_t pin_len;$/;"     m       struct:wps_config
+pin_len        src/wps/wps_registrar.c /^      size_t pin_len;$/;"     m       struct:wps_uuid_pin     file:
+pin_needed_cb  src/wps/wps.h   /^      void (*pin_needed_cb)(void *ctx, const u8 *uuid_e,$/;"  m       struct:wps_registrar_config
+pin_needed_cb  src/wps/wps_registrar.c /^      void (*pin_needed_cb)(void *ctx, const u8 *uuid_e,$/;"  m       struct:wps_registrar    file:
+pins   src/wps/wps_registrar.c /^      struct dl_list pins;$/;"        m       struct:wps_registrar    typeref:struct:wps_registrar::dl_list   file:
+pkcs11_engine_path     src/tls/tls.h   /^      const char *pkcs11_engine_path;$/;"     m       struct:tls_config
+pkcs11_module_path     src/tls/tls.h   /^      const char *pkcs11_module_path;$/;"     m       struct:tls_config
+pkcs1_decrypt_public_key       src/tls/pkcs1.c /^int pkcs1_decrypt_public_key(struct crypto_rsa_key *key,$/;"  f
+pkcs1_encrypt  src/tls/pkcs1.c /^int pkcs1_encrypt(int block_type, struct crypto_rsa_key *key,$/;"     f
+pkcs1_generate_encryption_block        src/tls/pkcs1.c /^static int pkcs1_generate_encryption_block(u8 block_type, size_t modlen,$/;"  f       file:
+pkcs1_v15_private_key_decrypt  src/tls/pkcs1.c /^int pkcs1_v15_private_key_decrypt(struct crypto_rsa_key *key,$/;"     f
+pkcs5_alg      src/tls/pkcs5.c /^      enum pkcs5_alg {$/;"    g       struct:pkcs5_params     file:
+pkcs5_crypto_init      src/tls/pkcs5.c /^static struct crypto_cipher * pkcs5_crypto_init(struct pkcs5_params *params,$/;"      f       file:
+pkcs5_decrypt  src/tls/pkcs5.c /^u8 * pkcs5_decrypt(const u8 *enc_alg, size_t enc_alg_len,$/;" f
+pkcs5_get_alg  src/tls/pkcs5.c /^static enum pkcs5_alg pkcs5_get_alg(struct asn1_oid *oid)$/;" f       file:
+pkcs5_get_params       src/tls/pkcs5.c /^static int pkcs5_get_params(const u8 *enc_alg, size_t enc_alg_len,$/;"        f       file:
+pkcs5_params   src/tls/pkcs5.c /^struct pkcs5_params {$/;"     s       file:
+pkcs8_enc_key_import   src/tls/pkcs8.c /^pkcs8_enc_key_import(const u8 *buf, size_t len, const char *passwd)$/;"       f
+pkcs8_key_import       src/tls/pkcs8.c /^struct crypto_private_key * pkcs8_key_import(const u8 *buf, size_t len)$/;"   f
+pmk    src/rsn_supp/wpa.h      /^    u8 pmk[PMK_LEN];$/;"      m       struct:wpa_sm
+pmk_len        src/rsn_supp/wpa.h      /^    size_t pmk_len;$/;"       m       struct:wpa_sm
+pmk_r0_name    src/ap/wpa_auth.h       /^      u8 pmk_r0_name[WPA_PMK_NAME_LEN];$/;"   m       struct:ft_r0kh_r1kh_pull_frame
+pmk_r0_name    src/ap/wpa_auth.h       /^      u8 pmk_r0_name[WPA_PMK_NAME_LEN];$/;"   m       struct:ft_r0kh_r1kh_push_frame
+pmk_r1 src/ap/wpa_auth.h       /^      u8 pmk_r1[PMK_LEN];$/;" m       struct:ft_r0kh_r1kh_push_frame
+pmk_r1 src/ap/wpa_auth.h       /^      u8 pmk_r1[PMK_LEN];$/;" m       struct:ft_r0kh_r1kh_resp_frame
+pmk_r1_name    src/ap/wpa_auth.h       /^      u8 pmk_r1_name[WPA_PMK_NAME_LEN];$/;"   m       struct:ft_r0kh_r1kh_push_frame
+pmk_r1_name    src/ap/wpa_auth.h       /^      u8 pmk_r1_name[WPA_PMK_NAME_LEN];$/;"   m       struct:ft_r0kh_r1kh_resp_frame
+pmk_r1_name    src/ap/wpa_auth_i.h     /^      u8 pmk_r1_name[WPA_PMK_NAME_LEN]; \/* PMKR1Name derived from FT Auth$/;"        m       struct:wpa_state_machine
+pmk_r1_name_valid      src/ap/wpa_auth_i.h     /^      unsigned int pmk_r1_name_valid:1;$/;"   m       struct:wpa_state_machine
+pmk_r1_push    src/ap/ap_config.h      /^      int pmk_r1_push;$/;"    m       struct:hostapd_bss_config
+pmk_r1_push    src/ap/wpa_auth.h       /^      int pmk_r1_push;$/;"    m       struct:wpa_auth_config
+pmkid  src/ap/wpa_auth_ie.h    /^      const u8 *pmkid;$/;"    m       struct:wpa_eapol_ie_parse
+pmkid  src/common/wpa_common.h /^      const u8 *pmkid;$/;"    m       struct:wpa_ie_data
+pmkid  src/rsn_supp/wpa_ie.h   /^      const u8 *pmkid;$/;"    m       struct:wpa_eapol_ie_parse
+pn     src/common/wpa_common.h /^      u8 pn[6];$/;"   m       struct:wpa_igtk_kde
+pp_michael_mic_failure src/rsn_supp/wpa.c      /^pp_michael_mic_failure(u16 isunicast)$/;"     f
+preamble       src/ap/ap_config.h      /^      } preamble;$/;" m       struct:hostapd_config   typeref:enum:hostapd_config::__anon19
+prev   src/utils/list.h        /^      struct dl_list *prev;$/;"       m       struct:dl_list  typeref:struct:dl_list::dl_list
+prev_challenge src/eap_peer/eap_mschapv2.c     /^      struct wpabuf *prev_challenge;$/;"      m       struct:eap_mschapv2_data        typeref:struct:eap_mschapv2_data::wpabuf        file:
+prev_cipher_suite      src/tls/tlsv1_client_i.h        /^      u16 prev_cipher_suite;$/;"      m       struct:tlsv1_client
+prev_error     src/eap_peer/eap_mschapv2.c     /^      int prev_error;$/;"     m       struct:eap_mschapv2_data        file:
+prev_key_replay        src/ap/wpa_auth_i.h     /^              prev_key_replay[RSNA_MAX_EAPOL_RETRIES];$/;"    m       struct:wpa_state_machine        typeref:struct:wpa_state_machine::wpa_key_replay_counter
+pri_dev_type   src/wps/wps.h   /^              const u8 *pri_dev_type;$/;"     m       struct:wps_event_data::wps_event_er_ap
+pri_dev_type   src/wps/wps.h   /^              const u8 *pri_dev_type;$/;"     m       struct:wps_event_data::wps_event_er_enrollee
+pri_dev_type   src/wps/wps.h   /^      u8 pri_dev_type[WPS_DEV_TYPE_LEN];$/;"  m       struct:wps_device_data
+primary_dev_type       src/wps/wps.h   /^              const u8 *primary_dev_type; \/* 8 octets *\/$/;"        m       struct:wps_event_data::wps_event_m2d
+primary_dev_type       src/wps/wps_attr_parse.h        /^      const u8 *primary_dev_type; \/* 8 octets *\/$/;"        m       struct:wps_parse_attr
+prime  include/crypto/dh_groups.h      /^      const u8 *prime;$/;"    m       struct:dh_group
+prime_len      include/crypto/dh_groups.h      /^      size_t prime_len;$/;"   m       struct:dh_group
+priv   src/utils/ext_password.c        /^      void *priv;$/;" m       struct:ext_password_data        file:
+private_key    src/eap_peer/eap_config.h       /^      u8 *private_key;$/;"    m       struct:eap_peer_config
+private_key    src/tls/rsa.c   /^      int private_key; \/* whether private key is set *\/$/;" m       struct:crypto_rsa_key   file:
+private_key    src/tls/tls.h   /^      const char *private_key;$/;"    m       struct:tls_connection_params
+private_key2   src/eap_peer/eap_config.h       /^      u8 *private_key2;$/;"   m       struct:eap_peer_config
+private_key2_password  src/eap_peer/eap_config.h       /^      u8 *private_key2_password;$/;"  m       struct:eap_peer_config
+private_key_blob       src/tls/tls.h   /^      const u8 *private_key_blob;$/;" m       struct:tls_connection_params
+private_key_blob_len   src/tls/tls.h   /^      size_t private_key_blob_len;$/;"        m       struct:tls_connection_params
+private_key_passwd     src/eap_peer/eap_config.h       /^      const u8 *private_key_passwd;$/;"       m       struct:eap_peer_config
+private_key_passwd     src/tls/tls.h   /^      const char *private_key_passwd;$/;"     m       struct:tls_connection_params
+probe_req      src/common/ieee802_11_defs.h    /^              } STRUCT_PACKED probe_req;$/;"  m       union:ieee80211_mgmt::__anon66  typeref:struct:ieee80211_mgmt::__anon66::__anon74
+probe_resp     src/common/ieee802_11_defs.h    /^              } STRUCT_PACKED probe_resp;$/;" m       union:ieee80211_mgmt::__anon66  typeref:struct:ieee80211_mgmt::__anon66::__anon75
+process        src/eap_peer/eap_i.h    /^      struct wpabuf * (*process)(struct eap_sm *sm, void *priv,$/;"   m       struct:eap_method       typeref:struct:eap_method::process
+proto  src/common/wpa_common.h /^      int proto;$/;"  m       struct:wpa_ie_data
+proto  src/rsn_supp/wpa.h      /^    unsigned int proto;$/;"   m       struct:wpa_sm
+psk    src/ap/ap_config.h      /^      u8 psk[PMK_LEN];$/;"    m       struct:hostapd_sta_wpa_psk_short
+psk    src/ap/ap_config.h      /^      u8 psk[PMK_LEN];$/;"    m       struct:hostapd_wpa_psk
+psk    src/wps/wps.h   /^      u8 psk[32];$/;" m       struct:wps_context
+psk1   src/wps/wps_i.h /^      u8 psk1[WPS_PSK_LEN];$/;"       m       struct:wps_data
+psk2   src/wps/wps_i.h /^      u8 psk2[WPS_PSK_LEN];$/;"       m       struct:wps_data
+psk_set        src/wps/wps.h   /^      int psk_set;$/;"        m       struct:wps_context
+ptk    src/rsn_supp/wpa.h      /^    struct wpa_ptk ptk, tptk;$/;"     m       struct:wpa_sm   typeref:struct:wpa_sm::wpa_ptk
+ptk_set        src/rsn_supp/wpa.h      /^    int ptk_set, tptk_set;$/;"        m       struct:wpa_sm
+pubkey_hash    src/wps/wps_registrar.c /^      u8 pubkey_hash[WPS_OOB_PUBKEY_HASH_LEN];$/;"    m       struct:wps_nfc_pw_token file:
+public_key     src/tls/x509v3.h        /^      u8 *public_key;$/;"     m       struct:x509_certificate
+public_key     src/wps/wps_attr_parse.h        /^      const u8 *public_key;$/;"       m       struct:wps_parse_attr
+public_key_alg src/tls/x509v3.h        /^      struct x509_algorithm_identifier public_key_alg;$/;"    m       struct:x509_certificate typeref:struct:x509_certificate::x509_algorithm_identifier
+public_key_len src/tls/x509v3.h        /^      size_t public_key_len;$/;"      m       struct:x509_certificate
+public_key_len src/wps/wps_attr_parse.h        /^      size_t public_key_len;$/;"      m       struct:wps_parse_attr
+pw_id  src/wps/wps_registrar.c /^      u16 pw_id;$/;"  m       struct:wps_nfc_pw_token file:
+pwd_auth_fail  src/wps/wps.h   /^      } pwd_auth_fail;$/;"    m       union:wps_event_data    typeref:struct:wps_event_data::wps_event_pwd_auth_fail
+q      src/tls/rsa.c   /^      struct bignum *q; \/* prime q (factor of n) *\/$/;"     m       struct:crypto_rsa_key   typeref:struct:crypto_rsa_key::bignum   file:
+qos_info       src/common/ieee802_11_defs.h    /^      u8 qos_info; \/* AP\/STA specif QoS info *\/$/;"        m       struct:wmm_parameter_element
+qos_info       src/common/ieee802_11_defs.h    /^      u8 qos_info; \/* AP\/STA specific QoS info *\/$/;"      m       struct:wmm_information_element
+r0_key_holder  src/ap/wpa_auth.h       /^      u8 r0_key_holder[FT_R0KH_ID_MAX_LEN];$/;"       m       struct:wpa_auth_config
+r0_key_holder_len      src/ap/wpa_auth.h       /^      size_t r0_key_holder_len;$/;"   m       struct:wpa_auth_config
+r0_key_lifetime        src/ap/ap_config.h      /^      u32 r0_key_lifetime;$/;"        m       struct:hostapd_bss_config
+r0_key_lifetime        src/ap/wpa_auth.h       /^      u32 r0_key_lifetime;$/;"        m       struct:wpa_auth_config
+r0kh_id        src/ap/wpa_auth_i.h     /^      u8 r0kh_id[FT_R0KH_ID_MAX_LEN]; \/* R0KH-ID from FT Auth Request *\/$/;"        m       struct:wpa_state_machine
+r0kh_id_len    src/ap/wpa_auth_i.h     /^      size_t r0kh_id_len;$/;" m       struct:wpa_state_machine
+r0kh_list      src/ap/ap_config.h      /^      struct ft_remote_r0kh *r0kh_list;$/;"   m       struct:hostapd_bss_config       typeref:struct:hostapd_bss_config::ft_remote_r0kh
+r0kh_list      src/ap/wpa_auth.h       /^      struct ft_remote_r0kh *r0kh_list;$/;"   m       struct:wpa_auth_config  typeref:struct:wpa_auth_config::ft_remote_r0kh
+r1_key_holder  src/ap/ap_config.h      /^      u8 r1_key_holder[FT_R1KH_ID_LEN];$/;"   m       struct:hostapd_bss_config
+r1_key_holder  src/ap/wpa_auth.h       /^      u8 r1_key_holder[FT_R1KH_ID_LEN];$/;"   m       struct:wpa_auth_config
+r1kh_id        src/ap/wpa_auth.h       /^      u8 r1kh_id[FT_R1KH_ID_LEN]; \/* copied from pull *\/$/;"        m       struct:ft_r0kh_r1kh_resp_frame
+r1kh_id        src/ap/wpa_auth.h       /^      u8 r1kh_id[FT_R1KH_ID_LEN];$/;" m       struct:ft_r0kh_r1kh_pull_frame
+r1kh_id        src/ap/wpa_auth.h       /^      u8 r1kh_id[FT_R1KH_ID_LEN];$/;" m       struct:ft_r0kh_r1kh_push_frame
+r1kh_list      src/ap/ap_config.h      /^      struct ft_remote_r1kh *r1kh_list;$/;"   m       struct:hostapd_bss_config       typeref:struct:hostapd_bss_config::ft_remote_r1kh
+r1kh_list      src/ap/wpa_auth.h       /^      struct ft_remote_r1kh *r1kh_list;$/;"   m       struct:wpa_auth_config  typeref:struct:wpa_auth_config::ft_remote_r1kh
+r_hash1        src/wps/wps_attr_parse.h        /^      const u8 *r_hash1; \/* WPS_HASH_LEN (32) octets *\/$/;" m       struct:wps_parse_attr
+r_hash2        src/wps/wps_attr_parse.h        /^      const u8 *r_hash2; \/* WPS_HASH_LEN (32) octets *\/$/;" m       struct:wps_parse_attr
+r_snonce1      src/wps/wps_attr_parse.h        /^      const u8 *r_snonce1; \/* WPS_SECRET_NONCE_LEN (16) octets *\/$/;"       m       struct:wps_parse_attr
+r_snonce2      src/wps/wps_attr_parse.h        /^      const u8 *r_snonce2; \/* WPS_SECRET_NONCE_LEN (16) octets *\/$/;"       m       struct:wps_parse_attr
+random_add_randomness  include/crypto/random.h 23;"    d
+random_deinit  include/crypto/random.h 22;"    d
+random_get_bytes       include/crypto/random.h 24;"    d
+random_init    include/crypto/random.h 21;"    d
+random_mark_pool_ready include/crypto/random.h 26;"    d
+random_pool_ready      include/crypto/random.h 25;"    d
+rate   src/ap/hostapd.h        /^      int rate; \/* rate in 100 kbps *\/$/;"  m       struct:hostapd_rate_data
+rc4    src/crypto/crypto_internal-cipher.c     /^              } rc4;$/;"      m       union:crypto_cipher::__anon10   typeref:struct:crypto_cipher::__anon10::__anon11        file:
+rc4    src/fast_crypto/fast_crypto_internal-cipher.c   /^        } rc4;$/;"    m       union:fast_crypto_cipher::__anon56      typeref:struct:fast_crypto_cipher::__anon56::__anon57   file:
+rc4_skip       src/crypto/rc4.c        /^rc4_skip(const u8 *key, size_t keylen, size_t skip,$/;"       f
+rcon   src/crypto/aes-internal.c       /^const u32 rcon[] \/* ICACHE_RODATA_ATTR *\/ = {$/;"   v
+rcons  src/crypto/aes-internal.c       /^const u8 rcons[] \/* ICACHE_RODATA_ATTR *\/ = {$/;"   v
+read_cbc       src/tls/tlsv1_record.h  /^      struct crypto_cipher *read_cbc;$/;"     m       struct:tlsv1_record_layer       typeref:struct:tlsv1_record_layer::crypto_cipher
+read_cipher_suite      src/tls/tlsv1_record.h  /^      u16 read_cipher_suite;$/;"      m       struct:tlsv1_record_layer
+read_iv        src/tls/tlsv1_record.h  /^      u8 read_iv[TLS_MAX_IV_LEN];$/;" m       struct:tlsv1_record_layer
+read_key       src/tls/tlsv1_record.h  /^      u8 read_key[TLS_MAX_WRITE_KEY_LEN];$/;" m       struct:tlsv1_record_layer
+read_mac_secret        src/tls/tlsv1_record.h  /^      u8 read_mac_secret[TLS_MAX_WRITE_MAC_SECRET_LEN];$/;"   m       struct:tlsv1_record_layer
+read_seq_num   src/tls/tlsv1_record.h  /^      u8 read_seq_num[TLS_SEQ_NUM_LEN];$/;"   m       struct:tlsv1_record_layer
+ready_for_tnc  src/eap_peer/eap_ttls.c /^      int ready_for_tnc;$/;"  m       struct:eap_ttls_data    file:
+reason src/tls/tls.h   /^              enum tls_fail_reason reason;$/;"        m       struct:tls_event_data::__anon34 typeref:enum:tls_event_data::__anon34::tls_fail_reason
+reason_code    src/common/ieee802_11_defs.h    /^                      le16 reason_code;$/;"   m       struct:ieee80211_mgmt::__anon66::__anon68
+reason_code    src/common/ieee802_11_defs.h    /^                      le16 reason_code;$/;"   m       struct:ieee80211_mgmt::__anon66::__anon72
+reason_txt     src/tls/tls.h   /^              const char *reason_txt;$/;"     m       struct:tls_event_data::__anon34
+reassoc_deadline       src/rsn_supp/wpa_ie.h   /^      const u8 *reassoc_deadline;$/;" m       struct:wpa_eapol_ie_parse
+reassoc_req    src/common/ieee802_11_defs.h    /^              } STRUCT_PACKED reassoc_req;$/;"        m       union:ieee80211_mgmt::__anon66  typeref:struct:ieee80211_mgmt::__anon66::__anon71
+reassoc_resp   src/common/ieee802_11_defs.h    /^              } STRUCT_PACKED assoc_resp, reassoc_resp;$/;"   m       union:ieee80211_mgmt::__anon66  typeref:struct:ieee80211_mgmt::__anon66::__anon70
+reassociation_deadline src/ap/ap_config.h      /^      u32 reassociation_deadline;$/;" m       struct:hostapd_bss_config
+reassociation_deadline src/ap/wpa_auth.h       /^      u32 reassociation_deadline;$/;" m       struct:wpa_auth_config
+reauth src/eap_peer/eap_peap.c /^      int reauth; \/* reauthentication *\/$/;"        m       struct:eap_peap_data    file:
+reauth src/eap_peer/eap_ttls.c /^      int reauth; \/* reauthentication *\/$/;"        m       struct:eap_ttls_data    file:
+received_version       src/eap_peer/eap_tlv_common.h   /^      u8 received_version;$/;"        m       struct:eap_tlv_crypto_binding_tlv
+reg_success_cb src/wps/wps.h   /^      void (*reg_success_cb)(void *ctx, const u8 *mac_addr,$/;"       m       struct:wps_registrar_config
+reg_success_cb src/wps/wps_registrar.c /^      void (*reg_success_cb)(void *ctx, const u8 *mac_addr,$/;"       m       struct:wps_registrar    file:
+registrar      src/wps/wps.h   /^      int registrar;$/;"      m       struct:wps_config
+registrar      src/wps/wps.h   /^      struct wps_registrar *registrar;$/;"    m       struct:wps_context      typeref:struct:wps_context::wps_registrar
+registrar      src/wps/wps_i.h /^      int registrar;$/;"      m       struct:wps_data
+registrar_nonce        src/wps/wps_attr_parse.h        /^      const u8 *registrar_nonce; \/* WPS_NONCE_LEN (16) octets *\/$/;"        m       struct:wps_parse_attr
+reject_4way_hs_for_entropy     src/ap/wpa_auth_i.h     /^      Boolean reject_4way_hs_for_entropy;$/;" m       struct:wpa_group
+reload_config  src/ap/hostapd.h        /^      int (*reload_config)(struct hostapd_iface *iface);$/;"  m       struct:hapd_interfaces
+renew_snonce   src/rsn_supp/wpa.h      /^    int renew_snonce;$/;"     m       struct:wpa_sm
+replay_counter src/common/eapol_common.h       /^      u8 replay_counter[IEEE8021X_REPLAY_COUNTER_LEN];$/;"    m       struct:ieee802_1x_eapol_key
+replay_counter src/common/wpa_common.h /^      u8 replay_counter[WPA_REPLAY_COUNTER_LEN];$/;"  m       struct:wpa_eapol_key
+req_dev_type   src/wps/wps_attr_parse.h        /^      const u8 *req_dev_type[MAX_REQ_DEV_TYPE_COUNT];$/;"     m       struct:wps_parse_attr
+req_replay_counter     src/ap/wpa_auth_i.h     /^      u8 req_replay_counter[WPA_REPLAY_COUNTER_LEN];$/;"      m       struct:wpa_state_machine
+req_replay_counter_used        src/ap/wpa_auth_i.h     /^      int req_replay_counter_used;$/;"        m       struct:wpa_state_machine
+request_counter        src/rsn_supp/wpa.h      /^    u8 request_counter[WPA_REPLAY_COUNTER_LEN];$/;"   m       struct:wpa_sm
+request_to_enroll      src/wps/wps_attr_parse.h        /^      const u8 *request_to_enroll; \/* 1 octet (Bool) *\/$/;" m       struct:wps_parse_attr
+request_type   src/wps/wps_attr_parse.h        /^      const u8 *request_type; \/* 1 octet *\/$/;"     m       struct:wps_parse_attr
+request_type   src/wps/wps_i.h /^      u8 request_type;$/;"    m       struct:wps_data
+require_ht     src/ap/ap_config.h      /^      int require_ht;$/;"     m       struct:hostapd_config
+require_vht    src/ap/ap_config.h      /^      int require_vht;$/;"    m       struct:hostapd_config
+resend_eapol   src/ap/wpa_auth_i.h     /^      ETSTimer resend_eapol;$/;"      m       struct:wpa_state_machine
+resend_eapol_handle    src/ap/wpa_auth.c       /^void resend_eapol_handle(void *timeout_ctx)$/;"       f
+reserved       src/common/ieee802_11_defs.h    /^      u8 reserved; \/* 0 *\/$/;"      m       struct:wmm_parameter_element
+reserved       src/eap_peer/eap_mschapv2.c     /^      u8 reserved[8];$/;"     m       struct:ms_change_password       file:
+reserved       src/eap_peer/eap_mschapv2.c     /^      u8 reserved[8];$/;"     m       struct:ms_response      file:
+reserved       src/eap_peer/eap_tlv_common.h   /^      u8 reserved;$/;"        m       struct:eap_tlv_crypto_binding_tlv
+response_type  src/wps/wps_attr_parse.h        /^      const u8 *response_type; \/* 1 octet *\/$/;"    m       struct:wps_parse_attr
+result src/eap_peer/eap_tlv_common.h   /^      be16 result;$/;"        m       struct:eap_tlv_pac_ack_tlv
+resuming       src/eap_peer/eap_peap.c /^      int resuming; \/* starting a resumed session *\/$/;"    m       struct:eap_peap_data    file:
+resuming       src/eap_peer/eap_ttls.c /^      int resuming; \/* starting a resumed session *\/$/;"    m       struct:eap_ttls_data    file:
+ret    src/esp_supplicant/esp_wps.c    /^    int ret; \/* return value *\/$/;" m       struct:__anon33 file:
+rf_bands       src/wps/wps.h   /^      u8 rf_bands;$/;"        m       struct:wps_device_data
+rf_bands       src/wps/wps_attr_parse.h        /^      const u8 *rf_bands; \/* 1 octet *\/$/;" m       struct:wps_parse_attr
+rid    src/tls/x509v3.h        /^      struct asn1_oid rid; \/* registeredID *\/$/;"   m       struct:x509_name        typeref:struct:x509_name::asn1_oid
+rijndaelDecrypt        src/crypto/aes-internal-dec.c   /^static void  rijndaelDecrypt(const u32 rk[\/*44*\/], int Nr, const u8 ct[16],$/;"     f       file:
+rijndaelEncrypt        src/crypto/aes-internal-enc.c   /^void  rijndaelEncrypt(const u32 rk[], int Nr, const u8 pt[16], u8 ct[16])$/;" f
+rijndaelKeySetupDec    src/crypto/aes-internal-dec.c   /^static int  rijndaelKeySetupDec(u32 rk[], const u8 cipherKey[], int keyBits)$/;"      f       file:
+rijndaelKeySetupEnc    src/crypto/aes-internal.c       /^int rijndaelKeySetupEnc(u32 rk[], const u8 cipherKey[], int keyBits)$/;"      f
+rl     src/tls/tlsv1_client_i.h        /^      struct tlsv1_record_layer rl;$/;"       m       struct:tlsv1_client     typeref:struct:tlsv1_client::tlsv1_record_layer
+rl     src/tls/tlsv1_server_i.h        /^      struct tlsv1_record_layer rl;$/;"       m       struct:tlsv1_server     typeref:struct:tlsv1_server::tlsv1_record_layer
+rol    src/crypto/sha1-internal.c      132;"   d       file:
+rotate_bits    src/tls/asn1.c  /^static u8 rotate_bits(u8 octet)$/;"   f       file:
+rotr   src/crypto/aes_i.h      /^static inline u32 rotr(u32 val, int bits)$/;" f
+rsn    src/esp_supplicant/esp_wifi_driver.h    /^    uint8_t    *rsn;$/;"      m       struct:wps_scan_ie
+rsn_cipher_put_suites  src/common/wpa_common.c /^int rsn_cipher_put_suites(u8 *pos, int ciphers)$/;"   f
+rsn_enabled    src/rsn_supp/wpa.h      /^    int rsn_enabled; \/* Whether RSN is enabled in configuration *\/$/;"      m       struct:wpa_sm
+rsn_error_kde  src/common/wpa_common.h /^struct rsn_error_kde {$/;"    s
+rsn_ftie       src/common/wpa_common.h /^struct rsn_ftie {$/;" s
+rsn_ie src/ap/wpa_auth_ie.h    /^      const u8 *rsn_ie;$/;"   m       struct:wpa_eapol_ie_parse
+rsn_ie src/rsn_supp/wpa_ie.h   /^      const u8 *rsn_ie;$/;"   m       struct:wpa_eapol_ie_parse
+rsn_ie_hdr     src/common/wpa_common.h /^struct rsn_ie_hdr {$/;"       s
+rsn_ie_len     src/ap/wpa_auth_ie.h    /^      size_t rsn_ie_len;$/;"  m       struct:wpa_eapol_ie_parse
+rsn_ie_len     src/rsn_supp/wpa_ie.h   /^      size_t rsn_ie_len;$/;"  m       struct:wpa_eapol_ie_parse
+rsn_key_mgmt_to_bitfield       src/common/wpa_common.c /^static int rsn_key_mgmt_to_bitfield(const u8 *s)$/;"  f       file:
+rsn_mdie       src/common/wpa_common.h /^struct rsn_mdie {$/;" s
+rsn_pairwise   src/ap/ap_config.h      /^      int rsn_pairwise;$/;"   m       struct:hostapd_bss_config
+rsn_pairwise   src/ap/wpa_auth.h       /^      int rsn_pairwise;$/;"   m       struct:wpa_auth_config
+rsn_pmkid      src/common/wpa_common.c /^void rsn_pmkid(const u8 *pmk, size_t pmk_len, const u8 *aa, const u8 *spa,$/;"        f
+rsn_preauth    src/ap/ap_config.h      /^      int rsn_preauth;$/;"    m       struct:hostapd_bss_config
+rsn_preauth    src/ap/wpa_auth.h       /^      int rsn_preauth;$/;"    m       struct:wpa_auth_config
+rsn_preauth_interfaces src/ap/ap_config.h      /^      char *rsn_preauth_interfaces;$/;"       m       struct:hostapd_bss_config
+rsn_rdie       src/common/wpa_common.h /^struct rsn_rdie {$/;" s
+rsn_selector_to_bitfield       src/common/wpa_common.c /^static int rsn_selector_to_bitfield(const u8 *s)$/;"  f       file:
+rsn_testing    src/ap/wpa_auth_ie.c    /^int rsn_testing = 0;$/;"      v
+rts_threshold  src/ap/ap_config.h      /^      int rts_threshold;$/;"  m       struct:hostapd_config
+rx_eapol_key_secure    src/ap/wpa_auth_i.h     /^      unsigned int rx_eapol_key_secure:1;$/;" m       struct:wpa_state_machine
+rx_mic_key     src/common/wpa_common.h /^                      u8 rx_mic_key[8];$/;"   m       struct:wpa_ptk::__anon62::__anon63
+rx_replay_counter      src/rsn_supp/wpa.h      /^    u8 rx_replay_counter[WPA_REPLAY_COUNTER_LEN];$/;" m       struct:wpa_sm
+rx_replay_counter_set  src/rsn_supp/wpa.h      /^    int rx_replay_counter_set;$/;"    m       struct:wpa_sm
+s16    include/utils/common.h  /^typedef int16_t s16;$/;"      t
+s1kh_id        src/ap/wpa_auth.h       /^      u8 s1kh_id[ETH_ALEN]; \/* copied from pull *\/$/;"      m       struct:ft_r0kh_r1kh_resp_frame
+s1kh_id        src/ap/wpa_auth.h       /^      u8 s1kh_id[ETH_ALEN];$/;"       m       struct:ft_r0kh_r1kh_pull_frame
+s1kh_id        src/ap/wpa_auth.h       /^      u8 s1kh_id[ETH_ALEN];$/;"       m       struct:ft_r0kh_r1kh_push_frame
+s32    include/utils/common.h  /^typedef int32_t s32;$/;"      t
+s64    include/utils/common.h  /^typedef int64_t s64;$/;"      t
+s8     include/utils/common.h  /^typedef int8_t s8;$/;"        t
+s_factory_info src/esp_supplicant/esp_wps.c    /^static wps_factory_information_t *s_factory_info = NULL;$/;"  v       file:
+s_mp_add       src/crypto/libtommath.h /^s_mp_add (mp_int * a, mp_int * b, mp_int * c)$/;"     f
+s_mp_add       src/tls/libtommath.h    /^s_mp_add (mp_int * a, mp_int * b, mp_int * c)$/;"     f
+s_mp_exptmod   src/crypto/libtommath.h /^s_mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode)$/;"        f
+s_mp_exptmod   src/tls/libtommath.h    /^s_mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode)$/;"        f
+s_mp_mul       src/crypto/libtommath.h 132;"   d
+s_mp_mul       src/tls/libtommath.h    134;"   d
+s_mp_mul_digs  src/crypto/libtommath.h /^s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)$/;"      f
+s_mp_mul_digs  src/tls/libtommath.h    /^s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)$/;"      f
+s_mp_mul_high_digs     src/crypto/libtommath.h /^s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)$/;" f
+s_mp_mul_high_digs     src/tls/libtommath.h    /^s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)$/;" f
+s_mp_sqr       src/crypto/libtommath.h /^s_mp_sqr (mp_int * a, mp_int * b)$/;" f
+s_mp_sqr       src/tls/libtommath.h    /^s_mp_sqr (mp_int * a, mp_int * b)$/;" f
+s_mp_sub       src/crypto/libtommath.h /^s_mp_sub (mp_int * a, mp_int * b, mp_int * c)$/;"     f
+s_mp_sub       src/tls/libtommath.h    /^s_mp_sub (mp_int * a, mp_int * b, mp_int * c)$/;"     f
+s_sm_table     src/ap/wpa_auth.c       /^static void *s_sm_table[WPA_SM_MAX_INDEX];$/;"        v       file:
+s_sm_valid_bitmap      src/ap/wpa_auth.c       /^static u32 s_sm_valid_bitmap = 0;$/;" v       file:
+s_wps_api_lock src/esp_supplicant/esp_wps.c    /^static void *s_wps_api_lock = NULL;  \/* Used in WPS public API only, never be freed *\/$/;"  v       file:
+s_wps_api_sem  src/esp_supplicant/esp_wps.c    /^static void *s_wps_api_sem = NULL;   \/* Sync semaphore used between WPS publi API caller task and WPS task *\/$/;"   v       file:
+s_wps_data_lock        src/esp_supplicant/esp_wps.c    /^static void *s_wps_data_lock = NULL;$/;"      v       file:
+s_wps_enabled  src/esp_supplicant/esp_wps.c    /^static bool s_wps_enabled = false;$/;"        v       file:
+s_wps_sig_cnt  src/esp_supplicant/esp_wps.c    /^static uint8_t s_wps_sig_cnt[SIG_WPS_NUM] = {0};$/;"  v       file:
+s_wps_task_create_sem  src/esp_supplicant/esp_wps.c    /^static void *s_wps_task_create_sem = NULL;$/;"        v       file:
+sa     src/common/ieee802_11_defs.h    /^      u8 sa[6];$/;"   m       struct:ieee80211_mgmt
+sa     src/esp_supplicant/esp_wpa_enterprise.c /^    u8 sa[WPA_ADDR_LEN];$/;"  m       struct:wpa2_rx_param    file:
+sa     src/esp_supplicant/esp_wps.c    /^    u8 sa[WPS_ADDR_LEN];$/;"  m       struct:wps_rx_param     file:
+sa_query_count src/ap/sta_info.h       /^      int sa_query_count; \/* number of pending SA Query requests;$/;"        m       struct:sta_info
+sa_query_req   src/common/ieee802_11_defs.h    /^                              } STRUCT_PACKED sa_query_req;$/;"       m       union:ieee80211_mgmt::__anon66::__anon76::__anon77      typeref:struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon82
+sa_query_resp  src/common/ieee802_11_defs.h    /^                              } STRUCT_PACKED sa_query_resp;$/;"      m       union:ieee80211_mgmt::__anon66::__anon76::__anon77      typeref:struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon83
+sa_query_start src/ap/sta_info.h       /^      struct os_time sa_query_start;$/;"      m       struct:sta_info typeref:struct:sta_info::os_time
+sa_query_timed_out     src/ap/sta_info.h       /^      int sa_query_timed_out;$/;"     m       struct:sta_info
+sa_query_trans_id      src/ap/sta_info.h       /^      u8 *sa_query_trans_id; \/* buffer of WLAN_SA_QUERY_TR_ID_LEN *$/;"      m       struct:sta_info
+sae_send_confirm       src/ap/sta_info.h       /^      u16 sae_send_confirm;$/;"       m       struct:sta_info
+sae_state      src/ap/sta_info.h       /^      enum { SAE_INIT, SAE_COMMIT, SAE_CONFIRM } sae_state;$/;"       m       struct:sta_info typeref:enum:sta_info::__anon16
+salt   src/tls/pkcs5.c /^      u8 salt[8];$/;" m       struct:pkcs5_params     file:
+salt_len       src/tls/pkcs5.c /^      size_t salt_len;$/;"    m       struct:pkcs5_params     file:
+scan_cnt       src/wps/wps.h   /^    u8 scan_cnt;$/;"  m       struct:wps_sm
+search_tag     src/tls/tlsv1_cred.c    /^static const u8 * search_tag(const char *tag, const u8 *buf, size_t len)$/;"  f       file:
+sec    port/include/os.h       /^      os_time_t sec;$/;"      m       struct:os_time
+sec_dev_type   src/wps/wps.h   /^      u8 sec_dev_type[WPS_SEC_DEVICE_TYPES][WPS_DEV_TYPE_LEN];$/;"    m       struct:wps_device_data
+sec_dev_type_list      src/wps/wps_attr_parse.h        /^      const u8 *sec_dev_type_list; \/* <= 128 octets *\/$/;"  m       struct:wps_parse_attr
+sec_dev_type_list_len  src/wps/wps_attr_parse.h        /^      size_t sec_dev_type_list_len;$/;"       m       struct:wps_parse_attr
+secondary_channel      src/ap/ap_config.h      /^      int secondary_channel;$/;"      m       struct:hostapd_config
+secpolicy      src/ap/ap_config.h      /^} secpolicy;$/;"      t       typeref:enum:hostap_security_policy
+sel_reg        src/wps/wps.h   /^              int sel_reg;$/;"        m       struct:wps_event_data::wps_event_er_set_selected_registrar
+sel_reg_config_methods src/wps/wps.h   /^              u16 sel_reg_config_methods;$/;" m       struct:wps_event_data::wps_event_er_set_selected_registrar
+sel_reg_config_methods src/wps/wps_attr_parse.h        /^      const u8 *sel_reg_config_methods; \/* 2 octets *\/$/;"  m       struct:wps_parse_attr
+sel_reg_config_methods_override        src/wps/wps_registrar.c /^      int sel_reg_config_methods_override;$/;"        m       struct:wps_registrar    file:
+sel_reg_dev_password_id_override       src/wps/wps_registrar.c /^      int sel_reg_dev_password_id_override;$/;"       m       struct:wps_registrar    file:
+sel_reg_union  src/wps/wps_registrar.c /^      int sel_reg_union;$/;"  m       struct:wps_registrar    file:
+selected_registrar     src/wps/wps_attr_parse.h        /^      const u8 *selected_registrar; \/* 1 octet (Bool) *\/$/;"        m       struct:wps_parse_attr
+selected_registrar     src/wps/wps_registrar.c /^      int selected_registrar;$/;"     m       struct:wps_registrar    file:
+send_eapol     src/ap/wpa_auth.h       /^      int (*send_eapol)(void *ctx, const u8 *addr, const u8 *data,$/;"        m       struct:wpa_auth_callbacks
+send_ether     src/ap/wpa_auth.h       /^      int (*send_ether)(void *ctx, const u8 *dst, u16 proto, const u8 *data,$/;"      m       struct:wpa_auth_callbacks
+send_ft_action src/ap/wpa_auth.h       /^      int (*send_ft_action)(void *ctx, const u8 *dst,$/;"     m       struct:wpa_auth_callbacks
+send_probe_response    src/ap/ap_config.h      /^      u8 send_probe_response;$/;"     m       struct:hostapd_config
+sendto src/rsn_supp/wpa.h      /^    void (* sendto) (void *buffer, uint16_t len);$/;" m       struct:wpa_sm
+seq    src/rsn_supp/wpa.h      /^    u8 seq[10];$/;"   m       struct:install_key
+seq_ctrl       src/common/ieee802_11_defs.h    /^      le16 seq_ctrl;$/;"      m       struct:ieee80211_hdr
+seq_ctrl       src/common/ieee802_11_defs.h    /^      le16 seq_ctrl;$/;"      m       struct:ieee80211_mgmt
+serial_number  src/ap/ap_config.h      /^      char *serial_number;$/;"        m       struct:hostapd_bss_config
+serial_number  src/tls/x509v3.h        /^      unsigned long serial_number;$/;"        m       struct:x509_certificate
+serial_number  src/wps/wps.h   /^              const char *serial_number;$/;"  m       struct:wps_event_data::wps_event_er_ap
+serial_number  src/wps/wps.h   /^              const char *serial_number;$/;"  m       struct:wps_event_data::wps_event_er_enrollee
+serial_number  src/wps/wps.h   /^              const u8 *serial_number;$/;"    m       struct:wps_event_data::wps_event_m2d
+serial_number  src/wps/wps.h   /^      char *serial_number;$/;"        m       struct:wps_device_data
+serial_number  src/wps/wps_attr_parse.h        /^      const u8 *serial_number;$/;"    m       struct:wps_parse_attr
+serial_number_len      src/wps/wps.h   /^              size_t serial_number_len;$/;"   m       struct:wps_event_data::wps_event_m2d
+serial_number_len      src/wps/wps_attr_parse.h        /^      size_t serial_number_len;$/;"   m       struct:wps_parse_attr
+server src/tls/tls_internal.c  /^      int server;$/;" m       struct:tls_global       file:
+server src/tls/tls_internal.c  /^      struct tlsv1_server *server;$/;"        m       struct:tls_connection   typeref:struct:tls_connection::tlsv1_server     file:
+server_cred    src/tls/tls_internal.c  /^      struct tlsv1_credentials *server_cred;$/;"      m       struct:tls_global       typeref:struct:tls_global::tlsv1_credentials    file:
+server_random  src/tls/tls.h   /^      const u8 *server_random;$/;"    m       struct:tls_keys
+server_random  src/tls/tlsv1_client_i.h        /^      u8 server_random[TLS_RANDOM_LEN];$/;"   m       struct:tlsv1_client
+server_random  src/tls/tlsv1_server_i.h        /^      u8 server_random[TLS_RANDOM_LEN];$/;"   m       struct:tlsv1_server
+server_random_len      src/tls/tls.h   /^      size_t server_random_len;$/;"   m       struct:tls_keys
+server_rsa_key src/tls/tlsv1_client_i.h        /^      struct crypto_public_key *server_rsa_key;$/;"   m       struct:tlsv1_client     typeref:struct:tlsv1_client::crypto_public_key
+service_start_time     src/common/ieee802_11_defs.h    /^      le32 service_start_time;$/;"    m       struct:wmm_tspec_element
+session_id     src/eap_peer/eap_peap.c /^      u8 *session_id;$/;"     m       struct:eap_peap_data    file:
+session_id     src/eap_peer/eap_tls.c  /^      u8 *session_id;$/;"     m       struct:eap_tls_data     file:
+session_id     src/eap_peer/eap_ttls.c /^      u8 *session_id;$/;"     m       struct:eap_ttls_data    file:
+session_id     src/tls/tlsv1_client_i.h        /^      u8 session_id[TLS_SESSION_ID_MAX_LEN];$/;"      m       struct:tlsv1_client
+session_id     src/tls/tlsv1_server_i.h        /^      u8 session_id[TLS_SESSION_ID_MAX_LEN];$/;"      m       struct:tlsv1_server
+session_id_len src/tls/tlsv1_client_i.h        /^      size_t session_id_len;$/;"      m       struct:tlsv1_client
+session_id_len src/tls/tlsv1_server_i.h        /^      size_t session_id_len;$/;"      m       struct:tlsv1_server
+session_resumed        src/tls/tlsv1_client_i.h        /^      unsigned int session_resumed:1;$/;"     m       struct:tlsv1_client
+session_ticket src/tls/tlsv1_server_i.h        /^      u8 *session_ticket;$/;" m       struct:tlsv1_server
+session_ticket_cb      src/tls/tlsv1_client_i.h        /^      tlsv1_client_session_ticket_cb session_ticket_cb;$/;"   m       struct:tlsv1_client
+session_ticket_cb      src/tls/tlsv1_server_i.h        /^      tlsv1_server_session_ticket_cb session_ticket_cb;$/;"   m       struct:tlsv1_server
+session_ticket_cb_ctx  src/tls/tlsv1_client_i.h        /^      void *session_ticket_cb_ctx;$/;"        m       struct:tlsv1_client
+session_ticket_cb_ctx  src/tls/tlsv1_server_i.h        /^      void *session_ticket_cb_ctx;$/;"        m       struct:tlsv1_server
+session_ticket_included        src/tls/tlsv1_client_i.h        /^      unsigned int session_ticket_included:1;$/;"     m       struct:tlsv1_client
+session_ticket_len     src/tls/tlsv1_server_i.h        /^      size_t session_ticket_len;$/;"  m       struct:tlsv1_server
+set_assoc_ie   src/rsn_supp/wpa.c      /^set_assoc_ie(u8 * assoc_buf)$/;"      f
+set_eapol      src/ap/wpa_auth.h       /^      void (*set_eapol)(void *ctx, const u8 *addr, wpa_eapol_variable var,$/;"        m       struct:wpa_auth_callbacks
+set_ie_cb      src/wps/wps.h   /^      int (*set_ie_cb)(void *ctx, struct wpabuf *beacon_ie,$/;"       m       struct:wps_registrar_config
+set_ie_cb      src/wps/wps_registrar.c /^      int (*set_ie_cb)(void *ctx, struct wpabuf *beacon_ie,$/;"       m       struct:wps_registrar    file:
+set_key        src/ap/wpa_auth.h       /^      int (*set_key)(void *ctx, int vlan_id, enum wpa_alg alg,$/;"    m       struct:wpa_auth_callbacks
+set_sel_reg    src/wps/wps.h   /^      } set_sel_reg;$/;"      m       union:wps_event_data    typeref:struct:wps_event_data::wps_event_er_set_selected_registrar
+set_sel_reg_cb src/wps/wps.h   /^      void (*set_sel_reg_cb)(void *ctx, int sel_reg, u16 dev_passwd_id,$/;"   m       struct:wps_registrar_config
+set_sel_reg_cb src/wps/wps_registrar.c /^      void (*set_sel_reg_cb)(void *ctx, int sel_reg, u16 dev_passwd_id,$/;"   m       struct:wps_registrar    file:
+set_tx src/rsn_supp/wpa.h      /^    int set_tx;$/;"   m       struct:install_key
+settings_delay_time    src/wps/wps_attr_parse.h        /^      const u8 *settings_delay_time; \/* 1 octet *\/$/;"      m       struct:wps_parse_attr
+sha1   src/crypto/crypto_internal.c    /^              struct SHA1Context sha1;$/;"    m       union:crypto_hash::__anon9      typeref:struct:crypto_hash::__anon9::SHA1Context        file:
+sha1   src/fast_crypto/fast_crypto_internal.c  /^              struct SHA1Context sha1;$/;"    m       union:fast_crypto_hash::__anon61        typeref:struct:fast_crypto_hash::__anon61::SHA1Context  file:
+sha1_cert      src/tls/tlsv1_common.h  /^      struct crypto_hash *sha1_cert;$/;"      m       struct:tls_verify_hash  typeref:struct:tls_verify_hash::crypto_hash
+sha1_client    src/tls/tlsv1_common.h  /^      struct crypto_hash *sha1_client;$/;"    m       struct:tls_verify_hash  typeref:struct:tls_verify_hash::crypto_hash
+sha1_prf       src/crypto/sha1.c       /^sha1_prf(const u8 *key, size_t key_len, const char *label,$/;"        f
+sha1_server    src/tls/tlsv1_common.h  /^      struct crypto_hash *sha1_server;$/;"    m       struct:tls_verify_hash  typeref:struct:tls_verify_hash::crypto_hash
+sha1_vector    src/crypto/sha1-internal.c      /^sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)$/;"        f
+sha256 src/crypto/crypto_internal.c    /^              struct sha256_state sha256;$/;" m       union:crypto_hash::__anon9      typeref:struct:crypto_hash::__anon9::sha256_state       file:
+sha256 src/fast_crypto/fast_crypto_internal.c  /^                mbedtls_sha256_context sha256;$/;"    m       union:fast_crypto_hash::__anon61        file:
+sha256_cert    src/tls/tlsv1_common.h  /^      struct crypto_hash *sha256_cert;$/;"    m       struct:tls_verify_hash  typeref:struct:tls_verify_hash::crypto_hash
+sha256_client  src/tls/tlsv1_common.h  /^      struct crypto_hash *sha256_client;$/;"  m       struct:tls_verify_hash  typeref:struct:tls_verify_hash::crypto_hash
+sha256_compress        src/crypto/sha256-internal.c    /^sha256_compress(struct sha256_state *md, unsigned char *buf)$/;"      f       file:
+sha256_done    src/crypto/sha256-internal.c    /^sha256_done(struct sha256_state *md, unsigned char *out)$/;"  f       file:
+sha256_init    src/crypto/sha256-internal.c    /^sha256_init(struct sha256_state *md)$/;"      f       file:
+sha256_prf     src/crypto/sha256.c     /^sha256_prf(const u8 *key, size_t key_len, const char *label,$/;"      f
+sha256_process src/crypto/sha256-internal.c    /^sha256_process(struct sha256_state *md, const unsigned char *in,$/;"  f       file:
+sha256_server  src/tls/tlsv1_common.h  /^      struct crypto_hash *sha256_server;$/;"  m       struct:tls_verify_hash  typeref:struct:tls_verify_hash::crypto_hash
+sha256_state   src/crypto/sha256-internal.c    /^struct sha256_state {$/;"     s       file:
+sha256_vector  src/crypto/sha256-internal.c    /^sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len,$/;"       f
+sign   src/crypto/libtommath.h /^    int used, alloc, sign;$/;"        m       struct:__anon8
+sign   src/tls/libtommath.h    /^    int used, alloc, sign;$/;"        m       struct:__anon40
+sign_value     src/tls/x509v3.h        /^      u8 *sign_value;$/;"     m       struct:x509_certificate
+sign_value_len src/tls/x509v3.h        /^      size_t sign_value_len;$/;"      m       struct:x509_certificate
+signature      src/tls/x509v3.h        /^      struct x509_algorithm_identifier signature;$/;" m       struct:x509_certificate typeref:struct:x509_certificate::x509_algorithm_identifier
+signature_alg  src/tls/x509v3.h        /^      struct x509_algorithm_identifier signature_alg;$/;"     m       struct:x509_certificate typeref:struct:x509_certificate::x509_algorithm_identifier
+size   include/utils/wpabuf.h  /^      size_t size; \/* total size of the allocated buffer *\/$/;"     m       struct:wpabuf
+skip_cred_build        src/ap/ap_config.h      /^      int skip_cred_build;$/;"        m       struct:hostapd_bss_config
+skip_cred_build        src/wps/wps.h   /^      int skip_cred_build;$/;"        m       struct:wps_registrar_config
+skip_cred_build        src/wps/wps_registrar.c /^      int skip_cred_build;$/;"        m       struct:wps_registrar    file:
+smk    src/ap/wpa_auth_ie.h    /^      const u8 *smk;$/;"      m       struct:wpa_eapol_ie_parse
+smk    src/rsn_supp/wpa_ie.h   /^      const u8 *smk;$/;"      m       struct:wpa_eapol_ie_parse
+smk_len        src/ap/wpa_auth_ie.h    /^      size_t smk_len;$/;"     m       struct:wpa_eapol_ie_parse
+smk_len        src/rsn_supp/wpa_ie.h   /^      size_t smk_len;$/;"     m       struct:wpa_eapol_ie_parse
+snonce src/common/wpa_common.h /^      u8 snonce[WPA_NONCE_LEN];$/;"   m       struct:rsn_ftie
+snonce src/rsn_supp/wpa.h      /^    u8 snonce[WPA_NONCE_LEN];$/;"     m       struct:wpa_sm
+snonce src/wps/wps_i.h /^      u8 snonce[2 * WPS_SECRET_NONCE_LEN];$/;"        m       struct:wps_data
+soh    src/eap_peer/eap_peap.c /^      int soh; \/* Whether IF-TNCCS-SOH (Statement of Health; Microsoft NAP)$/;"      m       struct:eap_peap_data    file:
+ssi_signal     src/ap/hostapd.h        /^      int ssi_signal; \/* dBm *\/$/;" m       struct:hostapd_frame_info
+ssid   src/ap/ap_config.h      /^      struct hostapd_ssid ssid;$/;"   m       struct:hostapd_bss_config       typeref:struct:hostapd_bss_config::hostapd_ssid
+ssid   src/ap/ap_config.h      /^      u8 ssid[HOSTAPD_MAX_SSID_LEN];$/;"      m       struct:hostapd_ssid
+ssid   src/ap/sta_info.h       /^      struct hostapd_ssid *ssid; \/* SSID selection based on (Re)AssocReq *\/$/;"     m       struct:sta_info typeref:struct:sta_info::hostapd_ssid
+ssid   src/ap/wpa_auth.h       /^      u8 ssid[SSID_LEN];$/;"  m       struct:wpa_auth_config
+ssid   src/esp_supplicant/esp_wifi_driver.h    /^    uint8_t    *ssid;$/;"     m       struct:wps_scan_ie
+ssid   src/esp_supplicant/esp_wifi_driver.h    /^    uint8_t ssid[32];$/;"     m       struct:wifi_ssid
+ssid   src/wps/wps.h   /^      u8 ssid[32];$/;"        m       struct:wps_context
+ssid   src/wps/wps.h   /^      u8 ssid[32];$/;"        m       struct:wps_credential
+ssid   src/wps/wps.h   /^    u8 ssid[32];$/;"  m       struct:wps_sm
+ssid   src/wps/wps_attr_parse.h        /^      const u8 *ssid; \/* <= 32 octets *\/$/;"        m       struct:wps_parse_attr
+ssid_len       src/ap/ap_config.h      /^      size_t ssid_len;$/;"    m       struct:hostapd_ssid
+ssid_len       src/ap/wpa_auth.h       /^      size_t ssid_len;$/;"    m       struct:wpa_auth_config
+ssid_len       src/wps/wps.h   /^      size_t ssid_len;$/;"    m       struct:wps_context
+ssid_len       src/wps/wps.h   /^      size_t ssid_len;$/;"    m       struct:wps_credential
+ssid_len       src/wps/wps.h   /^    u8 ssid_len;$/;"  m       struct:wps_sm
+ssid_len       src/wps/wps_attr_parse.h        /^      size_t ssid_len;$/;"    m       struct:wps_parse_attr
+ssid_set       src/ap/ap_config.h      /^      unsigned int ssid_set:1;$/;"    m       struct:hostapd_ssid
+ssl    src/eap_peer/eap_peap.c /^      struct eap_ssl_data ssl;$/;"    m       struct:eap_peap_data    typeref:struct:eap_peap_data::eap_ssl_data      file:
+ssl    src/eap_peer/eap_tls.c  /^      struct eap_ssl_data ssl;$/;"    m       struct:eap_tls_data     typeref:struct:eap_tls_data::eap_ssl_data       file:
+ssl    src/eap_peer/eap_ttls.c /^      struct eap_ssl_data ssl;$/;"    m       struct:eap_ttls_data    typeref:struct:eap_ttls_data::eap_ssl_data      file:
+ssl_ctx        src/eap_peer/eap_i.h    /^      void *ssl_ctx;$/;"      m       struct:eap_sm
+ssl_ctx        src/eap_peer/eap_tls.c  /^      void *ssl_ctx;$/;"      m       struct:eap_tls_data     file:
+ssl_ctx        src/eap_peer/eap_tls_common.h   /^      void *ssl_ctx;$/;"      m       struct:eap_ssl_data
+st_cb  src/wps/wps.h   /^    wps_st_cb_t st_cb;$/;"    m       struct:wps_sm
+sta_addr       src/common/ieee802_11_defs.h    /^                                      u8 sta_addr[ETH_ALEN];$/;"      m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon80
+sta_addr       src/common/ieee802_11_defs.h    /^                                      u8 sta_addr[ETH_ALEN];$/;"      m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon81
+sta_info       src/ap/sta_info.h       /^struct sta_info {$/;" s
+started        src/ap/wpa_auth_i.h     /^      unsigned int started:1;$/;"     m       struct:wpa_state_machine
+state  src/crypto/md4-internal.c       /^      u32 state[4];$/;"       m       struct:MD4Context       file:
+state  src/crypto/sha1_i.h     /^      u32 state[5];$/;"       m       struct:SHA1Context
+state  src/crypto/sha256-internal.c    /^      u32 state[8], curlen;$/;"       m       struct:sha256_state     file:
+state  src/tls/tlsv1_client_i.h        /^      } state;$/;"    m       struct:tlsv1_client     typeref:enum:tlsv1_client::__anon43
+state  src/tls/tlsv1_server_i.h        /^      } state;$/;"    m       struct:tlsv1_server     typeref:enum:tlsv1_server::__anon39
+state  src/wps/wps.h   /^              } state;$/;"    m       struct:wps_event_data::wps_event_er_set_selected_registrar      typeref:enum:wps_event_data::wps_event_er_set_selected_registrar::__anon54
+state  src/wps/wps_i.h /^      } state;$/;"    m       struct:wps_data typeref:enum:wps_data::__anon53
+static_wep_only        src/wps/wps.h   /^      int static_wep_only;$/;"        m       struct:wps_registrar_config
+static_wep_only        src/wps/wps_registrar.c /^      int static_wep_only;$/;"        m       struct:wps_registrar    file:
+status src/eap_peer/eap_tlv_common.h   /^      be16 status;$/;"        m       struct:eap_tlv_intermediate_result_tlv
+status src/eap_peer/eap_tlv_common.h   /^      be16 status;$/;"        m       struct:eap_tlv_result_tlv
+status_code    src/common/ieee802_11_defs.h    /^                                      le16 status_code;$/;"   m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon81
+status_code    src/common/ieee802_11_defs.h    /^                                      u8 status_code;$/;"     m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon78
+status_code    src/common/ieee802_11_defs.h    /^                      le16 status_code;$/;"   m       struct:ieee80211_mgmt::__anon66::__anon67
+status_code    src/common/ieee802_11_defs.h    /^                      le16 status_code;$/;"   m       struct:ieee80211_mgmt::__anon66::__anon70
+status_code    src/common/wpa_common.h /^      le16 status_code;$/;"   m       struct:rsn_rdie
+stbc_param     src/common/ieee802_11_defs.h    /^      le16 stbc_param;$/;"    m       struct:ieee80211_ht_operation
+subject        src/tls/tls.h   /^              const char *subject;$/;"        m       struct:tls_event_data::__anon34
+subject        src/tls/tls.h   /^              const char *subject;$/;"        m       struct:tls_event_data::__anon35
+subject        src/tls/x509v3.h        /^      struct x509_name subject;$/;"   m       struct:x509_certificate typeref:struct:x509_certificate::x509_name
+subject_match  src/tls/tls.h   /^      const char *subject_match;$/;"  m       struct:tls_connection_params
+subtype        src/eap_peer/eap_tlv_common.h   /^      u8 subtype;$/;" m       struct:eap_tlv_crypto_binding_tlv
+success        src/eap_peer/eap_mschapv2.c     /^      int success;$/;"        m       struct:eap_mschapv2_data        file:
+suite  src/tls/tlsv1_common.h  /^      u16 suite;$/;"  m       struct:tls_cipher_suite
+sup_pmk_r1_name        src/ap/wpa_auth_i.h     /^      u8 sup_pmk_r1_name[WPA_PMK_NAME_LEN]; \/* PMKR1Name from EAPOL-Key$/;"  m       struct:wpa_state_machine
+supported_mcs_set      src/common/ieee802_11_defs.h    /^      u8 supported_mcs_set[16];$/;"   m       struct:ieee80211_ht_capabilities
+supported_rates        src/ap/ap_config.h      /^      int *supported_rates;$/;"       m       struct:hostapd_config
+supported_rates        src/ap/sta_info.h       /^      u8 supported_rates[WLAN_SUPP_RATES_MAX];$/;"    m       struct:sta_info
+supported_rates_len    src/ap/sta_info.h       /^      int supported_rates_len;$/;"    m       struct:sta_info
+surplus_bandwidth_allowance    src/common/ieee802_11_defs.h    /^      le16 surplus_bandwidth_allowance;$/;"   m       struct:wmm_tspec_element
+suspension_interval    src/common/ieee802_11_defs.h    /^      le32 suspension_interval;$/;"   m       struct:wmm_tspec_element
+switch_count   src/common/ieee802_11_defs.h    /^                                      u8 switch_count;$/;"    m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon79
+switch_mode    src/common/ieee802_11_defs.h    /^                                      u8 switch_mode;$/;"     m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon79
+tag    src/tls/asn1.h  /^      unsigned int tag, length;$/;"   m       struct:asn1_hdr
+target_ap_addr src/common/ieee802_11_defs.h    /^                                      u8 target_ap_addr[ETH_ALEN];$/;"        m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon80
+target_ap_addr src/common/ieee802_11_defs.h    /^                                      u8 target_ap_addr[ETH_ALEN];$/;"        m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon81
+tbs_cert_len   src/tls/x509v3.h        /^      size_t tbs_cert_len;$/;"        m       struct:x509_certificate
+tbs_cert_start src/tls/x509v3.h        /^      const u8 *tbs_cert_start;$/;"   m       struct:x509_certificate
+timeout_next   src/ap/sta_info.h       /^      } timeout_next;$/;"     m       struct:sta_info typeref:enum:sta_info::__anon15
+timestamp      src/ap/wpa_auth.h       /^      u8 timestamp[4]; \/* current time in seconds since unix epoch, little$/;"       m       struct:ft_r0kh_r1kh_push_frame
+timestamp      src/common/ieee802_11_defs.h    /^                      u8 timestamp[8];$/;"    m       struct:ieee80211_mgmt::__anon66::__anon73
+timestamp      src/common/ieee802_11_defs.h    /^                      u8 timestamp[8];$/;"    m       struct:ieee80211_mgmt::__anon66::__anon75
+timestamp      src/wps/wps_registrar.c /^      struct os_time timestamp;$/;"   m       struct:wps_pbc_session  typeref:struct:wps_pbc_session::os_time file:
+tk1    src/common/wpa_common.h /^      u8 tk1[16]; \/* Temporal Key 1 (TK1) *\/$/;"    m       struct:wpa_ptk
+tk2    src/common/wpa_common.h /^              u8 tk2[16]; \/* Temporal Key 2 (TK2) *\/$/;"    m       union:wpa_ptk::__anon62
+tls_alert      src/tls/tlsv1_client.c  /^void tls_alert(struct tlsv1_client *conn, u8 level, u8 description)$/;"       f
+tls_capabilities       src/tls/tls_internal.c  /^unsigned int tls_capabilities(void *tls_ctx)$/;"      f
+tls_cipher     src/tls/tlsv1_common.h  /^} tls_cipher;$/;"     t       typeref:enum:__anon50
+tls_cipher_data        src/tls/tlsv1_common.h  /^struct tls_cipher_data {$/;"  s
+tls_cipher_suite       src/tls/tlsv1_common.h  /^struct tls_cipher_suite {$/;" s
+tls_cipher_suites      src/tls/tlsv1_common.c  /^static const struct tls_cipher_suite tls_cipher_suites[] = {$/;"      v       typeref:struct:tls_cipher_suite file:
+tls_cipher_type        src/tls/tlsv1_common.h  /^} tls_cipher_type;$/;"        t       typeref:enum:__anon52
+tls_ciphers    src/tls/tlsv1_common.c  /^static const struct tls_cipher_data tls_ciphers[] = {$/;"     v       typeref:struct:tls_cipher_data  file:
+tls_client_cert_chain_der_len  src/tls/tlsv1_client_write.c    /^static size_t tls_client_cert_chain_der_len(struct tlsv1_client *conn)$/;"    f       file:
+tls_config     src/tls/tls.h   /^struct tls_config {$/;"       s
+tls_connection src/tls/tls_internal.c  /^struct tls_connection {$/;"   s       file:
+tls_connection_client_hello_ext        src/tls/tls_internal.c  /^int tls_connection_client_hello_ext(void *tls_ctx, struct tls_connection *conn,$/;"   f
+tls_connection_decrypt src/tls/tls_internal.c  /^struct wpabuf * tls_connection_decrypt(void *tls_ctx,$/;"     f
+tls_connection_decrypt2        src/tls/tls_internal.c  /^struct wpabuf * tls_connection_decrypt2(void *tls_ctx,$/;"    f
+tls_connection_deinit  src/tls/tls_internal.c  /^void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn)$/;"    f
+tls_connection_enable_workaround       src/tls/tls_internal.c  /^int tls_connection_enable_workaround(void *tls_ctx,$/;"       f
+tls_connection_encrypt src/tls/tls_internal.c  /^struct wpabuf * tls_connection_encrypt(void *tls_ctx,$/;"     f
+tls_connection_established     src/tls/tls_internal.c  /^int tls_connection_established(void *tls_ctx, struct tls_connection *conn)$/;"        f
+tls_connection_get_failed      src/tls/tls_internal.c  /^int tls_connection_get_failed(void *tls_ctx, struct tls_connection *conn)$/;" f
+tls_connection_get_keyblock_size       src/tls/tls_internal.c  /^int tls_connection_get_keyblock_size(void *tls_ctx,$/;"       f
+tls_connection_get_keys        src/tls/tls_internal.c  /^int tls_connection_get_keys(void *tls_ctx, struct tls_connection *conn,$/;"   f
+tls_connection_get_read_alerts src/tls/tls_internal.c  /^int tls_connection_get_read_alerts(void *tls_ctx, struct tls_connection *conn)$/;"    f
+tls_connection_get_write_alerts        src/tls/tls_internal.c  /^int tls_connection_get_write_alerts(void *tls_ctx,$/;"        f
+tls_connection_handshake       src/tls/tls_internal.c  /^struct wpabuf * tls_connection_handshake(void *tls_ctx,$/;"   f
+tls_connection_handshake2      src/tls/tls_internal.c  /^struct wpabuf * tls_connection_handshake2(void *tls_ctx,$/;"  f
+tls_connection_init    src/tls/tls_internal.c  /^struct tls_connection * tls_connection_init(void *tls_ctx)$/;"        f
+tls_connection_params  src/tls/tls.h   /^struct tls_connection_params {$/;"    s
+tls_connection_prf     src/tls/tls_internal.c  /^int tls_connection_prf(void *tls_ctx, struct tls_connection *conn,$/;"        f
+tls_connection_resumed src/tls/tls_internal.c  /^int tls_connection_resumed(void *tls_ctx, struct tls_connection *conn)$/;"    f
+tls_connection_server_handshake        src/tls/tls_internal.c  /^struct wpabuf * tls_connection_server_handshake(void *tls_ctx,$/;"    f
+tls_connection_set_cipher_list src/tls/tls_internal.c  /^int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn,$/;"    f
+tls_connection_set_params      src/tls/tls_internal.c  /^int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,$/;" f
+tls_connection_set_session_ticket_cb   src/tls/tls_internal.c  /^int tls_connection_set_session_ticket_cb(void *tls_ctx,$/;"   f
+tls_connection_set_verify      src/tls/tls_internal.c  /^int tls_connection_set_verify(void *tls_ctx, struct tls_connection *conn,$/;" f
+tls_connection_shutdown        src/tls/tls_internal.c  /^int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn)$/;"   f
+tls_deinit     src/tls/tls_internal.c  /^void tls_deinit(void *ssl_ctx)$/;"    f
+tls_derive_keys        src/tls/tlsv1_client.c  /^int tls_derive_keys(struct tlsv1_client *conn,$/;"    f
+tls_derive_pre_master_secret   src/tls/tlsv1_client.c  /^int tls_derive_pre_master_secret(u8 *pre_master_secret)$/;"   f
+tls_event      src/tls/tls.h   /^enum tls_event {$/;"  g
+tls_event_data src/tls/tls.h   /^union tls_event_data {$/;"    u
+tls_fail_reason        src/tls/tls.h   /^enum tls_fail_reason {$/;"    g
+tls_get_cipher src/tls/tls_internal.c  /^int tls_get_cipher(void *tls_ctx, struct tls_connection *conn,$/;"    f
+tls_get_cipher_data    src/tls/tlsv1_common.c  /^const struct tls_cipher_data * tls_get_cipher_data(tls_cipher cipher)$/;"     f
+tls_get_cipher_suite   src/tls/tlsv1_common.c  /^const struct tls_cipher_suite * tls_get_cipher_suite(u16 suite)$/;"   f
+tls_get_errors src/tls/tls_internal.c  /^int tls_get_errors(void *tls_ctx)$/;" f
+tls_global     src/tls/tls_internal.c  /^struct tls_global {$/;"       s       file:
+tls_global_set_params  src/tls/tls_internal.c  /^int tls_global_set_params(void *tls_ctx,$/;"  f
+tls_global_set_verify  src/tls/tls_internal.c  /^int tls_global_set_verify(void *tls_ctx, int check_crl)$/;"   f
+tls_hash       src/tls/tlsv1_common.h  /^} tls_hash;$/;"       t       typeref:enum:__anon51
+tls_in src/eap_peer/eap_tls_common.h   /^      struct wpabuf *tls_in;$/;"      m       struct:eap_ssl_data     typeref:struct:eap_ssl_data::wpabuf
+tls_in_left    src/eap_peer/eap_tls_common.h   /^      size_t tls_in_left;$/;" m       struct:eap_ssl_data
+tls_in_total   src/eap_peer/eap_tls_common.h   /^      size_t tls_in_total;$/;"        m       struct:eap_ssl_data
+tls_init       src/tls/tls_internal.c  /^void * tls_init(void)$/;"     f
+tls_key_exchange       src/tls/tlsv1_common.h  /^} tls_key_exchange;$/;"       t       typeref:enum:__anon49
+tls_keys       src/tls/tls.h   /^struct tls_keys {$/;" s
+tls_out        src/eap_peer/eap_tls_common.h   /^      struct wpabuf *tls_out;$/;"     m       struct:eap_ssl_data     typeref:struct:eap_ssl_data::wpabuf
+tls_out_limit  src/eap_peer/eap_tls_common.h   /^      size_t tls_out_limit;$/;"       m       struct:eap_ssl_data
+tls_out_pos    src/eap_peer/eap_tls_common.h   /^      size_t tls_out_pos;$/;" m       struct:eap_ssl_data
+tls_parse_cert src/tls/tlsv1_common.c  /^int tls_parse_cert(const u8 *buf, size_t len, struct crypto_public_key **pk)$/;"      f
+tls_prf        src/tls/tlsv1_common.c  /^int tls_prf(u16 ver, const u8 *secret, size_t secret_len, const char *label,$/;"      f
+tls_prf_sha1_md5       src/tls/tls_internal.c  /^int tls_prf_sha1_md5(const u8 *secret, size_t secret_len, const char *label,$/;"      f
+tls_process_application_data   src/tls/tlsv1_client_read.c     /^static int tls_process_application_data(struct tlsv1_client *conn, u8 ct,$/;" f       file:
+tls_process_certificate        src/tls/tlsv1_client_read.c     /^static int tls_process_certificate(struct tlsv1_client *conn, u8 ct,$/;"      f       file:
+tls_process_certificate        src/tls/tlsv1_server_read.c     /^static int tls_process_certificate(struct tlsv1_server *conn, u8 ct,$/;"      f       file:
+tls_process_certificate_request        src/tls/tlsv1_client_read.c     /^static int tls_process_certificate_request(struct tlsv1_client *conn, u8 ct,$/;"      f       file:
+tls_process_certificate_verify src/tls/tlsv1_server_read.c     /^static int tls_process_certificate_verify(struct tlsv1_server *conn, u8 ct,$/;"       f       file:
+tls_process_change_cipher_spec src/tls/tlsv1_server_read.c     /^static int tls_process_change_cipher_spec(struct tlsv1_server *conn,$/;"      f       file:
+tls_process_client_finished    src/tls/tlsv1_server_read.c     /^static int tls_process_client_finished(struct tlsv1_server *conn, u8 ct,$/;"  f       file:
+tls_process_client_hello       src/tls/tlsv1_server_read.c     /^static int tls_process_client_hello(struct tlsv1_server *conn, u8 ct,$/;"     f       file:
+tls_process_client_key_exchange        src/tls/tlsv1_server_read.c     /^static int tls_process_client_key_exchange(struct tlsv1_server *conn, u8 ct,$/;"      f       file:
+tls_process_client_key_exchange_dh_anon        src/tls/tlsv1_server_read.c     /^static int tls_process_client_key_exchange_dh_anon($/;"       f       file:
+tls_process_client_key_exchange_rsa    src/tls/tlsv1_server_read.c     /^static int tls_process_client_key_exchange_rsa($/;"   f       file:
+tls_process_server_change_cipher_spec  src/tls/tlsv1_client_read.c     /^static int tls_process_server_change_cipher_spec(struct tlsv1_client *conn,$/;"       f       file:
+tls_process_server_finished    src/tls/tlsv1_client_read.c     /^static int tls_process_server_finished(struct tlsv1_client *conn, u8 ct,$/;"  f       file:
+tls_process_server_hello       src/tls/tlsv1_client_read.c     /^static int tls_process_server_hello(struct tlsv1_client *conn, u8 ct,$/;"     f       file:
+tls_process_server_hello_done  src/tls/tlsv1_client_read.c     /^static int tls_process_server_hello_done(struct tlsv1_client *conn, u8 ct,$/;"        f       file:
+tls_process_server_key_exchange        src/tls/tlsv1_client_read.c     /^static int tls_process_server_key_exchange(struct tlsv1_client *conn, u8 ct,$/;"      f       file:
+tls_ref_count  src/tls/tls_internal.c  /^static int tls_ref_count = 0;$/;"     v       file:
+tls_send_change_cipher_spec    src/tls/tlsv1_client_write.c    /^static u8 * tls_send_change_cipher_spec(struct tlsv1_client *conn,$/;"        f       file:
+tls_send_change_cipher_spec    src/tls/tlsv1_server_write.c    /^static u8 * tls_send_change_cipher_spec(struct tlsv1_server *conn,$/;"        f       file:
+tls_send_client_hello  src/tls/tlsv1_client_write.c    /^u8 * tls_send_client_hello(struct tlsv1_client *conn, size_t *out_len)$/;"    f
+tls_send_client_key_exchange   src/tls/tlsv1_client_write.c    /^static u8 * tls_send_client_key_exchange(struct tlsv1_client *conn,$/;"       f       file:
+tls_send_server_hello  src/tls/tlsv1_server_write.c    /^static u8 * tls_send_server_hello(struct tlsv1_server *conn, size_t *out_len)$/;"     f       file:
+tls_server_cert_chain_der_len  src/tls/tlsv1_server_write.c    /^static size_t tls_server_cert_chain_der_len(struct tlsv1_server *conn)$/;"    f       file:
+tls_server_key_exchange_allowed        src/tls/tlsv1_common.c  /^int tls_server_key_exchange_allowed(tls_cipher cipher)$/;"    f
+tls_session_ticket_cb  src/tls/tls.h   /^typedef int (*tls_session_ticket_cb)$/;"      t
+tls_verify_hash        src/tls/tlsv1_common.h  /^struct tls_verify_hash {$/;"  s
+tls_verify_hash_add    src/tls/tlsv1_common.c  /^void tls_verify_hash_add(struct tls_verify_hash *verify, const u8 *buf,$/;"   f
+tls_verify_hash_free   src/tls/tlsv1_common.c  /^void tls_verify_hash_free(struct tls_verify_hash *verify)$/;" f
+tls_verify_hash_init   src/tls/tlsv1_common.c  /^int tls_verify_hash_init(struct tls_verify_hash *verify)$/;"  f
+tls_version    src/tls/tlsv1_record.h  /^      u16 tls_version;$/;"    m       struct:tlsv1_record_layer
+tls_version_ok src/tls/tlsv1_common.c  /^int tls_version_ok(u16 ver)$/;"       f
+tls_version_str        src/tls/tlsv1_common.c  /^const char * tls_version_str(u16 ver)$/;"     f
+tls_write_client_certificate   src/tls/tlsv1_client_write.c    /^static int tls_write_client_certificate(struct tlsv1_client *conn,$/;"        f       file:
+tls_write_client_certificate_verify    src/tls/tlsv1_client_write.c    /^static int tls_write_client_certificate_verify(struct tlsv1_client *conn,$/;" f       file:
+tls_write_client_change_cipher_spec    src/tls/tlsv1_client_write.c    /^static int tls_write_client_change_cipher_spec(struct tlsv1_client *conn,$/;" f       file:
+tls_write_client_finished      src/tls/tlsv1_client_write.c    /^static int tls_write_client_finished(struct tlsv1_client *conn,$/;"   f       file:
+tls_write_client_key_exchange  src/tls/tlsv1_client_write.c    /^static int tls_write_client_key_exchange(struct tlsv1_client *conn,$/;"       f       file:
+tls_write_server_certificate   src/tls/tlsv1_server_write.c    /^static int tls_write_server_certificate(struct tlsv1_server *conn,$/;"        f       file:
+tls_write_server_certificate_request   src/tls/tlsv1_server_write.c    /^static int tls_write_server_certificate_request(struct tlsv1_server *conn,$/;"        f       file:
+tls_write_server_change_cipher_spec    src/tls/tlsv1_server_write.c    /^static int tls_write_server_change_cipher_spec(struct tlsv1_server *conn,$/;" f       file:
+tls_write_server_finished      src/tls/tlsv1_server_write.c    /^static int tls_write_server_finished(struct tlsv1_server *conn,$/;"   f       file:
+tls_write_server_hello src/tls/tlsv1_server_write.c    /^static int tls_write_server_hello(struct tlsv1_server *conn,$/;"      f       file:
+tls_write_server_hello_done    src/tls/tlsv1_server_write.c    /^static int tls_write_server_hello_done(struct tlsv1_server *conn,$/;" f       file:
+tls_write_server_key_exchange  src/tls/tlsv1_server_write.c    /^static int tls_write_server_key_exchange(struct tlsv1_server *conn,$/;"       f       file:
+tlsv1_add_cert src/tls/tlsv1_cred.c    /^static int tlsv1_add_cert(struct x509_certificate **chain,$/;"        f       file:
+tlsv1_add_cert_der     src/tls/tlsv1_cred.c    /^static int tlsv1_add_cert_der(struct x509_certificate **chain,$/;"    f       file:
+tlsv1_client   src/tls/tlsv1_client_i.h        /^struct tlsv1_client {$/;"     s
+tlsv1_client_decrypt   src/tls/tlsv1_client.c  /^struct wpabuf * tlsv1_client_decrypt(struct tlsv1_client *conn,$/;"   f
+tlsv1_client_deinit    src/tls/tlsv1_client.c  /^void tlsv1_client_deinit(struct tlsv1_client *conn)$/;"       f
+tlsv1_client_encrypt   src/tls/tlsv1_client.c  /^int tlsv1_client_encrypt(struct tlsv1_client *conn,$/;"       f
+tlsv1_client_established       src/tls/tlsv1_client.c  /^int tlsv1_client_established(struct tlsv1_client *conn)$/;"   f
+tlsv1_client_free_dh   src/tls/tlsv1_client.c  /^void tlsv1_client_free_dh(struct tlsv1_client *conn)$/;"      f
+tlsv1_client_get_cipher        src/tls/tlsv1_client.c  /^int tlsv1_client_get_cipher(struct tlsv1_client *conn, char *buf,$/;" f
+tlsv1_client_get_keyblock_size src/tls/tlsv1_client.c  /^int tlsv1_client_get_keyblock_size(struct tlsv1_client *conn)$/;"     f
+tlsv1_client_get_keys  src/tls/tlsv1_client.c  /^int tlsv1_client_get_keys(struct tlsv1_client *conn, struct tls_keys *keys)$/;"       f
+tlsv1_client_global_deinit     src/tls/tlsv1_client.c  /^void tlsv1_client_global_deinit(void)$/;"     f
+tlsv1_client_global_init       src/tls/tlsv1_client.c  /^int tlsv1_client_global_init(void)$/;"        f
+tlsv1_client_handshake src/tls/tlsv1_client.c  /^u8 * tlsv1_client_handshake(struct tlsv1_client *conn,$/;"    f
+tlsv1_client_handshake_write   src/tls/tlsv1_client_write.c    /^u8 * tlsv1_client_handshake_write(struct tlsv1_client *conn, size_t *out_len,$/;"     f
+tlsv1_client_hello_ext src/tls/tlsv1_client.c  /^int tlsv1_client_hello_ext(struct tlsv1_client *conn, int ext_type,$/;"       f
+tlsv1_client_init      src/tls/tlsv1_client.c  /^struct tlsv1_client * tlsv1_client_init(void)$/;"     f
+tlsv1_client_prf       src/tls/tlsv1_client.c  /^int tlsv1_client_prf(struct tlsv1_client *conn, const char *label,$/;"        f
+tlsv1_client_process_handshake src/tls/tlsv1_client_read.c     /^int tlsv1_client_process_handshake(struct tlsv1_client *conn, u8 ct,$/;"      f
+tlsv1_client_resumed   src/tls/tlsv1_client.c  /^int tlsv1_client_resumed(struct tlsv1_client *conn)$/;"       f
+tlsv1_client_send_alert        src/tls/tlsv1_client_write.c    /^u8 * tlsv1_client_send_alert(struct tlsv1_client *conn, u8 level,$/;" f
+tlsv1_client_session_ticket_cb src/tls/tlsv1_client.h  /^typedef int (*tlsv1_client_session_ticket_cb)$/;"     t
+tlsv1_client_set_cipher_list   src/tls/tlsv1_client.c  /^int tlsv1_client_set_cipher_list(struct tlsv1_client *conn, u8 *ciphers)$/;"  f
+tlsv1_client_set_cred  src/tls/tlsv1_client.c  /^int tlsv1_client_set_cred(struct tlsv1_client *conn,$/;"      f
+tlsv1_client_set_session_ticket_cb     src/tls/tlsv1_client.c  /^void tlsv1_client_set_session_ticket_cb(struct tlsv1_client *conn,$/;"        f
+tlsv1_client_set_time_checks   src/tls/tlsv1_client.c  /^void tlsv1_client_set_time_checks(struct tlsv1_client *conn, int enabled)$/;" f
+tlsv1_client_shutdown  src/tls/tlsv1_client.c  /^int tlsv1_client_shutdown(struct tlsv1_client *conn)$/;"      f
+tlsv1_cred_alloc       src/tls/tlsv1_cred.c    /^struct tlsv1_credentials * tlsv1_cred_alloc(void)$/;" f
+tlsv1_cred_free        src/tls/tlsv1_cred.c    /^void tlsv1_cred_free(struct tlsv1_credentials *cred)$/;"      f
+tlsv1_credentials      src/tls/tlsv1_cred.h    /^struct tlsv1_credentials {$/;"        s
+tlsv1_key_x_anon_dh    src/tls/tlsv1_client_write.c    /^static int tlsv1_key_x_anon_dh(struct tlsv1_client *conn, u8 **pos, u8 *end)$/;"      f       file:
+tlsv1_key_x_rsa        src/tls/tlsv1_client_write.c    /^static int tlsv1_key_x_rsa(struct tlsv1_client *conn, u8 **pos, u8 *end)$/;"  f       file:
+tlsv1_process_diffie_hellman   src/tls/tlsv1_client_read.c     /^static int tlsv1_process_diffie_hellman(struct tlsv1_client *conn,$/;"        f       file:
+tlsv1_record_change_read_cipher        src/tls/tlsv1_record.c  /^int tlsv1_record_change_read_cipher(struct tlsv1_record_layer *rl)$/;"        f
+tlsv1_record_change_write_cipher       src/tls/tlsv1_record.c  /^int tlsv1_record_change_write_cipher(struct tlsv1_record_layer *rl)$/;"       f
+tlsv1_record_layer     src/tls/tlsv1_record.h  /^struct tlsv1_record_layer {$/;"       s
+tlsv1_record_receive   src/tls/tlsv1_record.c  /^int tlsv1_record_receive(struct tlsv1_record_layer *rl,$/;"   f
+tlsv1_record_send      src/tls/tlsv1_record.c  /^int tlsv1_record_send(struct tlsv1_record_layer *rl, u8 content_type, u8 *buf,$/;"    f
+tlsv1_record_set_cipher_suite  src/tls/tlsv1_record.c  /^int tlsv1_record_set_cipher_suite(struct tlsv1_record_layer *rl,$/;"  f
+tlsv1_server   src/tls/tlsv1_server_i.h        /^struct tlsv1_server {$/;"     s
+tlsv1_server_alert     src/tls/tlsv1_server.c  /^void tlsv1_server_alert(struct tlsv1_server *conn, u8 level, u8 description)$/;"      f
+tlsv1_server_clear_data        src/tls/tlsv1_server.c  /^static void tlsv1_server_clear_data(struct tlsv1_server *conn)$/;"    f       file:
+tlsv1_server_decrypt   src/tls/tlsv1_server.c  /^int tlsv1_server_decrypt(struct tlsv1_server *conn,$/;"       f
+tlsv1_server_deinit    src/tls/tlsv1_server.c  /^void tlsv1_server_deinit(struct tlsv1_server *conn)$/;"       f
+tlsv1_server_derive_keys       src/tls/tlsv1_server.c  /^int tlsv1_server_derive_keys(struct tlsv1_server *conn,$/;"   f
+tlsv1_server_encrypt   src/tls/tlsv1_server.c  /^int tlsv1_server_encrypt(struct tlsv1_server *conn,$/;"       f
+tlsv1_server_established       src/tls/tlsv1_server.c  /^int tlsv1_server_established(struct tlsv1_server *conn)$/;"   f
+tlsv1_server_get_cipher        src/tls/tlsv1_server.c  /^int tlsv1_server_get_cipher(struct tlsv1_server *conn, char *buf,$/;" f
+tlsv1_server_get_keyblock_size src/tls/tlsv1_server.c  /^int tlsv1_server_get_keyblock_size(struct tlsv1_server *conn)$/;"     f
+tlsv1_server_get_keys  src/tls/tlsv1_server.c  /^int tlsv1_server_get_keys(struct tlsv1_server *conn, struct tls_keys *keys)$/;"       f
+tlsv1_server_global_deinit     src/tls/tlsv1_server.c  /^void tlsv1_server_global_deinit(void)$/;"     f
+tlsv1_server_global_init       src/tls/tlsv1_server.c  /^int tlsv1_server_global_init(void)$/;"        f
+tlsv1_server_handshake src/tls/tlsv1_server.c  /^u8 * tlsv1_server_handshake(struct tlsv1_server *conn,$/;"    f
+tlsv1_server_handshake_write   src/tls/tlsv1_server_write.c    /^u8 * tlsv1_server_handshake_write(struct tlsv1_server *conn, size_t *out_len)$/;"     f
+tlsv1_server_init      src/tls/tlsv1_server.c  /^struct tlsv1_server * tlsv1_server_init(struct tlsv1_credentials *cred)$/;"   f
+tlsv1_server_prf       src/tls/tlsv1_server.c  /^int tlsv1_server_prf(struct tlsv1_server *conn, const char *label,$/;"        f
+tlsv1_server_process_handshake src/tls/tlsv1_server_read.c     /^int tlsv1_server_process_handshake(struct tlsv1_server *conn, u8 ct,$/;"      f
+tlsv1_server_resumed   src/tls/tlsv1_server.c  /^int tlsv1_server_resumed(struct tlsv1_server *conn)$/;"       f
+tlsv1_server_send_alert        src/tls/tlsv1_server_write.c    /^u8 * tlsv1_server_send_alert(struct tlsv1_server *conn, u8 level,$/;" f
+tlsv1_server_session_ticket_cb src/tls/tlsv1_server.h  /^typedef int (*tlsv1_server_session_ticket_cb)$/;"     t
+tlsv1_server_set_cipher_list   src/tls/tlsv1_server.c  /^int tlsv1_server_set_cipher_list(struct tlsv1_server *conn, u8 *ciphers)$/;"  f
+tlsv1_server_set_session_ticket_cb     src/tls/tlsv1_server.c  /^void tlsv1_server_set_session_ticket_cb(struct tlsv1_server *conn,$/;"        f
+tlsv1_server_set_verify        src/tls/tlsv1_server.c  /^int tlsv1_server_set_verify(struct tlsv1_server *conn, int verify_peer)$/;"   f
+tlsv1_server_shutdown  src/tls/tlsv1_server.c  /^int tlsv1_server_shutdown(struct tlsv1_server *conn)$/;"      f
+tlsv1_set_ca_cert      src/tls/tlsv1_cred.c    /^int tlsv1_set_ca_cert(struct tlsv1_credentials *cred, const char *cert,$/;"   f
+tlsv1_set_cert src/tls/tlsv1_cred.c    /^int tlsv1_set_cert(struct tlsv1_credentials *cred, const char *cert,$/;"      f
+tlsv1_set_cert_chain   src/tls/tlsv1_cred.c    /^static int tlsv1_set_cert_chain(struct x509_certificate **chain,$/;"  f       file:
+tlsv1_set_dhparams     src/tls/tlsv1_cred.c    /^int tlsv1_set_dhparams(struct tlsv1_credentials *cred, const char *dh_file,$/;"       f
+tlsv1_set_dhparams_blob        src/tls/tlsv1_cred.c    /^static int tlsv1_set_dhparams_blob(struct tlsv1_credentials *cred,$/;"        f       file:
+tlsv1_set_dhparams_der src/tls/tlsv1_cred.c    /^static int tlsv1_set_dhparams_der(struct tlsv1_credentials *cred,$/;" f       file:
+tlsv1_set_key  src/tls/tlsv1_cred.c    /^static int tlsv1_set_key(struct tlsv1_credentials *cred,$/;"  f       file:
+tlsv1_set_key_enc_pem  src/tls/tlsv1_cred.c    /^static struct crypto_private_key * tlsv1_set_key_enc_pem(const u8 *key,$/;"   f       file:
+tlsv1_set_key_pem      src/tls/tlsv1_cred.c    /^static struct crypto_private_key * tlsv1_set_key_pem(const u8 *key, size_t len)$/;"   f       file:
+tlsv1_set_private_key  src/tls/tlsv1_cred.c    /^int tlsv1_set_private_key(struct tlsv1_credentials *cred,$/;" f
+tlv_type       src/eap_peer/eap_tlv_common.h   /^      be16 tlv_type; \/* PAC_TYPE_PAC_TYPE *\/$/;"    m       struct:eap_tlv_pac_type_tlv
+tlv_type       src/eap_peer/eap_tlv_common.h   /^      be16 tlv_type;$/;"      m       struct:eap_tlv_crypto_binding_tlv
+tlv_type       src/eap_peer/eap_tlv_common.h   /^      be16 tlv_type;$/;"      m       struct:eap_tlv_hdr
+tlv_type       src/eap_peer/eap_tlv_common.h   /^      be16 tlv_type;$/;"      m       struct:eap_tlv_intermediate_result_tlv
+tlv_type       src/eap_peer/eap_tlv_common.h   /^      be16 tlv_type;$/;"      m       struct:eap_tlv_nak_tlv
+tlv_type       src/eap_peer/eap_tlv_common.h   /^      be16 tlv_type;$/;"      m       struct:eap_tlv_pac_ack_tlv
+tlv_type       src/eap_peer/eap_tlv_common.h   /^      be16 tlv_type;$/;"      m       struct:eap_tlv_request_action_tlv
+tlv_type       src/eap_peer/eap_tlv_common.h   /^      be16 tlv_type;$/;"      m       struct:eap_tlv_result_tlv
+tmp_eap_user   src/ap/hostapd.h        /^      struct hostapd_eap_user tmp_eap_user;$/;"       m       struct:hostapd_data     typeref:struct:hostapd_data::hostapd_eap_user
+tnc_started    src/eap_peer/eap_ttls.c /^      int tnc_started;$/;"    m       struct:eap_ttls_data    file:
+totrot src/crypto/des-internal.c       /^static const u8 totrot[16] = {$/;"    v       file:
+tptk   src/rsn_supp/wpa.h      /^    struct wpa_ptk ptk, tptk;$/;"     m       struct:wpa_sm   typeref:struct:wpa_sm::
+tptk_set       src/rsn_supp/wpa.h      /^    int ptk_set, tptk_set;$/;"        m       struct:wpa_sm
+trans_id       src/common/ieee802_11_defs.h    /^                                      u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];$/;"       m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon82
+trans_id       src/common/ieee802_11_defs.h    /^                                      u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];$/;"       m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon83
+trusted_certs  src/tls/tlsv1_cred.h    /^      struct x509_certificate *trusted_certs;$/;"     m       struct:tlsv1_credentials        typeref:struct:tlsv1_credentials::x509_certificate
+ts_info        src/common/ieee802_11_defs.h    /^      u8 ts_info[3];$/;"      m       struct:wmm_tspec_element
+ttls_avp       src/eap_peer/eap_ttls.h /^struct ttls_avp {$/;" s
+ttls_avp_vendor        src/eap_peer/eap_ttls.h /^struct ttls_avp_vendor {$/;"  s
+ttls_parse_avp src/eap_peer/eap_ttls.c /^struct ttls_parse_avp {$/;"   s       file:
+ttls_version   src/eap_peer/eap_ttls.c /^      int ttls_version;$/;"   m       struct:eap_ttls_data    file:
+tx     src/common/wpa_common.h /^      int tx, key_rsc_len, keyidx;$/;"        m       struct:wpa_gtk_data
+tx_bf_capability_info  src/common/ieee802_11_defs.h    /^      le32 tx_bf_capability_info;$/;" m       struct:ieee80211_ht_capabilities
+tx_mic_key     src/common/wpa_common.h /^                      u8 tx_mic_key[8];$/;"   m       struct:wpa_ptk::__anon62::__anon63
+tx_status      src/ap/wpa_auth.h       /^      int tx_status;$/;"      m       struct:wpa_auth_config
+txcb_flags     src/rsn_supp/wpa.h      /^    u16 txcb_flags;$/;"       m       struct:wpa_sm
+txop_limit     src/common/ieee802_11_defs.h    /^      le16 txop_limit;$/;"    m       struct:wmm_ac_parameter
+type   src/common/eapol_common.h       /^      u8 type;$/;"    m       struct:ieee802_1x_eapol_key
+type   src/common/eapol_common.h       /^      u8 type;$/;"    m       struct:ieee802_1x_hdr
+type   src/common/wpa_common.h /^      u8 type;$/;"    m       struct:wpa_eapol_key
+type   src/tls/tls.h   /^              const char *type;$/;"   m       struct:tls_event_data::__anon36
+type   src/tls/tlsv1_common.h  /^      tls_cipher_type type;$/;"       m       struct:tls_cipher_data
+type   src/tls/x509v3.h        /^      } type;$/;"     m       struct:x509_name_attr   typeref:enum:x509_name_attr::x509_name_attr_type
+type   src/wps/wps.h   /^      enum wps_msg_type type;$/;"     m       struct:upnp_pending_message     typeref:enum:upnp_pending_message::wps_msg_type
+u      src/common/ieee802_11_defs.h    /^                      } u;$/;"        m       struct:ieee80211_mgmt::__anon66::__anon76       typeref:union:ieee80211_mgmt::__anon66::__anon76::__anon77
+u      src/common/ieee802_11_defs.h    /^      } u;$/;"        m       struct:ieee80211_mgmt   typeref:union:ieee80211_mgmt::__anon66
+u      src/common/wpa_common.h /^      } u;$/;"        m       struct:wpa_ptk  typeref:union:wpa_ptk::__anon62
+u      src/crypto/crypto_internal-cipher.c     /^      } u;$/;"        m       struct:crypto_cipher    typeref:union:crypto_cipher::__anon10   file:
+u      src/crypto/crypto_internal.c    /^      } u;$/;"        m       struct:crypto_hash      typeref:union:crypto_hash::__anon9      file:
+u      src/fast_crypto/fast_crypto_internal-cipher.c   /^    } u;$/;"  m       struct:fast_crypto_cipher       typeref:union:fast_crypto_cipher::__anon56      file:
+u      src/fast_crypto/fast_crypto_internal.c  /^      } u;$/;"        m       struct:fast_crypto_hash typeref:union:fast_crypto_hash::__anon61        file:
+u16    include/utils/common.h  /^typedef uint16_t u16;$/;"     t
+u32    include/utils/common.h  /^typedef uint32_t u32;$/;"     t
+u64    include/utils/common.h  /^typedef uint64_t u64;$/;"     t
+u8     include/utils/common.h  /^typedef uint8_t u8;$/;"       t
+uint16_t       port/include/endian.h   /^typedef       __uint16_t      uint16_t;$/;"   t
+uint32_t       port/include/endian.h   /^typedef       __uint32_t      uint32_t;$/;"   t
+uint64_t       port/include/endian.h   /^typedef       __uint64_t      uint64_t;$/;"   t
+uint8_t        port/include/endian.h   /^typedef       __uint8_t       uint8_t;$/;"    t
+upc    src/ap/ap_config.h      /^      char *upc;$/;"  m       struct:hostapd_bss_config
+upc    src/wps/wps.h   /^              const char *upc;$/;"    m       struct:wps_event_data::wps_event_er_ap
+upc    src/wps/wps.h   /^      char *upc;$/;"  m       struct:wps_context
+update_snonce  src/ap/wpa_auth_i.h     /^      unsigned int update_snonce:1;$/;"       m       struct:wpa_state_machine
+upnp_iface     src/ap/ap_config.h      /^      char *upnp_iface;$/;"   m       struct:hostapd_bss_config
+upnp_pending_message   src/wps/wps.h   /^struct upnp_pending_message {$/;"     s
+uri    src/tls/x509v3.h        /^      char *uri; \/* uniformResourceIdentifier *\/$/;"        m       struct:x509_name
+use_cred       src/wps/wps_i.h /^      struct wps_credential *use_cred;$/;"    m       struct:wps_data typeref:struct:wps_data::wps_credential
+use_psk_key    src/wps/wps.h   /^      int use_psk_key;$/;"    m       struct:wps_config
+use_psk_key    src/wps/wps_i.h /^      int use_psk_key;$/;"    m       struct:wps_data
+use_session_ticket     src/tls/tlsv1_client_i.h        /^      unsigned int use_session_ticket:1;$/;"  m       struct:tlsv1_client
+use_session_ticket     src/tls/tlsv1_server_i.h        /^      int use_session_ticket;$/;"     m       struct:tlsv1_server
+usec   port/include/os.h       /^      os_time_t usec;$/;"     m       struct:os_time
+used   include/utils/wpabuf.h  /^      size_t used; \/* length of data in the buffer *\/$/;"   m       struct:wpabuf
+used   src/crypto/libtommath.h /^    int used, alloc, sign;$/;"        m       struct:__anon8
+used   src/tls/libtommath.h    /^    int used, alloc, sign;$/;"        m       struct:__anon40
+used_bytes     src/crypto/crypto_internal-cipher.c     /^                      size_t used_bytes;$/;"  m       struct:crypto_cipher::__anon10::__anon11        file:
+used_bytes     src/fast_crypto/fast_crypto_internal-cipher.c   /^            size_t used_bytes;$/;"    m       struct:fast_crypto_cipher::__anon56::__anon57   file:
+utf8_ssid      src/ap/ap_config.h      /^      unsigned int utf8_ssid:1;$/;"   m       struct:hostapd_ssid
+utf8_to_ucs2   src/crypto/ms_funcs.c   /^static int utf8_to_ucs2(const u8 *utf8_string, size_t utf8_string_len,$/;"    f       file:
+uuid   src/ap/ap_config.h      /^      u8 uuid[16];$/;"        m       struct:hostapd_bss_config
+uuid   src/wps/wps.h   /^              const u8 *uuid;$/;"     m       struct:wps_event_data::wps_event_er_ap
+uuid   src/wps/wps.h   /^              const u8 *uuid;$/;"     m       struct:wps_event_data::wps_event_er_ap_settings
+uuid   src/wps/wps.h   /^              const u8 *uuid;$/;"     m       struct:wps_event_data::wps_event_er_enrollee
+uuid   src/wps/wps.h   /^              const u8 *uuid;$/;"     m       struct:wps_event_data::wps_event_er_set_selected_registrar
+uuid   src/wps/wps.h   /^      u8 uuid[16];$/;"        m       struct:wps_context
+uuid   src/wps/wps.h   /^    u8 uuid[16];$/;"  m       struct:wps_sm
+uuid   src/wps/wps_registrar.c /^      u8 uuid[WPS_UUID_LEN];$/;"      m       struct:wps_registrar_device     file:
+uuid   src/wps/wps_registrar.c /^      u8 uuid[WPS_UUID_LEN];$/;"      m       struct:wps_uuid_pin     file:
+uuid_bin2str   src/utils/uuid.c        /^int uuid_bin2str(const u8 *bin, char *str, size_t max_len)$/;"        f
+uuid_e src/wps/wps_attr_parse.h        /^      const u8 *uuid_e; \/* WPS_UUID_LEN (16) octets *\/$/;"  m       struct:wps_parse_attr
+uuid_e src/wps/wps_i.h /^      u8 uuid_e[WPS_UUID_LEN];$/;"    m       struct:wps_data
+uuid_e src/wps/wps_registrar.c /^      u8 uuid_e[WPS_UUID_LEN];$/;"    m       struct:wps_pbc_session  file:
+uuid_gen_mac_addr      src/wps/wps_common.c    /^void uuid_gen_mac_addr(const u8 *mac_addr, u8 *uuid)$/;"      f
+uuid_r src/wps/wps_attr_parse.h        /^      const u8 *uuid_r; \/* WPS_UUID_LEN (16) octets *\/$/;"  m       struct:wps_parse_attr
+uuid_r src/wps/wps_i.h /^      u8 uuid_r[WPS_UUID_LEN];$/;"    m       struct:wps_data
+uuid_str2bin   src/utils/uuid.c        /^int uuid_str2bin(const char *str, u8 *bin)$/;"        f
+valid  src/ap/wpa_auth_i.h     /^              Boolean valid;$/;"      m       struct:wpa_state_machine::wpa_key_replay_counter
+valid_config_methods   src/wps/wps_validate.c  /^static int valid_config_methods(u16 val, int wps2)$/;"        f       file:
+value  src/tls/x509v3.h        /^      char *value;$/;"        m       struct:x509_name_attr
+variable       src/common/ieee802_11_defs.h    /^                                      u8 variable[0]; \/* FT Request *\/$/;"  m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon80
+variable       src/common/ieee802_11_defs.h    /^                                      u8 variable[0]; \/* FT Request *\/$/;"  m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon81
+variable       src/common/ieee802_11_defs.h    /^                                      u8 variable[0];$/;"     m       struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon78
+variable       src/common/ieee802_11_defs.h    /^                      u8 variable[0];$/;"     m       struct:ieee80211_mgmt::__anon66::__anon67
+variable       src/common/ieee802_11_defs.h    /^                      u8 variable[0];$/;"     m       struct:ieee80211_mgmt::__anon66::__anon69
+variable       src/common/ieee802_11_defs.h    /^                      u8 variable[0];$/;"     m       struct:ieee80211_mgmt::__anon66::__anon70
+variable       src/common/ieee802_11_defs.h    /^                      u8 variable[0];$/;"     m       struct:ieee80211_mgmt::__anon66::__anon71
+variable       src/common/ieee802_11_defs.h    /^                      u8 variable[0];$/;"     m       struct:ieee80211_mgmt::__anon66::__anon73
+variable       src/common/ieee802_11_defs.h    /^                      u8 variable[0];$/;"     m       struct:ieee80211_mgmt::__anon66::__anon74
+variable       src/common/ieee802_11_defs.h    /^                      u8 variable[0];$/;"     m       struct:ieee80211_mgmt::__anon66::__anon75
+vendor src/eap_peer/eap.h      /^      int vendor;$/;" m       struct:eap_method_type
+vendor src/eap_peer/eap_i.h    /^      int vendor;$/;" m       struct:eap_method
+vendor_ext     src/wps/wps.h   /^      struct wpabuf *vendor_ext[MAX_WPS_VENDOR_EXTENSIONS];$/;"       m       struct:wps_device_data  typeref:struct:wps_device_data::wpabuf
+vendor_ext     src/wps/wps_attr_parse.h        /^      const u8 *vendor_ext[MAX_WPS_PARSE_VENDOR_EXT];$/;"     m       struct:wps_parse_attr
+vendor_ext_len src/wps/wps_attr_parse.h        /^      size_t vendor_ext_len[MAX_WPS_PARSE_VENDOR_EXT];$/;"    m       struct:wps_parse_attr
+vendor_ext_m1  src/wps/wps.h   /^      struct wpabuf *vendor_ext_m1;$/;"       m       struct:wps_device_data  typeref:struct:wps_device_data::wpabuf
+vendor_id      src/eap_peer/eap_defs.h /^    u8 vendor_id[3];$/;"      m       struct:eap_expand
+vendor_id      src/eap_peer/eap_tlv_common.h   /^      be32 vendor_id;$/;"     m       struct:eap_tlv_nak_tlv
+vendor_id      src/eap_peer/eap_ttls.h /^      be32 vendor_id;$/;"     m       struct:ttls_avp_vendor
+vendor_type    src/eap_peer/eap_defs.h /^    be32 vendor_type;$/;"     m       struct:eap_expand
+verify src/tls/tlsv1_client_i.h        /^      struct tls_verify_hash verify;$/;"      m       struct:tlsv1_client     typeref:struct:tlsv1_client::tls_verify_hash
+verify src/tls/tlsv1_server_i.h        /^      struct tls_verify_hash verify;$/;"      m       struct:tlsv1_server     typeref:struct:tlsv1_server::tls_verify_hash
+verify_peer    src/tls/tlsv1_server_i.h        /^      int verify_peer;$/;"    m       struct:tlsv1_server
+version        src/common/eapol_common.h       /^      u8 version;$/;" m       struct:ieee802_1x_hdr
+version        src/common/ieee802_11_defs.h    /^      u8 version; \/* 1 *\/$/;"       m       struct:wmm_tspec_element
+version        src/common/ieee802_11_defs.h    /^      u8 version; \/* 1 for WMM version 1.0 *\/$/;"   m       struct:wmm_information_element
+version        src/common/ieee802_11_defs.h    /^      u8 version; \/* 1 for WMM version 1.0 *\/$/;"   m       struct:wmm_parameter_element
+version        src/common/wpa_common.h /^      u8 version[2]; \/* little endian *\/$/;"        m       struct:rsn_ie_hdr
+version        src/common/wpa_common.h /^      u8 version[2]; \/* little endian *\/$/;"        m       struct:wpa_ie_hdr
+version        src/eap_peer/eap_tlv_common.h   /^      u8 version;$/;" m       struct:eap_tlv_crypto_binding_tlv
+version        src/tls/x509v3.h        /^      enum { X509_CERT_V1 = 0, X509_CERT_V2 = 1, X509_CERT_V3 = 2 } version;$/;"      m       struct:x509_certificate typeref:enum:x509_certificate::__anon41
+version        src/wps/wps_attr_parse.h        /^      const u8 *version; \/* 1 octet *\/$/;"  m       struct:wps_parse_attr
+version2       src/wps/wps_attr_parse.h        /^      const u8 *version2; \/* 1 octet *\/$/;" m       struct:wps_parse_attr
+vht_capab      src/ap/ap_config.h      /^      u32 vht_capab;$/;"      m       struct:hostapd_config
+vht_oper_centr_freq_seg0_idx   src/ap/ap_config.h      /^      u8 vht_oper_centr_freq_seg0_idx;$/;"    m       struct:hostapd_config
+vht_oper_centr_freq_seg1_idx   src/ap/ap_config.h      /^      u8 vht_oper_centr_freq_seg1_idx;$/;"    m       struct:hostapd_config
+vht_oper_chwidth       src/ap/ap_config.h      /^      u8 vht_oper_chwidth;$/;"        m       struct:hostapd_config
+vlan_id        src/ap/ap_config.h      /^      int vlan_id;$/;"        m       struct:mac_acl_entry
+vlan_id        src/ap/wpa_auth_i.h     /^      int vlan_id;$/;"        m       struct:wpa_group
+wep    src/ap/ap_config.h      /^      struct hostapd_wep_keys wep;$/;"        m       struct:hostapd_ssid     typeref:struct:hostapd_ssid::hostapd_wep_keys
+wep_rekeying_period    src/ap/ap_config.h      /^      int wep_rekeying_period;$/;"    m       struct:hostapd_bss_config
+wifi_appie     src/esp_supplicant/esp_wifi_driver.h    /^struct wifi_appie {$/;"       s
+wifi_cipher    src/esp_supplicant/esp_wifi_driver.h    /^struct wifi_cipher {$/;"      s
+wifi_ipc_config_t      src/esp_supplicant/esp_wifi_driver.h    /^} wifi_ipc_config_t;$/;"      t       typeref:struct:__anon32
+wifi_ipc_fn_t  src/esp_supplicant/esp_wifi_driver.h    /^typedef int (*wifi_ipc_fn_t)(void *);$/;"     t
+wifi_key       src/esp_supplicant/esp_wifi_driver.h    /^struct wifi_key {$/;" s
+wifi_key_alg   src/common/defs.h       /^enum wifi_key_alg {$/;"       g
+wifi_keyix     src/esp_supplicant/esp_wifi_driver.h    /^typedef uint16_t wifi_keyix;       \/* h\/w key index *\/$/;" t
+wifi_set_wps_cb        src/esp_supplicant/esp_wps.c    /^wifi_set_wps_cb(wps_st_cb_t cb)$/;"   f
+wifi_ssid      src/esp_supplicant/esp_wifi_driver.h    /^struct wifi_ssid {$/;"        s
+wifi_sta_get_enterprise_disable_time_check     src/esp_supplicant/esp_wpa_enterprise.c /^bool wifi_sta_get_enterprise_disable_time_check(void)$/;"     f
+wifi_station_wps_deinit        src/esp_supplicant/esp_wps.c    /^wifi_station_wps_deinit(void)$/;"     f
+wifi_station_wps_eapol_start_handle    src/esp_supplicant/esp_wps.c    /^void wifi_station_wps_eapol_start_handle(void)$/;"    f
+wifi_station_wps_eapol_start_handle_internal   src/esp_supplicant/esp_wps.c    /^void wifi_station_wps_eapol_start_handle_internal(void)$/;"   f
+wifi_station_wps_init  src/esp_supplicant/esp_wps.c    /^wifi_station_wps_init(void)$/;"       f
+wifi_station_wps_msg_timeout   src/esp_supplicant/esp_wps.c    /^void wifi_station_wps_msg_timeout(void)$/;"   f
+wifi_station_wps_msg_timeout_internal  src/esp_supplicant/esp_wps.c    /^wifi_station_wps_msg_timeout_internal(void)$/;"       f
+wifi_station_wps_start src/esp_supplicant/esp_wifi_driver.h    /^    int  (*wifi_station_wps_start)(void);$/;" m       struct:wps_funcs
+wifi_station_wps_start src/esp_supplicant/esp_wps.c    /^int wifi_station_wps_start(void)$/;"  f
+wifi_station_wps_success       src/esp_supplicant/esp_wps.c    /^void wifi_station_wps_success(void)$/;"       f
+wifi_station_wps_success_internal      src/esp_supplicant/esp_wps.c    /^void wifi_station_wps_success_internal(void)$/;"      f
+wifi_station_wps_timeout       src/esp_supplicant/esp_wps.c    /^void wifi_station_wps_timeout(void)$/;"       f
+wifi_station_wps_timeout_internal      src/esp_supplicant/esp_wps.c    /^wifi_station_wps_timeout_internal(void)$/;"   f
+wifi_tx_cb_t   src/esp_supplicant/esp_wifi_driver.h    /^typedef void(* wifi_tx_cb_t)(void *);$/;"     t
+wifi_wpa2_fn_t src/esp_supplicant/esp_wifi_driver.h    /^typedef esp_err_t (*wifi_wpa2_fn_t)(void *);$/;"      t
+wifi_wpa2_param_t      src/esp_supplicant/esp_wifi_driver.h    /^}wifi_wpa2_param_t;$/;"       t       typeref:struct:__anon31
+wifi_wps_disable_internal      src/esp_supplicant/esp_wps.c    /^int wifi_wps_disable_internal(void)$/;"       f
+wifi_wps_enable_internal       src/esp_supplicant/esp_wps.c    /^int wifi_wps_enable_internal(const esp_wps_config_t *config)$/;"      f
+wifi_wps_scan  src/esp_supplicant/esp_wps.c    /^void wifi_wps_scan(void)$/;"  f
+wifi_wps_scan_done     src/esp_supplicant/esp_wps.c    /^wifi_wps_scan_done(void *arg, STATUS status)$/;"      f
+wifi_wps_scan_internal src/esp_supplicant/esp_wps.c    /^wifi_wps_scan_internal(void)$/;"      f
+wildcard_uuid  src/wps/wps_registrar.c /^      int wildcard_uuid;$/;"  m       struct:wps_uuid_pin     file:
+wk_cipher      src/esp_supplicant/esp_wifi_driver.h    /^    const struct wifi_cipher *wk_cipher;$/;"  m       struct:wifi_key typeref:struct:wifi_key::wifi_cipher
+wk_keyix       src/esp_supplicant/esp_wifi_driver.h    /^    wifi_keyix wk_keyix;       \/* h\/w key index *\/$/;"     m       struct:wifi_key
+wk_keyrsc      src/esp_supplicant/esp_wifi_driver.h    /^    uint64_t        wk_keyrsc[WIFI_TID_SIZE];$/;"     m       struct:wifi_key
+wk_keytsc      src/esp_supplicant/esp_wifi_driver.h    /^    uint64_t        wk_keytsc;      \/* key transmit sequence counter *\/$/;" m       struct:wifi_key
+wmm_ac_parameter       src/common/ieee802_11_defs.h    /^struct wmm_ac_parameter {$/;" s
+wmm_action     src/common/ieee802_11_defs.h    /^                              } STRUCT_PACKED wmm_action;$/;" m       union:ieee80211_mgmt::__anon66::__anon76::__anon77      typeref:struct:ieee80211_mgmt::__anon66::__anon76::__anon77::__anon78
+wmm_enabled    src/ap/ap_config.h      /^      int wmm_enabled;$/;"    m       struct:hostapd_bss_config
+wmm_enabled    src/ap/wpa_auth.h       /^      int wmm_enabled;$/;"    m       struct:wpa_auth_config
+wmm_information_element        src/common/ieee802_11_defs.h    /^struct wmm_information_element {$/;"  s
+wmm_parameter_element  src/common/ieee802_11_defs.h    /^struct wmm_parameter_element {$/;"    s
+wmm_tspec_element      src/common/ieee802_11_defs.h    /^struct wmm_tspec_element {$/;"        s
+wmm_uapsd      src/ap/ap_config.h      /^      int wmm_uapsd;$/;"      m       struct:hostapd_bss_config
+wmm_uapsd      src/ap/wpa_auth.h       /^      int wmm_uapsd;$/;"      m       struct:wpa_auth_config
+workaround     src/eap_peer/eap_i.h    /^      unsigned int workaround;$/;"    m       struct:eap_sm
+wpa    src/ap/ap_config.h      /^      int wpa; \/* bitfield of WPA_PROTO_WPA, WPA_PROTO_RSN *\/$/;"   m       struct:hostapd_bss_config
+wpa    src/ap/wpa_auth.h       /^      int wpa;$/;"    m       struct:wpa_auth_config
+wpa    src/ap/wpa_auth_i.h     /^      } wpa;$/;"      m       struct:wpa_state_machine        typeref:enum:wpa_state_machine::__anon26
+wpa    src/esp_supplicant/esp_wifi_driver.h    /^    uint8_t    *wpa;$/;"      m       struct:wps_scan_ie
+wpa2Task       src/esp_supplicant/esp_wpa_enterprise.c /^void wpa2Task(void *pvParameters )$/;"        f
+wpa2_api_lock  src/esp_supplicant/esp_wpa_enterprise.c /^static void wpa2_api_lock(void)$/;"   f       file:
+wpa2_api_unlock        src/esp_supplicant/esp_wpa_enterprise.c /^static void wpa2_api_unlock(void)$/;" f       file:
+wpa2_deinit    src/esp_supplicant/esp_wifi_driver.h    /^    void (*wpa2_deinit)(void);$/;"    m       struct:wpa2_funcs
+wpa2_ent_eap_state_t   src/esp_supplicant/esp_wifi_driver.h    /^} wpa2_ent_eap_state_t;$/;"   t       typeref:enum:__anon30
+wpa2_funcs     src/esp_supplicant/esp_wifi_driver.h    /^struct wpa2_funcs {$/;"       s
+wpa2_get_state src/esp_supplicant/esp_wifi_driver.h    /^    u8   (*wpa2_get_state)(void);$/;" m       struct:wpa2_funcs
+wpa2_init      src/esp_supplicant/esp_wifi_driver.h    /^    int  (*wpa2_init)(void);$/;"      m       struct:wpa2_funcs
+wpa2_is_disabled       src/esp_supplicant/esp_wpa_enterprise.c /^static bool inline wpa2_is_disabled(void)$/;" f       file:
+wpa2_is_enabled        src/esp_supplicant/esp_wpa_enterprise.c /^static bool inline wpa2_is_enabled(void)$/;"  f       file:
+wpa2_machine_start     src/esp_supplicant/esp_wpa_enterprise.c /^uint8_t wpa2_machine_start = 0;$/;"   v
+wpa2_post      src/esp_supplicant/esp_wpa_enterprise.c /^ETS_STATUS wpa2_post(ETSSignal sig, ETSParam par)$/;" f
+wpa2_rx_param  src/esp_supplicant/esp_wpa_enterprise.c /^struct wpa2_rx_param {$/;"    s       file:
+wpa2_sendto_wrapper    src/esp_supplicant/esp_wpa_enterprise.c /^static void wpa2_sendto_wrapper(void *buffer, uint16_t len)$/;"       f       file:
+wpa2_set_eap_state     src/esp_supplicant/esp_wpa_enterprise.c /^static void wpa2_set_eap_state(wpa2_ent_eap_state_t state)$/;"        f       file:
+wpa2_set_state src/esp_supplicant/esp_wpa_enterprise.c /^static void inline wpa2_set_state(wpa2_state_t state)$/;"     f       file:
+wpa2_sig_cnt   src/eap_peer/eap_i.h    /^      u8 wpa2_sig_cnt[SIG_WPA2_MAX];$/;"      m       struct:eap_sm
+wpa2_sm_alloc_eapol    src/esp_supplicant/esp_wpa_enterprise.c /^u8 *wpa2_sm_alloc_eapol(struct eap_sm *sm, u8 type,$/;"       f
+wpa2_sm_ether_send     src/esp_supplicant/esp_wpa_enterprise.c /^static inline int wpa2_sm_ether_send(struct eap_sm *sm, const u8 *dest, u16 proto,$/;"        f       file:
+wpa2_sm_free_eapol     src/esp_supplicant/esp_wpa_enterprise.c /^void wpa2_sm_free_eapol(u8 *buffer)$/;"       f
+wpa2_sm_rx_eapol       src/esp_supplicant/esp_wifi_driver.h    /^    int  (*wpa2_sm_rx_eapol)(u8 *src_addr, u8 *buf, u32 len, u8 *bssid);$/;"  m       struct:wpa2_funcs
+wpa2_sm_rx_eapol       src/esp_supplicant/esp_wpa_enterprise.c /^static int wpa2_sm_rx_eapol(u8 *src_addr, u8 *buf, u32 len, uint8_t *bssid)$/;"       f       file:
+wpa2_sm_rx_eapol_internal      src/esp_supplicant/esp_wpa_enterprise.c /^static int wpa2_sm_rx_eapol_internal(u8 *src_addr, u8 *buf, u32 len, uint8_t *bssid)$/;"      f       file:
+wpa2_start     src/esp_supplicant/esp_wifi_driver.h    /^    int  (*wpa2_start)(void);$/;"     m       struct:wpa2_funcs
+wpa2_start_eapol       src/esp_supplicant/esp_wpa_enterprise.c /^static int wpa2_start_eapol(void)$/;" f       file:
+wpa2_start_eapol_internal      src/esp_supplicant/esp_wpa_enterprise.c /^static int wpa2_start_eapol_internal(void)$/;"        f       file:
+wpa2_state_t   src/eap_peer/eap_i.h    /^}wpa2_state_t;$/;"    t       typeref:enum:__anon3
+wpa2_task_delete       src/esp_supplicant/esp_wpa_enterprise.c /^static inline void wpa2_task_delete(void *arg)$/;"    f       file:
+wpa2_task_hdl  src/esp_supplicant/esp_wpa_enterprise.c /^static void *wpa2_task_hdl = NULL;$/;"        v       file:
+wpa_add_kde    src/ap/wpa_auth_ie.c    /^u8 * wpa_add_kde(u8 *pos, u32 kde, const u8 *data, size_t data_len,$/;"       f
+wpa_alg        src/common/defs.h       /^enum wpa_alg {$/;"    g
+wpa_ap_deinit  src/esp_supplicant/esp_wifi_driver.h    /^    bool (*wpa_ap_deinit)(void* data);$/;"    m       struct:wpa_funcs
+wpa_ap_get_wpa_ie      src/esp_supplicant/esp_wifi_driver.h    /^    uint8_t* (*wpa_ap_get_wpa_ie)(uint8_t *len);$/;"  m       struct:wpa_funcs
+wpa_ap_get_wpa_ie      src/esp_supplicant/esp_wpa_main.c       /^uint8_t  *wpa_ap_get_wpa_ie(uint8_t *ie_len)$/;"      f
+wpa_ap_init    src/esp_supplicant/esp_wifi_driver.h    /^    void* (*wpa_ap_init)(void);$/;"   m       struct:wpa_funcs
+wpa_ap_join    src/ap/wpa_auth.c       /^bool wpa_ap_join(void** sm, uint8_t *bssid, uint8_t *wpa_ie, uint8_t wpa_ie_len)$/;"  f
+wpa_ap_join    src/esp_supplicant/esp_wifi_driver.h    /^    bool (*wpa_ap_join)(void** sm, u8 *bssid, u8 *wpa_ie, u8 wpa_ie_len);$/;" m       struct:wpa_funcs
+wpa_ap_remove  src/ap/wpa_auth.c       /^bool wpa_ap_remove(void* sm)$/;"      f
+wpa_ap_remove  src/esp_supplicant/esp_wifi_driver.h    /^    bool (*wpa_ap_remove)(void* sm);$/;"      m       struct:wpa_funcs
+wpa_ap_rx_eapol        src/esp_supplicant/esp_wifi_driver.h    /^    bool (*wpa_ap_rx_eapol)(void* hapd_data, void *sm, u8 *data, size_t data_len);$/;"        m       struct:wpa_funcs
+wpa_ap_rx_eapol        src/esp_supplicant/esp_wpa_main.c       /^bool  wpa_ap_rx_eapol(void *hapd_data, void *sm_data, u8 *data, size_t data_len)$/;"  f
+wpa_attach     src/esp_supplicant/esp_wpa_main.c       /^void  wpa_attach(void)$/;"    f
+wpa_auth       src/ap/hostapd.h        /^      struct wpa_authenticator *wpa_auth;$/;" m       struct:hostapd_data     typeref:struct:hostapd_data::wpa_authenticator
+wpa_auth       src/ap/wpa_auth_i.h     /^      struct wpa_authenticator *wpa_auth;$/;" m       struct:wpa_state_machine        typeref:struct:wpa_state_machine::wpa_authenticator
+wpa_auth_add_sm        src/ap/wpa_auth.c       /^static void wpa_auth_add_sm(struct wpa_state_machine *sm)$/;" f       file:
+wpa_auth_callbacks     src/ap/wpa_auth.h       /^struct wpa_auth_callbacks {$/;"       s
+wpa_auth_config        src/ap/wpa_auth.h       /^struct wpa_auth_config {$/;"  s
+wpa_auth_del_sm        src/ap/wpa_auth.c       /^static void wpa_auth_del_sm(struct wpa_state_machine *sm)$/;" f       file:
+wpa_auth_for_each_sta  src/ap/wpa_auth.c       /^int wpa_auth_for_each_sta(struct wpa_authenticator *wpa_auth,$/;"     f
+wpa_auth_gen_wpa_ie    src/ap/wpa_auth_ie.c    /^int wpa_auth_gen_wpa_ie(struct wpa_authenticator *wpa_auth)$/;"       f
+wpa_auth_get_eapol     src/ap/wpa_auth.c       /^static inline int wpa_auth_get_eapol(struct wpa_authenticator *wpa_auth,$/;"  f       file:
+wpa_auth_get_msk       src/ap/wpa_auth.c       /^static inline int wpa_auth_get_msk(struct wpa_authenticator *wpa_auth,$/;"    f       file:
+wpa_auth_get_psk       src/ap/wpa_auth.c       /^static inline const u8 * wpa_auth_get_psk(struct wpa_authenticator *wpa_auth,$/;"     f       file:
+wpa_auth_get_seqnum    src/ap/wpa_auth.c       /^static inline int wpa_auth_get_seqnum(struct wpa_authenticator *wpa_auth,$/;" f       file:
+wpa_auth_get_sm        src/ap/wpa_auth.c       /^static struct wpa_state_machine * wpa_auth_get_sm(u32 index)$/;"      f       file:
+wpa_auth_logger        include/utils/wpa_debug.h       161;"   d
+wpa_auth_mic_failure_report    src/ap/wpa_auth.c       /^static inline int wpa_auth_mic_failure_report($/;"    f       file:
+wpa_auth_send_eapol    src/ap/wpa_auth.c       /^wpa_auth_send_eapol(struct wpa_authenticator *wpa_auth, const u8 *addr,$/;"   f       file:
+wpa_auth_set_eapol     src/ap/wpa_auth.c       /^static inline void wpa_auth_set_eapol(struct wpa_authenticator *wpa_auth,$/;" f       file:
+wpa_auth_set_key       src/ap/wpa_auth.c       /^static inline int wpa_auth_set_key(struct wpa_authenticator *wpa_auth,$/;"    f       file:
+wpa_auth_sm_event      src/ap/wpa_auth.c       /^int wpa_auth_sm_event(struct wpa_state_machine *sm, wpa_event event)$/;"      f
+wpa_auth_sta_associated        src/ap/wpa_auth.c       /^int wpa_auth_sta_associated(struct wpa_authenticator *wpa_auth,$/;"   f
+wpa_auth_sta_deinit    src/ap/wpa_auth.c       /^void wpa_auth_sta_deinit(struct wpa_state_machine *sm)$/;"    f
+wpa_auth_sta_init      src/ap/wpa_auth.c       /^wpa_auth_sta_init(struct wpa_authenticator *wpa_auth, const u8 *addr)$/;"     f
+wpa_auth_sta_no_wpa    src/ap/wpa_auth.c       /^void wpa_auth_sta_no_wpa(struct wpa_state_machine *sm)$/;"    f
+wpa_auth_uses_mfp      src/ap/wpa_auth_ie.c    /^int wpa_auth_uses_mfp(struct wpa_state_machine *sm)$/;"       f
+wpa_auth_vlogger       include/utils/wpa_debug.h       162;"   d
+wpa_authenticator      src/ap/wpa_auth_i.h     /^struct wpa_authenticator {$/;"        s
+wpa_cipher     src/common/defs.h       /^enum wpa_cipher {$/;" g
+wpa_cipher_key_len     src/common/wpa_common.c /^int wpa_cipher_key_len(int cipher)$/;"        f
+wpa_cipher_put_suites  src/common/wpa_common.c /^int wpa_cipher_put_suites(u8 *pos, int ciphers)$/;"   f
+wpa_cipher_to_alg      src/common/wpa_common.c /^int wpa_cipher_to_alg(int cipher)$/;" f
+wpa_cipher_to_suite    src/common/wpa_common.c /^u32 wpa_cipher_to_suite(int proto, int cipher)$/;"    f
+wpa_cipher_txt src/common/wpa_common.c /^const char * wpa_cipher_txt(int cipher)$/;"   f
+wpa_compare_rsn_ie     src/common/wpa_common.c /^int wpa_compare_rsn_ie(int ft_initial_assoc,$/;"      f
+wpa_config_assoc_ie    src/esp_supplicant/esp_wpa_main.c       /^void  wpa_config_assoc_ie(u8 proto, u8 *assoc_buf, u32 assoc_wpa_ie_len)$/;"  f
+wpa_config_blob        src/eap_peer/eap_config.h       /^struct wpa_config_blob {$/;"  s
+wpa_config_bss src/esp_supplicant/esp_wpa_main.c       /^void  wpa_config_bss(uint8_t *bssid)$/;"      f
+wpa_config_parse_string        src/utils/common.c      /^char * wpa_config_parse_string(const char *value, size_t *len)$/;"    f
+wpa_config_profile     src/esp_supplicant/esp_wpa_main.c       /^void  wpa_config_profile()$/;"        f
+wpa_deattach   src/esp_supplicant/esp_wpa_main.c       /^bool  wpa_deattach(void)$/;"  f
+wpa_deauthenticate     src/esp_supplicant/esp_wpa_main.c       /^void  wpa_deauthenticate(u8 reason_code)$/;"  f
+wpa_deauthenticate     src/rsn_supp/wpa.h      /^    void (*wpa_deauthenticate)(u8 reason_code);$/;"   m       struct:wpa_sm
+wpa_debug_print_timestamp      src/utils/wpa_debug.c   /^void  wpa_debug_print_timestamp(void)$/;"     f
+wpa_derive_ptk src/ap/wpa_auth.c       /^static int wpa_derive_ptk(struct wpa_state_machine *sm, const u8 *pmk,$/;"    f       file:
+wpa_derive_ptk src/rsn_supp/wpa.c      /^int   wpa_derive_ptk(struct wpa_sm *sm, const unsigned char *src_addr,$/;"    f
+wpa_dump_mem   src/utils/wpa_debug.c   /^void  wpa_dump_mem(char* desc, uint8_t *addr, uint16_t len)$/;"       f
+wpa_eapol_ie_parse     src/ap/wpa_auth_ie.h    /^struct wpa_eapol_ie_parse {$/;"       s
+wpa_eapol_ie_parse     src/rsn_supp/wpa_ie.h   /^struct wpa_eapol_ie_parse {$/;"       s
+wpa_eapol_key  src/common/wpa_common.h /^struct wpa_eapol_key {$/;"    s
+wpa_eapol_key_dump     src/rsn_supp/wpa.c      /^  void   wpa_eapol_key_dump(int level, const struct wpa_eapol_key *key)$/;"   f
+wpa_eapol_key_mic      src/common/wpa_common.c /^int wpa_eapol_key_mic(const u8 *key, int ver, const u8 *buf, size_t len,$/;"  f
+wpa_eapol_key_send     src/rsn_supp/wpa.c      /^void   wpa_eapol_key_send(struct wpa_sm *sm, const u8 *kck,$/;"       f
+wpa_eapol_variable     src/ap/wpa_auth.h       /^} wpa_eapol_variable;$/;"     t       typeref:enum:__anon21
+wpa_event      src/ap/wpa_auth.h       /^} wpa_event;$/;"      t       typeref:enum:__anon23
+wpa_free_sta_sm        src/ap/wpa_auth.c       /^static void wpa_free_sta_sm(struct wpa_state_machine *sm)$/;" f       file:
+wpa_funcs      src/esp_supplicant/esp_wifi_driver.h    /^struct wpa_funcs {$/;"        s
+wpa_gen_wpa_ie src/rsn_supp/wpa_ie.c   /^int  wpa_gen_wpa_ie(struct wpa_sm *sm, u8 *wpa_ie, size_t wpa_ie_len)$/;"     f
+wpa_gen_wpa_ie_rsn     src/rsn_supp/wpa_ie.c   /^static int  wpa_gen_wpa_ie_rsn(u8 *rsn_ie, size_t rsn_ie_len,$/;"     f       file:
+wpa_gen_wpa_ie_wpa     src/rsn_supp/wpa_ie.c   /^static int  wpa_gen_wpa_ie_wpa(u8 *wpa_ie, size_t wpa_ie_len,$/;"     f       file:
+wpa_get_key    src/esp_supplicant/esp_wpa_main.c       /^int  wpa_get_key(uint8_t *ifx, int *alg, u8 *addr, int *key_idx,$/;"  f
+wpa_get_ntp_timestamp  src/utils/common.c      /^void wpa_get_ntp_timestamp(u8 *buf)$/;"       f
+wpa_gmk_rekey  src/ap/ap_config.h      /^      int wpa_gmk_rekey;$/;"  m       struct:hostapd_bss_config
+wpa_gmk_rekey  src/ap/wpa_auth.h       /^      int wpa_gmk_rekey;$/;"  m       struct:wpa_auth_config
+wpa_gmk_to_gtk src/ap/wpa_auth.c       /^static int wpa_gmk_to_gtk(const u8 *gmk, const char *label, const u8 *addr,$/;"       f       file:
+wpa_group      src/ap/ap_config.h      /^      int wpa_group;$/;"      m       struct:hostapd_bss_config
+wpa_group      src/ap/wpa_auth.h       /^      int wpa_group;$/;"      m       struct:wpa_auth_config
+wpa_group      src/ap/wpa_auth_i.h     /^struct wpa_group {$/;"        s
+wpa_group_config_group_keys    src/ap/wpa_auth.c       /^static int wpa_group_config_group_keys(struct wpa_authenticator *wpa_auth,$/;"        f       file:
+wpa_group_ensure_init  src/ap/wpa_auth.c       /^static void wpa_group_ensure_init(struct wpa_authenticator *wpa_auth,$/;"     f       file:
+wpa_group_gtk_init     src/ap/wpa_auth.c       /^static void wpa_group_gtk_init(struct wpa_authenticator *wpa_auth,$/;"        f       file:
+wpa_group_init src/ap/wpa_auth.c       /^static struct wpa_group * wpa_group_init(struct wpa_authenticator *wpa_auth,$/;"      f       file:
+wpa_group_init_gmk_and_counter src/ap/wpa_auth.c       /^static int wpa_group_init_gmk_and_counter(struct wpa_authenticator *wpa_auth,$/;"     f       file:
+wpa_group_rekey        src/ap/ap_config.h      /^      int wpa_group_rekey;$/;"        m       struct:hostapd_bss_config
+wpa_group_rekey        src/ap/wpa_auth.h       /^      int wpa_group_rekey;$/;"        m       struct:wpa_auth_config
+wpa_group_setkeys      src/ap/wpa_auth.c       /^static void wpa_group_setkeys(struct wpa_authenticator *wpa_auth,$/;" f       file:
+wpa_group_setkeysdone  src/ap/wpa_auth.c       /^static int wpa_group_setkeysdone(struct wpa_authenticator *wpa_auth,$/;"      f       file:
+wpa_group_sm_step      src/ap/wpa_auth.c       /^static void wpa_group_sm_step(struct wpa_authenticator *wpa_auth,$/;" f       file:
+wpa_group_state        src/ap/wpa_auth_i.h     /^      } wpa_group_state;$/;"  m       struct:wpa_group        typeref:enum:wpa_group::__anon27
+wpa_group_update_sta   src/ap/wpa_auth.c       /^static int wpa_group_update_sta(struct wpa_state_machine *sm, void *ctx)$/;"  f       file:
+wpa_gtk_data   src/common/wpa_common.h /^struct wpa_gtk_data {$/;"     s
+wpa_gtk_update src/ap/wpa_auth.c       /^static int wpa_gtk_update(struct wpa_authenticator *wpa_auth,$/;"     f       file:
+wpa_hexdump    include/utils/wpa_debug.h       153;"   d
+wpa_hexdump    src/utils/wpa_debug.c   /^void  wpa_hexdump(int level, const char *title, const u8 *buf, size_t len)$/;"        f
+wpa_hexdump_ascii      include/utils/wpa_debug.h       /^static inline void wpa_hexdump_ascii(int level, const char *title, const u8 *buf, size_t len)$/;"     f
+wpa_hexdump_ascii      include/utils/wpa_debug.h       157;"   d
+wpa_hexdump_ascii_key  include/utils/wpa_debug.h       /^static inline void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf, size_t len)$/;" f
+wpa_hexdump_ascii_key  include/utils/wpa_debug.h       158;"   d
+wpa_hexdump_buf        include/utils/wpa_debug.h       /^static inline void wpa_hexdump_buf(int level, const char *title,$/;"  f
+wpa_hexdump_buf        include/utils/wpa_debug.h       154;"   d
+wpa_hexdump_buf_key    include/utils/wpa_debug.h       /^static inline void wpa_hexdump_buf_key(int level, const char *title,$/;"      f
+wpa_hexdump_buf_key    include/utils/wpa_debug.h       156;"   d
+wpa_hexdump_key        include/utils/wpa_debug.h       155;"   d
+wpa_hexdump_key        src/utils/wpa_debug.c   /^void  wpa_hexdump_key(int level, const char *title, const u8 *buf, size_t len)$/;"    f
+wpa_hook_deinit        src/esp_supplicant/esp_wpa_main.c       /^bool  wpa_hook_deinit(void)$/;"       f
+wpa_ie src/ap/wpa_auth_i.h     /^      u8 *wpa_ie;$/;" m       struct:wpa_authenticator
+wpa_ie src/ap/wpa_auth_i.h     /^      u8 *wpa_ie;$/;" m       struct:wpa_state_machine
+wpa_ie src/ap/wpa_auth_ie.h    /^      const u8 *wpa_ie;$/;"   m       struct:wpa_eapol_ie_parse
+wpa_ie src/rsn_supp/wpa_ie.h   /^      const u8 *wpa_ie;$/;"   m       struct:wpa_eapol_ie_parse
+wpa_ie_data    src/common/wpa_common.h /^struct wpa_ie_data {$/;"      s
+wpa_ie_hdr     src/common/wpa_common.h /^struct wpa_ie_hdr {$/;"       s
+wpa_ie_len     src/ap/wpa_auth_i.h     /^      size_t wpa_ie_len;$/;"  m       struct:wpa_authenticator
+wpa_ie_len     src/ap/wpa_auth_i.h     /^      size_t wpa_ie_len;$/;"  m       struct:wpa_state_machine
+wpa_ie_len     src/ap/wpa_auth_ie.h    /^      size_t wpa_ie_len;$/;"  m       struct:wpa_eapol_ie_parse
+wpa_ie_len     src/rsn_supp/wpa_ie.h   /^      size_t wpa_ie_len;$/;"  m       struct:wpa_eapol_ie_parse
+wpa_igtk_kde   src/common/wpa_common.h /^struct wpa_igtk_kde {$/;"     s
+wpa_init       src/ap/wpa_auth.c       /^struct wpa_authenticator * wpa_init(const u8 *addr,$/;"       f
+wpa_install_key        src/esp_supplicant/esp_wpa_main.c       /^void  wpa_install_key(enum wpa_alg alg, u8 *addr, int key_idx, int set_tx,$/;"        f
+wpa_key_mgmt   src/ap/ap_config.h      /^      int wpa_key_mgmt;$/;"   m       struct:hostapd_bss_config
+wpa_key_mgmt   src/ap/wpa_auth.h       /^      int wpa_key_mgmt;$/;"   m       struct:wpa_auth_config
+wpa_key_mgmt   src/ap/wpa_auth_i.h     /^      int wpa_key_mgmt; \/* the selected WPA_KEY_MGMT_* *\/$/;"       m       struct:wpa_state_machine
+wpa_key_mgmt   src/common/defs.h       /^enum wpa_key_mgmt {$/;"       g
+wpa_key_mgmt_ft        src/common/defs.h       /^static inline int wpa_key_mgmt_ft(int akm)$/;"        f
+wpa_key_mgmt_sha256    src/common/defs.h       /^static inline int wpa_key_mgmt_sha256(int akm)$/;"    f
+wpa_key_mgmt_to_bitfield       src/common/wpa_common.c /^static int wpa_key_mgmt_to_bitfield(const u8 *s)$/;"  f       file:
+wpa_key_mgmt_wpa_ieee8021x     src/common/defs.h       /^static inline int wpa_key_mgmt_wpa_ieee8021x(int akm)$/;"     f
+wpa_key_mgmt_wpa_psk   src/common/defs.h       /^static inline int wpa_key_mgmt_wpa_psk(int akm)$/;"   f
+wpa_key_replay_counter src/ap/wpa_auth_i.h     /^      struct wpa_key_replay_counter {$/;"     s       struct:wpa_state_machine
+wpa_msg_cb_func        include/utils/wpa_debug.h       /^typedef void (*wpa_msg_cb_func)(void *ctx, int level, const char *txt,$/;"    t
+wpa_neg_complete       src/esp_supplicant/esp_wpa_main.c       /^void  wpa_neg_complete()$/;"  f
+wpa_neg_complete       src/rsn_supp/wpa.h      /^    void (*wpa_neg_complete)();$/;"   m       struct:wpa_sm
+wpa_pairwise   src/ap/ap_config.h      /^      int wpa_pairwise;$/;"   m       struct:hostapd_bss_config
+wpa_pairwise   src/ap/wpa_auth.h       /^      int wpa_pairwise;$/;"   m       struct:wpa_auth_config
+wpa_parse_generic      src/ap/wpa_auth_ie.c    /^static int wpa_parse_generic(const u8 *pos, const u8 *end,$/;"        f       file:
+wpa_parse_generic      src/rsn_supp/wpa_ie.c   /^static int  wpa_parse_generic(const u8 *pos, const u8 *end,$/;"       f       file:
+wpa_parse_kde_ies      src/ap/wpa_auth_ie.c    /^int wpa_parse_kde_ies(const u8 *buf, size_t len, struct wpa_eapol_ie_parse *ie)$/;"   f
+wpa_parse_wpa_ie       src/rsn_supp/wpa_ie.c   /^int  wpa_parse_wpa_ie(const u8 *wpa_ie, size_t wpa_ie_len,$/;"        f
+wpa_parse_wpa_ie_rsn   src/common/wpa_common.c /^int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len,$/;"     f
+wpa_parse_wpa_ie_wpa   src/common/wpa_common.c /^int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len,$/;"     f
+wpa_passphrase src/ap/ap_config.h      /^      char *wpa_passphrase;$/;"       m       struct:hostapd_ssid
+wpa_pmk_to_ptk src/common/wpa_common.c /^void wpa_pmk_to_ptk(const u8 *pmk, size_t pmk_len, const char *label,$/;"     f
+wpa_printf     include/utils/wpa_debug.h       152;"   d
+wpa_printf     include/utils/wpa_debug.h       76;"    d
+wpa_psk        src/ap/ap_config.h      /^      struct hostapd_wpa_psk *wpa_psk;$/;"    m       struct:hostapd_ssid     typeref:struct:hostapd_ssid::hostapd_wpa_psk
+wpa_psk_radius src/ap/ap_config.h      /^      } wpa_psk_radius;$/;"   m       struct:hostapd_bss_config       typeref:enum:hostapd_bss_config::__anon18
+wpa_ptk        src/common/wpa_common.h /^struct wpa_ptk {$/;"  s
+wpa_ptk_group_state    src/ap/wpa_auth_i.h     /^      } wpa_ptk_group_state;$/;"      m       struct:wpa_state_machine        typeref:enum:wpa_state_machine::__anon25
+wpa_ptk_rekey  src/ap/ap_config.h      /^      int wpa_ptk_rekey;$/;"  m       struct:hostapd_bss_config
+wpa_ptk_rekey  src/ap/wpa_auth.h       /^      int wpa_ptk_rekey;$/;"  m       struct:wpa_auth_config
+wpa_ptk_rekey  src/rsn_supp/wpa.h      /^    int wpa_ptk_rekey;$/;"    m       struct:wpa_sm
+wpa_ptk_state  src/ap/wpa_auth_i.h     /^      } wpa_ptk_state;$/;"    m       struct:wpa_state_machine        typeref:enum:wpa_state_machine::__anon24
+wpa_receive    src/ap/wpa_auth.c       /^void wpa_receive(struct wpa_authenticator *wpa_auth, struct wpa_state_machine *sm, u8 *data, size_t data_len)$/;"     f
+wpa_receive_error_report       src/ap/wpa_auth.c       /^static int wpa_receive_error_report(struct wpa_authenticator *wpa_auth,$/;"   f       file:
+wpa_register   src/rsn_supp/wpa.c      /^void   wpa_register(char * payload, WPA_SEND_FUNC snd_func,$/;"       f
+wpa_rekey_gtk  src/ap/wpa_auth.c       /^static void wpa_rekey_gtk(void *eloop_ctx, void *timeout_ctx)$/;"     f       file:
+wpa_rekey_ptk  src/ap/wpa_auth.c       /^static void wpa_rekey_ptk(void *eloop_ctx, void *timeout_ctx)$/;"     f       file:
+wpa_remove_ptk src/ap/wpa_auth.c       /^void wpa_remove_ptk(struct wpa_state_machine *sm)$/;" f
+wpa_replay_counter_mark_invalid        src/ap/wpa_auth.c       /^static void wpa_replay_counter_mark_invalid(struct wpa_key_replay_counter *ctr,$/;"   f       file:
+wpa_replay_counter_valid       src/ap/wpa_auth.c       /^static int wpa_replay_counter_valid(struct wpa_key_replay_counter *ctr,$/;"   f       file:
+wpa_report_ie_mismatch src/rsn_supp/wpa.c      /^void wpa_report_ie_mismatch(struct wpa_sm *sm,$/;"    f
+wpa_request_new_ptk    src/ap/wpa_auth.c       /^static void wpa_request_new_ptk(struct wpa_state_machine *sm)$/;"     f       file:
+wpa_selector_to_bitfield       src/common/wpa_common.c /^static int wpa_selector_to_bitfield(const u8 *s)$/;"  f       file:
+wpa_send_eapol src/ap/wpa_auth.c       /^static void wpa_send_eapol(struct wpa_authenticator *wpa_auth,$/;"    f       file:
+wpa_send_eapol_timeout src/ap/wpa_auth.c       /^static void wpa_send_eapol_timeout(void *eloop_ctx, void *timeout_ctx)$/;"    f       file:
+wpa_sendto_wrapper     src/esp_supplicant/esp_wpa_main.c       /^void  wpa_sendto_wrapper(void *buffer, u16 len)$/;"   f
+wpa_set_bss    src/rsn_supp/wpa.c      /^wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher, char *passphrase, u8 *ssid, size_t ssid_len)$/;" f
+wpa_set_passphrase     src/rsn_supp/wpa.c      /^wpa_set_passphrase(char * passphrase, u8 *ssid, size_t ssid_len)$/;"  f
+wpa_set_pmk    src/rsn_supp/wpa.c      /^void wpa_set_pmk(uint8_t *pmk)$/;"    f
+wpa_set_profile        src/rsn_supp/wpa.c      /^void wpa_set_profile(u32 wpa_proto, u8 auth_mode)$/;" f
+wpa_set_wnmsleep       src/ap/wpa_auth.c       /^void wpa_set_wnmsleep(struct wpa_state_machine *sm, int flag)$/;"     f
+wpa_sm src/ap/sta_info.h       /^      struct wpa_state_machine *wpa_sm;$/;"   m       struct:sta_info typeref:struct:sta_info::wpa_state_machine
+wpa_sm src/rsn_supp/wpa.h      /^struct wpa_sm {$/;"   s
+wpa_sm_alloc_eapol     src/esp_supplicant/esp_wpas_glue.c      /^u8   *wpa_sm_alloc_eapol(struct wpa_sm *sm, u8 type,$/;"      f
+wpa_sm_cancel_auth_timeout     src/rsn_supp/wpa.c      /^static inline void   wpa_sm_cancel_auth_timeout(struct wpa_sm *sm)$/;"        f       file:
+wpa_sm_deauthenticate  src/esp_supplicant/esp_wpas_glue.c      /^void  wpa_sm_deauthenticate(struct wpa_sm *sm, u8 reason_code)$/;"    f
+wpa_sm_disassociate    src/esp_supplicant/esp_wpas_glue.c      /^void  wpa_sm_disassociate(struct wpa_sm *sm, int reason_code)$/;"     f
+wpa_sm_ether_send      src/rsn_supp/wpa.c      /^static inline int   wpa_sm_ether_send( struct wpa_sm *sm, const u8 *dest, u16 proto,$/;"      f       file:
+wpa_sm_free_eapol      src/esp_supplicant/esp_wpas_glue.c      /^void  wpa_sm_free_eapol(u8 *buffer)$/;"       f
+wpa_sm_get_beacon_ie   src/esp_supplicant/esp_wpas_glue.c      /^int  wpa_sm_get_beacon_ie(struct wpa_sm *sm)$/;"      f
+wpa_sm_get_bssid       src/rsn_supp/wpa.c      /^static inline int   wpa_sm_get_bssid(struct wpa_sm *sm, u8 *bssid)$/;"        f       file:
+wpa_sm_get_key src/rsn_supp/wpa.c      /^wpa_sm_get_key(uint8_t *ifx, int *alg, u8 *addr, int *key_idx, u8 *key, size_t key_len, int key_entry_valid)$/;"      f
+wpa_sm_get_state       src/rsn_supp/wpa.c      /^static inline enum wpa_states   wpa_sm_get_state(struct wpa_sm *sm)$/;"       f       file:
+wpa_sm_key_request     src/rsn_supp/wpa.c      /^void   wpa_sm_key_request(struct wpa_sm *sm, int error, int pairwise)$/;"     f
+wpa_sm_mlme_setprotection      src/esp_supplicant/esp_wpas_glue.c      /^int  wpa_sm_mlme_setprotection(struct wpa_sm *sm, const u8 *addr,$/;" f
+wpa_sm_rekey_ptk       src/rsn_supp/wpa.c      /^  void   wpa_sm_rekey_ptk(void *eloop_ctx, void *timeout_ctx)$/;"     f
+wpa_sm_rx_eapol        src/rsn_supp/wpa.c      /^int   wpa_sm_rx_eapol(u8 *src_addr, u8 *buf, u32 len)$/;"     f
+wpa_sm_set_key src/rsn_supp/wpa.c      /^wpa_sm_set_key(struct install_key *key_sm, enum wpa_alg alg,$/;"      f
+wpa_sm_set_seq src/rsn_supp/wpa.c      /^  void   wpa_sm_set_seq(struct wpa_sm *sm, struct wpa_eapol_key *key, u8 isptk)$/;"   f
+wpa_sm_set_state       src/rsn_supp/wpa.c      /^void wpa_sm_set_state(enum wpa_states state)$/;"      f
+wpa_sm_step    src/ap/wpa_auth.c       /^static int wpa_sm_step(struct wpa_state_machine *sm)$/;"      f       file:
+wpa_snprintf_hex       src/utils/wpa_debug.c   /^int  wpa_snprintf_hex(char *buf, size_t buf_size, const u8 *data, size_t len)$/;"     f
+wpa_snprintf_hex_uppercase     src/utils/wpa_debug.c   /^int  wpa_snprintf_hex_uppercase(char *buf, size_t buf_size, const u8 *data, size_t len)$/;"   f
+wpa_sta_connect        src/esp_supplicant/esp_wifi_driver.h    /^    void (*wpa_sta_connect)(uint8_t *bssid);$/;"      m       struct:wpa_funcs
+wpa_sta_connect        src/esp_supplicant/esp_wpa_main.c       /^void  wpa_sta_connect(uint8_t *bssid)$/;"     f
+wpa_sta_deinit src/esp_supplicant/esp_wifi_driver.h    /^    bool (*wpa_sta_deinit)(void);$/;" m       struct:wpa_funcs
+wpa_sta_disconnect     src/ap/wpa_auth.c       /^static void wpa_sta_disconnect(struct wpa_authenticator *wpa_auth,$/;"        f       file:
+wpa_sta_in_4way_handshake      src/esp_supplicant/esp_wifi_driver.h    /^    bool (*wpa_sta_in_4way_handshake)(void);$/;"      m       struct:wpa_funcs
+wpa_sta_in_4way_handshake      src/rsn_supp/wpa.c      /^bool wpa_sta_in_4way_handshake(void)$/;"      f
+wpa_sta_init   src/esp_supplicant/esp_wifi_driver.h    /^    void (*wpa_sta_init)(void);$/;"   m       struct:wpa_funcs
+wpa_sta_rx_eapol       src/esp_supplicant/esp_wifi_driver.h    /^    int (*wpa_sta_rx_eapol)(u8 *src_addr, u8 *buf, u32 len);$/;"      m       struct:wpa_funcs
+wpa_state      src/rsn_supp/wpa.h      /^    enum wpa_states wpa_state;$/;"    m       struct:wpa_sm   typeref:enum:wpa_sm::wpa_states
+wpa_state_machine      src/ap/wpa_auth_i.h     /^struct wpa_state_machine {$/;"        s
+wpa_states     src/common/defs.h       /^enum wpa_states {$/;" g
+wpa_strdup_tchar       include/utils/common.h  308;"   d
+wpa_strict_rekey       src/ap/ap_config.h      /^      int wpa_strict_rekey;$/;"       m       struct:hostapd_bss_config
+wpa_strict_rekey       src/ap/wpa_auth.h       /^      int wpa_strict_rekey;$/;"       m       struct:wpa_auth_config
+wpa_stsl_negotiation   src/ap/wpa_auth_i.h     /^struct wpa_stsl_negotiation {$/;"     s
+wpa_supplicant_check_group_cipher      src/rsn_supp/wpa.c      /^int   wpa_supplicant_check_group_cipher(int group_cipher,$/;" f
+wpa_supplicant_clr_countermeasures     src/rsn_supp/wpa.c      /^void wpa_supplicant_clr_countermeasures(u16 *pisunicast)$/;"  f
+wpa_supplicant_decrypt_key_data        src/rsn_supp/wpa.c      /^  int   wpa_supplicant_decrypt_key_data(struct wpa_sm *sm,$/;"        f
+wpa_supplicant_get_pmk src/rsn_supp/wpa.c      /^int   wpa_supplicant_get_pmk(struct wpa_sm *sm)$/;"   f
+wpa_supplicant_gtk_in_use      src/rsn_supp/wpa.c      /^bool wpa_supplicant_gtk_in_use(struct wpa_sm *sm, struct wpa_gtk_data *gd)$/;"        f
+wpa_supplicant_gtk_tx_bit_workaround   src/rsn_supp/wpa.c      /^int wpa_supplicant_gtk_tx_bit_workaround(const struct wpa_sm *sm,$/;" f
+wpa_supplicant_install_gtk     src/rsn_supp/wpa.c      /^int   wpa_supplicant_install_gtk(struct wpa_sm *sm,$/;"       f
+wpa_supplicant_install_ptk     src/rsn_supp/wpa.c      /^int   wpa_supplicant_install_ptk(struct wpa_sm *sm)$/;"       f
+wpa_supplicant_key_neg_complete        src/rsn_supp/wpa.c      /^void   wpa_supplicant_key_neg_complete(struct wpa_sm *sm,$/;" f
+wpa_supplicant_pairwise_gtk    src/rsn_supp/wpa.c      /^int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,$/;"        f
+wpa_supplicant_parse_ies       src/rsn_supp/wpa_ie.c   /^int  wpa_supplicant_parse_ies(const u8 *buf, size_t len,$/;"  f
+wpa_supplicant_process_1_of_2  src/rsn_supp/wpa.c      /^  void   wpa_supplicant_process_1_of_2(struct wpa_sm *sm,$/;" f
+wpa_supplicant_process_1_of_2_rsn      src/rsn_supp/wpa.c      /^  int   wpa_supplicant_process_1_of_2_rsn(struct wpa_sm *sm,$/;"      f
+wpa_supplicant_process_1_of_2_wpa      src/rsn_supp/wpa.c      /^  int   wpa_supplicant_process_1_of_2_wpa(struct wpa_sm *sm,$/;"      f
+wpa_supplicant_process_1_of_4  src/rsn_supp/wpa.c      /^void   wpa_supplicant_process_1_of_4(struct wpa_sm *sm,$/;"   f
+wpa_supplicant_process_3_of_4  src/rsn_supp/wpa.c      /^  void   wpa_supplicant_process_3_of_4(struct wpa_sm *sm,$/;" f
+wpa_supplicant_send_2_of_2     src/rsn_supp/wpa.c      /^  int   wpa_supplicant_send_2_of_2(struct wpa_sm *sm,$/;"     f
+wpa_supplicant_send_2_of_2_txcallback  src/rsn_supp/wpa.c      /^  int   wpa_supplicant_send_2_of_2_txcallback(struct wpa_sm *sm)$/;"  f
+wpa_supplicant_send_2_of_4     src/rsn_supp/wpa.c      /^int   wpa_supplicant_send_2_of_4(struct wpa_sm *sm, const unsigned char *dst,$/;"     f
+wpa_supplicant_send_4_of_4     src/rsn_supp/wpa.c      /^  int   wpa_supplicant_send_4_of_4(struct wpa_sm *sm, const unsigned char *dst,$/;"   f
+wpa_supplicant_send_4_of_4_txcallback  src/rsn_supp/wpa.c      /^  int   wpa_supplicant_send_4_of_4_txcallback(struct wpa_sm *sm)$/;"  f
+wpa_supplicant_stop_countermeasures    src/rsn_supp/wpa.c      /^void wpa_supplicant_stop_countermeasures(u16 *pisunicast)$/;" f
+wpa_supplicant_validate_ie     src/rsn_supp/wpa.c      /^  int   wpa_supplicant_validate_ie(struct wpa_sm *sm,$/;"     f
+wpa_supplicant_verify_eapol_key_mic    src/rsn_supp/wpa.c      /^   int   wpa_supplicant_verify_eapol_key_mic(struct wpa_sm *sm,$/;"   f
+wpa_swap_16    include/utils/common.h  /^static inline unsigned short wpa_swap_16(unsigned short v)$/;"        f
+wpa_swap_32    include/utils/common.h  /^static inline unsigned int wpa_swap_32(unsigned int v)$/;"    f
+wpa_unicode2ascii_inplace      include/utils/common.h  307;"   d
+wpa_use_aes_cmac       src/ap/wpa_auth.c       /^static int wpa_use_aes_cmac(struct wpa_state_machine *sm)$/;" f       file:
+wpa_validate_wpa_ie    src/ap/wpa_auth_ie.c    /^int wpa_validate_wpa_ie(struct wpa_authenticator *wpa_auth,$/;"       f
+wpa_verify_key_mic     src/ap/wpa_auth.c       /^static int wpa_verify_key_mic(struct wpa_ptk *PTK, u8 *data, size_t data_len)$/;"     f       file:
+wpa_wnmsleep_gtk_subelem       src/ap/wpa_auth.c       /^int wpa_wnmsleep_gtk_subelem(struct wpa_state_machine *sm, u8 *pos)$/;"       f
+wpa_wnmsleep_igtk_subelem      src/ap/wpa_auth.c       /^int wpa_wnmsleep_igtk_subelem(struct wpa_state_machine *sm, u8 *pos)$/;"      f
+wpa_wnmsleep_rekey_gtk src/ap/wpa_auth.c       /^void wpa_wnmsleep_rekey_gtk(struct wpa_state_machine *sm)$/;" f
+wpa_write_rsn_ie       src/ap/wpa_auth_ie.c    /^int wpa_write_rsn_ie(struct wpa_auth_config *conf, u8 *buf, size_t len,$/;"   f
+wpa_write_wpa_ie       src/ap/wpa_auth_ie.c    /^static int wpa_write_wpa_ie(struct wpa_auth_config *conf, u8 *buf, size_t len)$/;"    f       file:
+wpabuf include/utils/wpabuf.h  /^struct wpabuf {$/;"   s
+wpabuf_alloc   src/utils/wpabuf.c      /^struct wpabuf * wpabuf_alloc(size_t len)$/;"  f
+wpabuf_alloc_copy      src/utils/wpabuf.c      /^struct wpabuf * wpabuf_alloc_copy(const void *data, size_t len)$/;"   f
+wpabuf_alloc_ext_data  src/utils/wpabuf.c      /^struct wpabuf * wpabuf_alloc_ext_data(u8 *data, size_t len)$/;"       f
+wpabuf_concat  src/utils/wpabuf.c      /^struct wpabuf * wpabuf_concat(struct wpabuf *a, struct wpabuf *b)$/;" f
+wpabuf_dup     src/utils/wpabuf.c      /^struct wpabuf * wpabuf_dup(const struct wpabuf *src)$/;"      f
+wpabuf_free    src/utils/wpabuf.c      /^void wpabuf_free(struct wpabuf *buf)$/;"      f
+wpabuf_get_trace       src/utils/wpabuf.c      /^static struct wpabuf_trace * wpabuf_get_trace(const struct wpabuf *buf)$/;"   f       file:
+wpabuf_head    include/utils/wpabuf.h  /^static inline const void * wpabuf_head(const struct wpabuf *buf)$/;"  f
+wpabuf_head_u8 include/utils/wpabuf.h  /^static inline const u8 * wpabuf_head_u8(const struct wpabuf *buf)$/;" f
+wpabuf_len     include/utils/wpabuf.h  /^static inline size_t wpabuf_len(const struct wpabuf *buf)$/;" f
+wpabuf_mhead   include/utils/wpabuf.h  /^static inline void * wpabuf_mhead(struct wpabuf *buf)$/;"     f
+wpabuf_mhead_u8        include/utils/wpabuf.h  /^static inline u8 * wpabuf_mhead_u8(struct wpabuf *buf)$/;"    f
+wpabuf_overflow        src/utils/wpabuf.c      /^static void wpabuf_overflow(const struct wpabuf *buf, size_t len)$/;" f       file:
+wpabuf_printf  src/utils/wpabuf.c      /^void wpabuf_printf(struct wpabuf *buf, char *fmt, ...)$/;"    f
+wpabuf_put     src/utils/wpabuf.c      /^void * wpabuf_put(struct wpabuf *buf, size_t len)$/;" f
+wpabuf_put_be16        include/utils/wpabuf.h  /^static inline void wpabuf_put_be16(struct wpabuf *buf, u16 data)$/;"  f
+wpabuf_put_be24        include/utils/wpabuf.h  /^static inline void wpabuf_put_be24(struct wpabuf *buf, u32 data)$/;"  f
+wpabuf_put_be32        include/utils/wpabuf.h  /^static inline void wpabuf_put_be32(struct wpabuf *buf, u32 data)$/;"  f
+wpabuf_put_buf include/utils/wpabuf.h  /^static inline void wpabuf_put_buf(struct wpabuf *dst,$/;"     f
+wpabuf_put_data        include/utils/wpabuf.h  /^static inline void wpabuf_put_data(struct wpabuf *buf, const void *data,$/;"  f
+wpabuf_put_le16        include/utils/wpabuf.h  /^static inline void wpabuf_put_le16(struct wpabuf *buf, u16 data)$/;"  f
+wpabuf_put_le32        include/utils/wpabuf.h  /^static inline void wpabuf_put_le32(struct wpabuf *buf, u32 data)$/;"  f
+wpabuf_put_str include/utils/wpabuf.h  /^static inline void wpabuf_put_str(struct wpabuf *dst, const char *str)$/;"    f
+wpabuf_put_u8  include/utils/wpabuf.h  /^static inline void wpabuf_put_u8(struct wpabuf *buf, u8 data)$/;"     f
+wpabuf_resize  src/utils/wpabuf.c      /^int wpabuf_resize(struct wpabuf **_buf, size_t add_len)$/;"   f
+wpabuf_set     include/utils/wpabuf.h  /^static inline void wpabuf_set(struct wpabuf *buf, const void *data, size_t len)$/;"   f
+wpabuf_size    include/utils/wpabuf.h  /^static inline size_t wpabuf_size(const struct wpabuf *buf)$/;"        f
+wpabuf_tailroom        include/utils/wpabuf.h  /^static inline size_t wpabuf_tailroom(const struct wpabuf *buf)$/;"    f
+wpabuf_trace   src/utils/wpabuf.c      /^struct wpabuf_trace {$/;"     s       file:
+wpabuf_zeropad src/utils/wpabuf.c      /^struct wpabuf * wpabuf_zeropad(struct wpabuf *buf, size_t len)$/;"    f
+wps    src/esp_supplicant/esp_wifi_driver.h    /^    uint8_t    *wps;$/;"      m       struct:wps_scan_ie
+wps    src/wps/wps.h   /^      struct wps_context *wps;$/;"    m       struct:wps_config       typeref:struct:wps_config::wps_context
+wps    src/wps/wps.h   /^    struct wps_data *wps;$/;" m       struct:wps_sm   typeref:struct:wps_sm::wps_data
+wps    src/wps/wps_i.h /^      struct wps_context *wps;$/;"    m       struct:wps_data typeref:struct:wps_data::wps_context
+wps    src/wps/wps_registrar.c /^      struct wps_context *wps;$/;"    m       struct:wps_registrar    typeref:struct:wps_registrar::wps_context       file:
+wpsTask        src/esp_supplicant/esp_wps.c    /^void wpsTask(void *pvParameters )$/;" f
+wps_add_discard_ap     src/esp_supplicant/esp_wps.c    /^void wps_add_discard_ap(u8 *bssid)$/;"        f
+wps_ap_priority_compar src/wps/wps.c   /^int wps_ap_priority_compar(const struct wpabuf *wps_a,$/;"    f
+wps_assoc_state        src/wps/wps_defs.h      /^enum wps_assoc_state {$/;"    g
+wps_attr_text  src/wps/wps.c   /^int wps_attr_text(struct wpabuf *data, char *buf, char *end)$/;"      f
+wps_attribute  src/wps/wps_defs.h      /^enum wps_attribute {$/;"      g
+wps_authorized_macs    src/wps/wps_registrar.c /^const u8 * wps_authorized_macs(struct wps_registrar *reg, size_t *count)$/;"  f
+wps_build_ap_cred      src/wps/wps_registrar.c /^static struct wpabuf * wps_build_ap_cred(struct wps_data *wps)$/;"    f       file:
+wps_build_ap_settings  src/wps/wps_enrollee.c  /^static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *plain)$/;"      f       file:
+wps_build_ap_settings  src/wps/wps_registrar.c /^static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *msg)$/;"        f       file:
+wps_build_ap_setup_locked      src/wps/wps_registrar.c /^static int wps_build_ap_setup_locked(struct wps_context *wps,$/;"     f       file:
+wps_build_assoc_req_ie src/wps/wps.c   /^struct wpabuf * wps_build_assoc_req_ie(enum wps_request_type req_type)$/;"    f
+wps_build_assoc_resp_ie        src/wps/wps.c   /^struct wpabuf * wps_build_assoc_resp_ie(void)$/;"     f
+wps_build_assoc_state  src/wps/wps_attr_build.c        /^int wps_build_assoc_state(struct wps_data *wps, struct wpabuf *msg)$/;"       f
+wps_build_auth_type_flags      src/wps/wps_attr_build.c        /^int wps_build_auth_type_flags(struct wps_data *wps, struct wpabuf *msg)$/;"   f
+wps_build_authenticator        src/wps/wps_attr_build.c        /^int wps_build_authenticator(struct wps_data *wps, struct wpabuf *msg)$/;"     f
+wps_build_config_error src/wps/wps_attr_build.c        /^int wps_build_config_error(struct wpabuf *msg, u16 err)$/;"   f
+wps_build_config_methods       src/wps/wps_attr_build.c        /^int wps_build_config_methods(struct wpabuf *msg, u16 methods)$/;"     f
+wps_build_config_methods_r     src/wps/wps_registrar.c /^static int wps_build_config_methods_r(struct wps_registrar *reg,$/;"  f       file:
+wps_build_conn_type_flags      src/wps/wps_attr_build.c        /^int wps_build_conn_type_flags(struct wps_data *wps, struct wpabuf *msg)$/;"   f
+wps_build_cred src/wps/wps_registrar.c /^int wps_build_cred(struct wps_data *wps, struct wpabuf *msg)$/;"      f
+wps_build_cred_auth_type       src/wps/wps_enrollee.c  /^static int wps_build_cred_auth_type(struct wps_data *wps, struct wpabuf *msg)$/;"     f       file:
+wps_build_cred_auth_type       src/wps/wps_registrar.c /^static int wps_build_cred_auth_type(struct wpabuf *msg,$/;"   f       file:
+wps_build_cred_encr_type       src/wps/wps_enrollee.c  /^static int wps_build_cred_encr_type(struct wps_data *wps, struct wpabuf *msg)$/;"     f       file:
+wps_build_cred_encr_type       src/wps/wps_registrar.c /^static int wps_build_cred_encr_type(struct wpabuf *msg,$/;"   f       file:
+wps_build_cred_mac_addr        src/wps/wps_enrollee.c  /^static int wps_build_cred_mac_addr(struct wps_data *wps, struct wpabuf *msg)$/;"      f       file:
+wps_build_cred_mac_addr        src/wps/wps_registrar.c /^static int wps_build_cred_mac_addr(struct wpabuf *msg,$/;"    f       file:
+wps_build_cred_network_idx     src/wps/wps_registrar.c /^static int wps_build_cred_network_idx(struct wpabuf *msg,$/;" f       file:
+wps_build_cred_network_key     src/wps/wps_enrollee.c  /^static int wps_build_cred_network_key(struct wps_data *wps, struct wpabuf *msg)$/;"   f       file:
+wps_build_cred_network_key     src/wps/wps_registrar.c /^static int wps_build_cred_network_key(struct wpabuf *msg,$/;" f       file:
+wps_build_cred_ssid    src/wps/wps_enrollee.c  /^static int wps_build_cred_ssid(struct wps_data *wps, struct wpabuf *msg)$/;"  f       file:
+wps_build_cred_ssid    src/wps/wps_registrar.c /^static int wps_build_cred_ssid(struct wpabuf *msg,$/;"        f       file:
+wps_build_credential   src/wps/wps_registrar.c /^static int wps_build_credential(struct wpabuf *msg,$/;"       f       file:
+wps_build_credential_wrap      src/wps/wps_registrar.c /^int wps_build_credential_wrap(struct wpabuf *msg,$/;" f
+wps_build_dev_name     src/wps/wps_dev_attr.c  /^int wps_build_dev_name(struct wps_device_data *dev, struct wpabuf *msg)$/;"   f
+wps_build_dev_password_id      src/wps/wps_attr_build.c        /^int wps_build_dev_password_id(struct wpabuf *msg, u16 id)$/;" f
+wps_build_device_attrs src/wps/wps_dev_attr.c  /^int wps_build_device_attrs(struct wps_device_data *dev, struct wpabuf *msg)$/;"       f
+wps_build_e_hash       src/wps/wps_enrollee.c  /^static int wps_build_e_hash(struct wps_data *wps, struct wpabuf *msg)$/;"     f       file:
+wps_build_e_snonce1    src/wps/wps_enrollee.c  /^static int wps_build_e_snonce1(struct wps_data *wps, struct wpabuf *msg)$/;"  f       file:
+wps_build_e_snonce2    src/wps/wps_enrollee.c  /^static int wps_build_e_snonce2(struct wps_data *wps, struct wpabuf *msg)$/;"  f       file:
+wps_build_encr_settings        src/wps/wps_attr_build.c        /^int wps_build_encr_settings(struct wps_data *wps, struct wpabuf *msg,$/;"     f
+wps_build_encr_type_flags      src/wps/wps_attr_build.c        /^int wps_build_encr_type_flags(struct wps_data *wps, struct wpabuf *msg)$/;"   f
+wps_build_enrollee_nonce       src/wps/wps_attr_build.c        /^int wps_build_enrollee_nonce(struct wps_data *wps, struct wpabuf *msg)$/;"    f
+wps_build_ic_appie_wps_ar      src/esp_supplicant/esp_wps.c    /^wps_build_ic_appie_wps_ar(void)$/;"   f       file:
+wps_build_ic_appie_wps_pr      src/esp_supplicant/esp_wps.c    /^wps_build_ic_appie_wps_pr(void)$/;"   f       file:
+wps_build_key_wrap_auth        src/wps/wps_attr_build.c        /^int wps_build_key_wrap_auth(struct wps_data *wps, struct wpabuf *msg)$/;"     f
+wps_build_m1   src/wps/wps_enrollee.c  /^static struct wpabuf * wps_build_m1(struct wps_data *wps)$/;" f       file:
+wps_build_m2   src/wps/wps_registrar.c /^static struct wpabuf * wps_build_m2(struct wps_data *wps)$/;" f       file:
+wps_build_m2d  src/wps/wps_registrar.c /^static struct wpabuf * wps_build_m2d(struct wps_data *wps)$/;"        f       file:
+wps_build_m3   src/wps/wps_enrollee.c  /^static struct wpabuf * wps_build_m3(struct wps_data *wps)$/;" f       file:
+wps_build_m4   src/wps/wps_registrar.c /^static struct wpabuf * wps_build_m4(struct wps_data *wps)$/;" f       file:
+wps_build_m5   src/wps/wps_enrollee.c  /^static struct wpabuf * wps_build_m5(struct wps_data *wps)$/;" f       file:
+wps_build_m6   src/wps/wps_registrar.c /^static struct wpabuf * wps_build_m6(struct wps_data *wps)$/;" f       file:
+wps_build_m7   src/wps/wps_enrollee.c  /^static struct wpabuf * wps_build_m7(struct wps_data *wps)$/;" f       file:
+wps_build_m8   src/wps/wps_registrar.c /^static struct wpabuf * wps_build_m8(struct wps_data *wps)$/;" f       file:
+wps_build_mac_addr     src/wps/wps_enrollee.c  /^static int wps_build_mac_addr(struct wps_data *wps, struct wpabuf *msg) {$/;" f       file:
+wps_build_manufacturer src/wps/wps_dev_attr.c  /^int wps_build_manufacturer(struct wps_device_data *dev, struct wpabuf *msg)$/;"       f
+wps_build_model_name   src/wps/wps_dev_attr.c  /^int wps_build_model_name(struct wps_device_data *dev, struct wpabuf *msg)$/;" f
+wps_build_model_number src/wps/wps_dev_attr.c  /^int wps_build_model_number(struct wps_device_data *dev, struct wpabuf *msg)$/;"       f
+wps_build_msg_type     src/wps/wps_attr_build.c        /^int wps_build_msg_type(struct wpabuf *msg, enum wps_msg_type msg_type)$/;"    f
+wps_build_nfc_pw_token src/wps/wps_common.c    /^struct wpabuf * wps_build_nfc_pw_token(u16 dev_pw_id,$/;"     f
+wps_build_oob_dev_pw   src/wps/wps_attr_build.c        /^int wps_build_oob_dev_pw(struct wpabuf *msg, u16 dev_pw_id,$/;"       f
+wps_build_os_version   src/wps/wps_dev_attr.c  /^int wps_build_os_version(struct wps_device_data *dev, struct wpabuf *msg)$/;" f
+wps_build_primary_dev_type     src/wps/wps_dev_attr.c  /^int wps_build_primary_dev_type(struct wps_device_data *dev, struct wpabuf *msg)$/;"   f
+wps_build_probe_config_methods src/wps/wps_registrar.c /^static int wps_build_probe_config_methods(struct wps_registrar *reg,$/;"      f       file:
+wps_build_probe_req_ie src/wps/wps.c   /^struct wpabuf * wps_build_probe_req_ie(u16 pw_id, struct wps_device_data *dev,$/;"    f
+wps_build_public_key   src/wps/wps_attr_build.c        /^int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg, wps_key_mode_t mode)$/;"   f
+wps_build_r_hash       src/wps/wps_registrar.c /^static int wps_build_r_hash(struct wps_data *wps, struct wpabuf *msg)$/;"     f       file:
+wps_build_r_snonce1    src/wps/wps_registrar.c /^static int wps_build_r_snonce1(struct wps_data *wps, struct wpabuf *msg)$/;"  f       file:
+wps_build_r_snonce2    src/wps/wps_registrar.c /^static int wps_build_r_snonce2(struct wps_data *wps, struct wpabuf *msg)$/;"  f       file:
+wps_build_registrar_nonce      src/wps/wps_attr_build.c        /^int wps_build_registrar_nonce(struct wps_data *wps, struct wpabuf *msg)$/;"   f
+wps_build_req_dev_type src/wps/wps_dev_attr.c  /^int wps_build_req_dev_type(struct wps_device_data *dev, struct wpabuf *msg,$/;"       f
+wps_build_req_type     src/wps/wps_attr_build.c        /^int wps_build_req_type(struct wpabuf *msg, enum wps_request_type type)$/;"    f
+wps_build_resp_type    src/wps/wps_attr_build.c        /^int wps_build_resp_type(struct wpabuf *msg, enum wps_response_type type)$/;"  f
+wps_build_rf_bands     src/wps/wps_dev_attr.c  /^int wps_build_rf_bands(struct wps_device_data *dev, struct wpabuf *msg)$/;"   f
+wps_build_secondary_dev_type   src/wps/wps_dev_attr.c  /^int wps_build_secondary_dev_type(struct wps_device_data *dev,$/;"     f
+wps_build_sel_pbc_reg_uuid_e   src/wps/wps_registrar.c /^static int wps_build_sel_pbc_reg_uuid_e(struct wps_registrar *reg,$/;"        f       file:
+wps_build_sel_reg_config_methods       src/wps/wps_registrar.c /^static int wps_build_sel_reg_config_methods(struct wps_registrar *reg,$/;"    f       file:
+wps_build_sel_reg_dev_password_id      src/wps/wps_registrar.c /^static int wps_build_sel_reg_dev_password_id(struct wps_registrar *reg,$/;"   f       file:
+wps_build_selected_registrar   src/wps/wps_registrar.c /^static int wps_build_selected_registrar(struct wps_registrar *reg,$/;"        f       file:
+wps_build_serial_number        src/wps/wps_dev_attr.c  /^static int wps_build_serial_number(struct wps_device_data *dev,$/;"   f       file:
+wps_build_uuid_e       src/wps/wps_attr_build.c        /^int wps_build_uuid_e(struct wpabuf *msg, const u8 *uuid)$/;"  f
+wps_build_uuid_r       src/wps/wps_registrar.c /^static int wps_build_uuid_r(struct wps_data *wps, struct wpabuf *msg)$/;"     f       file:
+wps_build_vendor_ext   src/wps/wps_dev_attr.c  /^int wps_build_vendor_ext(struct wps_device_data *dev, struct wpabuf *msg)$/;" f
+wps_build_vendor_ext_m1        src/wps/wps_dev_attr.c  /^int wps_build_vendor_ext_m1(struct wps_device_data *dev, struct wpabuf *msg)$/;"      f
+wps_build_version      src/wps/wps_attr_build.c        /^int wps_build_version(struct wpabuf *msg)$/;" f
+wps_build_wfa_ext      src/wps/wps_attr_build.c        /^int wps_build_wfa_ext(struct wpabuf *msg, int req_to_enroll,$/;"      f
+wps_build_wps_state    src/wps/wps_enrollee.c  /^static int wps_build_wps_state(struct wps_data *wps, struct wpabuf *msg)$/;"  f       file:
+wps_build_wps_state    src/wps/wps_registrar.c /^static int wps_build_wps_state(struct wps_context *wps, struct wpabuf *msg)$/;"       f       file:
+wps_build_wsc_ack      src/wps/wps_common.c    /^struct wpabuf * wps_build_wsc_ack(struct wps_data *wps)$/;"   f
+wps_build_wsc_done     src/wps/wps_enrollee.c  /^static struct wpabuf * wps_build_wsc_done(struct wps_data *wps)$/;"   f       file:
+wps_build_wsc_nack     src/wps/wps_common.c    /^struct wpabuf * wps_build_wsc_nack(struct wps_data *wps)$/;"  f
+wps_calc_key_mode      src/wps/wps_i.h /^typedef enum wps_calc_key_mode {$/;"  g
+wps_cb_new_psk src/wps/wps_registrar.c /^static int wps_cb_new_psk(struct wps_registrar *reg, const u8 *mac_addr,$/;"  f       file:
+wps_cb_pin_needed      src/wps/wps_registrar.c /^static void wps_cb_pin_needed(struct wps_registrar *reg, const u8 *uuid_e,$/;"        f       file:
+wps_cb_reg_success     src/wps/wps_registrar.c /^static void wps_cb_reg_success(struct wps_registrar *reg, const u8 *mac_addr,$/;"     f       file:
+wps_cb_set_ie  src/wps/wps_registrar.c /^static int wps_cb_set_ie(struct wps_registrar *reg, struct wpabuf *beacon_ie,$/;"     f       file:
+wps_cb_set_sel_reg     src/wps/wps_registrar.c /^static void wps_cb_set_sel_reg(struct wps_registrar *reg)$/;" f       file:
+wps_cb_status  src/wps/wps.h   /^enum wps_cb_status {$/;"      g
+wps_cfg        src/wps/wps.h   /^    struct wps_config *wps_cfg;$/;"   m       struct:wps_sm   typeref:struct:wps_sm::wps_config
+wps_check_wifi_mode    src/esp_supplicant/esp_wps.c    /^int wps_check_wifi_mode(void)$/;"     f
+wps_config     src/wps/wps.h   /^struct wps_config {$/;"       s
+wps_config_error       src/wps/wps_defs.h      /^enum wps_config_error {$/;"   g
+wps_config_methods_str2bin     src/wps/wps_common.c    /^u16 wps_config_methods_str2bin(const char *str)$/;"   f
+wps_context    src/wps/wps.h   /^struct wps_context {$/;"      s
+wps_cred_processing    src/ap/ap_config.h      /^      int wps_cred_processing;$/;"    m       struct:hostapd_bss_config
+wps_cred_update        src/wps/wps_registrar.c /^static void wps_cred_update(struct wps_credential *dst,$/;"   f       file:
+wps_credential src/wps/wps.h   /^struct wps_credential {$/;"   s
+wps_ctx        src/wps/wps.h   /^    struct wps_context *wps_ctx;$/;"  m       struct:wps_sm   typeref:struct:wps_sm::wps_context
+wps_data       src/wps/wps_i.h /^struct wps_data {$/;" s
+wps_decrypt_encr_settings      src/wps/wps_common.c    /^struct wpabuf * wps_decrypt_encr_settings(struct wps_data *wps, const u8 *encr,$/;"   f
+wps_deinit     src/esp_supplicant/esp_wps.c    /^void wps_deinit(void)$/;"     f
+wps_delete_timer       src/esp_supplicant/esp_wps.c    /^int wps_delete_timer(void)$/;"        f
+wps_derive_keys        src/wps/wps_common.c    /^int wps_derive_keys(struct wps_data *wps)$/;" f
+wps_derive_psk src/wps/wps_common.c    /^void wps_derive_psk(struct wps_data *wps, const u8 *dev_passwd,$/;"   f
+wps_dev_categ  src/wps/wps_defs.h      /^enum wps_dev_categ {$/;"      g
+wps_dev_deinit src/esp_supplicant/esp_wps.c    /^int wps_dev_deinit(struct wps_device_data *dev)$/;"   f
+wps_dev_init   src/esp_supplicant/esp_wps.c    /^int wps_dev_init(void)$/;"    f
+wps_dev_password_id    src/wps/wps_defs.h      /^enum wps_dev_password_id {$/;"        g
+wps_dev_subcateg       src/wps/wps_defs.h      /^enum wps_dev_subcateg {$/;"   g
+wps_dev_type_bin2str   src/wps/wps_common.c    /^char * wps_dev_type_bin2str(const u8 dev_type[WPS_DEV_TYPE_LEN], char *buf,$/;"       f
+wps_dev_type_str2bin   src/wps/wps_common.c    /^int wps_dev_type_str2bin(const char *str, u8 dev_type[WPS_DEV_TYPE_LEN])$/;"  f
+wps_device_clone_data  src/wps/wps_registrar.c /^static void wps_device_clone_data(struct wps_device_data *dst,$/;"    f       file:
+wps_device_data        src/wps/wps.h   /^struct wps_device_data {$/;"  s
+wps_device_data_dup    src/wps/wps_dev_attr.c  /^void wps_device_data_dup(struct wps_device_data *dst,$/;"     f
+wps_device_data_free   src/wps/wps_dev_attr.c  /^void wps_device_data_free(struct wps_device_data *dev)$/;"    f
+wps_device_get src/wps/wps_registrar.c /^static struct wps_registrar_device * wps_device_get(struct wps_registrar *reg,$/;"    f       file:
+wps_device_store       src/wps/wps_registrar.c /^int wps_device_store(struct wps_registrar *reg,$/;"   f
+wps_eapol_start_timer  src/wps/wps.h   /^    ETSTimer wps_eapol_start_timer;$/;"       m       struct:wps_sm
+wps_enrollee_get_msg   src/wps/wps_enrollee.c  /^struct wpabuf * wps_enrollee_get_msg(struct wps_data *wps,$/;"        f
+wps_enrollee_process_msg       src/wps/wps_enrollee.c  /^enum wps_process_res wps_enrollee_process_msg(struct wps_data *wps,$/;"       f
+wps_enrollee_process_msg_frag  src/esp_supplicant/esp_wps.c    /^int wps_enrollee_process_msg_frag(struct wpabuf **buf, int tot_len, u8 *frag_data, int frag_len, u8 flag)$/;" f
+wps_error_indication   src/wps/wps_defs.h      /^enum wps_error_indication {$/;"       g
+wps_event      src/wps/wps.h   /^enum wps_event {$/;"  g
+wps_event_data src/wps/wps.h   /^union wps_event_data {$/;"    u
+wps_event_er_ap        src/wps/wps.h   /^      struct wps_event_er_ap {$/;"    s       union:wps_event_data
+wps_event_er_ap_settings       src/wps/wps.h   /^      struct wps_event_er_ap_settings {$/;"   s       union:wps_event_data
+wps_event_er_enrollee  src/wps/wps.h   /^      struct wps_event_er_enrollee {$/;"      s       union:wps_event_data
+wps_event_er_set_selected_registrar    src/wps/wps.h   /^      struct wps_event_er_set_selected_registrar {$/;"        s       union:wps_event_data
+wps_event_fail src/wps/wps.h   /^      struct wps_event_fail {$/;"     s       union:wps_event_data
+wps_event_m2d  src/wps/wps.h   /^      struct wps_event_m2d {$/;"      s       union:wps_event_data
+wps_event_pwd_auth_fail        src/wps/wps.h   /^      struct wps_event_pwd_auth_fail {$/;"    s       union:wps_event_data
+wps_factory_information_t      include/esp_supplicant/esp_wps.h        /^} wps_factory_information_t;$/;"      t       typeref:struct:__anon89
+wps_fail_event src/wps/wps_common.c    /^void wps_fail_event(struct wps_context *wps, enum wps_msg_type msg,$/;"       f
+wps_finish     src/esp_supplicant/esp_wps.c    /^int wps_finish(void)$/;"      f
+wps_free_devices       src/wps/wps_registrar.c /^static void wps_free_devices(struct wps_registrar_device *dev)$/;"    f       file:
+wps_free_nfc_pw_tokens src/wps/wps_registrar.c /^static void wps_free_nfc_pw_tokens(struct dl_list *tokens, u16 pw_id)$/;"     f       file:
+wps_free_nfc_pw_tokens src/wps/wps_registrar.c 70;"    d       file:
+wps_free_pbc_sessions  src/wps/wps_registrar.c /^static void wps_free_pbc_sessions(struct wps_pbc_session *pbc)$/;"    f       file:
+wps_free_pending_msgs  src/wps/wps.c   /^void wps_free_pending_msgs(struct upnp_pending_message *msgs)$/;"     f
+wps_free_pin   src/wps/wps_registrar.c /^static void wps_free_pin(struct wps_uuid_pin *pin)$/;"        f       file:
+wps_free_pins  src/wps/wps_registrar.c /^static void wps_free_pins(struct dl_list *pins)$/;"   f       file:
+wps_funcs      src/esp_supplicant/esp_wifi_driver.h    /^struct wps_funcs {$/;"        s
+wps_generate_pin       src/wps/wps_common.c    /^unsigned int wps_generate_pin(void)$/;"       f
+wps_get_dev_password   src/wps/wps_registrar.c /^static int wps_get_dev_password(struct wps_data *wps)$/;"     f       file:
+wps_get_msg    src/wps/wps.c   /^struct wpabuf * wps_get_msg(struct wps_data *wps, enum wsc_op_code *op_code)$/;"      f
+wps_get_nfc_pw_token   src/wps/wps_registrar.c /^static struct wps_nfc_pw_token * wps_get_nfc_pw_token(struct dl_list *tokens,$/;"     f       file:
+wps_get_oob_cred       src/wps/wps_common.c    /^struct wpabuf * wps_get_oob_cred(struct wps_context *wps)$/;" f
+wps_get_status src/esp_supplicant/esp_wps.c    /^int wps_get_status(void)$/;"  f
+wps_get_type   src/esp_supplicant/esp_wps.c    /^int wps_get_type(void)$/;"    f
+wps_get_uuid_e src/wps/wps.c   /^const u8 * wps_get_uuid_e(const struct wpabuf *msg)$/;"       f
+wps_ie_encapsulate     src/wps/wps_attr_build.c        /^struct wpabuf * wps_ie_encapsulate(struct wpabuf *data)$/;"   f
+wps_init       src/esp_supplicant/esp_wps.c    /^struct wps_data *wps_init(void)$/;"   f
+wps_ioctl_param_t      src/esp_supplicant/esp_wps.c    /^} wps_ioctl_param_t;$/;"      t       typeref:struct:__anon33 file:
+wps_is_20      src/wps/wps.c   /^int wps_is_20(const struct wpabuf *msg)$/;"   f
+wps_is_addr_authorized src/wps/wps.c   /^int wps_is_addr_authorized(const struct wpabuf *msg, const u8 *addr,$/;"      f
+wps_is_selected_pbc_registrar  src/wps/wps.c   /^int wps_is_selected_pbc_registrar(const struct wpabuf *msg, u8 *bssid)$/;"    f
+wps_is_selected_pin_registrar  src/wps/wps.c   /^int wps_is_selected_pin_registrar(const struct wpabuf *msg, u8 *bssid)$/;"    f
+wps_kdf        src/wps/wps_common.c    /^void wps_kdf(const u8 *key, const u8 *label_prefix, size_t label_prefix_len,$/;"      f
+wps_key_mode_t src/wps/wps_i.h /^} wps_key_mode_t;$/;" t       typeref:enum:wps_calc_key_mode
+wps_key_save   src/esp_supplicant/esp_wps.c    /^wps_key_save(char *key, u8 key_len)$/;"       f
+wps_msg_flag   src/wps/wps_defs.h      /^enum wps_msg_flag {$/;"       g
+wps_msg_timeout_timer  src/wps/wps.h   /^    ETSTimer wps_msg_timeout_timer;$/;"       m       struct:wps_sm
+wps_msg_type   src/wps/wps_defs.h      /^enum wps_msg_type {$/;"       g
+wps_nfc_dev_pw src/ap/ap_config.h      /^      struct wpabuf *wps_nfc_dev_pw;$/;"      m       struct:hostapd_bss_config       typeref:struct:hostapd_bss_config::wpabuf
+wps_nfc_dev_pw_id      src/ap/ap_config.h      /^      int wps_nfc_dev_pw_id;$/;"      m       struct:hostapd_bss_config
+wps_nfc_dh_privkey     src/ap/ap_config.h      /^      struct wpabuf *wps_nfc_dh_privkey;$/;"  m       struct:hostapd_bss_config       typeref:struct:hostapd_bss_config::wpabuf
+wps_nfc_dh_pubkey      src/ap/ap_config.h      /^      struct wpabuf *wps_nfc_dh_pubkey;$/;"   m       struct:hostapd_bss_config       typeref:struct:hostapd_bss_config::wpabuf
+wps_nfc_pw_token       src/wps/wps_registrar.c /^struct wps_nfc_pw_token {$/;" s       file:
+wps_nfc_token_gen      src/wps/wps_common.c    /^struct wpabuf * wps_nfc_token_gen(int ndef, int *id, struct wpabuf **pubkey,$/;"      f
+wps_oob_use_cred       src/wps/wps_common.c    /^int wps_oob_use_cred(struct wps_context *wps, struct wps_parse_attr *attr)$/;"        f
+wps_parse_attr src/wps/wps_attr_parse.h        /^struct wps_parse_attr {$/;"   s
+wps_parse_msg  src/wps/wps_attr_parse.c        /^int wps_parse_msg(const struct wpabuf *msg, struct wps_parse_attr *attr)$/;"  f
+wps_parse_scan_result  src/esp_supplicant/esp_wifi_driver.h    /^    bool (*wps_parse_scan_result)(struct wps_scan_ie *scan);$/;"      m       struct:wps_funcs
+wps_parse_scan_result  src/esp_supplicant/esp_wps.c    /^wps_parse_scan_result(struct wps_scan_ie *scan)$/;"   f       file:
+wps_parse_vendor_ext   src/wps/wps_attr_parse.c        /^static int wps_parse_vendor_ext(struct wps_parse_attr *attr, const u8 *pos,$/;"       f       file:
+wps_parse_vendor_ext_wfa       src/wps/wps_attr_parse.c        /^static int wps_parse_vendor_ext_wfa(struct wps_parse_attr *attr, const u8 *pos,$/;"   f       file:
+wps_pbc_overlap_event  src/wps/wps_common.c    /^void wps_pbc_overlap_event(struct wps_context *wps)$/;"       f
+wps_pbc_session        src/wps/wps_registrar.c /^struct wps_pbc_session {$/;"  s       file:
+wps_pbc_timeout_event  src/wps/wps_common.c    /^void wps_pbc_timeout_event(struct wps_context *wps)$/;"       f
+wps_pin_checksum       src/wps/wps_common.c    /^unsigned int wps_pin_checksum(unsigned int pin)$/;"   f
+wps_pin_requests       src/ap/ap_config.h      /^      char *wps_pin_requests;$/;"     m       struct:hostapd_bss_config
+wps_pin_revealed       src/wps/wps_i.h /^      int wps_pin_revealed;$/;"       m       struct:wps_data
+wps_pin_str_valid      src/wps/wps_common.c    /^int wps_pin_str_valid(const char *pin)$/;"    f
+wps_pin_valid  src/wps/wps_common.c    /^unsigned int wps_pin_valid(unsigned int pin)$/;"      f
+wps_post       src/esp_supplicant/esp_wps.c    /^ETS_STATUS wps_post(ETSSignal sig, ETSParam par)$/;"  f
+wps_post_block src/esp_supplicant/esp_wps.c    /^int wps_post_block(ETSSignal sig, void *arg)$/;"      f
+wps_process_ap_settings        src/wps/wps_attr_process.c      /^int wps_process_ap_settings(struct wps_parse_attr *attr,$/;"  f
+wps_process_ap_settings_e      src/wps/wps_enrollee.c  /^static int wps_process_ap_settings_e(struct wps_data *wps,$/;"        f       file:
+wps_process_ap_settings_r      src/wps/wps_registrar.c /^static int wps_process_ap_settings_r(struct wps_data *wps,$/;"        f       file:
+wps_process_assoc_state        src/wps/wps_registrar.c /^static int wps_process_assoc_state(struct wps_data *wps, const u8 *assoc)$/;" f       file:
+wps_process_auth_type_flags    src/wps/wps_registrar.c /^static int wps_process_auth_type_flags(struct wps_data *wps, const u8 *auth)$/;"      f       file:
+wps_process_authenticator      src/wps/wps_attr_process.c      /^int wps_process_authenticator(struct wps_data *wps, const u8 *authenticator,$/;"      f
+wps_process_config_error       src/wps/wps_registrar.c /^static int wps_process_config_error(struct wps_data *wps, const u8 *err)$/;"  f       file:
+wps_process_config_methods     src/wps/wps_registrar.c /^static int wps_process_config_methods(struct wps_data *wps, const u8 *methods)$/;"    f       file:
+wps_process_conn_type_flags    src/wps/wps_registrar.c /^static int wps_process_conn_type_flags(struct wps_data *wps, const u8 *conn)$/;"      f       file:
+wps_process_cred       src/wps/wps_attr_process.c      /^int wps_process_cred(struct wps_parse_attr *attr,$/;" f
+wps_process_cred_802_1x_enabled        src/wps/wps_attr_process.c      /^static int wps_process_cred_802_1x_enabled(struct wps_credential *cred,$/;"   f       file:
+wps_process_cred_ap_channel    src/wps/wps_attr_process.c      /^static int wps_process_cred_ap_channel(struct wps_credential *cred,$/;"       f       file:
+wps_process_cred_auth_type     src/wps/wps_attr_process.c      /^static int wps_process_cred_auth_type(struct wps_credential *cred,$/;"        f       file:
+wps_process_cred_e     src/wps/wps_enrollee.c  /^static int wps_process_cred_e(struct wps_data *wps, const u8 *cred,$/;"       f       file:
+wps_process_cred_eap_identity  src/wps/wps_attr_process.c      /^static int wps_process_cred_eap_identity(struct wps_credential *cred,$/;"     f       file:
+wps_process_cred_eap_type      src/wps/wps_attr_process.c      /^static int wps_process_cred_eap_type(struct wps_credential *cred,$/;" f       file:
+wps_process_cred_encr_type     src/wps/wps_attr_process.c      /^static int wps_process_cred_encr_type(struct wps_credential *cred,$/;"        f       file:
+wps_process_cred_key_prov_auto src/wps/wps_attr_process.c      /^static int wps_process_cred_key_prov_auto(struct wps_credential *cred,$/;"    f       file:
+wps_process_cred_mac_addr      src/wps/wps_attr_process.c      /^static int wps_process_cred_mac_addr(struct wps_credential *cred,$/;" f       file:
+wps_process_cred_network_idx   src/wps/wps_attr_process.c      /^static int wps_process_cred_network_idx(struct wps_credential *cred,$/;"      f       file:
+wps_process_cred_network_key   src/wps/wps_attr_process.c      /^static int wps_process_cred_network_key(struct wps_credential *cred,$/;"      f       file:
+wps_process_cred_network_key_idx       src/wps/wps_attr_process.c      /^static int wps_process_cred_network_key_idx(struct wps_credential *cred,$/;"  f       file:
+wps_process_cred_ssid  src/wps/wps_attr_process.c      /^static int wps_process_cred_ssid(struct wps_credential *cred, const u8 *ssid,$/;"     f       file:
+wps_process_creds      src/wps/wps_enrollee.c  /^static int wps_process_creds(struct wps_data *wps, const u8 *cred[],$/;"      f       file:
+wps_process_dev_name   src/wps/wps_dev_attr.c  /^static int wps_process_dev_name(struct wps_device_data *dev, const u8 *str,$/;"       f       file:
+wps_process_dev_password_id    src/wps/wps_registrar.c /^static int wps_process_dev_password_id(struct wps_data *wps, const u8 *pw_id)$/;"     f       file:
+wps_process_device_attrs       src/wps/wps_dev_attr.c  /^int wps_process_device_attrs(struct wps_device_data *dev,$/;" f
+wps_process_e_hash1    src/wps/wps_registrar.c /^static int wps_process_e_hash1(struct wps_data *wps, const u8 *e_hash1)$/;"   f       file:
+wps_process_e_hash2    src/wps/wps_registrar.c /^static int wps_process_e_hash2(struct wps_data *wps, const u8 *e_hash2)$/;"   f       file:
+wps_process_e_snonce1  src/wps/wps_registrar.c /^static int wps_process_e_snonce1(struct wps_data *wps, const u8 *e_snonce1)$/;"       f       file:
+wps_process_e_snonce2  src/wps/wps_registrar.c /^static int wps_process_e_snonce2(struct wps_data *wps, const u8 *e_snonce2)$/;"       f       file:
+wps_process_encr_type_flags    src/wps/wps_registrar.c /^static int wps_process_encr_type_flags(struct wps_data *wps, const u8 *encr)$/;"      f       file:
+wps_process_enrollee_nonce     src/wps/wps_enrollee.c  /^static int wps_process_enrollee_nonce(struct wps_data *wps, const u8 *e_nonce)$/;"    f       file:
+wps_process_enrollee_nonce     src/wps/wps_registrar.c /^static int wps_process_enrollee_nonce(struct wps_data *wps, const u8 *e_nonce)$/;"    f       file:
+wps_process_key_wrap_auth      src/wps/wps_attr_process.c      /^int wps_process_key_wrap_auth(struct wps_data *wps, struct wpabuf *msg,$/;"   f
+wps_process_m1 src/wps/wps_registrar.c /^static enum wps_process_res wps_process_m1(struct wps_data *wps,$/;"  f       file:
+wps_process_m2 src/wps/wps_enrollee.c  /^static enum wps_process_res wps_process_m2(struct wps_data *wps,$/;"  f       file:
+wps_process_m2d        src/wps/wps_enrollee.c  /^static enum wps_process_res wps_process_m2d(struct wps_data *wps,$/;" f       file:
+wps_process_m3 src/wps/wps_registrar.c /^static enum wps_process_res wps_process_m3(struct wps_data *wps,$/;"  f       file:
+wps_process_m4 src/wps/wps_enrollee.c  /^static enum wps_process_res wps_process_m4(struct wps_data *wps,$/;"  f       file:
+wps_process_m5 src/wps/wps_registrar.c /^static enum wps_process_res wps_process_m5(struct wps_data *wps,$/;"  f       file:
+wps_process_m6 src/wps/wps_enrollee.c  /^static enum wps_process_res wps_process_m6(struct wps_data *wps,$/;"  f       file:
+wps_process_m7 src/wps/wps_registrar.c /^static enum wps_process_res wps_process_m7(struct wps_data *wps,$/;"  f       file:
+wps_process_m8 src/wps/wps_enrollee.c  /^static enum wps_process_res wps_process_m8(struct wps_data *wps,$/;"  f       file:
+wps_process_mac_addr   src/wps/wps_registrar.c /^static int wps_process_mac_addr(struct wps_data *wps, const u8 *mac_addr)$/;" f       file:
+wps_process_manufacturer       src/wps/wps_dev_attr.c  /^static int wps_process_manufacturer(struct wps_device_data *dev, const u8 *str,$/;"   f       file:
+wps_process_model_name src/wps/wps_dev_attr.c  /^static int wps_process_model_name(struct wps_device_data *dev, const u8 *str,$/;"     f       file:
+wps_process_model_number       src/wps/wps_dev_attr.c  /^static int wps_process_model_number(struct wps_device_data *dev, const u8 *str,$/;"   f       file:
+wps_process_msg        src/wps/wps.c   /^enum wps_process_res wps_process_msg(struct wps_data *wps,$/;"        f
+wps_process_os_version src/wps/wps_dev_attr.c  /^int wps_process_os_version(struct wps_device_data *dev, const u8 *ver)$/;"    f
+wps_process_primary_dev_type   src/wps/wps_dev_attr.c  /^static int wps_process_primary_dev_type(struct wps_device_data *dev,$/;"      f       file:
+wps_process_pubkey     src/wps/wps_enrollee.c  /^static int wps_process_pubkey(struct wps_data *wps, const u8 *pk,$/;" f       file:
+wps_process_pubkey     src/wps/wps_registrar.c /^static int wps_process_pubkey(struct wps_data *wps, const u8 *pk,$/;" f       file:
+wps_process_r_hash1    src/wps/wps_enrollee.c  /^static int wps_process_r_hash1(struct wps_data *wps, const u8 *r_hash1)$/;"   f       file:
+wps_process_r_hash2    src/wps/wps_enrollee.c  /^static int wps_process_r_hash2(struct wps_data *wps, const u8 *r_hash2)$/;"   f       file:
+wps_process_r_snonce1  src/wps/wps_enrollee.c  /^static int wps_process_r_snonce1(struct wps_data *wps, const u8 *r_snonce1)$/;"       f       file:
+wps_process_r_snonce2  src/wps/wps_enrollee.c  /^static int wps_process_r_snonce2(struct wps_data *wps, const u8 *r_snonce2)$/;"       f       file:
+wps_process_registrar_nonce    src/wps/wps_enrollee.c  /^static int wps_process_registrar_nonce(struct wps_data *wps, const u8 *r_nonce)$/;"   f       file:
+wps_process_registrar_nonce    src/wps/wps_registrar.c /^static int wps_process_registrar_nonce(struct wps_data *wps, const u8 *r_nonce)$/;"   f       file:
+wps_process_res        src/wps/wps.h   /^enum wps_process_res {$/;"    g
+wps_process_rf_bands   src/wps/wps_dev_attr.c  /^int wps_process_rf_bands(struct wps_device_data *dev, const u8 *bands)$/;"    f
+wps_process_serial_number      src/wps/wps_dev_attr.c  /^static int wps_process_serial_number(struct wps_device_data *dev,$/;" f       file:
+wps_process_uuid_e     src/wps/wps_registrar.c /^static int wps_process_uuid_e(struct wps_data *wps, const u8 *uuid_e)$/;"     f       file:
+wps_process_uuid_r     src/wps/wps_enrollee.c  /^static int wps_process_uuid_r(struct wps_data *wps, const u8 *uuid_r)$/;"     f       file:
+wps_process_wps_mX_req src/esp_supplicant/esp_wps.c    /^int wps_process_wps_mX_req(u8 *ubuf, int len, enum wps_process_res *res)$/;"  f
+wps_process_wps_state  src/wps/wps_registrar.c /^static int wps_process_wps_state(struct wps_data *wps, const u8 *state)$/;"   f       file:
+wps_process_wsc_ack    src/wps/wps_enrollee.c  /^static enum wps_process_res wps_process_wsc_ack(struct wps_data *wps,$/;"     f       file:
+wps_process_wsc_ack    src/wps/wps_registrar.c /^static enum wps_process_res wps_process_wsc_ack(struct wps_data *wps,$/;"     f       file:
+wps_process_wsc_done   src/wps/wps_registrar.c /^static enum wps_process_res wps_process_wsc_done(struct wps_data *wps,$/;"    f       file:
+wps_process_wsc_msg    src/wps/wps_enrollee.c  /^static enum wps_process_res wps_process_wsc_msg(struct wps_data *wps,$/;"     f       file:
+wps_process_wsc_msg    src/wps/wps_registrar.c /^static enum wps_process_res wps_process_wsc_msg(struct wps_data *wps,$/;"     f       file:
+wps_process_wsc_nack   src/wps/wps_enrollee.c  /^static enum wps_process_res wps_process_wsc_nack(struct wps_data *wps,$/;"    f       file:
+wps_process_wsc_nack   src/wps/wps_registrar.c /^static enum wps_process_res wps_process_wsc_nack(struct wps_data *wps,$/;"    f       file:
+wps_process_wsc_start  src/wps/wps_enrollee.c  /^static enum wps_process_res wps_process_wsc_start(struct wps_data *wps,$/;"   f       file:
+wps_pwd_auth_fail_event        src/wps/wps_common.c    /^void wps_pwd_auth_fail_event(struct wps_context *wps, int enrollee, int part)$/;"     f
+wps_registrar  src/wps/wps_registrar.c /^struct wps_registrar {$/;"    s       file:
+wps_registrar_add_authorized_mac       src/wps/wps_registrar.c /^static void wps_registrar_add_authorized_mac(struct wps_registrar *reg,$/;"   f       file:
+wps_registrar_add_nfc_password_token   src/wps/wps_registrar.c /^int wps_registrar_add_nfc_password_token(struct wps_registrar *reg,$/;"       f
+wps_registrar_add_nfc_pw_token src/wps/wps_registrar.c /^int wps_registrar_add_nfc_pw_token(struct wps_registrar *reg,$/;"     f
+wps_registrar_add_pbc_session  src/wps/wps_registrar.c /^static void wps_registrar_add_pbc_session(struct wps_registrar *reg,$/;"      f       file:
+wps_registrar_add_pin  src/wps/wps_registrar.c /^int wps_registrar_add_pin(struct wps_registrar *reg, const u8 *addr,$/;"      f
+wps_registrar_button_pushed    src/wps/wps_registrar.c /^int wps_registrar_button_pushed(struct wps_registrar *reg,$/;"        f
+wps_registrar_complete src/wps/wps_registrar.c /^void wps_registrar_complete(struct wps_registrar *registrar, const u8 *uuid_e,$/;"    f
+wps_registrar_config   src/wps/wps.h   /^struct wps_registrar_config {$/;"     s
+wps_registrar_config_ap        src/wps/wps_registrar.c /^int wps_registrar_config_ap(struct wps_registrar *reg,$/;"    f
+wps_registrar_deinit   src/wps/wps_registrar.c /^void wps_registrar_deinit(struct wps_registrar *reg)$/;"      f
+wps_registrar_device   src/wps/wps_registrar.c /^struct wps_registrar_device {$/;"     s       file:
+wps_registrar_expire_pins      src/wps/wps_registrar.c /^static void wps_registrar_expire_pins(struct wps_registrar *reg)$/;"  f       file:
+wps_registrar_free_pending_m2  src/wps/wps_registrar.c /^static void wps_registrar_free_pending_m2(struct wps_context *wps)$/;"        f       file:
+wps_registrar_get_info src/wps/wps_registrar.c /^int wps_registrar_get_info(struct wps_registrar *reg, const u8 *addr,$/;"     f
+wps_registrar_get_msg  src/wps/wps_registrar.c /^struct wpabuf * wps_registrar_get_msg(struct wps_data *wps,$/;"       f
+wps_registrar_get_pin  src/wps/wps_registrar.c /^static const u8 * wps_registrar_get_pin(struct wps_registrar *reg,$/;"        f       file:
+wps_registrar_init     src/wps/wps_registrar.c /^struct wps_registrar * wps_registrar_init(struct wps_context *wps,$/;"        f
+wps_registrar_invalidate_pin   src/wps/wps_registrar.c /^int wps_registrar_invalidate_pin(struct wps_registrar *reg, const u8 *uuid)$/;"       f
+wps_registrar_invalidate_unused        src/wps/wps_registrar.c /^static void wps_registrar_invalidate_unused(struct wps_registrar *reg)$/;"    f       file:
+wps_registrar_invalidate_wildcard_pin  src/wps/wps_registrar.c /^static int wps_registrar_invalidate_wildcard_pin(struct wps_registrar *reg,$/;"       f       file:
+wps_registrar_p2p_dev_addr_match       src/wps/wps_registrar.c /^static int wps_registrar_p2p_dev_addr_match(struct wps_data *wps)$/;" f       file:
+wps_registrar_pbc_completed    src/wps/wps_registrar.c /^static void wps_registrar_pbc_completed(struct wps_registrar *reg)$/;"        f       file:
+wps_registrar_pbc_overlap      src/wps/wps_registrar.c /^int wps_registrar_pbc_overlap(struct wps_registrar *reg,$/;"  f
+wps_registrar_pbc_timeout      src/wps/wps_registrar.c /^static void wps_registrar_pbc_timeout(void *eloop_ctx)$/;"    f       file:
+wps_registrar_pin_completed    src/wps/wps_registrar.c /^static void wps_registrar_pin_completed(struct wps_registrar *reg)$/;"        f       file:
+wps_registrar_probe_req_rx     src/wps/wps_registrar.c /^void wps_registrar_probe_req_rx(struct wps_registrar *reg, const u8 *addr,$/;"        f
+wps_registrar_process_msg      src/wps/wps_registrar.c /^enum wps_process_res wps_registrar_process_msg(struct wps_data *wps,$/;"      f
+wps_registrar_remove_authorized_mac    src/wps/wps_registrar.c /^static void wps_registrar_remove_authorized_mac(struct wps_registrar *reg,$/;"        f       file:
+wps_registrar_remove_nfc_pw_token      src/wps/wps_registrar.c /^void wps_registrar_remove_nfc_pw_token(struct wps_registrar *reg,$/;" f
+wps_registrar_remove_pbc_session       src/wps/wps_registrar.c /^static void wps_registrar_remove_pbc_session(struct wps_registrar *reg,$/;"   f       file:
+wps_registrar_remove_pin       src/wps/wps_registrar.c /^static void wps_registrar_remove_pin(struct wps_registrar *reg,$/;"   f       file:
+wps_registrar_sel_reg_add      src/wps/wps_registrar.c /^static void wps_registrar_sel_reg_add(struct wps_registrar *reg,$/;"  f       file:
+wps_registrar_sel_reg_union    src/wps/wps_registrar.c /^static void wps_registrar_sel_reg_union(struct wps_registrar *reg)$/;"        f       file:
+wps_registrar_selected_registrar_changed       src/wps/wps_registrar.c /^void wps_registrar_selected_registrar_changed(struct wps_registrar *reg)$/;"  f
+wps_registrar_skip_overlap     src/wps/wps_registrar.c /^static int wps_registrar_skip_overlap(struct wps_data *wps)$/;"       f       file:
+wps_registrar_stop_pbc src/wps/wps_registrar.c /^static void wps_registrar_stop_pbc(struct wps_registrar *reg)$/;"     f       file:
+wps_registrar_unlock_pin       src/wps/wps_registrar.c /^int wps_registrar_unlock_pin(struct wps_registrar *reg, const u8 *uuid)$/;"   f
+wps_registrar_update_ie        src/wps/wps_registrar.c /^int wps_registrar_update_ie(struct wps_registrar *reg)$/;"    f
+wps_registrar_wps_cancel       src/wps/wps_registrar.c /^int wps_registrar_wps_cancel(struct wps_registrar *reg)$/;"   f
+wps_remove_nfc_pw_token        src/wps/wps_registrar.c /^static void wps_remove_nfc_pw_token(struct wps_nfc_pw_token *token)$/;"       f       file:
+wps_remove_pin src/wps/wps_registrar.c /^static void wps_remove_pin(struct wps_uuid_pin *pin)$/;"      f       file:
+wps_request_type       src/wps/wps_defs.h      /^enum wps_request_type {$/;"   g
+wps_response_type      src/wps/wps_defs.h      /^enum wps_response_type {$/;"  g
+wps_rx_param   src/esp_supplicant/esp_wps.c    /^struct wps_rx_param {$/;"     s       file:
+wps_scan_ie    src/esp_supplicant/esp_wifi_driver.h    /^struct wps_scan_ie {$/;"      s
+wps_scan_timer src/wps/wps.h   /^    ETSTimer wps_scan_timer;$/;"      m       struct:wps_sm
+wps_send_eap_identity_rsp      src/esp_supplicant/esp_wps.c    /^int wps_send_eap_identity_rsp(u8 id)$/;"      f
+wps_send_frag_ack      src/esp_supplicant/esp_wps.c    /^int wps_send_frag_ack(u8 id)$/;"      f
+wps_send_wps_mX_rsp    src/esp_supplicant/esp_wps.c    /^int wps_send_wps_mX_rsp(u8 id)$/;"    f
+wps_sendto_wrapper     src/esp_supplicant/esp_wps.c    /^static void wps_sendto_wrapper(void *buffer, uint16_t len)$/;"        f       file:
+wps_set_attr   src/wps/wps_attr_parse.c        /^static int wps_set_attr(struct wps_parse_attr *attr, u16 type,$/;"    f       file:
+wps_set_default_factory        src/esp_supplicant/esp_wps.c    /^int wps_set_default_factory(void)$/;" f
+wps_set_factory_info   src/esp_supplicant/esp_wps.c    /^int wps_set_factory_info(const esp_wps_config_t *config)$/;"  f
+wps_set_ie     src/wps/wps_registrar.c /^static int wps_set_ie(struct wps_registrar *reg)$/;"  f       file:
+wps_set_pushbutton     src/wps/wps_registrar.c /^static void wps_set_pushbutton(u16 *methods, u16 conf_methods)$/;"    f       file:
+wps_set_status src/esp_supplicant/esp_wps.c    /^int wps_set_status(uint32_t status)$/;"       f
+wps_set_type   src/esp_supplicant/esp_wps.c    /^int wps_set_type(uint32_t type)$/;"   f
+wps_set_vendor_ext_wfa_subelem src/wps/wps_attr_parse.c        /^static int wps_set_vendor_ext_wfa_subelem(struct wps_parse_attr *attr,$/;"    f       file:
+wps_sig_cnt    src/wps/wps.h   /^    u8 wps_sig_cnt[SIG_WPS_NUM];$/;"  m       struct:wps_sm
+wps_sig_type   src/wps/wps.h   /^enum wps_sig_type {$/;"       g
+wps_sm src/wps/wps.h   /^struct wps_sm {$/;"   s
+wps_sm_alloc_eapol     src/esp_supplicant/esp_wps.c    /^u8 *wps_sm_alloc_eapol(struct wps_sm *sm, u8 type,$/;"        f
+wps_sm_ether_send      src/esp_supplicant/esp_wps.c    /^static inline int wps_sm_ether_send(struct wps_sm *sm, const u8 *dest, u16 proto,$/;" f       file:
+wps_sm_free_eapol      src/esp_supplicant/esp_wps.c    /^void wps_sm_free_eapol(u8 *buffer)$/;"        f
+wps_sm_get     src/esp_supplicant/esp_wps.c    /^wps_sm_get(void)$/;"  f
+wps_sm_rx_eapol        src/esp_supplicant/esp_wifi_driver.h    /^    int  (*wps_sm_rx_eapol)(u8 *src_addr, u8 *buf, u32 len);$/;"      m       struct:wps_funcs
+wps_sm_rx_eapol        src/esp_supplicant/esp_wps.c    /^int wps_sm_rx_eapol(u8 *src_addr, u8 *buf, u32 len)$/;"       f
+wps_sm_rx_eapol_internal       src/esp_supplicant/esp_wps.c    /^int wps_sm_rx_eapol_internal(u8 *src_addr, u8 *buf, u32 len)$/;"      f
+wps_ssid_save  src/esp_supplicant/esp_wps.c    /^wps_ssid_save(u8 *ssid, u8 ssid_len)$/;"      f
+wps_st_cb_t    src/wps/wps.h   /^typedef void (*wps_st_cb_t)(int status);$/;"  t
+wps_sta_cred_cb        src/wps/wps_registrar.c /^static void wps_sta_cred_cb(struct wps_data *wps)$/;" f       file:
+wps_start      src/esp_supplicant/esp_wps.c    /^uint8_t wps_start = 0;$/;"    v
+wps_start_msg_timer    src/esp_supplicant/esp_wps.c    /^int wps_start_msg_timer(void)$/;"     f
+wps_start_pending      src/esp_supplicant/esp_wifi_driver.h    /^    int  (*wps_start_pending)(void);$/;"      m       struct:wps_funcs
+wps_start_pending      src/esp_supplicant/esp_wps.c    /^int wps_start_pending(void)$/;"       f
+wps_state      src/wps/wps.h   /^              u8 wps_state;$/;"       m       struct:wps_event_data::wps_event_er_ap
+wps_state      src/wps/wps.h   /^      enum wps_state wps_state;$/;"   m       struct:wps_context      typeref:enum:wps_context::wps_state
+wps_state      src/wps/wps_attr_parse.h        /^      const u8 *wps_state; \/* 1 octet *\/$/;"        m       struct:wps_parse_attr
+wps_state      src/wps/wps_defs.h      /^enum wps_state {$/;"  g
+wps_station_wps_register_cb    src/esp_supplicant/esp_wps.c    /^wps_station_wps_register_cb(wps_st_cb_t cb)$/;"       f
+wps_status     src/esp_supplicant/esp_wifi_driver.h    /^typedef enum wps_status {$/;" g
+wps_stop_process       src/esp_supplicant/esp_wps.c    /^int wps_stop_process(system_event_sta_wps_fail_reason_t reason_code)$/;"      f
+wps_success_cb_timer   src/wps/wps.h   /^    ETSTimer wps_success_cb_timer;$/;"        m       struct:wps_sm
+wps_success_event      src/wps/wps_common.c    /^void wps_success_event(struct wps_context *wps)$/;"   f
+wps_task_deinit        src/esp_supplicant/esp_wps.c    /^int wps_task_deinit(void)$/;" f
+wps_task_hdl   src/esp_supplicant/esp_wps.c    /^static void *wps_task_hdl = NULL;$/;" v       file:
+wps_task_init  src/esp_supplicant/esp_wps.c    /^int wps_task_init(void)$/;"   f
+wps_testing_dummy_cred src/esp_supplicant/esp_wps.c    /^int wps_testing_dummy_cred = 0;$/;"   v
+wps_timeout_timer      src/wps/wps.h   /^    ETSTimer wps_timeout_timer;$/;"   m       struct:wps_sm
+wps_txStart    src/esp_supplicant/esp_wps.c    /^int wps_txStart(void)$/;"     f
+wps_type       include/esp_supplicant/esp_wps.h        /^    wps_type_t wps_type;$/;"  m       struct:__anon90
+wps_type       include/esp_supplicant/esp_wps.h        /^typedef enum wps_type {$/;"   g
+wps_type_t     include/esp_supplicant/esp_wps.h        /^} wps_type_t;$/;"     t       typeref:enum:wps_type
+wps_upnp       src/ap/hostapd.h        /^      struct upnp_wps_device_sm *wps_upnp;$/;"        m       struct:hostapd_data     typeref:struct:hostapd_data::upnp_wps_device_sm
+wps_uuid_pin   src/wps/wps_registrar.c /^struct wps_uuid_pin {$/;"     s       file:
+wps_validate_ap_config_methods src/wps/wps_validate.c  /^static int wps_validate_ap_config_methods(const u8 *config_methods, int wps2,$/;"     f       file:
+wps_validate_ap_setup_locked   src/wps/wps_validate.c  /^static int wps_validate_ap_setup_locked(const u8 *ap_setup_locked,$/;"        f       file:
+wps_validate_assoc_req src/wps/wps.h   /^static inline int wps_validate_assoc_req(const struct wpabuf *wps_ie)$/;"     f
+wps_validate_assoc_req src/wps/wps_validate.c  /^int wps_validate_assoc_req(const struct wpabuf *wps_ie)$/;"   f
+wps_validate_assoc_resp        src/wps/wps.h   /^static inline int wps_validate_assoc_resp(const struct wpabuf *wps_ie)$/;"    f
+wps_validate_assoc_resp        src/wps/wps_validate.c  /^int wps_validate_assoc_resp(const struct wpabuf *wps_ie)$/;"  f
+wps_validate_assoc_state       src/wps/wps_validate.c  /^static int wps_validate_assoc_state(const u8 *assoc_state, int mandatory)$/;" f       file:
+wps_validate_auth_type src/wps/wps_validate.c  /^static int wps_validate_auth_type(const u8 *type, int mandatory)$/;"  f       file:
+wps_validate_auth_type_flags   src/wps/wps_validate.c  /^static int wps_validate_auth_type_flags(const u8 *flags, int mandatory)$/;"   f       file:
+wps_validate_authenticator     src/wps/wps_validate.c  /^static int wps_validate_authenticator(const u8 *authenticator, int mandatory)$/;"     f       file:
+wps_validate_authorized_macs   src/wps/wps_validate.c  /^static int wps_validate_authorized_macs(const u8 *authorized_macs, size_t len,$/;"    f       file:
+wps_validate_beacon    src/wps/wps.h   /^static inline int wps_validate_beacon(const struct wpabuf *wps_ie){$/;"       f
+wps_validate_beacon    src/wps/wps_validate.c  /^int wps_validate_beacon(const struct wpabuf *wps_ie)$/;"      f
+wps_validate_beacon_probe_resp src/wps/wps.h   /^static inline int wps_validate_beacon_probe_resp(const struct wpabuf *wps_ie,$/;"     f
+wps_validate_beacon_probe_resp src/wps/wps_validate.c  /^int wps_validate_beacon_probe_resp(const struct wpabuf *wps_ie, int probe,$/;"        f
+wps_validate_config_error      src/wps/wps_validate.c  /^static int wps_validate_config_error(const u8 *config_error, int mandatory)$/;"       f       file:
+wps_validate_config_methods    src/wps/wps_validate.c  /^static int wps_validate_config_methods(const u8 *config_methods, int wps2,$/;"        f       file:
+wps_validate_conn_type_flags   src/wps/wps_validate.c  /^static int wps_validate_conn_type_flags(const u8 *flags, int mandatory)$/;"   f       file:
+wps_validate_cred      src/wps/wps_validate.c  /^static int wps_validate_cred(const u8 *cred, size_t len)$/;"  f       file:
+wps_validate_credential        src/wps/wps_validate.c  /^static int wps_validate_credential(const u8 *cred[], size_t len[], size_t num,$/;"    f       file:
+wps_validate_dev_name  src/wps/wps_validate.c  /^static int wps_validate_dev_name(const u8 *dev_name, size_t len,$/;"  f       file:
+wps_validate_dev_password_id   src/wps/wps_validate.c  /^static int wps_validate_dev_password_id(const u8 *dev_password_id,$/;"        f       file:
+wps_validate_e_hash1   src/wps/wps_validate.c  /^static int wps_validate_e_hash1(const u8 *hash, int mandatory)$/;"    f       file:
+wps_validate_e_hash2   src/wps/wps_validate.c  /^static int wps_validate_e_hash2(const u8 *hash, int mandatory)$/;"    f       file:
+wps_validate_e_snonce1 src/wps/wps_validate.c  /^static int wps_validate_e_snonce1(const u8 *nonce, int mandatory)$/;" f       file:
+wps_validate_e_snonce2 src/wps/wps_validate.c  /^static int wps_validate_e_snonce2(const u8 *nonce, int mandatory)$/;" f       file:
+wps_validate_encr_settings     src/wps/wps_validate.c  /^static int wps_validate_encr_settings(const u8 *encr_settings, size_t len,$/;"        f       file:
+wps_validate_encr_type src/wps/wps_validate.c  /^static int wps_validate_encr_type(const u8 *type, int mandatory)$/;"  f       file:
+wps_validate_encr_type_flags   src/wps/wps_validate.c  /^static int wps_validate_encr_type_flags(const u8 *flags, int mandatory)$/;"   f       file:
+wps_validate_enrollee_nonce    src/wps/wps_validate.c  /^static int wps_validate_enrollee_nonce(const u8 *enrollee_nonce, int mandatory)$/;"   f       file:
+wps_validate_key_wrap_auth     src/wps/wps_validate.c  /^static int wps_validate_key_wrap_auth(const u8 *auth, int mandatory)$/;"      f       file:
+wps_validate_m1        src/wps/wps.h   /^static inline int wps_validate_m1(const struct wpabuf *tlvs)$/;"      f
+wps_validate_m1        src/wps/wps_validate.c  /^int wps_validate_m1(const struct wpabuf *tlvs)$/;"    f
+wps_validate_m2        src/wps/wps.h   /^static inline int wps_validate_m2(const struct wpabuf *tlvs)$/;"      f
+wps_validate_m2        src/wps/wps_validate.c  /^int wps_validate_m2(const struct wpabuf *tlvs)$/;"    f
+wps_validate_m2d       src/wps/wps.h   /^static inline int wps_validate_m2d(const struct wpabuf *tlvs)$/;"     f
+wps_validate_m2d       src/wps/wps_validate.c  /^int wps_validate_m2d(const struct wpabuf *tlvs)$/;"   f
+wps_validate_m3        src/wps/wps.h   /^static inline int wps_validate_m3(const struct wpabuf *tlvs)$/;"      f
+wps_validate_m3        src/wps/wps_validate.c  /^int wps_validate_m3(const struct wpabuf *tlvs)$/;"    f
+wps_validate_m4        src/wps/wps.h   /^static inline int wps_validate_m4(const struct wpabuf *tlvs)$/;"      f
+wps_validate_m4        src/wps/wps_validate.c  /^int wps_validate_m4(const struct wpabuf *tlvs)$/;"    f
+wps_validate_m4_encr   src/wps/wps.h   /^static inline int wps_validate_m4_encr(const struct wpabuf *tlvs, int wps2)$/;"       f
+wps_validate_m4_encr   src/wps/wps_validate.c  /^int wps_validate_m4_encr(const struct wpabuf *tlvs, int wps2)$/;"     f
+wps_validate_m5        src/wps/wps.h   /^static inline int wps_validate_m5(const struct wpabuf *tlvs)$/;"      f
+wps_validate_m5        src/wps/wps_validate.c  /^int wps_validate_m5(const struct wpabuf *tlvs)$/;"    f
+wps_validate_m5_encr   src/wps/wps.h   /^static inline int wps_validate_m5_encr(const struct wpabuf *tlvs, int wps2)$/;"       f
+wps_validate_m5_encr   src/wps/wps_validate.c  /^int wps_validate_m5_encr(const struct wpabuf *tlvs, int wps2)$/;"     f
+wps_validate_m6        src/wps/wps.h   /^static inline int wps_validate_m6(const struct wpabuf *tlvs)$/;"      f
+wps_validate_m6        src/wps/wps_validate.c  /^int wps_validate_m6(const struct wpabuf *tlvs)$/;"    f
+wps_validate_m6_encr   src/wps/wps.h   /^static inline int wps_validate_m6_encr(const struct wpabuf *tlvs, int wps2)$/;"       f
+wps_validate_m6_encr   src/wps/wps_validate.c  /^int wps_validate_m6_encr(const struct wpabuf *tlvs, int wps2)$/;"     f
+wps_validate_m7        src/wps/wps.h   /^static inline int wps_validate_m7(const struct wpabuf *tlvs)$/;"      f
+wps_validate_m7        src/wps/wps_validate.c  /^int wps_validate_m7(const struct wpabuf *tlvs)$/;"    f
+wps_validate_m7_encr   src/wps/wps.h   /^static inline int wps_validate_m7_encr(const struct wpabuf *tlvs, int ap,$/;" f
+wps_validate_m7_encr   src/wps/wps_validate.c  /^int wps_validate_m7_encr(const struct wpabuf *tlvs, int ap, int wps2)$/;"     f
+wps_validate_m8        src/wps/wps.h   /^static inline int wps_validate_m8(const struct wpabuf *tlvs)$/;"      f
+wps_validate_m8        src/wps/wps_validate.c  /^int wps_validate_m8(const struct wpabuf *tlvs)$/;"    f
+wps_validate_m8_encr   src/wps/wps.h   /^static inline int wps_validate_m8_encr(const struct wpabuf *tlvs, int ap,$/;" f
+wps_validate_m8_encr   src/wps/wps_validate.c  /^int wps_validate_m8_encr(const struct wpabuf *tlvs, int ap, int wps2)$/;"     f
+wps_validate_mac_addr  src/wps/wps_validate.c  /^static int wps_validate_mac_addr(const u8 *mac_addr, int mandatory)$/;"       f       file:
+wps_validate_manufacturer      src/wps/wps_validate.c  /^static int wps_validate_manufacturer(const u8 *manufacturer, size_t len,$/;"  f       file:
+wps_validate_model_name        src/wps/wps_validate.c  /^static int wps_validate_model_name(const u8 *model_name, size_t len,$/;"      f       file:
+wps_validate_model_number      src/wps/wps_validate.c  /^static int wps_validate_model_number(const u8 *model_number, size_t len,$/;"  f       file:
+wps_validate_msg_type  src/wps/wps_validate.c  /^static int wps_validate_msg_type(const u8 *msg_type, int mandatory)$/;"       f       file:
+wps_validate_network_idx       src/wps/wps_validate.c  /^static int wps_validate_network_idx(const u8 *idx, int mandatory)$/;" f       file:
+wps_validate_network_key       src/wps/wps_validate.c  /^static int wps_validate_network_key(const u8 *key, size_t key_len,$/;"        f       file:
+wps_validate_network_key_index src/wps/wps_validate.c  /^static int wps_validate_network_key_index(const u8 *idx, int mandatory)$/;"   f       file:
+wps_validate_network_key_shareable     src/wps/wps_validate.c  /^static int wps_validate_network_key_shareable(const u8 *val, int mandatory)$/;"       f       file:
+wps_validate_os_version        src/wps/wps_validate.c  /^static int wps_validate_os_version(const u8 *os_version, int mandatory)$/;"   f       file:
+wps_validate_primary_dev_type  src/wps/wps_validate.c  /^static int wps_validate_primary_dev_type(const u8 *primary_dev_type,$/;"      f       file:
+wps_validate_probe_req src/wps/wps.h   /^static inline int wps_validate_probe_req(const struct wpabuf *wps_ie,$/;"     f
+wps_validate_probe_req src/wps/wps_validate.c  /^int wps_validate_probe_req(const struct wpabuf *wps_ie, const u8 *addr)$/;"   f
+wps_validate_public_key        src/wps/wps_validate.c  /^static int wps_validate_public_key(const u8 *public_key, size_t len,$/;"      f       file:
+wps_validate_r_hash1   src/wps/wps_validate.c  /^static int wps_validate_r_hash1(const u8 *hash, int mandatory)$/;"    f       file:
+wps_validate_r_hash2   src/wps/wps_validate.c  /^static int wps_validate_r_hash2(const u8 *hash, int mandatory)$/;"    f       file:
+wps_validate_r_snonce1 src/wps/wps_validate.c  /^static int wps_validate_r_snonce1(const u8 *nonce, int mandatory)$/;" f       file:
+wps_validate_r_snonce2 src/wps/wps_validate.c  /^static int wps_validate_r_snonce2(const u8 *nonce, int mandatory)$/;" f       file:
+wps_validate_registrar_nonce   src/wps/wps_validate.c  /^static int wps_validate_registrar_nonce(const u8 *registrar_nonce,$/;"        f       file:
+wps_validate_req_dev_type      src/wps/wps_validate.c  /^static int wps_validate_req_dev_type(const u8 *req_dev_type[], size_t num,$/;"        f       file:
+wps_validate_request_to_enroll src/wps/wps_validate.c  /^static int wps_validate_request_to_enroll(const u8 *request_to_enroll,$/;"    f       file:
+wps_validate_request_type      src/wps/wps_validate.c  /^static int wps_validate_request_type(const u8 *request_type, int mandatory)$/;"       f       file:
+wps_validate_response_type     src/wps/wps_validate.c  /^static int wps_validate_response_type(const u8 *response_type, int mandatory)$/;"     f       file:
+wps_validate_rf_bands  src/wps/wps_validate.c  /^static int wps_validate_rf_bands(const u8 *rf_bands, int mandatory)$/;"       f       file:
+wps_validate_sel_reg_config_methods    src/wps/wps_validate.c  /^static int wps_validate_sel_reg_config_methods(const u8 *config_methods,$/;"  f       file:
+wps_validate_selected_registrar        src/wps/wps_validate.c  /^static int wps_validate_selected_registrar(const u8 *selected_registrar,$/;"  f       file:
+wps_validate_serial_number     src/wps/wps_validate.c  /^static int wps_validate_serial_number(const u8 *serial_number, size_t len,$/;"        f       file:
+wps_validate_settings_delay_time       src/wps/wps_validate.c  /^static int wps_validate_settings_delay_time(const u8 *delay, int mandatory)$/;"       f       file:
+wps_validate_ssid      src/wps/wps_validate.c  /^static int wps_validate_ssid(const u8 *ssid, size_t ssid_len, int mandatory)$/;"      f       file:
+wps_validate_upnp_set_selected_registrar       src/wps/wps.h   /^static inline int wps_validate_upnp_set_selected_registrar($/;"       f
+wps_validate_upnp_set_selected_registrar       src/wps/wps_validate.c  /^int wps_validate_upnp_set_selected_registrar(const struct wpabuf *tlvs)$/;"   f
+wps_validate_uuid_e    src/wps/wps_validate.c  /^static int wps_validate_uuid_e(const u8 *uuid_e, int mandatory)$/;"   f       file:
+wps_validate_uuid_r    src/wps/wps_validate.c  /^static int wps_validate_uuid_r(const u8 *uuid_r, int mandatory)$/;"   f       file:
+wps_validate_version   src/wps/wps_validate.c  /^static int wps_validate_version(const u8 *version, int mandatory)$/;" f       file:
+wps_validate_version2  src/wps/wps_validate.c  /^static int wps_validate_version2(const u8 *version2, int mandatory)$/;"       f       file:
+wps_validate_wps_state src/wps/wps_validate.c  /^static int wps_validate_wps_state(const u8 *wps_state, int mandatory)$/;"     f       file:
+wps_validate_wsc_ack   src/wps/wps.h   /^static inline int wps_validate_wsc_ack(const struct wpabuf *tlvs)$/;" f
+wps_validate_wsc_ack   src/wps/wps_validate.c  /^int wps_validate_wsc_ack(const struct wpabuf *tlvs)$/;"       f
+wps_validate_wsc_done  src/wps/wps.h   /^static inline int wps_validate_wsc_done(const struct wpabuf *tlvs)$/;"        f
+wps_validate_wsc_done  src/wps/wps_validate.c  /^int wps_validate_wsc_done(const struct wpabuf *tlvs)$/;"      f
+wps_validate_wsc_nack  src/wps/wps.h   /^static inline int wps_validate_wsc_nack(const struct wpabuf *tlvs)$/;"        f
+wps_validate_wsc_nack  src/wps/wps_validate.c  /^int wps_validate_wsc_nack(const struct wpabuf *tlvs)$/;"      f
+wps_vendor_ext src/ap/ap_config.h      /^      struct wpabuf *wps_vendor_ext[MAX_WPS_VENDOR_EXTENSIONS];$/;"   m       struct:hostapd_bss_config       typeref:struct:hostapd_bss_config::wpabuf
+wps_version_number     src/esp_supplicant/esp_wps.c    /^int wps_version_number = 0x20;$/;"    v
+wps_workaround_cred_key        src/wps/wps_attr_process.c      /^static int wps_workaround_cred_key(struct wps_credential *cred)$/;"   f       file:
+write_cbc      src/tls/tlsv1_record.h  /^      struct crypto_cipher *write_cbc;$/;"    m       struct:tlsv1_record_layer       typeref:struct:tlsv1_record_layer::crypto_cipher
+write_cipher_suite     src/tls/tlsv1_record.h  /^      u16 write_cipher_suite;$/;"     m       struct:tlsv1_record_layer
+write_iv       src/tls/tlsv1_record.h  /^      u8 write_iv[TLS_MAX_IV_LEN];$/;"        m       struct:tlsv1_record_layer
+write_key      src/tls/tlsv1_record.h  /^      u8 write_key[TLS_MAX_WRITE_KEY_LEN];$/;"        m       struct:tlsv1_record_layer
+write_mac_secret       src/tls/tlsv1_record.h  /^      u8 write_mac_secret[TLS_MAX_WRITE_MAC_SECRET_LEN];$/;"  m       struct:tlsv1_record_layer
+write_seq_num  src/tls/tlsv1_record.h  /^      u8 write_seq_num[TLS_SEQ_NUM_LEN];$/;"  m       struct:tlsv1_record_layer
+wsc_op_code    src/wps/wps.h   /^enum wsc_op_code {$/;"        g
+x509_algorithm_identifier      src/tls/x509v3.h        /^struct x509_algorithm_identifier {$/;"        s
+x509_certificate       src/tls/x509v3.h        /^struct x509_certificate {$/;" s
+x509_certificate_chain_free    src/tls/x509v3.c        /^void x509_certificate_chain_free(struct x509_certificate *cert)$/;"   f
+x509_certificate_chain_validate        src/tls/x509v3.c        /^int x509_certificate_chain_validate(struct x509_certificate *trusted,$/;"     f
+x509_certificate_check_signature       src/tls/x509v3.c        /^int x509_certificate_check_signature(struct x509_certificate *issuer,$/;"     f
+x509_certificate_free  src/tls/x509v3.c        /^void x509_certificate_free(struct x509_certificate *cert)$/;" f
+x509_certificate_get_subject   src/tls/x509v3.c        /^x509_certificate_get_subject(struct x509_certificate *chain,$/;"      f
+x509_certificate_parse src/tls/x509v3.c        /^struct x509_certificate * x509_certificate_parse(const u8 *buf, size_t len)$/;"       f
+x509_certificate_self_signed   src/tls/x509v3.c        /^int x509_certificate_self_signed(struct x509_certificate *cert)$/;"   f
+x509_digest_oid        src/tls/x509v3.c        /^static int x509_digest_oid(struct asn1_oid *oid)$/;"  f       file:
+x509_free_name src/tls/x509v3.c        /^static void x509_free_name(struct x509_name *name)$/;"        f       file:
+x509_id_ce_oid src/tls/x509v3.c        /^static int x509_id_ce_oid(struct asn1_oid *oid)$/;"   f       file:
+x509_name      src/tls/x509v3.h        /^struct x509_name {$/;"        s
+x509_name_attr src/tls/x509v3.h        /^struct x509_name_attr {$/;"   s
+x509_name_attr_str     src/tls/x509v3.c        /^static char * x509_name_attr_str(enum x509_name_attr_type type)$/;"   f       file:
+x509_name_attr_type    src/tls/x509v3.h        /^      enum x509_name_attr_type {$/;"  g       struct:x509_name_attr
+x509_name_compare      src/tls/x509v3.c        /^int x509_name_compare(struct x509_name *a, struct x509_name *b)$/;"   f
+x509_name_string       src/tls/x509v3.c        /^void x509_name_string(struct x509_name *name, char *buf, size_t len)$/;"      f
+x509_parse_algorithm_identifier        src/tls/x509v3.c        /^static int x509_parse_algorithm_identifier($/;"       f       file:
+x509_parse_alt_name_dns        src/tls/x509v3.c        /^static int x509_parse_alt_name_dns(struct x509_name *name,$/;"        f       file:
+x509_parse_alt_name_ip src/tls/x509v3.c        /^static int x509_parse_alt_name_ip(struct x509_name *name,$/;" f       file:
+x509_parse_alt_name_rfc8222    src/tls/x509v3.c        /^static int x509_parse_alt_name_rfc8222(struct x509_name *name,$/;"    f       file:
+x509_parse_alt_name_rid        src/tls/x509v3.c        /^static int x509_parse_alt_name_rid(struct x509_name *name,$/;"        f       file:
+x509_parse_alt_name_uri        src/tls/x509v3.c        /^static int x509_parse_alt_name_uri(struct x509_name *name,$/;"        f       file:
+x509_parse_ext_alt_name        src/tls/x509v3.c        /^static int x509_parse_ext_alt_name(struct x509_name *name,$/;"        f       file:
+x509_parse_ext_basic_constraints       src/tls/x509v3.c        /^static int x509_parse_ext_basic_constraints(struct x509_certificate *cert,$/;"        f       file:
+x509_parse_ext_issuer_alt_name src/tls/x509v3.c        /^static int x509_parse_ext_issuer_alt_name(struct x509_certificate *cert,$/;"  f       file:
+x509_parse_ext_key_usage       src/tls/x509v3.c        /^static int x509_parse_ext_key_usage(struct x509_certificate *cert,$/;"        f       file:
+x509_parse_ext_subject_alt_name        src/tls/x509v3.c        /^static int x509_parse_ext_subject_alt_name(struct x509_certificate *cert,$/;" f       file:
+x509_parse_extension   src/tls/x509v3.c        /^static int x509_parse_extension(struct x509_certificate *cert,$/;"    f       file:
+x509_parse_extension_data      src/tls/x509v3.c        /^static int x509_parse_extension_data(struct x509_certificate *cert,$/;"       f       file:
+x509_parse_extensions  src/tls/x509v3.c        /^static int x509_parse_extensions(struct x509_certificate *cert,$/;"   f       file:
+x509_parse_name        src/tls/x509v3.c        /^static int x509_parse_name(const u8 *buf, size_t len, struct x509_name *name,$/;"     f       file:
+x509_parse_public_key  src/tls/x509v3.c        /^static int x509_parse_public_key(const u8 *buf, size_t len,$/;"       f       file:
+x509_parse_tbs_certificate     src/tls/x509v3.c        /^static int x509_parse_tbs_certificate(const u8 *buf, size_t len,$/;"  f       file:
+x509_parse_time        src/tls/x509v3.c        /^static int x509_parse_time(const u8 *buf, size_t len, u8 asn1_tag,$/;"        f       file:
+x509_parse_validity    src/tls/x509v3.c        /^static int x509_parse_validity(const u8 *buf, size_t len,$/;" f       file:
+x509_pkcs_oid  src/tls/x509v3.c        /^static int x509_pkcs_oid(struct asn1_oid *oid)$/;"    f       file:
+x509_rsadsi_oid        src/tls/x509v3.c        /^static int x509_rsadsi_oid(struct asn1_oid *oid)$/;"  f       file:
+x509_sha1_oid  src/tls/x509v3.c        /^static int x509_sha1_oid(struct asn1_oid *oid)$/;"    f       file:
+x509_sha256_oid        src/tls/x509v3.c        /^static int x509_sha256_oid(struct asn1_oid *oid)$/;"  f       file:
+x509_str_compare       src/tls/x509v3.c        /^static int x509_str_compare(const char *a, const char *b)$/;" f       file:
+x509_str_strip_whitespace      src/tls/x509v3.c        /^static void x509_str_strip_whitespace(char *a)$/;"    f       file:
+x509_valid_issuer      src/tls/x509v3.c        /^static int x509_valid_issuer(const struct x509_certificate *cert)$/;" f       file:
+x509_whitespace        src/tls/x509v3.c        /^static int x509_whitespace(char c)$/;"        f       file:
+xWpa2Queue     src/esp_supplicant/esp_wpa_enterprise.c /^static void *xWpa2Queue = NULL;$/;"   v       file:
+xWpsQueue      src/esp_supplicant/esp_wps.c    /^static void *xWpsQueue = NULL;$/;"    v       file:
+xxkey  src/ap/wpa_auth_i.h     /^      u8 xxkey[PMK_LEN]; \/* PSK or the second 256 bits of MSK *\/$/;"        m       struct:wpa_state_machine
+xxkey_len      src/ap/wpa_auth_i.h     /^      size_t xxkey_len;$/;"   m       struct:wpa_state_machine
index 1be503f44f677a3c1df5065110b1e51eb1f1d00d..0fd0a625cee0650d1aaff011e05e3690705db378 100644 (file)
@@ -1,3 +1,12 @@
 idf_component_register(SRC_DIRS "."
-                    INCLUDE_DIRS "."
-                    REQUIRES unity wpa_supplicant mbedtls)
\ No newline at end of file
+                    INCLUDE_DIRS "." "${CMAKE_CURRENT_BINARY_DIR}"
+                    PRIV_INCLUDE_DIRS "../src"
+                    REQUIRES unity esp_common test_utils wpa_supplicant mbedtls)
+
+idf_component_get_property(esp_supplicant_dir wpa_supplicant COMPONENT_DIR)
+
+# Calculate MD5 value of header file esp_wifi_driver.h
+file(MD5 ${esp_supplicant_dir}/src/esp_supplicant/esp_wifi_driver.h WIFI_SUPPLICANT_MD5)
+string(SUBSTRING "${WIFI_SUPPLICANT_MD5}" 0 7 WIFI_SUPPLICANT_MD5)
+
+add_definitions(-DWIFI_SUPPLICANT_MD5=\"${WIFI_SUPPLICANT_MD5}\")
index 5dd172bdb741ac981aca2ac446a56e62733f816a..cfec44f29261669bde18eb746c2b3fd3f77b807e 100644 (file)
@@ -2,4 +2,10 @@
 #Component Makefile
 #
 
+COMPONENT_PRIV_INCLUDEDIRS := ../src
+COMPONENT_SRCDIRS := .
+
 COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME) -Wl,--no-whole-archive
+
+WIFI_SUPPLICANT_MD5_VAL=\"$(shell md5sum $(IDF_PATH)/components/wpa_supplicant/src/esp_supplicant/esp_wifi_driver.h | cut -c 1-7)\"
+CFLAGS+=-DWIFI_SUPPLICANT_MD5=$(WIFI_SUPPLICANT_MD5_VAL)
diff --git a/components/wpa_supplicant/test/test_header_files_md5.c b/components/wpa_supplicant/test/test_header_files_md5.c
new file mode 100644 (file)
index 0000000..179227c
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ Tests for the Wi-Fi
+*/
+#include "unity.h"
+#include "esp_log.h"
+#include "utils/common.h"
+#include "esp_supplicant/esp_wifi_driver.h"
+
+static const char* TAG = "test_header_files_md5";
+
+TEST_CASE("wifi supplicant header files MD5","[wpa_supplicant]")
+{    
+    const char *test_wifi_supplicant_header_md5 = WIFI_SUPPLICANT_MD5;
+
+    ESP_LOGI(TAG, "test wifi supplicant MD5...");
+    TEST_ESP_OK(esp_wifi_internal_supplicant_header_md5_check(test_wifi_supplicant_header_md5));
+
+    ESP_LOGI(TAG, "test passed...");
+}
+
index 1917c1eb5aa15e856ed60dd8ca142dd4a1471ab1..e2127d84baf3a20b8c65982d0cb028ee7de60cfb 100644 (file)
@@ -94,7 +94,6 @@ static void initialise_wifi(void)
     unsigned int ca_pem_bytes = ca_pem_end - ca_pem_start;
     unsigned int client_crt_bytes = client_crt_end - client_crt_start;
     unsigned int client_key_bytes = client_key_end - client_key_start;
-    esp_wpa2_config_t config = WPA2_CONFIG_INIT_DEFAULT();
 
     tcpip_adapter_init();
     wifi_event_group = xEventGroupCreate();
@@ -121,7 +120,7 @@ static void initialise_wifi(void)
         ESP_ERROR_CHECK( esp_wifi_sta_wpa2_ent_set_password((uint8_t *)EXAMPLE_EAP_PASSWORD, strlen(EXAMPLE_EAP_PASSWORD)) );
     }
    
-    ESP_ERROR_CHECK( esp_wifi_sta_wpa2_ent_enable(&config) );
+    ESP_ERROR_CHECK( esp_wifi_sta_wpa2_ent_enable() );
     ESP_ERROR_CHECK( esp_wifi_start() );
 }