Classes | Defines | Functions | Variables
config_file.c File Reference
#include "includes.h"
#include "common.h"
#include "config.h"
#include "base64.h"
#include "uuid.h"
#include "eap_peer/eap_methods.h"
Include dependency graph for config_file.c:

Go to the source code of this file.

Classes

struct  global_parse_data

Defines

#define _INT(f)   #f, wpa_config_parse_int, OFFSET(f)
#define _STR(f)   #f, wpa_config_parse_str, OFFSET(f)
#define FUNC(f)   #f, wpa_config_process_ ## f, OFFSET(f), NULL, NULL
#define FUNC_NO_VAR(f)   #f, wpa_config_process_ ## f, NULL, NULL, NULL
#define INT(f)   _INT(f), NULL, NULL
#define INT(t)   write_int(f, #t, ssid->t, 0)
#define INT_DEF(t, def)   write_int(f, #t, ssid->t, def)
#define INT_DEFe(t, def)   write_int(f, #t, ssid->eap.t, def)
#define INT_RANGE(f, min, max)   _INT(f), (void *) min, (void *) max
#define INTe(t)   write_int(f, #t, ssid->eap.t, 0)
#define NUM_GLOBAL_FIELDS   (sizeof(global_fields) / sizeof(global_fields[0]))
#define OFFSET(v)   ((void *) &((struct wpa_config *) 0)->v)
#define STR(f)   _STR(f), NULL, NULL
#define STR(t)   write_str(f, #t, ssid)
#define STR_RANGE(f, min, max)   _STR(f), (void *) min, (void *) max

Functions

static char * wpa_config_get_line (char *s, int size, FILE *stream, int *line, char **_pos)
static int wpa_config_parse_int (const struct global_parse_data *data, struct wpa_config *config, int line, const char *pos)
static int wpa_config_parse_str (const struct global_parse_data *data, struct wpa_config *config, int line, const char *pos)
static int wpa_config_process_blob (struct wpa_config *config, FILE *f, int *line, char *bname)
static int wpa_config_process_country (const struct global_parse_data *data, struct wpa_config *config, int line, const char *pos)
static int wpa_config_process_global (struct wpa_config *config, char *pos, int line)
static int wpa_config_process_load_dynamic_eap (const struct global_parse_data *data, struct wpa_config *config, int line, const char *so)
struct wpa_configwpa_config_read (const char *name)
static struct wpa_config_blobwpa_config_read_blob (FILE *f, int *line, const char *name)
static struct wpa_ssidwpa_config_read_network (FILE *f, int *line, int id)
static int wpa_config_validate_network (struct wpa_ssid *ssid, int line)
int wpa_config_write (const char *name, struct wpa_config *config)
static int wpa_config_write_blob (FILE *f, struct wpa_config_blob *blob)
static void wpa_config_write_global (FILE *f, struct wpa_config *config)
static void wpa_config_write_network (FILE *f, struct wpa_ssid *ssid)
static void write_auth_alg (FILE *f, struct wpa_ssid *ssid)
static void write_bssid (FILE *f, struct wpa_ssid *ssid)
static void write_group (FILE *f, struct wpa_ssid *ssid)
static void write_int (FILE *f, const char *field, int value, int def)
static void write_key_mgmt (FILE *f, struct wpa_ssid *ssid)
static void write_pairwise (FILE *f, struct wpa_ssid *ssid)
static void write_proto (FILE *f, struct wpa_ssid *ssid)
static void write_psk (FILE *f, struct wpa_ssid *ssid)
static void write_str (FILE *f, const char *field, struct wpa_ssid *ssid)
static void write_wep_key (FILE *f, int idx, struct wpa_ssid *ssid)

Variables

static struct global_parse_data global_fields []

Define Documentation

#define _INT (   f)    #f, wpa_config_parse_int, OFFSET(f)

Definition at line 422 of file config_file.c.

#define _STR (   f)    #f, wpa_config_parse_str, OFFSET(f)

Definition at line 425 of file config_file.c.

#define FUNC (   f)    #f, wpa_config_process_ ## f, OFFSET(f), NULL, NULL

Definition at line 420 of file config_file.c.

#define FUNC_NO_VAR (   f)    #f, wpa_config_process_ ## f, NULL, NULL, NULL

Definition at line 421 of file config_file.c.

#define INT (   f)    _INT(f), NULL, NULL

Definition at line 423 of file config_file.c.

#define INT (   t)    write_int(f, #t, ssid->t, 0)

Definition at line 423 of file config_file.c.

#define INT_DEF (   t,
  def 
)    write_int(f, #t, ssid->t, def)
#define INT_DEFe (   t,
  def 
)    write_int(f, #t, ssid->eap.t, def)
#define INT_RANGE (   f,
  min,
  max 
)    _INT(f), (void *) min, (void *) max

Definition at line 424 of file config_file.c.

#define INTe (   t)    write_int(f, #t, ssid->eap.t, 0)
#define NUM_GLOBAL_FIELDS   (sizeof(global_fields) / sizeof(global_fields[0]))

Definition at line 472 of file config_file.c.

#define OFFSET (   v)    ((void *) &((struct wpa_config *) 0)->v)

Definition at line 418 of file config_file.c.

#define STR (   f)    _STR(f), NULL, NULL

Definition at line 426 of file config_file.c.

#define STR (   t)    write_str(f, #t, ssid)

Definition at line 426 of file config_file.c.

#define STR_RANGE (   f,
  min,
  max 
)    _STR(f), (void *) min, (void *) max

Definition at line 427 of file config_file.c.


Function Documentation

static char* wpa_config_get_line ( char *  s,
int  size,
FILE *  stream,
int *  line,
char **  _pos 
) [static]

wpa_config_get_line - Read the next configuration file line : Buffer for the line : The buffer length : File stream to read from Pointer to a variable storing the file line number : Buffer for the pointer to the beginning of data on the text line or NULL if not needed (returned value used instead) Returns: Pointer to the beginning of data on the text line or NULL if no more text lines are available.

This function reads the next non-empty line from the configuration file and removes comments. The returned string is guaranteed to be null-terminated.

Definition at line 42 of file config_file.c.

static int wpa_config_parse_int ( const struct global_parse_data data,
struct wpa_config config,
int  line,
const char *  pos 
) [static]

Definition at line 281 of file config_file.c.

static int wpa_config_parse_str ( const struct global_parse_data data,
struct wpa_config config,
int  line,
const char *  pos 
) [static]

Definition at line 310 of file config_file.c.

static int wpa_config_process_blob ( struct wpa_config config,
FILE *  f,
int *  line,
char *  bname 
) [static]

Definition at line 247 of file config_file.c.

static int wpa_config_process_country ( const struct global_parse_data data,
struct wpa_config config,
int  line,
const char *  pos 
) [static]

Definition at line 345 of file config_file.c.

static int wpa_config_process_global ( struct wpa_config config,
char *  pos,
int  line 
) [static]

Definition at line 475 of file config_file.c.

static int wpa_config_process_load_dynamic_eap ( const struct global_parse_data data,
struct wpa_config config,
int  line,
const char *  so 
) [static]

Definition at line 361 of file config_file.c.

struct wpa_config* wpa_config_read ( const char *  name) [read]

Definition at line 505 of file config_file.c.

static struct wpa_config_blob* wpa_config_read_blob ( FILE *  f,
int *  line,
const char *  name 
) [static, read]

Definition at line 191 of file config_file.c.

static struct wpa_ssid* wpa_config_read_network ( FILE *  f,
int *  line,
int  id 
) [static, read]

Definition at line 130 of file config_file.c.

static int wpa_config_validate_network ( struct wpa_ssid ssid,
int  line 
) [static]

Definition at line 95 of file config_file.c.

int wpa_config_write ( const char *  name,
struct wpa_config config 
)

Definition at line 903 of file config_file.c.

static int wpa_config_write_blob ( FILE *  f,
struct wpa_config_blob blob 
) [static]

Definition at line 811 of file config_file.c.

static void wpa_config_write_global ( FILE *  f,
struct wpa_config config 
) [static]

Definition at line 826 of file config_file.c.

static void wpa_config_write_network ( FILE *  f,
struct wpa_ssid ssid 
) [static]

Definition at line 729 of file config_file.c.

static void write_auth_alg ( FILE *  f,
struct wpa_ssid ssid 
) [static]

Definition at line 681 of file config_file.c.

static void write_bssid ( FILE *  f,
struct wpa_ssid ssid 
) [static]

Definition at line 597 of file config_file.c.

static void write_group ( FILE *  f,
struct wpa_ssid ssid 
) [static]

Definition at line 665 of file config_file.c.

static void write_int ( FILE *  f,
const char *  field,
int  value,
int  def 
) [static]

Definition at line 589 of file config_file.c.

static void write_key_mgmt ( FILE *  f,
struct wpa_ssid ssid 
) [static]

Definition at line 633 of file config_file.c.

static void write_pairwise ( FILE *  f,
struct wpa_ssid ssid 
) [static]

Definition at line 649 of file config_file.c.

static void write_proto ( FILE *  f,
struct wpa_ssid ssid 
) [static]

Definition at line 617 of file config_file.c.

static void write_psk ( FILE *  f,
struct wpa_ssid ssid 
) [static]

Definition at line 607 of file config_file.c.

static void write_str ( FILE *  f,
const char *  field,
struct wpa_ssid ssid 
) [static]

Definition at line 579 of file config_file.c.

static void write_wep_key ( FILE *  f,
int  idx,
struct wpa_ssid ssid 
) [static]

Definition at line 713 of file config_file.c.


Variable Documentation

struct global_parse_data global_fields[] [static]

Definition at line 429 of file config_file.c.



wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:37