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