2022-01-14 11:52:00 -05:00
|
|
|
/*
|
2024-03-28 05:10:19 -04:00
|
|
|
* SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD
|
2022-01-14 11:52:00 -05:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2018-08-13 04:37:56 -04:00
|
|
|
|
|
|
|
#ifndef __ESP_WPA_H__
|
|
|
|
#define __ESP_WPA_H__
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "esp_err.h"
|
|
|
|
#include "esp_wifi_crypto_types.h"
|
2020-01-20 01:47:53 -05:00
|
|
|
#include "esp_wifi_types.h"
|
2018-08-13 04:37:56 -04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** \defgroup WiFi_APIs WiFi Related APIs
|
|
|
|
* @brief WiFi APIs
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @addtogroup WiFi_APIs
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** \defgroup WPA_APIs WPS APIs
|
2022-06-06 01:31:02 -04:00
|
|
|
* @brief Supplicant APIs
|
2018-08-13 04:37:56 -04:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @addtogroup WPA_APIs
|
|
|
|
* @{
|
|
|
|
*/
|
2019-08-06 07:40:16 -04:00
|
|
|
/* Crypto callback functions */
|
2022-01-14 11:52:00 -05:00
|
|
|
extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs; // NOLINT(readability-redundant-declaration)
|
|
|
|
|
2019-08-06 07:40:16 -04:00
|
|
|
/* Mesh crypto callback functions */
|
2022-01-14 11:52:00 -05:00
|
|
|
extern const mesh_crypto_funcs_t g_wifi_default_mesh_crypto_funcs;
|
2018-08-13 04:37:56 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Supplicant initialization
|
|
|
|
*
|
2020-11-10 02:40:01 -05:00
|
|
|
* @return
|
2018-08-13 04:37:56 -04:00
|
|
|
* - ESP_OK : succeed
|
|
|
|
* - ESP_ERR_NO_MEM : out of memory
|
|
|
|
*/
|
|
|
|
esp_err_t esp_supplicant_init(void);
|
|
|
|
|
2019-10-24 05:11:30 -04:00
|
|
|
/**
|
|
|
|
* @brief Supplicant deinitialization
|
|
|
|
*
|
2020-11-10 02:40:01 -05:00
|
|
|
* @return
|
2019-10-24 05:11:30 -04:00
|
|
|
* - ESP_OK : succeed
|
|
|
|
* - others: failed
|
|
|
|
*/
|
|
|
|
esp_err_t esp_supplicant_deinit(void);
|
|
|
|
|
2024-03-28 05:10:19 -04:00
|
|
|
/**
|
|
|
|
* @brief Disable or enable the caching of Pairwise Master Keys (PMK) in the supplicant.
|
|
|
|
*
|
|
|
|
* This function allows disabling or enabling the caching of Pairwise Master Keys (PMK).
|
|
|
|
* PMK caching is used in Wi-Fi Protected Access (WPA/WPA2/WPA3) networks to speed up the reconnection process
|
|
|
|
* by storing the PMK generated during the initial connection. Disabling PMK caching may result in slightly
|
|
|
|
* longer reconnection times. PMK caching is enabled by default, this configuration has been provided
|
|
|
|
* in case the AP is known not to support PMK caching or has a buggy implementation for PMK caching.
|
|
|
|
*
|
|
|
|
* @param disable Boolean indicating whether to disable (true) or enable (false) PMK caching.
|
|
|
|
* @return
|
|
|
|
* - ESP_OK: Success
|
|
|
|
* - An error code if disabling or enabling PMK caching fails.
|
|
|
|
*/
|
|
|
|
esp_err_t esp_supplicant_disable_pmk_caching(bool disable);
|
|
|
|
|
2018-08-13 04:37:56 -04:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __ESP_WPA_H__ */
|