config.h
Go to the documentation of this file.00001
00016 #ifndef CONFIG_H
00017 #define CONFIG_H
00018
00019 #define DEFAULT_EAPOL_VERSION 1
00020 #ifdef CONFIG_NO_SCAN_PROCESSING
00021 #define DEFAULT_AP_SCAN 2
00022 #else
00023 #define DEFAULT_AP_SCAN 1
00024 #endif
00025 #define DEFAULT_FAST_REAUTH 1
00026
00027 #include "config_ssid.h"
00028
00029
00039 struct wpa_config {
00046 struct wpa_ssid *ssid;
00047
00052 struct wpa_ssid **pssid;
00053
00061 int num_prio;
00062
00074 int eapol_version;
00075
00104 int ap_scan;
00105
00159 char *ctrl_interface;
00160
00169 char *ctrl_interface_group;
00170
00180 int fast_reauth;
00181
00182 #ifdef EAP_TLS_OPENSSL
00183
00190 char *opensc_engine_path;
00191
00199 char *pkcs11_engine_path;
00200
00209 char *pkcs11_module_path;
00210 #endif
00211
00221 char *driver_param;
00222
00230 unsigned int dot11RSNAConfigPMKLifetime;
00231
00239 unsigned int dot11RSNAConfigPMKReauthThreshold;
00240
00248 unsigned int dot11RSNAConfigSATimeout;
00249
00262 int update_config;
00263
00268 struct wpa_config_blob *blobs;
00269
00274 u8 uuid[16];
00275
00282 char *device_name;
00283
00289 char *manufacturer;
00290
00296 char *model_name;
00297
00303 char *model_number;
00304
00310 char *serial_number;
00311
00326 char *device_type;
00327
00333 u8 os_version[4];
00334
00342 char country[2];
00343
00354 int wps_cred_processing;
00355 };
00356
00357
00358
00359
00360 void wpa_config_free(struct wpa_config *ssid);
00361 void wpa_config_free_ssid(struct wpa_ssid *ssid);
00362 struct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id);
00363 struct wpa_ssid * wpa_config_add_network(struct wpa_config *config);
00364 int wpa_config_remove_network(struct wpa_config *config, int id);
00365 void wpa_config_set_network_defaults(struct wpa_ssid *ssid);
00366 int wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value,
00367 int line);
00368 char ** wpa_config_get_all(struct wpa_ssid *ssid, int get_keys);
00369 char * wpa_config_get(struct wpa_ssid *ssid, const char *var);
00370 char * wpa_config_get_no_key(struct wpa_ssid *ssid, const char *var);
00371 void wpa_config_update_psk(struct wpa_ssid *ssid);
00372 int wpa_config_add_prio_network(struct wpa_config *config,
00373 struct wpa_ssid *ssid);
00374 const struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config,
00375 const char *name);
00376 void wpa_config_set_blob(struct wpa_config *config,
00377 struct wpa_config_blob *blob);
00378 void wpa_config_free_blob(struct wpa_config_blob *blob);
00379 int wpa_config_remove_blob(struct wpa_config *config, const char *name);
00380
00381 struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
00382 const char *driver_param);
00383 #ifndef CONFIG_NO_STDOUT_DEBUG
00384 void wpa_config_debug_dump_networks(struct wpa_config *config);
00385 #else
00386 #define wpa_config_debug_dump_networks(c) do { } while (0)
00387 #endif
00388
00389
00390
00391
00405 struct wpa_config * wpa_config_read(const char *name);
00406
00422 int wpa_config_write(const char *name, struct wpa_config *config);
00423
00424 #endif
00425