config.h

Go to the documentation of this file.
00001 
00016 #ifndef CONFIG_H
00017 #define CONFIG_H
00018 
00019 #ifdef CONFIG_CTRL_IFACE
00020 #ifndef CONFIG_CTRL_IFACE_UDP
00021 #include <grp.h>
00022 #endif /* CONFIG_CTRL_IFACE_UDP */
00023 #endif /* CONFIG_CTRL_IFACE */
00024 
00025 #define DEFAULT_EAPOL_VERSION 1
00026 #define DEFAULT_AP_SCAN 1
00027 #define DEFAULT_FAST_REAUTH 1
00028 
00029 #include "config_ssid.h"
00030 
00039 struct wpa_config_blob {
00044         char *name;
00045 
00050         u8 *data;
00051 
00056         size_t len;
00057 
00062         struct wpa_config_blob *next;
00063 };
00064 
00065 
00075 struct wpa_config {
00082         struct wpa_ssid *ssid;
00083 
00088         struct wpa_ssid **pssid;
00089 
00097         int num_prio;
00098 
00110         int eapol_version;
00111 
00140         int ap_scan;
00141 
00151         char *ctrl_interface;
00152 
00153 #ifdef CONFIG_CTRL_IFACE
00154 #ifndef CONFIG_CTRL_IFACE_UDP
00155 
00173         gid_t ctrl_interface_gid;
00174 #endif /* CONFIG_CTRL_IFACE_UDP */
00175 
00183         int ctrl_interface_gid_set;
00184 #endif /* CONFIG_CTRL_IFACE */
00185 
00195         int fast_reauth;
00196 
00204         char *opensc_engine_path;
00205 
00213         char *pkcs11_engine_path;
00214 
00223         char *pkcs11_module_path;
00224 
00234         char *driver_param;
00235 
00243         unsigned int dot11RSNAConfigPMKLifetime;
00244 
00252         unsigned int dot11RSNAConfigPMKReauthThreshold;
00253 
00261         unsigned int dot11RSNAConfigSATimeout;
00262 
00275         int update_config;
00276 
00281         struct wpa_config_blob *blobs;
00282 };
00283 
00284 
00285 /* Prototypes for common functions from config.c */
00286 
00287 void wpa_config_free(struct wpa_config *ssid);
00288 void wpa_config_free_ssid(struct wpa_ssid *ssid);
00289 struct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id);
00290 struct wpa_ssid * wpa_config_add_network(struct wpa_config *config);
00291 int wpa_config_remove_network(struct wpa_config *config, int id);
00292 void wpa_config_set_network_defaults(struct wpa_ssid *ssid);
00293 int wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value,
00294                    int line);
00295 char * wpa_config_get(struct wpa_ssid *ssid, const char *var);
00296 void wpa_config_update_psk(struct wpa_ssid *ssid);
00297 int wpa_config_add_prio_network(struct wpa_config *config,
00298                                 struct wpa_ssid *ssid);
00299 
00300 const struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config,
00301                                                    const char *name);
00302 void wpa_config_set_blob(struct wpa_config *config,
00303                          struct wpa_config_blob *blob);
00304 void wpa_config_free_blob(struct wpa_config_blob *blob);
00305 int wpa_config_remove_blob(struct wpa_config *config, const char *name);
00306 struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
00307                                            const char *driver_param);
00308 
00309 
00310 /* Prototypes for backend specific functions from the selected config_*.c */
00311 
00325 struct wpa_config * wpa_config_read(const char *name);
00326 
00342 int wpa_config_write(const char *name, struct wpa_config *config);
00343 
00344 #endif /* CONFIG_H */
00345 

Generated on Sat May 6 21:13:30 2006 for wpa_supplicant by  doxygen 1.4.2