mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
change(wifi): sync NAN/netif wifi headers + rebuilt libs [d3da506]
- injected esp_wifi_netif.h: add esp_wifi_netif_get_ip6_linklocal_from_mac() and esp_wifi_netif_set_static_neighbor() (static ND6 IPv6-pin API). - esp_wifi_types_generic.h (public + injected): rename the NCS-GTK cipher suites CCM_128 -> CCMP_128 / GCM_256 -> GCMP_256 to match Wi-Fi Aware v4.0 (Table 121, section 9.5.21.1); refresh NAN group-protection docs. Enum values (5/6), struct layout and on-air behaviour are unchanged. - nan_security.c: use the renamed macros and update the advertise log. - esp_wifi/lib: bump to the rebuilt blobs carrying the renamed MD5-checked header (han2 d3da506).
This commit is contained in:
@@ -933,8 +933,8 @@ typedef enum {
|
||||
WIFI_NAN_CSID_NCS_SK_256 = 2, /**< NCS-SK-256 (PSK/Passphrase). Reserved: not supported right now. */
|
||||
WIFI_NAN_CSID_NCS_PK_2WDH_128 = 3, /**< NCS-PK-2WDH-128. Reserved: not supported right now. */
|
||||
WIFI_NAN_CSID_NCS_PK_2WDH_256 = 4, /**< NCS-PK-2WDH-256. Reserved: not supported right now. */
|
||||
WIFI_NAN_CSID_NCS_GTK_CCM_128 = 5, /**< Group-data cipher (GTKSA). Selected internally when group_data_prot is set; not user-selectable via csid_bitmap. */
|
||||
WIFI_NAN_CSID_NCS_GTK_GCM_256 = 6, /**< Reserved: not supported right now. */
|
||||
WIFI_NAN_CSID_NCS_GTK_CCMP_128 = 5, /**< NCS-GTK-CCMP-128, the group-data cipher (GTKSA). Selected internally when group_data_prot is set; not user-selectable via csid_bitmap. */
|
||||
WIFI_NAN_CSID_NCS_GTK_GCMP_256 = 6, /**< NCS-GTK-GCMP-256. Reserved: not supported right now. */
|
||||
WIFI_NAN_CSID_NCS_PK_PASN_128 = 7, /**< NCS-PK-PASN-128 (NAN Pairing). Requires CONFIG_ESP_WIFI_NAN_PAIRING and the Wi-Fi Aware component (esp-wifi-apps); not usable with stand-alone ESP-IDF. */
|
||||
WIFI_NAN_CSID_NCS_PK_PASN_256 = 8, /**< NCS-PK-PASN-256. Reserved: not supported right now. */
|
||||
} wifi_nan_cipher_suite_id_t;
|
||||
@@ -943,8 +943,8 @@ typedef enum {
|
||||
#define WIFI_NAN_CSID_BIT_NCS_SK_256 (1 << WIFI_NAN_CSID_NCS_SK_256)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_PK_2WDH_128 (1 << WIFI_NAN_CSID_NCS_PK_2WDH_128)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_PK_2WDH_256 (1 << WIFI_NAN_CSID_NCS_PK_2WDH_256)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_GTK_CCM_128 (1 << WIFI_NAN_CSID_NCS_GTK_CCM_128)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_GTK_GCM_256 (1 << WIFI_NAN_CSID_NCS_GTK_GCM_256)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_GTK_CCMP_128 (1 << WIFI_NAN_CSID_NCS_GTK_CCMP_128)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_GTK_GCMP_256 (1 << WIFI_NAN_CSID_NCS_GTK_GCMP_256)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_PK_PASN_128 (1 << WIFI_NAN_CSID_NCS_PK_PASN_128)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_PK_PASN_256 (1 << WIFI_NAN_CSID_NCS_PK_PASN_256)
|
||||
|
||||
|
||||
Submodule components/esp_wifi/lib updated: df62dea0bc...c9950ae98a
@@ -81,6 +81,42 @@ bool esp_wifi_is_if_ready_when_started(wifi_netif_driver_t ifx);
|
||||
*/
|
||||
esp_err_t esp_wifi_register_if_rxcb(wifi_netif_driver_t ifx, esp_netif_receive_t fn, void * arg);
|
||||
|
||||
/**
|
||||
* @brief Derive an IPv6 link-local address from a link-layer (MAC) address
|
||||
*
|
||||
* Computes fe80::/64 combined with the EUI-64 form of the given MAC (the 802
|
||||
* group bit complemented) into an esp_ip6_addr_t (zone 0). Interface-agnostic.
|
||||
*
|
||||
* @param[out] ip6 destination, set to the derived IPv6 link-local address
|
||||
* @param[in] mac source link-layer (MAC) address (6 bytes)
|
||||
*/
|
||||
void esp_wifi_netif_get_ip6_linklocal_from_mac(esp_ip6_addr_t *ip6, const uint8_t mac[6]);
|
||||
|
||||
#if CONFIG_LWIP_ND6_SUPPORT_STATIC_ENTRIES
|
||||
/**
|
||||
* @brief Pin (or remove) a static IPv6 link-local neighbor mapping on a wifi netif
|
||||
*
|
||||
* Installs a fixed link-local IPv6 -> MAC mapping for a peer reachable on the
|
||||
* given wifi interface so that traffic to the peer bypasses Neighbor Discovery
|
||||
* (no NS/NA exchanged), or removes a previously installed one. This layer owns
|
||||
* both the netif lookup (from the interface type) and the derivation of the
|
||||
* peer's link-local address from its MAC, so the caller only supplies the
|
||||
* interface and the peer MAC. Only available when lwIP static ND6 entries are
|
||||
* enabled.
|
||||
*
|
||||
* @param[in] wifi_if wifi interface the peer is reachable on
|
||||
* @param[in] mac peer's link-layer (MAC) address
|
||||
* @param[in] add true to add the mapping, false to remove it
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if mac is NULL or wifi_if is out of range
|
||||
* - ESP_ERR_INVALID_STATE if the interface's netif is not up
|
||||
* - error code from the underlying esp_netif call otherwise
|
||||
*/
|
||||
esp_err_t esp_wifi_netif_set_static_neighbor(wifi_interface_t wifi_if, const uint8_t mac[6], bool add);
|
||||
#endif /* CONFIG_LWIP_ND6_SUPPORT_STATIC_ENTRIES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -933,9 +933,9 @@ typedef enum {
|
||||
WIFI_NAN_CSID_NCS_SK_256 = 2, /**< NCS-SK-256 (PSK/Passphrase). Reserved: not supported right now. */
|
||||
WIFI_NAN_CSID_NCS_PK_2WDH_128 = 3, /**< NCS-PK-2WDH-128. Reserved: not supported right now. */
|
||||
WIFI_NAN_CSID_NCS_PK_2WDH_256 = 4, /**< NCS-PK-2WDH-256. Reserved: not supported right now. */
|
||||
WIFI_NAN_CSID_NCS_GTK_CCM_128 = 5,
|
||||
WIFI_NAN_CSID_NCS_GTK_GCM_256 = 6,
|
||||
WIFI_NAN_CSID_NCS_PK_PASN_128 = 7, /**< NCS-PK-PASN-128. Reserved: not supported right now. */
|
||||
WIFI_NAN_CSID_NCS_GTK_CCMP_128 = 5, /**< NCS-GTK-CCMP-128, the group-data cipher (GTKSA). Selected internally when group_data_prot is set; not user-selectable via csid_bitmap. */
|
||||
WIFI_NAN_CSID_NCS_GTK_GCMP_256 = 6, /**< NCS-GTK-GCMP-256. Reserved: not supported right now. */
|
||||
WIFI_NAN_CSID_NCS_PK_PASN_128 = 7, /**< NCS-PK-PASN-128 (NAN Pairing). Requires CONFIG_WIFI_RMT_NAN_PAIRING and the Wi-Fi Aware component (esp-wifi-apps); not usable with stand-alone ESP-IDF. */
|
||||
WIFI_NAN_CSID_NCS_PK_PASN_256 = 8, /**< NCS-PK-PASN-256. Reserved: not supported right now. */
|
||||
} wifi_nan_cipher_suite_id_t;
|
||||
|
||||
@@ -943,8 +943,8 @@ typedef enum {
|
||||
#define WIFI_NAN_CSID_BIT_NCS_SK_256 (1 << WIFI_NAN_CSID_NCS_SK_256)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_PK_2WDH_128 (1 << WIFI_NAN_CSID_NCS_PK_2WDH_128)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_PK_2WDH_256 (1 << WIFI_NAN_CSID_NCS_PK_2WDH_256)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_GTK_CCM_128 (1 << WIFI_NAN_CSID_NCS_GTK_CCM_128)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_GTK_GCM_256 (1 << WIFI_NAN_CSID_NCS_GTK_GCM_256)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_GTK_CCMP_128 (1 << WIFI_NAN_CSID_NCS_GTK_CCMP_128)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_GTK_GCMP_256 (1 << WIFI_NAN_CSID_NCS_GTK_GCMP_256)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_PK_PASN_128 (1 << WIFI_NAN_CSID_NCS_PK_PASN_128)
|
||||
#define WIFI_NAN_CSID_BIT_NCS_PK_PASN_256 (1 << WIFI_NAN_CSID_NCS_PK_PASN_256)
|
||||
|
||||
@@ -975,8 +975,8 @@ typedef struct {
|
||||
* is computed by the stack as the union of each credential's @c csid.
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t group_data_prot: 1; /**< Group addressed data frame protection. Reserved: not supported right now. */
|
||||
uint8_t group_mgmt_prot: 1; /**< Group addressed management frame protection. Reserved: not supported right now. */
|
||||
uint8_t group_data_prot: 1; /**< Group addressed data frame protection (GTKSA): distribute a GTK on the secured NDP so multicast data frames are protected. */
|
||||
uint8_t group_mgmt_prot: 1; /**< Group addressed management frame protection (IGTKSA/BIGTKSA): BIP-protect multicast SDFs and Beacons. */
|
||||
uint8_t reserved: 6; /**< Reserved */
|
||||
uint8_t num_credentials; /**< Number of valid entries in @c creds (0..ESP_WIFI_NAN_MAX_CREDS_PER_SVC). 0 = open service. */
|
||||
wifi_nan_credential_t creds[ESP_WIFI_NAN_MAX_CREDS_PER_SVC]; /**< Credentials list. */
|
||||
|
||||
@@ -68,10 +68,10 @@ static struct {
|
||||
#define NAN_CSID_VALID_BITMAP ((uint16_t)0x01FE)
|
||||
|
||||
/* NCS-GTK cipher-suite bits (group-addressed data). Advertised when a service
|
||||
* sets group_data_prot; the basic default we generate/advertise is CCM-128. */
|
||||
#define NAN_CSID_GTK_BITS (WIFI_NAN_CSID_BIT_NCS_GTK_CCM_128 | \
|
||||
WIFI_NAN_CSID_BIT_NCS_GTK_GCM_256)
|
||||
#define NAN_CSID_GTK_DEFAULT WIFI_NAN_CSID_BIT_NCS_GTK_CCM_128
|
||||
* sets group_data_prot; the basic default we generate/advertise is CCMP-128. */
|
||||
#define NAN_CSID_GTK_BITS (WIFI_NAN_CSID_BIT_NCS_GTK_CCMP_128 | \
|
||||
WIFI_NAN_CSID_BIT_NCS_GTK_GCMP_256)
|
||||
#define NAN_CSID_GTK_DEFAULT WIFI_NAN_CSID_BIT_NCS_GTK_CCMP_128
|
||||
|
||||
/* Sentinel for peer_svc->matched_cred_idx: no PMKID match remembered yet. */
|
||||
#define NAN_NO_MATCHED_CRED 0xFF
|
||||
@@ -1274,7 +1274,7 @@ esp_err_t nan_derive_security_params(const char *service_name,
|
||||
}
|
||||
|
||||
if (sec_cfg->group_data_prot) {
|
||||
ESP_LOGI(TAG, "NAN GTK: advertising NCS-GTK-CCM-128 (group_data_prot=1) for svc='%s'",
|
||||
ESP_LOGI(TAG, "NAN GTK: advertising NCS-GTK-CCMP-128 (group_data_prot=1) for svc='%s'",
|
||||
service_name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user