X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=wpa_supplicant%2Fconfig.h;h=246c65fc3e59e1405eddfc7ed0f034fd41139ab8;hb=HEAD;hp=b05576d409a5370a4d51fd1c8c9e9f8d07d72be9;hpb=f855f923a735c38b0ec918f3302173bf3e8e7a7f;p=libeap.git diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h index b05576d..246c65f 100644 --- a/wpa_supplicant/config.h +++ b/wpa_supplicant/config.h @@ -22,10 +22,24 @@ #define DEFAULT_AP_SCAN 1 #endif /* CONFIG_NO_SCAN_PROCESSING */ #define DEFAULT_FAST_REAUTH 1 +#define DEFAULT_P2P_GO_INTENT 7 +#define DEFAULT_P2P_INTRA_BSS 1 +#define DEFAULT_BSS_MAX_COUNT 200 #include "config_ssid.h" +#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) + /** * struct wpa_config - wpa_supplicant configuration data * @@ -154,7 +168,7 @@ struct wpa_config { * ctrl_interface_group - Control interface group (DEPRECATED) * * This variable is only used for backwards compatibility. Group for - * UNIX domain sockets should now be specified using GROUP= in + * UNIX domain sockets should now be specified using GROUP=group in * ctrl_interface variable. */ char *ctrl_interface_group; @@ -169,7 +183,6 @@ struct wpa_config { */ int fast_reauth; -#ifdef EAP_TLS_OPENSSL /** * opensc_engine_path - Path to the OpenSSL engine for opensc * @@ -194,7 +207,6 @@ struct wpa_config { * module is not loaded. */ char *pkcs11_module_path; -#endif /* EAP_TLS_OPENSSL */ /** * driver_param - Driver interface parameters @@ -252,6 +264,124 @@ struct wpa_config { * uuid - Universally Unique IDentifier (UUID; see RFC 4122) for WPS */ u8 uuid[16]; + + /** + * device_name - Device Name (WPS) + * User-friendly description of device; up to 32 octets encoded in + * UTF-8 + */ + char *device_name; + + /** + * manufacturer - Manufacturer (WPS) + * The manufacturer of the device (up to 64 ASCII characters) + */ + char *manufacturer; + + /** + * model_name - Model Name (WPS) + * Model of the device (up to 32 ASCII characters) + */ + char *model_name; + + /** + * model_number - Model Number (WPS) + * Additional device description (up to 32 ASCII characters) + */ + char *model_number; + + /** + * serial_number - Serial Number (WPS) + * Serial number of the device (up to 32 characters) + */ + char *serial_number; + + /** + * device_type - Primary Device Type (WPS) + * Used format: categ-OUI-subcateg + * categ = Category as an integer value + * OUI = OUI and type octet as a 4-octet hex-encoded value; + * 0050F204 for default WPS OUI + * subcateg = OUI-specific Sub Category as an integer value + * Examples: + * 1-0050F204-1 (Computer / PC) + * 1-0050F204-2 (Computer / Server) + * 5-0050F204-1 (Storage / NAS) + * 6-0050F204-1 (Network Infrastructure / AP) + */ + char *device_type; + + /** + * config_methods - Config Methods + * + * This is a space-separated list of supported WPS configuration + * methods. For example, "label virtual_display virtual_push_button + * keypad". + * Available methods: usba ethernet label display ext_nfc_token + * int_nfc_token nfc_interface push_button keypad + * virtual_display physical_display + * virtual_push_button physical_push_button. + */ + char *config_methods; + + /** + * os_version - OS Version (WPS) + * 4-octet operating system version number + */ + u8 os_version[4]; + + /** + * country - Country code + * + * This is the ISO/IEC alpha2 country code for which we are operating + * in + */ + char country[2]; + + /** + * wps_cred_processing - Credential processing + * + * 0 = process received credentials internally + * 1 = do not process received credentials; just pass them over + * ctrl_iface to external program(s) + * 2 = process received credentials internally and pass them over + * ctrl_iface to external program(s) + */ + int wps_cred_processing; + +#define MAX_SEC_DEVICE_TYPES 5 + /** + * sec_device_type - Secondary Device Types (P2P) + * See device_type for the format used with these. + */ + char *sec_device_type[MAX_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; + + /** + * bss_max_count - Maximum number of BSS entries to keep in memory + */ + unsigned int bss_max_count; + + /** + * filter_ssids - SSID-based scan result filtering + * + * 0 = do not filter scan results + * 1 = only include configured SSIDs in scan results/BSS table + */ + int filter_ssids; + + /** + * changed_parameters - Bitmap of changed parameters since last update + */ + unsigned int changed_parameters; }; @@ -265,11 +395,13 @@ 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); +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, @@ -286,6 +418,10 @@ void wpa_config_debug_dump_networks(struct wpa_config *config); #endif /* CONFIG_NO_STDOUT_DEBUG */ +/* Prototypes for common functions from config.c */ +int wpa_config_process_global(struct wpa_config *config, char *pos, int line); + + /* Prototypes for backend specific functions from the selected config_*.c */ /**