config_file.c File Reference

WPA Supplicant / Configuration backend: text file. More...

#include "includes.h"
#include "common.h"
#include "config.h"
#include "base64.h"
#include "eap_methods.h"

Include dependency graph for config_file.c:

Go to the source code of this file.

Defines

#define STR(t)   write_str(f, #t, ssid)
#define INT(t)   write_int(f, #t, ssid->t, 0)
#define INT_DEF(t, def)   write_int(f, #t, ssid->t, def)

Functions

wpa_configwpa_config_read (const char *name)
 Read and parse configuration database.
int wpa_config_write (const char *name, struct wpa_config *config)
 Write or update configuration data.


Detailed Description

WPA Supplicant / Configuration backend: text file.

Copyright
Copyright (c) 2003-2006, Jouni Malinen <[email protected]>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.

This file implements a configuration backend for text files. All the configuration information is stored in a text file that uses a format described in the sample configuration file, wpa_supplicant.conf.

Definition in file config_file.c.


Function Documentation

struct wpa_config* wpa_config_read const char *  name  ) 
 

Read and parse configuration database.

Parameters:
name Name of the configuration (e.g., path and file name for the configuration file)
Returns:
Pointer to allocated configuration data or NULL on failure
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.

Definition at line 245 of file config_file.c.

Here is the call graph for this function:

int wpa_config_write const char *  name,
struct wpa_config config
 

Write or update configuration data.

Parameters:
name Name of the configuration (e.g., path and file name for the configuration file)
config Configuration data from wpa_config_read()
Returns:
0 on success, -1 on failure
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.

Definition at line 692 of file config_file.c.

Here is the call graph for this function:


Generated on Sun Dec 31 13:49:52 2006 for wpa_supplicant by  doxygen 1.4.2