1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426 |
- #ifndef CONFIG_H
- #define CONFIG_H
- #define DEFAULT_EAPOL_VERSION 1
- #ifdef CONFIG_NO_SCAN_PROCESSING
- #define DEFAULT_AP_SCAN 2
- #else
- #define DEFAULT_AP_SCAN 1
- #endif
- #define DEFAULT_USER_MPM 1
- #define DEFAULT_MAX_PEER_LINKS 99
- #define DEFAULT_MESH_MAX_INACTIVITY 300
- #define DEFAULT_DOT11_RSNA_SAE_RETRANS_PERIOD 1000
- #define DEFAULT_FAST_REAUTH 1
- #define DEFAULT_P2P_GO_INTENT 7
- #define DEFAULT_P2P_INTRA_BSS 1
- #define DEFAULT_P2P_GO_MAX_INACTIVITY (5 * 60)
- #define DEFAULT_P2P_OPTIMIZE_LISTEN_CHAN 0
- #define DEFAULT_BSS_MAX_COUNT 200
- #define DEFAULT_BSS_EXPIRATION_AGE 180
- #define DEFAULT_BSS_EXPIRATION_SCAN_COUNT 2
- #define DEFAULT_MAX_NUM_STA 128
- #define DEFAULT_ACCESS_NETWORK_TYPE 15
- #define DEFAULT_SCAN_CUR_FREQ 0
- #define DEFAULT_P2P_SEARCH_DELAY 500
- #define DEFAULT_RAND_ADDR_LIFETIME 60
- #define DEFAULT_KEY_MGMT_OFFLOAD 1
- #define DEFAULT_CERT_IN_CB 1
- #define DEFAULT_P2P_GO_CTWINDOW 0
- #define DEFAULT_WPA_RSC_RELAXATION 1
- #define DEFAULT_MBO_CELL_CAPA MBO_CELL_CAPA_NOT_SUPPORTED
- #include "config_ssid.h"
- #include "wps/wps.h"
- #include "common/ieee802_11_defs.h"
- #include "common/ieee802_11_common.h"
- struct wpa_cred {
-
- struct wpa_cred *next;
-
- int id;
-
- int temporary;
-
- int priority;
-
- int pcsc;
-
- char *realm;
-
- char *username;
-
- char *password;
-
- int ext_password;
-
- char *ca_cert;
-
- char *client_cert;
-
- char *private_key;
-
- char *private_key_passwd;
-
- char *imsi;
-
- char *milenage;
-
- char *domain_suffix_match;
-
- char **domain;
-
- size_t num_domain;
-
- u8 roaming_consortium[15];
-
- size_t roaming_consortium_len;
- u8 required_roaming_consortium[15];
- size_t required_roaming_consortium_len;
-
- struct eap_method_type *eap_method;
-
- char *phase1;
-
- char *phase2;
- struct excluded_ssid {
- u8 ssid[SSID_MAX_LEN];
- size_t ssid_len;
- } *excluded_ssid;
- size_t num_excluded_ssid;
- struct roaming_partner {
- char fqdn[128];
- int exact_match;
- u8 priority;
- char country[3];
- } *roaming_partner;
- size_t num_roaming_partner;
- int update_identifier;
-
- char *provisioning_sp;
-
- int sp_priority;
- unsigned int min_dl_bandwidth_home;
- unsigned int min_ul_bandwidth_home;
- unsigned int min_dl_bandwidth_roaming;
- unsigned int min_ul_bandwidth_roaming;
-
- unsigned int max_bss_load;
- unsigned int num_req_conn_capab;
- u8 *req_conn_capab_proto;
- int **req_conn_capab_port;
-
- int ocsp;
-
- int sim_num;
- };
- #define CFG_CHANGED_DEVICE_NAME BIT(0)
- #define CFG_CHANGED_CONFIG_METHODS BIT(1)
- #define CFG_CHANGED_DEVICE_TYPE BIT(2)
- #define CFG_CHANGED_OS_VERSION BIT(3)
- #define CFG_CHANGED_UUID BIT(4)
- #define CFG_CHANGED_COUNTRY BIT(5)
- #define CFG_CHANGED_SEC_DEVICE_TYPE BIT(6)
- #define CFG_CHANGED_P2P_SSID_POSTFIX BIT(7)
- #define CFG_CHANGED_WPS_STRING BIT(8)
- #define CFG_CHANGED_P2P_INTRA_BSS BIT(9)
- #define CFG_CHANGED_VENDOR_EXTENSION BIT(10)
- #define CFG_CHANGED_P2P_LISTEN_CHANNEL BIT(11)
- #define CFG_CHANGED_P2P_OPER_CHANNEL BIT(12)
- #define CFG_CHANGED_P2P_PREF_CHAN BIT(13)
- #define CFG_CHANGED_EXT_PW_BACKEND BIT(14)
- #define CFG_CHANGED_NFC_PASSWORD_TOKEN BIT(15)
- #define CFG_CHANGED_P2P_PASSPHRASE_LEN BIT(16)
- #define CFG_CHANGED_SCHED_SCAN_PLANS BIT(17)
- struct wpa_config {
-
- struct wpa_ssid *ssid;
-
- struct wpa_ssid **pssid;
-
- int num_prio;
-
- struct wpa_cred *cred;
-
- int eapol_version;
-
- int ap_scan;
-
- char *bgscan;
-
- int disable_scan_offload;
-
- char *ctrl_interface;
-
- char *ctrl_interface_group;
-
- int fast_reauth;
-
- char *opensc_engine_path;
-
- char *pkcs11_engine_path;
-
- char *pkcs11_module_path;
-
- char *openssl_ciphers;
-
- char *pcsc_reader;
-
- char *pcsc_pin;
-
- int external_sim;
-
- char *driver_param;
-
- unsigned int dot11RSNAConfigPMKLifetime;
-
- unsigned int dot11RSNAConfigPMKReauthThreshold;
-
- unsigned int dot11RSNAConfigSATimeout;
-
- int update_config;
-
- struct wpa_config_blob *blobs;
-
- u8 uuid[16];
-
- char *device_name;
-
- char *manufacturer;
-
- char *model_name;
-
- char *model_number;
-
- char *serial_number;
-
- u8 device_type[WPS_DEV_TYPE_LEN];
-
- char *config_methods;
-
- u8 os_version[4];
-
- char country[2];
-
- int wps_cred_processing;
- #define MAX_SEC_DEVICE_TYPES 5
-
- u8 sec_device_type[MAX_SEC_DEVICE_TYPES][WPS_DEV_TYPE_LEN];
- int num_sec_device_types;
- int p2p_listen_reg_class;
- int p2p_listen_channel;
- int p2p_oper_reg_class;
- int p2p_oper_channel;
- int p2p_go_intent;
- char *p2p_ssid_postfix;
- int persistent_reconnect;
- int p2p_intra_bss;
- unsigned int num_p2p_pref_chan;
- struct p2p_channel *p2p_pref_chan;
- struct wpa_freq_range_list p2p_no_go_freq;
- int p2p_add_cli_chan;
- int p2p_ignore_shared_freq;
- int p2p_optimize_listen_chan;
- struct wpabuf *wps_vendor_ext_m1;
- #define MAX_WPS_VENDOR_EXT 10
-
- struct wpabuf *wps_vendor_ext[MAX_WPS_VENDOR_EXT];
-
- int p2p_group_idle;
-
- enum {
- P2P_GO_FREQ_MOVE_SCM = 0,
- P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS = 1,
- P2P_GO_FREQ_MOVE_STAY = 2,
- P2P_GO_FREQ_MOVE_SCM_ECSA = 3,
- P2P_GO_FREQ_MOVE_MAX = P2P_GO_FREQ_MOVE_SCM_ECSA,
- } p2p_go_freq_change_policy;
- #define DEFAULT_P2P_GO_FREQ_MOVE P2P_GO_FREQ_MOVE_STAY
-
- unsigned int p2p_passphrase_len;
-
- unsigned int bss_max_count;
-
- unsigned int bss_expiration_age;
-
- unsigned int bss_expiration_scan_count;
-
- int filter_ssids;
-
- int filter_rssi;
-
- unsigned int max_num_sta;
-
- int *freq_list;
-
- int scan_cur_freq;
-
- unsigned int changed_parameters;
-
- int disassoc_low_ack;
-
- int interworking;
-
- int access_network_type;
-
- u8 hessid[ETH_ALEN];
-
- int hs20;
-
- int pbc_in_m1;
-
- char *autoscan;
-
- int wps_nfc_pw_from_config;
-
- int wps_nfc_dev_pw_id;
-
- struct wpabuf *wps_nfc_dh_pubkey;
-
- struct wpabuf *wps_nfc_dh_privkey;
-
- struct wpabuf *wps_nfc_dev_pw;
-
- char *ext_password_backend;
-
- int p2p_go_max_inactivity;
- struct hostapd_wmm_ac_params wmm_ac_params[4];
-
- int auto_interworking;
-
- int p2p_go_ht40;
-
- int p2p_go_vht;
-
- int p2p_go_ctwindow;
-
- int p2p_disabled;
-
- int p2p_no_group_iface;
-
- int p2p_cli_probe;
-
- int okc;
-
- enum mfp_options pmf;
-
- int *sae_groups;
-
- int dtim_period;
-
- int beacon_int;
-
- struct wpabuf *ap_vendor_elements;
-
- int ignore_old_scan_res;
-
- unsigned int sched_scan_interval;
-
- int tdls_external_control;
- u8 ip_addr_go[4];
- u8 ip_addr_mask[4];
- u8 ip_addr_start[4];
- u8 ip_addr_end[4];
-
- char *osu_dir;
-
- char *wowlan_triggers;
-
- unsigned int p2p_search_delay;
-
- int mac_addr;
-
- unsigned int rand_addr_lifetime;
-
- int preassoc_mac_addr;
-
- int key_mgmt_offload;
-
- int user_mpm;
-
- int max_peer_links;
-
- int cert_in_cb;
-
- int mesh_max_inactivity;
-
- int dot11RSNASAERetransPeriod;
-
- int passive_scan;
-
- int reassoc_same_bss_optim;
-
- int wps_priority;
-
- char *fst_group_id;
-
- int fst_priority;
-
- int fst_llt;
-
- int wpa_rsc_relaxation;
-
- char *sched_scan_plans;
- #ifdef CONFIG_MBO
-
- char *non_pref_chan;
-
- enum mbo_cellular_capa mbo_cell_capa;
- #endif
-
- int gas_address3;
-
- int ftm_responder;
-
- int ftm_initiator;
- };
- void wpa_config_free(struct wpa_config *ssid);
- void wpa_config_free_ssid(struct wpa_ssid *ssid);
- void wpa_config_foreach_network(struct wpa_config *config,
- void (*func)(void *, struct wpa_ssid *),
- void *arg);
- struct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id);
- struct wpa_ssid * wpa_config_add_network(struct wpa_config *config);
- int wpa_config_remove_network(struct wpa_config *config, int id);
- void wpa_config_set_network_defaults(struct wpa_ssid *ssid);
- int wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value,
- int line);
- int wpa_config_set_quoted(struct wpa_ssid *ssid, const char *var,
- const char *value);
- int wpa_config_dump_values(struct wpa_config *config, char *buf,
- size_t buflen);
- int wpa_config_get_value(const char *name, struct wpa_config *config,
- char *buf, size_t buflen);
- char ** wpa_config_get_all(struct wpa_ssid *ssid, int get_keys);
- char * wpa_config_get(struct wpa_ssid *ssid, const char *var);
- char * wpa_config_get_no_key(struct wpa_ssid *ssid, const char *var);
- void wpa_config_update_psk(struct wpa_ssid *ssid);
- int wpa_config_add_prio_network(struct wpa_config *config,
- struct wpa_ssid *ssid);
- int wpa_config_update_prio_list(struct wpa_config *config);
- const struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config,
- const char *name);
- void wpa_config_set_blob(struct wpa_config *config,
- struct wpa_config_blob *blob);
- void wpa_config_free_blob(struct wpa_config_blob *blob);
- int wpa_config_remove_blob(struct wpa_config *config, const char *name);
- void wpa_config_flush_blobs(struct wpa_config *config);
- struct wpa_cred * wpa_config_get_cred(struct wpa_config *config, int id);
- struct wpa_cred * wpa_config_add_cred(struct wpa_config *config);
- int wpa_config_remove_cred(struct wpa_config *config, int id);
- void wpa_config_free_cred(struct wpa_cred *cred);
- int wpa_config_set_cred(struct wpa_cred *cred, const char *var,
- const char *value, int line);
- char * wpa_config_get_cred_no_key(struct wpa_cred *cred, const char *var);
- struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
- const char *driver_param);
- #ifndef CONFIG_NO_STDOUT_DEBUG
- void wpa_config_debug_dump_networks(struct wpa_config *config);
- #else
- #define wpa_config_debug_dump_networks(c) do { } while (0)
- #endif
- int wpa_config_process_global(struct wpa_config *config, char *pos, int line);
- int wpa_config_get_num_global_field_names(void);
- const char * wpa_config_get_global_field_name(unsigned int i, int *no_var);
- struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp);
- int wpa_config_write(const char *name, struct wpa_config *config);
- #endif
|