config_none.c revision 189261
1279377Simp/*
2279377Simp * WPA Supplicant / Configuration backend: empty starting point
3279377Simp * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>
4279377Simp *
5279377Simp * This program is free software; you can redistribute it and/or modify
6279377Simp * it under the terms of the GNU General Public License version 2 as
7279377Simp * published by the Free Software Foundation.
8279377Simp *
9279377Simp * Alternatively, this software may be distributed under the terms of BSD
10279377Simp * license.
11279377Simp *
12279377Simp * See README and COPYING for more details.
13279377Simp *
14279377Simp * This file implements dummy example of a configuration backend. None of the
15279377Simp * functions are actually implemented so this can be used as a simple
16279377Simp * compilation test or a starting point for a new configuration backend.
17279377Simp */
18279377Simp
19279377Simp#include "includes.h"
20279377Simp
21279377Simp#include "common.h"
22279377Simp#include "config.h"
23279377Simp#include "base64.h"
24279377Simp
25279377Simp
26279377Simpstruct wpa_config * wpa_config_read(const char *name)
27279377Simp{
28279377Simp	struct wpa_config *config;
29279377Simp
30279377Simp	config = wpa_config_alloc_empty(NULL, NULL);
31279377Simp	if (config == NULL)
32279377Simp		return NULL;
33279377Simp	/* TODO: fill in configuration data */
34279377Simp	return config;
35279377Simp}
36279377Simp
37279377Simp
38279377Simpint wpa_config_write(const char *name, struct wpa_config *config)
39279377Simp{
40279377Simp	struct wpa_ssid *ssid;
41279377Simp	struct wpa_config_blob *blob;
42279377Simp
43279377Simp	wpa_printf(MSG_DEBUG, "Writing configuration file '%s'", name);
44279377Simp
45295011Sandrew	/* TODO: write global config parameters */
46295011Sandrew
47295011Sandrew
48295011Sandrew	for (ssid = config->ssid; ssid; ssid = ssid->next) {
49279377Simp		/* TODO: write networks */
50279377Simp	}
51279377Simp
52279377Simp	for (blob = config->blobs; blob; blob = blob->next) {
53279377Simp		/* TODO: write blobs */
54279377Simp	}
55279377Simp
56279377Simp	return 0;
57279377Simp}
58279377Simp