Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * WPA Supplicant / Program entrypoint for Symbian |
| 3 | * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 as |
| 7 | * published by the Free Software Foundation. |
| 8 | * |
| 9 | * Alternatively, this software may be distributed under the terms of BSD |
| 10 | * license. |
| 11 | * |
| 12 | * See README and COPYING for more details. |
| 13 | */ |
| 14 | |
| 15 | #include "includes.h" |
| 16 | |
| 17 | extern "C" { |
| 18 | #include "common.h" |
| 19 | #include "wpa_supplicant_i.h" |
| 20 | } |
| 21 | |
| 22 | GLDEF_C TInt E32Main(void) |
| 23 | { |
| 24 | struct wpa_interface iface; |
| 25 | int exitcode = 0; |
| 26 | struct wpa_params params; |
| 27 | struct wpa_global *global; |
| 28 | |
| 29 | memset(¶ms, 0, sizeof(params)); |
| 30 | params.wpa_debug_level = MSG_INFO; |
| 31 | |
| 32 | global = wpa_supplicant_init(¶ms); |
| 33 | if (global == NULL) |
| 34 | return -1; |
| 35 | |
| 36 | memset(&iface, 0, sizeof(iface)); |
| 37 | /* TODO: set interface parameters */ |
| 38 | |
| 39 | if (wpa_supplicant_add_iface(global, &iface) == NULL) |
| 40 | exitcode = -1; |
| 41 | |
| 42 | if (exitcode == 0) |
| 43 | exitcode = wpa_supplicant_run(global); |
| 44 | |
| 45 | wpa_supplicant_deinit(global); |
| 46 | |
| 47 | return exitcode; |
| 48 | } |