fix(wifi): update comments in esp_wifi_types_generic.h

This commit is contained in:
zhangyanjiao
2024-06-14 11:03:48 +08:00
parent 9a0b35172c
commit f2a5280031
2 changed files with 203 additions and 67 deletions

View File

@@ -17,6 +17,9 @@
extern "C" {
#endif
/**
* @brief WiFi mode type
*/
typedef enum {
WIFI_MODE_NULL = 0, /**< null mode */
WIFI_MODE_STA, /**< WiFi station mode */
@@ -26,6 +29,9 @@ typedef enum {
WIFI_MODE_MAX
} wifi_mode_t;
/**
* @brief WiFi interface type
*/
typedef enum {
WIFI_IF_STA = ESP_IF_WIFI_STA,
WIFI_IF_AP = ESP_IF_WIFI_AP,
@@ -41,12 +47,17 @@ typedef enum {
#define WIFI_ROC_REQ 1
#define WIFI_ROC_CANCEL 0
/**
* @brief WiFi country policy
*/
typedef enum {
WIFI_COUNTRY_POLICY_AUTO, /**< Country policy is auto, use the country info of AP to which the station is connected */
WIFI_COUNTRY_POLICY_MANUAL, /**< Country policy is manual, always use the configured country info */
} wifi_country_policy_t;
/** @brief Structure describing WiFi country-based regional restrictions. */
/**
* @brief Structure describing WiFi country-based regional restrictions.
*/
typedef struct {
char cc[3]; /**< country code string */
uint8_t schan; /**< start channel of the allowed 2.4GHz WiFi channels */
@@ -61,9 +72,12 @@ typedef struct {
#endif
} wifi_country_t;
/* Strength of authmodes */
/* Personal Networks : OPEN < WEP < WPA_PSK < OWE < WPA2_PSK = WPA_WPA2_PSK < WAPI_PSK < WPA3_PSK = WPA2_WPA3_PSK = DPP
* Enterprise Networks : WIFI_AUTH_WPA2_ENTERPRISE < WIFI_AUTH_WPA3_ENTERPRISE = WIFI_AUTH_WPA2_WPA3_ENTERPRISE < WIFI_AUTH_WPA3_ENT_192 */
/**
* @brief WiFi authmode type
* Strength of authmodes
* Personal Networks : OPEN < WEP < WPA_PSK < OWE < WPA2_PSK = WPA_WPA2_PSK < WAPI_PSK < WPA3_PSK = WPA2_WPA3_PSK = DPP
* Enterprise Networks : WIFI_AUTH_WPA2_ENTERPRISE < WIFI_AUTH_WPA3_ENTERPRISE = WIFI_AUTH_WPA2_WPA3_ENTERPRISE < WIFI_AUTH_WPA3_ENT_192
*/
typedef enum {
WIFI_AUTH_OPEN = 0, /**< authenticate mode : open */
WIFI_AUTH_WEP, /**< authenticate mode : WEP */
@@ -85,6 +99,9 @@ typedef enum {
WIFI_AUTH_MAX
} wifi_auth_mode_t;
/**
* @brief WiFi error reason
*/
typedef enum {
WIFI_REASON_UNSPECIFIED = 1,
WIFI_REASON_AUTH_EXPIRE = 2,
@@ -152,6 +169,9 @@ typedef enum {
WIFI_REASON_NO_AP_FOUND_IN_RSSI_THRESHOLD = 212,
} wifi_err_reason_t;
/**
* @brief WiFi second channel type
*/
typedef enum {
WIFI_SECOND_CHAN_NONE = 0, /**< the channel width is HT20 */
WIFI_SECOND_CHAN_ABOVE, /**< the channel width is HT40 and the secondary channel is above the primary channel */
@@ -170,31 +190,43 @@ typedef enum {
.home_chan_dwell_time = WIFI_SCAN_HOME_CHANNEL_DWELL_DEFAULT_TIME\
}
/**
* @brief WiFi scan type
*/
typedef enum {
WIFI_SCAN_TYPE_ACTIVE = 0, /**< active scan */
WIFI_SCAN_TYPE_PASSIVE, /**< passive scan */
} wifi_scan_type_t;
/** @brief Range of active scan times per channel */
/**
* @brief Range of active scan times per channel
*/
typedef struct {
uint32_t min; /**< minimum active scan time per channel, units: millisecond */
uint32_t max; /**< maximum active scan time per channel, units: millisecond, values above 1500ms may
cause station to disconnect from AP and are not recommended. */
cause station to disconnect from AP and are not recommended. */
} wifi_active_scan_time_t;
/** @brief Aggregate of active & passive scan time per channel */
/**
* @brief Aggregate of active & passive scan time per channel
*/
typedef struct {
wifi_active_scan_time_t active; /**< active scan time per channel, units: millisecond. */
uint32_t passive; /**< passive scan time per channel, units: millisecond, values above 1500ms may
cause station to disconnect from AP and are not recommended. */
} wifi_scan_time_t;
/**
* @brief Bitmap for scan channel
*/
typedef struct {
uint16_t ghz_2_channels; /**< Represents 2.4 GHz channels, that bits can be set as wifi_2g_channel_bit_t shown. */
uint32_t ghz_5_channels; /**< Represents 5 GHz channels, that bits can be set as wifi_5g_channel_bit_t shown. */
} wifi_scan_channel_bitmap_t;
/** @brief Parameters for an SSID scan. */
/**
* @brief Parameters for an SSID scan
*/
typedef struct {
uint8_t *ssid; /**< SSID of AP */
uint8_t *bssid; /**< MAC address of AP */
@@ -208,12 +240,17 @@ typedef struct {
Also, note that only allowed channels configured by wifi_country_t can be scaned. */
} wifi_scan_config_t;
/** @brief Parameters default scan configurations. */
/**
* @brief Parameters default scan configurations
*/
typedef struct {
wifi_scan_time_t scan_time; /**< scan time per channel */
uint8_t home_chan_dwell_time;/**< time spent at home channel between scanning consecutive channels.*/
} wifi_scan_default_params_t;
/**
* @brief WiFi cipher type
*/
typedef enum {
WIFI_CIPHER_TYPE_NONE = 0, /**< the cipher type is none */
WIFI_CIPHER_TYPE_WEP40, /**< the cipher type is WEP40 */
@@ -232,7 +269,6 @@ typedef enum {
/**
* @brief WiFi antenna
*
*/
typedef enum {
WIFI_ANT_ANT0, /**< WiFi antenna 0 */
@@ -240,7 +276,9 @@ typedef enum {
WIFI_ANT_MAX, /**< Invalid WiFi antenna */
} wifi_ant_t;
/** @brief Description of a WiFi AP HE Info */
/**
* @brief Description of a WiFi AP HE Info
*/
typedef struct {
uint8_t bss_color: 6; /**< an unsigned integer whose value is the BSS Color of the BSS corresponding to the AP */
uint8_t partial_bss_color: 1; /**< indicate if an AID assignment rule based on the BSS color */
@@ -248,7 +286,9 @@ typedef struct {
uint8_t bssid_index; /**< in M-BSSID set, identifies the nontransmitted BSSID */
} wifi_he_ap_info_t;
/** @brief Description of a WiFi AP */
/**
* @brief Description of a WiFi AP
*/
typedef struct {
uint8_t bssid[6]; /**< MAC address of AP */
uint8_t ssid[33]; /**< SSID of AP */
@@ -282,17 +322,25 @@ typedef struct {
channel frequency of the second segment. */
} wifi_ap_record_t;
/**
* @brief WiFi scan method
*/
typedef enum {
WIFI_FAST_SCAN = 0, /**< Do fast scan, scan will end after find SSID match AP */
WIFI_ALL_CHANNEL_SCAN, /**< All channel scan, scan will end after scan all the channel */
} wifi_scan_method_t;
/**
* @brief WiFi sort AP method
*/
typedef enum {
WIFI_CONNECT_AP_BY_SIGNAL = 0, /**< Sort match AP in scan list by RSSI */
WIFI_CONNECT_AP_BY_SECURITY, /**< Sort match AP in scan list by security mode */
} wifi_sort_method_t;
/** @brief Structure describing parameters for a WiFi fast scan */
/**
* @brief Structure describing parameters for a WiFi fast scan
*/
typedef struct {
int8_t rssi; /**< The minimum rssi to accept in the fast scan mode */
wifi_auth_mode_t authmode; /**< The weakest authmode to accept in the fast scan mode
@@ -300,19 +348,26 @@ typedef struct {
uint8_t rssi_5g_adjustment; /**< The RSSI value of the 5G AP is within the rssi_5g_adjustment range compared to the 2G AP, the 5G AP will be given priority for connection. */
} wifi_scan_threshold_t;
/**
* @brief WiFi power save type
*/
typedef enum {
WIFI_PS_NONE, /**< No power save */
WIFI_PS_MIN_MODEM, /**< Minimum modem power saving. In this mode, station wakes up to receive beacon every DTIM period */
WIFI_PS_MAX_MODEM, /**< Maximum modem power saving. In this mode, interval to receive beacons is determined by the listen_interval parameter in wifi_sta_config_t */
} wifi_ps_type_t;
/** Argument structure for WiFi band */
/**
* @brief Argument structure for WiFi band
*/
typedef enum {
WIFI_BAND_2G = 1, /* Band is 2.4G */
WIFI_BAND_5G = 2, /* Band is 5G */
} wifi_band_t;
/** Argument structure for WiFi band mode */
/**
* @brief Argument structure for WiFi band mode
*/
typedef enum {
WIFI_BAND_MODE_2G_ONLY = 1, /* WiFi band mode is 2.4G only */
WIFI_BAND_MODE_5G_ONLY = 2, /* WiFi band mode is 5G only */
@@ -393,12 +448,17 @@ typedef enum {
#define WIFI_PROTOCOL_11AC 0x20
#define WIFI_PROTOCOL_11AX 0x40
/** @brief Description of a WiFi protocols */
/**
* @brief Description of a WiFi protocols
*/
typedef struct {
uint16_t ghz_2g; /**< Represents 2.4 GHz protocol, support 802.11b or 802.11g or 802.11n or 802.11ax or LR mode */
uint16_t ghz_5g; /**< Represents 5 GHz protocol, support 802.11a or 802.11n or 802.11ac or 802.11ax */
} wifi_protocols_t;
/**
* @brief WiFi bandwidth type
*/
typedef enum {
WIFI_BW_HT20 = 1, /* Bandwidth is HT20 */
WIFI_BW20 = WIFI_BW_HT20, /* Bandwidth is 20 MHz */
@@ -409,19 +469,25 @@ typedef enum {
WIFI_BW80_BW80 = 5, /* Bandwidth is 80+80 MHz */
} wifi_bandwidth_t;
/** @brief Description of a WiFi band bandwidths */
/**
* @brief Description of a WiFi band bandwidths
*/
typedef struct {
wifi_bandwidth_t ghz_2g; /* Represents 2.4 GHz bandwidth */
wifi_bandwidth_t ghz_5g; /* Represents 5 GHz bandwidth */
} wifi_bandwidths_t;
/** Configuration structure for Protected Management Frame */
/**
* @brief Configuration structure for Protected Management Frame
*/
typedef struct {
bool capable; /**< Deprecated variable. Device will always connect in PMF mode if other device also advertises PMF capability. */
bool required; /**< Advertises that Protected Management Frame is required. Device will not associate to non-PMF capable devices. */
} wifi_pmf_config_t;
/** Configuration for SAE PWE derivation */
/**
* @brief Configuration for SAE PWE derivation
*/
typedef enum {
WPA3_SAE_PWE_UNSPECIFIED,
WPA3_SAE_PWE_HUNT_AND_PECK,
@@ -429,14 +495,18 @@ typedef enum {
WPA3_SAE_PWE_BOTH,
} wifi_sae_pwe_method_t;
/** Configuration for SAE-PK */
/**
* @brief Configuration for SAE-PK
*/
typedef enum {
WPA3_SAE_PK_MODE_AUTOMATIC = 0,
WPA3_SAE_PK_MODE_ONLY = 1,
WPA3_SAE_PK_MODE_DISABLED = 2,
} wifi_sae_pk_mode_t;
/** @brief Soft-AP configuration settings for the device */
/**
* @brief Soft-AP configuration settings for the device
*/
typedef struct {
uint8_t ssid[32]; /**< SSID of soft-AP. If ssid_len field is 0, this must be a Null terminated string. Otherwise, length is set according to ssid_len. */
uint8_t password[64]; /**< Password of soft-AP. */
@@ -455,7 +525,10 @@ typedef struct {
} wifi_ap_config_t;
#define SAE_H2E_IDENTIFIER_LEN 32
/** @brief STA configuration settings for the device */
/**
* @brief STA configuration settings for the device
*/
typedef struct {
uint8_t ssid[32]; /**< SSID of target AP. */
uint8_t password[64]; /**< Password of target AP. */
@@ -492,7 +565,6 @@ typedef struct {
/**
* @brief NAN Discovery start configuration
*
*/
typedef struct {
uint8_t op_channel; /**< NAN Discovery operating channel */
@@ -501,19 +573,22 @@ typedef struct {
uint16_t warm_up_sec; /**< Warm up time before assuming NAN Anchor Master role */
} wifi_nan_config_t;
/** @brief Configuration data for device's AP or STA or NAN.
*
* The usage of this union (for ap, sta or nan configuration) is determined by the accompanying
* interface argument passed to esp_wifi_set_config() or esp_wifi_get_config()
*
*/
/**
* @brief Configuration data for device's AP or STA or NAN.
*
* The usage of this union (for ap, sta or nan configuration) is determined by the accompanying
* interface argument passed to esp_wifi_set_config() or esp_wifi_get_config()
*
*/
typedef union {
wifi_ap_config_t ap; /**< configuration of AP */
wifi_sta_config_t sta; /**< configuration of STA */
wifi_nan_config_t nan; /**< configuration of NAN */
} wifi_config_t;
/** @brief Description of STA associated with AP */
/**
* @brief Description of STA associated with AP
*/
typedef struct {
uint8_t mac[6]; /**< mac address */
int8_t rssi; /**< current average rssi of sta connected */
@@ -528,6 +603,9 @@ typedef struct {
uint32_t reserved: 24; /**< bit: 8..31 reserved */
} wifi_sta_info_t;
/**
* @brief WiFi storage type
*/
typedef enum {
WIFI_STORAGE_FLASH, /**< all configuration will store in both memory and flash */
WIFI_STORAGE_RAM, /**< all configuration will only store in the memory */
@@ -573,10 +651,10 @@ typedef enum {
} wifi_phy_mode_t;
/**
* @brief Vendor Information Element header
*
* The first bytes of the Information Element will match this header. Payload follows.
*/
* @brief Vendor Information Element header
*
* The first bytes of the Information Element will match this header. Payload follows.
*/
typedef struct {
uint8_t element_id; /**< Should be set to WIFI_VENDOR_IE_ELEMENT_ID (0xDD) */
uint8_t length; /**< Length of all bytes in the element data following this field. Minimum 4. */
@@ -618,7 +696,9 @@ typedef enum {
#define WIFI_PROMIS_CTRL_FILTER_MASK_CFEND (1<<30) /**< filter the control packets with subtype of CF-END */
#define WIFI_PROMIS_CTRL_FILTER_MASK_CFENDACK (1<<31) /**< filter the control packets with subtype of CF-END+CF-ACK */
/** @brief Mask for filtering different packet types in promiscuous mode. */
/**
* @brief Mask for filtering different packet types in promiscuous mode
*/
typedef struct {
uint32_t filter_mask; /**< OR of one or more filter values WIFI_PROMIS_FILTER_* */
} wifi_promiscuous_filter_t;
@@ -685,10 +765,8 @@ typedef struct {
typedef int (* wifi_action_rx_cb_t)(uint8_t *hdr, uint8_t *payload,
size_t len, uint8_t channel);
/**
* @brief Action Frame Tx Request
*
*
*/
* @brief Action Frame Tx Request
*/
typedef struct {
wifi_interface_t ifx; /**< WiFi interface to send request to */
uint8_t dest_mac[6]; /**< Destination MAC address */
@@ -721,6 +799,7 @@ typedef struct {
#define ESP_WIFI_MAX_FILTER_LEN 256
#define ESP_WIFI_MAX_SVC_INFO_LEN 64
#define ESP_WIFI_MAX_NEIGHBOR_REP_LEN 64
/**
* @brief NAN Services types
*
@@ -879,7 +958,9 @@ typedef enum {
WIFI_PHY_RATE_MAX,
} wifi_phy_rate_t;
/** WiFi event declarations */
/**
* @brief WiFi event declarations
*/
typedef enum {
WIFI_EVENT_WIFI_READY = 0, /**< WiFi ready */
WIFI_EVENT_SCAN_DONE, /**< Finished scanning AP */
@@ -947,14 +1028,18 @@ typedef enum {
ESP_EVENT_DECLARE_BASE(WIFI_EVENT);
/** @endcond **/
/** Argument structure for WIFI_EVENT_SCAN_DONE event */
/**
* @brief Argument structure for WIFI_EVENT_SCAN_DONE event
*/
typedef struct {
uint32_t status; /**< status of scanning APs: 0 — success, 1 - failure */
uint8_t number; /**< number of scan results */
uint8_t scan_id; /**< scan sequence number, used for block scan */
} wifi_event_sta_scan_done_t;
/** Argument structure for WIFI_EVENT_STA_CONNECTED event */
/**
* @brief Argument structure for WIFI_EVENT_STA_CONNECTED event
*/
typedef struct {
uint8_t ssid[32]; /**< SSID of connected AP */
uint8_t ssid_len; /**< SSID length of connected AP */
@@ -964,7 +1049,9 @@ typedef struct {
uint16_t aid; /**< authentication id assigned by the connected AP */
} wifi_event_sta_connected_t;
/** Argument structure for WIFI_EVENT_STA_DISCONNECTED event */
/**
* @brief Argument structure for WIFI_EVENT_STA_DISCONNECTED event
*/
typedef struct {
uint8_t ssid[32]; /**< SSID of disconnected AP */
uint8_t ssid_len; /**< SSID length of disconnected AP */
@@ -973,18 +1060,24 @@ typedef struct {
int8_t rssi; /**< rssi of disconnection */
} wifi_event_sta_disconnected_t;
/** Argument structure for WIFI_EVENT_STA_AUTHMODE_CHANGE event */
/**
* @brief Argument structure for WIFI_EVENT_STA_AUTHMODE_CHANGE event
*/
typedef struct {
wifi_auth_mode_t old_mode; /**< the old auth mode of AP */
wifi_auth_mode_t new_mode; /**< the new auth mode of AP */
} wifi_event_sta_authmode_change_t;
/** Argument structure for WIFI_EVENT_STA_WPS_ER_PIN event */
/**
* @brief Argument structure for WIFI_EVENT_STA_WPS_ER_PIN event
*/
typedef struct {
uint8_t pin_code[8]; /**< PIN code of station in enrollee mode */
} wifi_event_sta_wps_er_pin_t;
/** Argument structure for WIFI_EVENT_STA_WPS_ER_FAILED event */
/**
* @brief Argument structure for WIFI_EVENT_STA_WPS_ER_FAILED event
*/
typedef enum {
WPS_FAIL_REASON_NORMAL = 0, /**< WPS normal fail reason */
WPS_FAIL_REASON_RECV_M2D, /**< WPS receive M2D frame */
@@ -996,7 +1089,9 @@ typedef enum {
#define MAX_PASSPHRASE_LEN 64
#define MAX_WPS_AP_CRED 3
/** Argument structure for WIFI_EVENT_STA_WPS_ER_SUCCESS event */
/**
* @brief Argument structure for WIFI_EVENT_STA_WPS_ER_SUCCESS event
*/
typedef struct {
uint8_t ap_cred_cnt; /**< Number of AP credentials received */
struct {
@@ -1005,14 +1100,18 @@ typedef struct {
} ap_cred[MAX_WPS_AP_CRED]; /**< All AP credentials received from WPS handshake */
} wifi_event_sta_wps_er_success_t;
/** Argument structure for WIFI_EVENT_AP_STACONNECTED event */
/**
* @brief Argument structure for WIFI_EVENT_AP_STACONNECTED event
*/
typedef struct {
uint8_t mac[6]; /**< MAC address of the station connected to Soft-AP */
uint8_t aid; /**< the aid that soft-AP gives to the station connected to */
bool is_mesh_child; /**< flag to identify mesh child */
} wifi_event_ap_staconnected_t;
/** Argument structure for WIFI_EVENT_AP_STADISCONNECTED event */
/**
* @brief Argument structure for WIFI_EVENT_AP_STADISCONNECTED event
*/
typedef struct {
uint8_t mac[6]; /**< MAC address of the station disconnects to soft-AP */
uint8_t aid; /**< the aid that soft-AP gave to the station disconnects to */
@@ -1020,18 +1119,24 @@ typedef struct {
uint16_t reason; /**< reason of disconnection */
} wifi_event_ap_stadisconnected_t;
/** Argument structure for WIFI_EVENT_AP_PROBEREQRECVED event */
/**
* @brief Argument structure for WIFI_EVENT_AP_PROBEREQRECVED event
*/
typedef struct {
int rssi; /**< Received probe request signal strength */
uint8_t mac[6]; /**< MAC address of the station which send probe request */
} wifi_event_ap_probe_req_rx_t;
/** Argument structure for WIFI_EVENT_STA_BSS_RSSI_LOW event */
/**
* @brief Argument structure for WIFI_EVENT_STA_BSS_RSSI_LOW event
*/
typedef struct {
int32_t rssi; /**< RSSI value of bss */
} wifi_event_bss_rssi_low_t;
/** Argument structure for WIFI_EVENT_HOME_CHANNEL_CHANGE event */
/**
* @brief Argument structure for WIFI_EVENT_HOME_CHANNEL_CHANGE event
*/
typedef struct {
uint8_t old_chan; /**< old home channel of the device */
wifi_second_chan_t old_snd; /**< old second channel of the device */
@@ -1053,7 +1158,9 @@ typedef enum {
FTM_STATUS_USER_TERM, /**< User triggered termination */
} wifi_ftm_status_t;
/** Argument structure for */
/**
* @brief Argument structure for FTM report entry
*/
typedef struct {
uint8_t dlog_token; /**< Dialog Token of the FTM frame */
int8_t rssi; /**< RSSI of the FTM frame received */
@@ -1064,7 +1171,9 @@ typedef struct {
uint64_t t4; /**< Time of arrival of ACK at FTM Responder in pSec */
} wifi_ftm_report_entry_t;
/** Argument structure for WIFI_EVENT_FTM_REPORT event */
/**
* @brief Argument structure for WIFI_EVENT_FTM_REPORT event
*/
typedef struct {
uint8_t peer_mac[6]; /**< MAC address of the FTM Peer */
wifi_ftm_status_t status; /**< Status of the FTM operation */
@@ -1083,7 +1192,9 @@ typedef struct {
#define WIFI_STATIS_PS (1<<4)
#define WIFI_STATIS_ALL (-1)
/** Argument structure for WIFI_EVENT_ACTION_TX_STATUS event */
/**
* @brief Argument structure for WIFI_EVENT_ACTION_TX_STATUS event
*/
typedef struct {
wifi_interface_t ifx; /**< WiFi interface to send request to */
uint32_t context; /**< Context to identify the request */
@@ -1091,16 +1202,23 @@ typedef struct {
uint8_t status; /**< Status of the operation */
} wifi_event_action_tx_status_t;
/** Argument structure for WIFI_EVENT_ROC_DONE event */
/**
* @brief Argument structure for WIFI_EVENT_ROC_DONE event
*/
typedef struct {
uint32_t context; /**< Context to identify the request */
} wifi_event_roc_done_t;
/** Argument structure for WIFI_EVENT_AP_WPS_RG_PIN event */
/**
* @brief Argument structure for WIFI_EVENT_AP_WPS_RG_PIN event
*/
typedef struct {
uint8_t pin_code[8]; /**< PIN code of station in enrollee mode */
} wifi_event_ap_wps_rg_pin_t;
/**
* @brief WPS fail reason
*/
typedef enum {
WPS_AP_FAIL_REASON_NORMAL = 0, /**< WPS normal fail reason */
WPS_AP_FAIL_REASON_CONFIG, /**< WPS failed due to incorrect config */
@@ -1108,18 +1226,24 @@ typedef enum {
WPS_AP_FAIL_REASON_MAX,
} wps_fail_reason_t;
/** Argument structure for WIFI_EVENT_AP_WPS_RG_FAILED event */
/**
* @brief Argument structure for WIFI_EVENT_AP_WPS_RG_FAILED event
*/
typedef struct {
wps_fail_reason_t reason; /**< WPS failure reason wps_fail_reason_t */
uint8_t peer_macaddr[6]; /**< Enrollee mac address */
} wifi_event_ap_wps_rg_fail_reason_t;
/** Argument structure for WIFI_EVENT_AP_WPS_RG_SUCCESS event */
/**
* @brief Argument structure for WIFI_EVENT_AP_WPS_RG_SUCCESS event
*/
typedef struct {
uint8_t peer_macaddr[6]; /**< Enrollee mac address */
} wifi_event_ap_wps_rg_success_t;
/** Argument structure for WIFI_EVENT_NAN_SVC_MATCH event */
/**
* @brief Argument structure for WIFI_EVENT_NAN_SVC_MATCH event
*/
typedef struct {
uint8_t subscribe_id; /**< Subscribe Service Identifier */
uint8_t publish_id; /**< Publish Service Identifier */
@@ -1127,14 +1251,18 @@ typedef struct {
bool update_pub_id; /**< Indicates whether publisher's service ID needs to be updated */
} wifi_event_nan_svc_match_t;
/** Argument structure for WIFI_EVENT_NAN_REPLIED event */
/**
* @brief Argument structure for WIFI_EVENT_NAN_REPLIED event
*/
typedef struct {
uint8_t publish_id; /**< Publish Service Identifier */
uint8_t subscribe_id; /**< Subscribe Service Identifier */
uint8_t sub_if_mac[6]; /**< NAN Interface MAC of the Subscriber */
} wifi_event_nan_replied_t;
/** Argument structure for WIFI_EVENT_NAN_RECEIVE event */
/**
* @brief Argument structure for WIFI_EVENT_NAN_RECEIVE event
*/
typedef struct {
uint8_t inst_id; /**< Our Service Identifier */
uint8_t peer_inst_id; /**< Peer's Service Identifier */
@@ -1142,7 +1270,9 @@ typedef struct {
uint8_t peer_svc_info[ESP_WIFI_MAX_SVC_INFO_LEN];/**< Peer Service Info */
} wifi_event_nan_receive_t;
/** Argument structure for WIFI_EVENT_NDP_INDICATION event */
/**
* @brief Argument structure for WIFI_EVENT_NDP_INDICATION event
*/
typedef struct {
uint8_t publish_id; /**< Publish Id for NAN Service */
uint8_t ndp_id; /**< NDP instance id */
@@ -1151,7 +1281,9 @@ typedef struct {
uint8_t svc_info[ESP_WIFI_MAX_SVC_INFO_LEN];/**< Service Specific Info */
} wifi_event_ndp_indication_t;
/** Argument structure for WIFI_EVENT_NDP_CONFIRM event */
/**
* @brief Argument structure for WIFI_EVENT_NDP_CONFIRM event
*/
typedef struct {
uint8_t status; /**< NDP status code */
uint8_t ndp_id; /**< NDP instance id */
@@ -1161,14 +1293,18 @@ typedef struct {
uint8_t svc_info[ESP_WIFI_MAX_SVC_INFO_LEN];/**< Service Specific Info */
} wifi_event_ndp_confirm_t;
/** Argument structure for WIFI_EVENT_NDP_TERMINATED event */
/**
* @brief Argument structure for WIFI_EVENT_NDP_TERMINATED event
*/
typedef struct {
uint8_t reason; /**< Termination reason code */
uint8_t ndp_id; /**< NDP instance id */
uint8_t init_ndi[6]; /**< Initiator's NAN Data Interface MAC */
} wifi_event_ndp_terminated_t;
/** Argument structure for WIFI_EVENT_STA_NEIGHBOR_REP event */
/**
* @brief Argument structure for WIFI_EVENT_STA_NEIGHBOR_REP event
*/
typedef struct {
uint8_t report[ESP_WIFI_MAX_NEIGHBOR_REP_LEN]; /**< Neighbor Report received from the AP*/
uint16_t report_len; /**< Length of the report*/