123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714 |
- #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_FAST_REAUTH 1
- #define DEFAULT_P2P_GO_INTENT 7
- #define DEFAULT_P2P_INTRA_BSS 1
- #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
- #include "config_ssid.h"
- #include "wps/wps.h"
- struct wpa_cred {
-
- struct wpa_cred *next;
-
- int id;
-
- int priority;
-
- int pcsc;
-
- char *realm;
-
- char *username;
-
- char *password;
-
- char *ca_cert;
-
- char *client_cert;
-
- char *private_key;
-
- char *private_key_passwd;
-
- char *imsi;
-
- char *milenage;
-
- char *domain;
- };
- #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)
- struct wpa_config {
-
- struct wpa_ssid *ssid;
-
- struct wpa_ssid **pssid;
-
- int num_prio;
-
- struct wpa_cred *cred;
-
- int eapol_version;
-
- int ap_scan;
-
- 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 *pcsc_reader;
-
- char *pcsc_pin;
-
- 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 wpabuf *wps_vendor_ext_m1;
- #define MAX_WPS_VENDOR_EXT 10
-
- struct wpabuf *wps_vendor_ext[MAX_WPS_VENDOR_EXT];
-
- int p2p_group_idle;
-
- unsigned int bss_max_count;
-
- unsigned int bss_expiration_age;
-
- unsigned int bss_expiration_scan_count;
-
- int filter_ssids;
-
- unsigned int max_num_sta;
-
- unsigned int changed_parameters;
-
- int disassoc_low_ack;
-
- int interworking;
-
- int access_network_type;
-
- u8 hessid[ETH_ALEN];
-
- int pbc_in_m1;
- };
- 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);
- 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);
- 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);
- 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);
- struct wpa_config * wpa_config_read(const char *name);
- int wpa_config_write(const char *name, struct wpa_config *config);
- #endif
|