aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2005-06-21 03:00:47 (GMT)
committerJouni Malinen <j@w1.fi>2005-06-21 03:00:47 (GMT)
commitd896b12aff194f2d0b038e139969a93d88cc2369 (patch)
treefaaa199ca2d945af5f925a90570f01b926c0cf6b
parenta97a1edc53f5859e19296faa2839867528d4e855 (diff)
downloadhostap-history-d896b12aff194f2d0b038e139969a93d88cc2369.zip
hostap-history-d896b12aff194f2d0b038e139969a93d88cc2369.tar.gz
hostap-history-d896b12aff194f2d0b038e139969a93d88cc2369.tar.bz2
Added function documentation.
-rw-r--r--wpa_supplicant/config.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 9b80ccd..bbb3cfe 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -828,6 +828,15 @@ static int wpa_config_add_prio_network(struct wpa_config *config,
}
+/**
+ * wpa_config_read - Read and parse a configuration file
+ * config_file: Path and file name for the configuration file
+ * Returns: Pointer to allocated configuration data or %NULL on failure
+ *
+ * This function reads a configuration file, parses its contents, and allocates
+ * data structures needed for storing configuration information. The allocated
+ * data can be freed with wpa_config_free().
+ */
struct wpa_config * wpa_config_read(const char *config_file)
{
FILE *f;
@@ -981,6 +990,13 @@ struct wpa_config * wpa_config_read(const char *config_file)
}
+/**
+ * wpa_config_free - Free configuration data
+ * @config: Configuration data from wpa_config_read()
+ *
+ * This function frees all resources allocated for the configuration data by
+ * wpa_config_read().
+ */
void wpa_config_free(struct wpa_config *config)
{
struct wpa_ssid *ssid, *prev = NULL;
@@ -1031,6 +1047,12 @@ void wpa_config_free(struct wpa_config *config)
}
+/**
+ * wpa_config_allowed_eap_method - Check whether EAP method is allowed
+ * @ssid: Pointer to a configuration data
+ * @method: EAP type
+ * Returns: 1 = allowed EAP method, 0 = not allowed
+ */
int wpa_config_allowed_eap_method(struct wpa_ssid *ssid, int method)
{
u8 *pos;
@@ -1048,6 +1070,11 @@ int wpa_config_allowed_eap_method(struct wpa_ssid *ssid, int method)
}
+/**
+ * wpa_cipher_txt - Convert cipher suite to a text string
+ * @cipher: Cipher suite (WPA_CIPHER_* enum)
+ * Returns: Pointer to a text string of the cipher suite name
+ */
const char * wpa_cipher_txt(int cipher)
{
switch (cipher) {
@@ -1067,6 +1094,12 @@ const char * wpa_cipher_txt(int cipher)
}
+/**
+ * wpa_key_mgmt_txt - Convert key management suite to a text string
+ * @key_mgmt: Key management suite (WPA_KEY_MGMT_* enum)
+ * @proto: WPA/WPA2 version (WPA_PROTO_*)
+ * Returns: Pointer to a text string of the key management suite name
+ */
const char * wpa_key_mgmt_txt(int key_mgmt, int proto)
{
switch (key_mgmt) {