1189251Ssam/* 2189251Ssam * WPA Supplicant / Configuration backend: empty starting point 3189251Ssam * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi> 4189251Ssam * 5189251Ssam * This program is free software; you can redistribute it and/or modify 6189251Ssam * it under the terms of the GNU General Public License version 2 as 7189251Ssam * published by the Free Software Foundation. 8189251Ssam * 9189251Ssam * Alternatively, this software may be distributed under the terms of BSD 10189251Ssam * license. 11189251Ssam * 12189251Ssam * See README and COPYING for more details. 13189251Ssam * 14189251Ssam * This file implements dummy example of a configuration backend. None of the 15189251Ssam * functions are actually implemented so this can be used as a simple 16189251Ssam * compilation test or a starting point for a new configuration backend. 17189251Ssam */ 18189251Ssam 19189251Ssam#include "includes.h" 20189251Ssam 21189251Ssam#include "common.h" 22189251Ssam#include "config.h" 23189251Ssam#include "base64.h" 24189251Ssam 25189251Ssam 26189251Ssamstruct wpa_config * wpa_config_read(const char *name) 27189251Ssam{ 28189251Ssam struct wpa_config *config; 29189251Ssam 30189251Ssam config = wpa_config_alloc_empty(NULL, NULL); 31189251Ssam if (config == NULL) 32189251Ssam return NULL; 33189251Ssam /* TODO: fill in configuration data */ 34189251Ssam return config; 35189251Ssam} 36189251Ssam 37189251Ssam 38189251Ssamint wpa_config_write(const char *name, struct wpa_config *config) 39189251Ssam{ 40189251Ssam struct wpa_ssid *ssid; 41189251Ssam struct wpa_config_blob *blob; 42189251Ssam 43189251Ssam wpa_printf(MSG_DEBUG, "Writing configuration file '%s'", name); 44189251Ssam 45189251Ssam /* TODO: write global config parameters */ 46189251Ssam 47189251Ssam 48189251Ssam for (ssid = config->ssid; ssid; ssid = ssid->next) { 49189251Ssam /* TODO: write networks */ 50189251Ssam } 51189251Ssam 52189251Ssam for (blob = config->blobs; blob; blob = blob->next) { 53189251Ssam /* TODO: write blobs */ 54189251Ssam } 55189251Ssam 56189251Ssam return 0; 57189251Ssam} 58