wpa_supplicant / hostapd
2.5
|
WPA Supplicant / Configuration backend: Windows registry. More...
Functions | |
struct wpa_config * | wpa_config_read (const char *name, struct wpa_config *cfgp) |
Read and parse configuration database. More... | |
int | wpa_config_write (const char *name, struct wpa_config *config) |
Write or update configuration data. More... | |
WPA Supplicant / Configuration backend: Windows registry.
This file implements a configuration backend for Windows registry. All the configuration information is stored in the registry and the format for network configuration fields is same as described in the sample configuration file, wpa_supplicant.conf.
Configuration data is in HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs key. Each configuration profile has its own key under this. In terms of text files, each profile would map to a separate text file with possibly multiple networks. Under each profile, there is a networks key that lists all networks as a subkey. Each network has set of values in the same way as network block in the configuration file. In addition, blobs subkey has possible blobs as values.
Example network configuration block:
HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test\networks\0000 ssid="example" key_mgmt=WPA-PSK
struct wpa_config* wpa_config_read | ( | const char * | name, |
struct wpa_config * | cfgp | ||
) |
Read and parse configuration database.
name | Name of the configuration (e.g., path and file name for the configuration file) |
cfgp | Pointer to previously allocated configuration data or NULL if none |
This function reads configuration data, parses its contents, and allocates data structures needed for storing configuration information. The allocated data can be freed with wpa_config_free().
Each configuration backend needs to implement this function.
int wpa_config_write | ( | const char * | name, |
struct wpa_config * | config | ||
) |
Write or update configuration data.
name | Name of the configuration (e.g., path and file name for the configuration file) |
config | Configuration data from wpa_config_read() |
This function write all configuration data into an external database (e.g., a text file) in a format that can be read with wpa_config_read(). This can be used to allow wpa_supplicant to update its configuration, e.g., when a new network is added or a password is changed.
Each configuration backend needs to implement this function.