hostapd
config_ssid.h
1 /*
2  * WPA Supplicant / Network configuration structures
3  * Copyright (c) 2003-2013, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef CONFIG_SSID_H
10 #define CONFIG_SSID_H
11 
12 #include "common/defs.h"
13 #include "utils/list.h"
14 #include "eap_peer/eap_config.h"
15 
16 
17 #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1)
18 #define DEFAULT_EAPOL_FLAGS (EAPOL_FLAG_REQUIRE_KEY_UNICAST | \
19  EAPOL_FLAG_REQUIRE_KEY_BROADCAST)
20 #define DEFAULT_PROTO (WPA_PROTO_WPA | WPA_PROTO_RSN)
21 #define DEFAULT_KEY_MGMT (WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_IEEE8021X)
22 #define DEFAULT_PAIRWISE (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP)
23 #define DEFAULT_GROUP (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP)
24 #define DEFAULT_FRAGMENT_SIZE 1398
25 
26 #define DEFAULT_BG_SCAN_PERIOD -1
27 #define DEFAULT_MESH_MAX_RETRIES 2
28 #define DEFAULT_MESH_RETRY_TIMEOUT 40
29 #define DEFAULT_MESH_CONFIRM_TIMEOUT 40
30 #define DEFAULT_MESH_HOLDING_TIMEOUT 40
31 #define DEFAULT_DISABLE_HT 0
32 #define DEFAULT_DISABLE_HT40 0
33 #define DEFAULT_DISABLE_SGI 0
34 #define DEFAULT_DISABLE_LDPC 0
35 #define DEFAULT_DISABLE_MAX_AMSDU -1 /* no change */
36 #define DEFAULT_AMPDU_FACTOR -1 /* no change */
37 #define DEFAULT_AMPDU_DENSITY -1 /* no change */
38 #define DEFAULT_USER_SELECTED_SIM 1
39 
41  struct dl_list list;
42  u8 addr[ETH_ALEN];
43  u8 psk[32];
44  u8 p2p;
45 };
46 
55 struct wpa_ssid {
62  struct wpa_ssid *next;
63 
71  struct wpa_ssid *pnext;
72 
81  int id;
82 
100  int priority;
101 
113  u8 *ssid;
114 
118  size_t ssid_len;
119 
129  u8 bssid[ETH_ALEN];
130 
135  size_t num_bssid_blacklist;
136 
141  size_t num_bssid_whitelist;
142 
147 
151  u8 go_p2p_dev_addr[ETH_ALEN];
152 
156  u8 psk[32];
157 
161  int psk_set;
162 
170  char *passphrase;
171 
178  char *ext_psk;
179 
187 
192 
197 
203  int key_mgmt;
204 
210 
214  int proto;
215 
221  int auth_alg;
222 
233 
234 #ifdef IEEE8021X_EAPOL
235 #define EAPOL_FLAG_REQUIRE_KEY_UNICAST BIT(0)
236 #define EAPOL_FLAG_REQUIRE_KEY_BROADCAST BIT(1)
237 
240  int eapol_flags;
241 
245  struct eap_peer_config eap;
246 #endif /* IEEE8021X_EAPOL */
247 
248 #define NUM_WEP_KEYS 4
249 #define MAX_WEP_KEY_LEN 16
250 
253  u8 wep_key[NUM_WEP_KEYS][MAX_WEP_KEY_LEN];
254 
258  size_t wep_key_len[NUM_WEP_KEYS];
259 
264 
284 
294 
295 #ifdef IEEE8021X_EAPOL
296 
303  int leap;
304 
312  int non_leap;
313 
325  unsigned int eap_workaround;
326 
327 #endif /* IEEE8021X_EAPOL */
328 
353  enum wpas_mode {
354  WPAS_MODE_INFRA = 0,
355  WPAS_MODE_IBSS = 1,
356  WPAS_MODE_AP = 2,
357  WPAS_MODE_P2P_GO = 3,
358  WPAS_MODE_P2P_GROUP_FORMATION = 4,
359  WPAS_MODE_MESH = 5,
360  } mode;
361 
373  int pbss;
374 
384  int disabled;
385 
393 
403  int peerkey;
404 
412  char *id_str;
413 
414 #ifdef CONFIG_IEEE80211W
415 
427  enum mfp_options ieee80211w;
428 #endif /* CONFIG_IEEE80211W */
429 
441 
446 
447 #ifdef CONFIG_ACS
448 
456  int acs;
457 #endif /* CONFIG_ACS */
458 
464 
469  int dot11MeshRetryTimeout; /* msec */
470  int dot11MeshConfirmTimeout; /* msec */
471  int dot11MeshHoldingTimeout; /* msec */
472 
473  int ht40;
474 
475  int vht;
476 
477  u8 max_oper_chwidth;
478 
479  unsigned int vht_center_freq2;
480 
488 
496 
505  int *scan_freq;
506 
514  char *bgscan;
515 
529 
538  int *freq_list;
539 
548 
553 
554 #ifndef P2P_MAX_STORED_CLIENTS
555 #define P2P_MAX_STORED_CLIENTS 100
556 #endif /* P2P_MAX_STORED_CLIENTS */
557 
561  struct dl_list psk_list;
562 
567 
572 
577 
585 
586 #ifdef CONFIG_HT_OVERRIDES
587 
593  int disable_ht;
594 
601  int disable_ht40;
602 
609  int disable_sgi;
610 
617  int disable_ldpc;
618 
622  int ht40_intolerant;
623 
631  int disable_max_amsdu;
632 
638  int ampdu_factor;
639 
645  int ampdu_density;
646 
652  char *ht_mcs;
653 #endif /* CONFIG_HT_OVERRIDES */
654 
655 #ifdef CONFIG_VHT_OVERRIDES
656 
662  int disable_vht;
663 
667  unsigned int vht_capa;
668 
672  unsigned int vht_capa_mask;
673 
674  int vht_rx_mcs_nss_1, vht_rx_mcs_nss_2,
675  vht_rx_mcs_nss_3, vht_rx_mcs_nss_4,
676  vht_rx_mcs_nss_5, vht_rx_mcs_nss_6,
677  vht_rx_mcs_nss_7, vht_rx_mcs_nss_8;
678  int vht_tx_mcs_nss_1, vht_tx_mcs_nss_2,
679  vht_tx_mcs_nss_3, vht_tx_mcs_nss_4,
680  vht_tx_mcs_nss_5, vht_tx_mcs_nss_6,
681  vht_tx_mcs_nss_7, vht_tx_mcs_nss_8;
682 #endif /* CONFIG_VHT_OVERRIDES */
683 
691 
697 
702 
706  unsigned int auth_failures;
707 
711  struct os_reltime disabled_until;
712 
720  void *parent_cred;
721 
722 #ifdef CONFIG_MACSEC
723 
730  int macsec_policy;
731 
742  int macsec_integ_only;
743 
751  int macsec_port;
752 
758  int mka_priority;
759 
763 #define MACSEC_CKN_LEN 32
764  u8 mka_ckn[MACSEC_CKN_LEN];
765 
769 #define MACSEC_CAK_LEN 16
770  u8 mka_cak[MACSEC_CAK_LEN];
771 
772 #define MKA_PSK_SET_CKN BIT(0)
773 #define MKA_PSK_SET_CAK BIT(1)
774 #define MKA_PSK_SET (MKA_PSK_SET_CKN | MKA_PSK_SET_CAK)
775 
778  u8 mka_psk_set;
779 #endif /* CONFIG_MACSEC */
780 
781 #ifdef CONFIG_HS20
782  int update_identifier;
783 #endif /* CONFIG_HS20 */
784 
785  unsigned int wps_run;
786 
798  int mac_addr;
799 
807 
815 };
816 
817 #endif /* CONFIG_SSID_H */
int p2p_persistent_group
p2p_persistent_group - Whether this is a persistent group
Definition: config_ssid.h:571
int wep_tx_keyidx
wep_tx_keyidx - Default key index for TX frames using WEP
Definition: config_ssid.h:263
int no_auto_peer
no_auto_peer - Do not automatically peer with compatible mesh peers
Definition: config_ssid.h:806
u8 * bssid_blacklist
bssid_blacklist - List of inacceptable BSSIDs
Definition: config_ssid.h:134
int export_keys
export_keys - Whether keys may be exported
Definition: config_ssid.h:584
int group_cipher
group_cipher - Bitfield of allowed group ciphers, WPA_CIPHER_*
Definition: config_ssid.h:196
int scan_ssid
scan_ssid - Scan this SSID with Probe Requests
Definition: config_ssid.h:232
u8 go_p2p_dev_addr[ETH_ALEN]
go_p2p_dev_addr - GO&#39;s P2P Device Address or all zeros if not set
Definition: config_ssid.h:151
int psk_set
psk_set - Whether PSK field is configured
Definition: config_ssid.h:161
int proto
proto - Bitfield of allowed protocols, WPA_PROTO_*
Definition: config_ssid.h:214
int bssid_set
bssid_set - Whether BSSID is configured for this network
Definition: config_ssid.h:146
int * freq_list
freq_list - Array of allowed frequencies or NULL for all
Definition: config_ssid.h:538
int mac_addr
mac_addr - MAC address policy
Definition: config_ssid.h:798
size_t ssid_len
ssid_len - Length of the SSID
Definition: config_ssid.h:118
wpas_mode
mode - IEEE 802.11 operation mode (Infrastucture/IBSS)
Definition: config_ssid.h:353
struct wpa_ssid * next
next - Next network in global list
Definition: config_ssid.h:62
void * parent_cred
parent_cred - Pointer to parent wpa_cred entry
Definition: config_ssid.h:720
u8 * p2p_client_list
p2p_client_list - List of P2P Clients in a persistent group (GO)
Definition: config_ssid.h:547
int proactive_key_caching
proactive_key_caching - Enable proactive key caching
Definition: config_ssid.h:283
u8 psk[32]
psk - WPA pre-shared key (256 bits)
Definition: config_ssid.h:156
size_t num_p2p_clients
num_p2p_clients - Number of entries in p2p_client_list
Definition: config_ssid.h:552
int temporary
temporary - Whether this network is temporary and not to be saved
Definition: config_ssid.h:576
int pbss
pbss - Whether to use PBSS.
Definition: config_ssid.h:373
int key_mgmt
key_mgmt - Bitfield of allowed key management protocols
Definition: config_ssid.h:203
int peerkey
peerkey - Whether PeerKey handshake for direct links is allowed
Definition: config_ssid.h:403
char * id_str
id_str - Network identifier string for external scripts
Definition: config_ssid.h:412
int mixed_cell
mixed_cell - Whether mixed cells are allowed
Definition: config_ssid.h:293
int id
id - Unique id for the network
Definition: config_ssid.h:81
unsigned int auth_failures
auth_failures - Number of consecutive authentication failures
Definition: config_ssid.h:706
int fixed_freq
fixed_freq - Use fixed frequency for IBSS
Definition: config_ssid.h:445
int mem_only_psk
mem_only_psk - Whether to keep PSK/passphrase only in memory
Definition: config_ssid.h:186
Definition: os.h:26
int disabled_for_connect
disabled_for_connect - Whether this network was temporarily disabled
Definition: config_ssid.h:392
struct dl_list - Doubly-linked list
Definition: list.h:15
char * passphrase
passphrase - WPA ASCII passphrase
Definition: config_ssid.h:170
u8 bssid[ETH_ALEN]
bssid - BSSID
Definition: config_ssid.h:129
int p2p_group
p2p_group - Network generated as a P2P group (used internally)
Definition: config_ssid.h:566
int dot11MeshMaxRetries
Mesh network plink parameters.
Definition: config_ssid.h:468
u8 * ssid
ssid - Service set identifier (network name)
Definition: config_ssid.h:113
int ap_max_inactivity
ap_max_inactivity - Timeout in seconds to detect STA&#39;s inactivity
Definition: config_ssid.h:690
char * bgscan
bgscan - Background scan and roaming parameters or NULL if none
Definition: config_ssid.h:514
Definition: config_ssid.h:40
struct wpa_ssid * pnext
pnext - Next network in per-priority list
Definition: config_ssid.h:71
int frequency
frequency - Channel frequency in megahertz (MHz) for IBSS
Definition: config_ssid.h:440
int * scan_freq
scan_freq - Array of frequencies to scan or NULL for all
Definition: config_ssid.h:505
int dtim_period
dtim_period - DTIM period in Beacon intervals By default: 2
Definition: config_ssid.h:696
int group_rekey
group_rekey - Group rekeying time in seconds
Definition: config_ssid.h:495
int bg_scan_period
bg_scan_period - Background scan period in seconds, 0 to disable, or -1 to indicate no change to defa...
Definition: config_ssid.h:209
int pairwise_cipher
pairwise_cipher - Bitfield of allowed pairwise ciphers, WPA_CIPHER_*
Definition: config_ssid.h:191
int * mesh_basic_rates
mesh_basic_rates - BSS Basic rate set for mesh network
Definition: config_ssid.h:463
int wpa_ptk_rekey
wpa_ptk_rekey - Maximum lifetime for PTK in seconds
Definition: config_ssid.h:487
int beacon_int
beacon_int - Beacon interval (default: 100 TU)
Definition: config_ssid.h:701
int ignore_broadcast_ssid
ignore_broadcast_ssid - Hide SSID in AP mode
Definition: config_ssid.h:528
int wps_disabled
wps_disabled - WPS disabled in AP mode
Definition: config_ssid.h:814
char * ext_psk
ext_psk - PSK/passphrase name in external storage
Definition: config_ssid.h:178
int auth_alg
auth_alg - Bitfield of allowed authentication algorithms
Definition: config_ssid.h:221
struct eap_peer_config - EAP peer configuration/credentials
Definition: eap_config.h:15
struct wpa_ssid - Network configuration data
Definition: config_ssid.h:55
int priority
priority - Priority group
Definition: config_ssid.h:100
int disabled
disabled - Whether this network is currently disabled
Definition: config_ssid.h:384
u8 * bssid_whitelist
bssid_blacklist - List of acceptable BSSIDs
Definition: config_ssid.h:140