config.h
Go to the documentation of this file.
00001 /*
00002  * WPA Supplicant / Configuration file structures
00003  * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #ifndef CONFIG_H
00016 #define CONFIG_H
00017 
00018 #define DEFAULT_EAPOL_VERSION 1
00019 #ifdef CONFIG_NO_SCAN_PROCESSING
00020 #define DEFAULT_AP_SCAN 2
00021 #else /* CONFIG_NO_SCAN_PROCESSING */
00022 #define DEFAULT_AP_SCAN 1
00023 #endif /* CONFIG_NO_SCAN_PROCESSING */
00024 #define DEFAULT_FAST_REAUTH 1
00025 #define DEFAULT_BSS_MAX_COUNT 200
00026 
00027 #include "config_ssid.h"
00028 
00029 
00038 struct wpa_config {
00044         struct wpa_ssid *ssid;
00045 
00049         struct wpa_ssid **pssid;
00050 
00057         int num_prio;
00058 
00069         int eapol_version;
00070 
00098         int ap_scan;
00099 
00152         char *ctrl_interface;
00153 
00161         char *ctrl_interface_group;
00162 
00171         int fast_reauth;
00172 
00179         char *opensc_engine_path;
00180 
00187         char *pkcs11_engine_path;
00188 
00196         char *pkcs11_module_path;
00197 
00206         char *driver_param;
00207 
00214         unsigned int dot11RSNAConfigPMKLifetime;
00215 
00222         unsigned int dot11RSNAConfigPMKReauthThreshold;
00223 
00230         unsigned int dot11RSNAConfigSATimeout;
00231 
00243         int update_config;
00244 
00248         struct wpa_config_blob *blobs;
00249 
00253         u8 uuid[16];
00254 
00260         char *device_name;
00261 
00266         char *manufacturer;
00267 
00272         char *model_name;
00273 
00278         char *model_number;
00279 
00284         char *serial_number;
00285 
00299         char *device_type;
00300 
00309         char *config_methods;
00310 
00315         u8 os_version[4];
00316 
00323         char country[2];
00324 
00334         int wps_cred_processing;
00335 
00339         unsigned int bss_max_count;
00340 
00347         int filter_ssids;
00348 };
00349 
00350 
00351 /* Prototypes for common functions from config.c */
00352 
00353 void wpa_config_free(struct wpa_config *ssid);
00354 void wpa_config_free_ssid(struct wpa_ssid *ssid);
00355 struct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id);
00356 struct wpa_ssid * wpa_config_add_network(struct wpa_config *config);
00357 int wpa_config_remove_network(struct wpa_config *config, int id);
00358 void wpa_config_set_network_defaults(struct wpa_ssid *ssid);
00359 int wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value,
00360                    int line);
00361 char ** wpa_config_get_all(struct wpa_ssid *ssid, int get_keys);
00362 char * wpa_config_get(struct wpa_ssid *ssid, const char *var);
00363 char * wpa_config_get_no_key(struct wpa_ssid *ssid, const char *var);
00364 void wpa_config_update_psk(struct wpa_ssid *ssid);
00365 int wpa_config_add_prio_network(struct wpa_config *config,
00366                                 struct wpa_ssid *ssid);
00367 int wpa_config_update_prio_list(struct wpa_config *config);
00368 const struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config,
00369                                                    const char *name);
00370 void wpa_config_set_blob(struct wpa_config *config,
00371                          struct wpa_config_blob *blob);
00372 void wpa_config_free_blob(struct wpa_config_blob *blob);
00373 int wpa_config_remove_blob(struct wpa_config *config, const char *name);
00374 
00375 struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
00376                                            const char *driver_param);
00377 #ifndef CONFIG_NO_STDOUT_DEBUG
00378 void wpa_config_debug_dump_networks(struct wpa_config *config);
00379 #else /* CONFIG_NO_STDOUT_DEBUG */
00380 #define wpa_config_debug_dump_networks(c) do { } while (0)
00381 #endif /* CONFIG_NO_STDOUT_DEBUG */
00382 
00383 
00384 /* Prototypes for backend specific functions from the selected config_*.c */
00385 
00398 struct wpa_config * wpa_config_read(const char *name);
00399 
00414 int wpa_config_write(const char *name, struct wpa_config *config);
00415 
00416 #endif /* CONFIG_H */


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:25:12