Skip to content

Commit 20b93d7

Browse files
rado17fabiobaltieri
authored andcommitted
net: wifi_mgmt: Enhance documentation
Provide details for the fields defined in wifi_connect_req_params structure. Signed-off-by: Ravi Dondaputi <[email protected]>
1 parent d6c2ebd commit 20b93d7

File tree

1 file changed

+106
-19
lines changed

1 file changed

+106
-19
lines changed

include/zephyr/net/wifi_mgmt.h

Lines changed: 106 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -568,43 +568,130 @@ struct wifi_connect_req_params {
568568
uint8_t bssid[WIFI_MAC_ADDR_LEN];
569569
/** Connect timeout in seconds, SYS_FOREVER_MS for no timeout */
570570
int timeout;
571-
/** anonymous identity */
571+
/**
572+
* Anonymous identity used in EAP authentication (Phase 1) for Wi-Fi Enterprise networks.
573+
* In EAP methods such as PEAP or TTLS, the anonymous identity is sent in the initial
574+
* outer authentication exchange to protect the user's real identity (eap_identity).
575+
* This value is not always required; if not set, the real identity may be exposed.
576+
* Only used in Phase 1 (outer authentication).
577+
*/
572578
const uint8_t *anon_id;
573-
/** anon_id length, max 64 */
579+
580+
/** Length of the anonymous identity, maximum 64 bytes. */
574581
uint8_t aid_length;
575-
/** Private key passwd for enterprise mode */
582+
583+
/**
584+
* Private key password for Wi-Fi Enterprise authentication.
585+
* Used when a client certificate and private key are required (e.g., EAP-TLS).
586+
* This is the password protecting the private key file.
587+
* Applies to Phase 1 (outer authentication) when client certificates are used.
588+
*/
576589
const uint8_t *key_passwd;
577-
/** Private key passwd length, max 128 */
590+
591+
/** Length of the private key password, maximum 128 bytes. */
578592
uint8_t key_passwd_length;
579-
/** private key2 passwd */
593+
594+
/**
595+
* Password for a secondary private key, if required by the authentication method.
596+
* Rarely used; typically only needed for advanced enterprise setups.
597+
* Applies to Phase 1 (outer authentication) if a second private key is used.
598+
*/
580599
const uint8_t *key2_passwd;
581-
/** key2 passwd length, max 128 */
600+
601+
/** Length of the secondary private key password, maximum 128 bytes. */
582602
uint8_t key2_passwd_length;
583-
/** wpa3 enterprise mode */
603+
604+
/**
605+
* WPA3 Enterprise mode type.
606+
* Selects the WPA3 Enterprise authentication variant to use.
607+
* WPA3 Enterprise is a security protocol for Wi-Fi networks, often used in organizations,
608+
* that provides enhanced security over WPA2. This field is only relevant for enterprise
609+
* networks.
610+
* Applies to Phase 1 (outer authentication).
611+
*/
584612
enum wifi_wpa3_enterprise_type wpa3_ent_mode;
585-
/** TLS cipher */
613+
614+
/**
615+
* TLS cipher suite to use for EAP-TLS authentication.
616+
* This selects the cryptographic algorithms used for the secure connection.
617+
* Only relevant for enterprise networks using EAP-TLS or similar methods.
618+
* Applies to Phase 1 (outer authentication).
619+
*/
586620
uint8_t TLS_cipher;
587-
/** eap version */
621+
622+
/**
623+
* EAP (Extensible Authentication Protocol) version to use.
624+
* EAP is a framework for network authentication, commonly used in enterprise Wi-Fi.
625+
* This field allows specifying the protocol version if required by the network.
626+
* Applies to Phase 1 (outer authentication).
627+
*/
588628
int eap_ver;
589-
/** Identity for EAP */
629+
630+
/**
631+
* Identity string for EAP authentication (Phase 2, inner authentication).
632+
* This is the real username or identity presented to the authentication server
633+
* after the secure tunnel is established (e.g., inside PEAP or TTLS).
634+
* Required for most enterprise Wi-Fi networks (e.g., WPA2/WPA3 Enterprise).
635+
* Applies to Phase 2 (inner authentication).
636+
*/
590637
const uint8_t *eap_identity;
591-
/** eap identity length, max 64 */
638+
639+
/** Length of the EAP identity, maximum 64 bytes. */
592640
uint8_t eap_id_length;
593-
/** Password string for EAP. */
641+
642+
/**
643+
* Password string for EAP authentication (Phase 2, inner authentication).
644+
* Used in EAP methods that require a password (e.g., PEAP, TTLS, EAP-FAST).
645+
* This is the user's password for the enterprise Wi-Fi network.
646+
* Applies to Phase 2 (inner authentication).
647+
*/
594648
const uint8_t *eap_password;
595-
/** eap passwd length, max 128 */
649+
650+
/** Length of the EAP password, maximum 128 bytes. */
596651
uint8_t eap_passwd_length;
597-
/** Whether verify peer with CA or not: false-not verify, true-verify. */
652+
653+
/**
654+
* Whether to verify the server's certificate authority (CA) during authentication.
655+
* Set to true to require validation of the server's certificate (recommended for security).
656+
* Set to false to skip CA verification (not recommended, but sometimes used for testing).
657+
* Applies to Phase 1 (outer authentication).
658+
*/
598659
bool verify_peer_cert;
599-
/** Fast BSS Transition used */
660+
661+
/**
662+
* Indicates if Fast BSS Transition (802.11r) is used.
663+
* Fast BSS Transition allows seamless roaming between access points in enterprise networks.
664+
* Applies to the overall connection, not specific to EAP phases.
665+
*/
600666
bool ft_used;
601-
/** Number of EAP users */
667+
668+
/**
669+
* Number of EAP user identities provided.
670+
* Used for advanced enterprise authentication scenarios where multiple user credentials
671+
* are needed.
672+
* Applies to Phase 2 (inner authentication).
673+
*/
602674
int nusers;
603-
/** Number of EAP passwds */
675+
676+
/**
677+
* Number of EAP passwords provided.
678+
* Used in conjunction with multiple user identities for enterprise authentication.
679+
* Applies to Phase 2 (inner authentication).
680+
*/
604681
uint8_t passwds;
605-
/** User Identities */
682+
683+
/**
684+
* Array of pointers to user identity strings for EAP authentication.
685+
* Used for enterprise Wi-Fi networks that require multiple user identities.
686+
* Applies to Phase 2 (inner authentication).
687+
*/
606688
const uint8_t *identities[WIFI_ENT_IDENTITY_MAX_USERS];
607-
/** User Passwords */
689+
690+
/**
691+
* Array of pointers to user password strings for EAP authentication.
692+
* Used for enterprise Wi-Fi networks that require multiple user passwords.
693+
* Applies to Phase 2 (inner authentication).
694+
*/
608695
const uint8_t *passwords[WIFI_ENT_IDENTITY_MAX_USERS];
609696
/** Hidden SSID configure
610697
* 0: disabled (default)

0 commit comments

Comments
 (0)