main_symbian.cpp
Go to the documentation of this file.
00001 /*
00002  * WPA Supplicant / Program entrypoint for Symbian
00003  * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #include "includes.h"
00016 
00017 extern "C" {
00018 #include "common.h"
00019 #include "wpa_supplicant_i.h"
00020 }
00021 
00022 GLDEF_C TInt E32Main(void)
00023 {
00024         struct wpa_interface iface;
00025         int exitcode = 0;
00026         struct wpa_params params;
00027         struct wpa_global *global;
00028 
00029         memset(&params, 0, sizeof(params));
00030         params.wpa_debug_level = MSG_INFO;
00031 
00032         global = wpa_supplicant_init(&params);
00033         if (global == NULL)
00034                 return -1;
00035 
00036         memset(&iface, 0, sizeof(iface));
00037         /* TODO: set interface parameters */
00038 
00039         if (wpa_supplicant_add_iface(global, &iface) == NULL)
00040                 exitcode = -1;
00041 
00042         if (exitcode == 0)
00043                 exitcode = wpa_supplicant_run(global);
00044 
00045         wpa_supplicant_deinit(global);
00046 
00047         return exitcode;
00048 }


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:26:38