wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
config_ssid.h
Go to the documentation of this file.
1 
5 #ifndef CONFIG_SSID_H
6 #define CONFIG_SSID_H
7 
8 #include "common/defs.h"
9 #include "utils/list.h"
10 #include "eap_peer/eap_config.h"
11 
12 
13 #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1)
14 #define DEFAULT_EAPOL_FLAGS (EAPOL_FLAG_REQUIRE_KEY_UNICAST | \
15  EAPOL_FLAG_REQUIRE_KEY_BROADCAST)
16 #define DEFAULT_PROTO (WPA_PROTO_WPA | WPA_PROTO_RSN)
17 #define DEFAULT_KEY_MGMT (WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_IEEE8021X)
18 #define DEFAULT_PAIRWISE (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP)
19 #define DEFAULT_GROUP (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP)
20 #define DEFAULT_FRAGMENT_SIZE 1398
21 
22 #define DEFAULT_BG_SCAN_PERIOD -1
23 #define DEFAULT_MESH_MAX_RETRIES 2
24 #define DEFAULT_MESH_RETRY_TIMEOUT 40
25 #define DEFAULT_MESH_CONFIRM_TIMEOUT 40
26 #define DEFAULT_MESH_HOLDING_TIMEOUT 40
27 #define DEFAULT_DISABLE_HT 0
28 #define DEFAULT_DISABLE_HT40 0
29 #define DEFAULT_DISABLE_SGI 0
30 #define DEFAULT_DISABLE_LDPC 0
31 #define DEFAULT_DISABLE_MAX_AMSDU -1 /* no change */
32 #define DEFAULT_AMPDU_FACTOR -1 /* no change */
33 #define DEFAULT_AMPDU_DENSITY -1 /* no change */
34 #define DEFAULT_USER_SELECTED_SIM 1
35 
37  struct dl_list list;
38  u8 addr[ETH_ALEN];
39  u8 psk[32];
40  u8 p2p;
41 };
42 
52 struct wpa_ssid {
60  struct wpa_ssid *next;
61 
70  struct wpa_ssid *pnext;
71 
81  int id;
82 
101  int priority;
102 
115  u8 *ssid;
116 
121  size_t ssid_len;
122 
133  u8 bssid[ETH_ALEN];
134 
140  size_t num_bssid_blacklist;
141 
147  size_t num_bssid_whitelist;
148 
154 
159  u8 go_p2p_dev_addr[ETH_ALEN];
160 
165  u8 psk[32];
166 
171  int psk_set;
172 
181  char *passphrase;
182 
190  char *ext_psk;
191 
200 
206 
212 
219  int key_mgmt;
220 
226 
231  int proto;
232 
239  int auth_alg;
240 
252 
253 #ifdef IEEE8021X_EAPOL
254 #define EAPOL_FLAG_REQUIRE_KEY_UNICAST BIT(0)
255 #define EAPOL_FLAG_REQUIRE_KEY_BROADCAST BIT(1)
256 
261 
267 #endif /* IEEE8021X_EAPOL */
268 
269 #define NUM_WEP_KEYS 4
270 #define MAX_WEP_KEY_LEN 16
271 
275  u8 wep_key[NUM_WEP_KEYS][MAX_WEP_KEY_LEN];
276 
281  size_t wep_key_len[NUM_WEP_KEYS];
282 
288 
309 
320 
321 #ifdef IEEE8021X_EAPOL
322 
330  int leap;
331 
340  int non_leap;
341 
354  unsigned int eap_workaround;
355 
356 #endif /* IEEE8021X_EAPOL */
357 
383  enum wpas_mode {
384  WPAS_MODE_INFRA = 0,
385  WPAS_MODE_IBSS = 1,
386  WPAS_MODE_AP = 2,
387  WPAS_MODE_P2P_GO = 3,
388  WPAS_MODE_P2P_GROUP_FORMATION = 4,
389  WPAS_MODE_MESH = 5,
390  } mode;
391 
402  int disabled;
403 
412 
423  int peerkey;
424 
433  char *id_str;
434 
435 #ifdef CONFIG_IEEE80211W
436 
449  enum mfp_options ieee80211w;
450 #endif /* CONFIG_IEEE80211W */
451 
464 
470 
477 
480  int dot11MeshRetryTimeout; /* msec */
481  int dot11MeshConfirmTimeout; /* msec */
482  int dot11MeshHoldingTimeout; /* msec */
483 
484  int ht40;
485 
486  int vht;
487 
496 
506  int *scan_freq;
507 
516  char *bgscan;
517 
532 
542  int *freq_list;
543 
553 
559 
560 #ifndef P2P_MAX_STORED_CLIENTS
561 #define P2P_MAX_STORED_CLIENTS 100
562 #endif /* P2P_MAX_STORED_CLIENTS */
563 
569 
575 
581 
587 
596 
597 #ifdef CONFIG_HT_OVERRIDES
598 
605  int disable_ht;
606 
614  int disable_ht40;
615 
623  int disable_sgi;
624 
632  int disable_ldpc;
633 
638  int ht40_intolerant;
639 
648  int disable_max_amsdu;
649 
656  int ampdu_factor;
657 
664  int ampdu_density;
665 
672  char *ht_mcs;
673 #endif /* CONFIG_HT_OVERRIDES */
674 
675 #ifdef CONFIG_VHT_OVERRIDES
676 
683  int disable_vht;
684 
689  unsigned int vht_capa;
690 
695  unsigned int vht_capa_mask;
696 
697  int vht_rx_mcs_nss_1, vht_rx_mcs_nss_2,
698  vht_rx_mcs_nss_3, vht_rx_mcs_nss_4,
699  vht_rx_mcs_nss_5, vht_rx_mcs_nss_6,
700  vht_rx_mcs_nss_7, vht_rx_mcs_nss_8;
701  int vht_tx_mcs_nss_1, vht_tx_mcs_nss_2,
702  vht_tx_mcs_nss_3, vht_tx_mcs_nss_4,
703  vht_tx_mcs_nss_5, vht_tx_mcs_nss_6,
704  vht_tx_mcs_nss_7, vht_tx_mcs_nss_8;
705 #endif /* CONFIG_VHT_OVERRIDES */
706 
715 
721 
727 
732  unsigned int auth_failures;
733 
739 
748  void *parent_cred;
749 
750 #ifdef CONFIG_MACSEC
751 
759  int macsec_policy;
760 #endif /* CONFIG_MACSEC */
761 
762 #ifdef CONFIG_HS20
763  int update_identifier;
764 #endif /* CONFIG_HS20 */
765 
766  unsigned int wps_run;
767 
780  int mac_addr;
781 
790 };
791 
792 #endif /* CONFIG_SSID_H */
int p2p_persistent_group
Whether this is a persistent group.
Definition: config_ssid.h:580
int wep_tx_keyidx
Default key index for TX frames using WEP.
Definition: config_ssid.h:287
int no_auto_peer
Do not automatically peer with compatible mesh peers.
Definition: config_ssid.h:789
u8 * bssid_blacklist
List of inacceptable BSSIDs.
Definition: config_ssid.h:139
int export_keys
Whether keys may be exported.
Definition: config_ssid.h:595
int group_cipher
Bitfield of allowed group ciphers, WPA_CIPHER_*.
Definition: config_ssid.h:211
int scan_ssid
Scan this SSID with Probe Requests.
Definition: config_ssid.h:251
u8 go_p2p_dev_addr[ETH_ALEN]
GO's P2P Device Address or all zeros if not set.
Definition: config_ssid.h:159
int psk_set
Whether PSK field is configured.
Definition: config_ssid.h:171
u8 wep_key[NUM_WEP_KEYS][MAX_WEP_KEY_LEN]
WEP keys.
Definition: config_ssid.h:275
int proto
Bitfield of allowed protocols, WPA_PROTO_*.
Definition: config_ssid.h:231
int bssid_set
Whether BSSID is configured for this network.
Definition: config_ssid.h:153
int * freq_list
Array of allowed frequencies or NULL for all.
Definition: config_ssid.h:542
int mac_addr
MAC address policy.
Definition: config_ssid.h:780
size_t wep_key_len[NUM_WEP_KEYS]
WEP key lengths.
Definition: config_ssid.h:281
WPA Supplicant - Common definitions.
size_t ssid_len
Length of the SSID.
Definition: config_ssid.h:121
wpas_mode
IEEE 802.11 operation mode (Infrastucture/IBSS)
Definition: config_ssid.h:383
struct wpa_ssid * next
Next network in global list.
Definition: config_ssid.h:60
void * parent_cred
Pointer to parent wpa_cred entry.
Definition: config_ssid.h:748
u8 * p2p_client_list
List of P2P Clients in a persistent group (GO)
Definition: config_ssid.h:552
int proactive_key_caching
Enable proactive key caching.
Definition: config_ssid.h:308
u8 psk[32]
WPA pre-shared key (256 bits)
Definition: config_ssid.h:165
size_t num_p2p_clients
Number of entries in p2p_client_list.
Definition: config_ssid.h:558
struct eap_peer_config eap
EAP peer configuration for this network.
Definition: config_ssid.h:266
int temporary
Whether this network is temporary and not to be saved.
Definition: config_ssid.h:586
int key_mgmt
Bitfield of allowed key management protocols.
Definition: config_ssid.h:219
int peerkey
Whether PeerKey handshake for direct links is allowed.
Definition: config_ssid.h:423
char * id_str
Network identifier string for external scripts.
Definition: config_ssid.h:433
int leap
Number of EAP methods using LEAP.
Definition: config_ssid.h:330
int mixed_cell
Whether mixed cells are allowed.
Definition: config_ssid.h:319
EAP peer configuration data.
int id
Unique id for the network.
Definition: config_ssid.h:81
unsigned int auth_failures
Number of consecutive authentication failures.
Definition: config_ssid.h:732
int fixed_freq
Use fixed frequency for IBSS.
Definition: config_ssid.h:469
int mem_only_psk
Whether to keep PSK/passphrase only in memory.
Definition: config_ssid.h:199
Definition: os.h:22
Doubly-linked list.
int disabled_for_connect
Whether this network was temporarily disabled.
Definition: config_ssid.h:411
Doubly-linked list.
Definition: list.h:12
char * passphrase
WPA ASCII passphrase.
Definition: config_ssid.h:181
u8 bssid[ETH_ALEN]
BSSID.
Definition: config_ssid.h:133
unsigned int eap_workaround
EAP workarounds enabled.
Definition: config_ssid.h:354
macsec_policy
Definition: ieee802_1x_defs.h:12
struct os_reltime disabled_until
Network block disabled until this time if non-zero.
Definition: config_ssid.h:738
int p2p_group
Network generated as a P2P group (used internally)
Definition: config_ssid.h:574
int dot11MeshMaxRetries
Mesh network plink parameters.
Definition: config_ssid.h:479
u8 * ssid
Service set identifier (network name)
Definition: config_ssid.h:115
int ap_max_inactivity
Timeout in seconds to detect STA's inactivity.
Definition: config_ssid.h:714
char * bgscan
Background scan and roaming parameters or NULL if none.
Definition: config_ssid.h:516
Definition: config_ssid.h:36
struct wpa_ssid * pnext
Next network in per-priority list.
Definition: config_ssid.h:70
int frequency
Channel frequency in megahertz (MHz) for IBSS.
Definition: config_ssid.h:463
int * scan_freq
Array of frequencies to scan or NULL for all.
Definition: config_ssid.h:506
int dtim_period
DTIM period in Beacon intervals By default: 2.
Definition: config_ssid.h:720
int eapol_flags
Bit field of IEEE 802.1X/EAPOL options (EAPOL_FLAG_*)
Definition: config_ssid.h:260
mfp_options
Management frame protection (IEEE 802.11w) options.
Definition: defs.h:291
int bg_scan_period
Background scan period in seconds, 0 to disable, or -1 to indicate no change to default driver config...
Definition: config_ssid.h:225
int pairwise_cipher
Bitfield of allowed pairwise ciphers, WPA_CIPHER_*.
Definition: config_ssid.h:205
int * mesh_basic_rates
BSS Basic rate set for mesh network.
Definition: config_ssid.h:476
struct dl_list psk_list
Per-client PSKs (struct psk_list_entry)
Definition: config_ssid.h:568
int wpa_ptk_rekey
Maximum lifetime for PTK in seconds.
Definition: config_ssid.h:495
int beacon_int
Beacon interval (default: 100 TU)
Definition: config_ssid.h:726
int ignore_broadcast_ssid
Hide SSID in AP mode.
Definition: config_ssid.h:531
int non_leap
Number of EAP methods not using LEAP.
Definition: config_ssid.h:340
char * ext_psk
PSK/passphrase name in external storage.
Definition: config_ssid.h:190
int auth_alg
Bitfield of allowed authentication algorithms.
Definition: config_ssid.h:239
EAP peer configuration/credentials.
Definition: eap_config.h:12
Network configuration data.
Definition: config_ssid.h:52
int priority
Priority group.
Definition: config_ssid.h:101
int disabled
Whether this network is currently disabled.
Definition: config_ssid.h:402
u8 * bssid_whitelist
List of acceptable BSSIDs.
Definition: config_ssid.h:146