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 | * |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 5 | * This software may be distributed under the terms of the BSD license. |
| 6 | * See README for more details. |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include "includes.h" |
| 10 | |
| 11 | extern "C" { |
| 12 | #include "common.h" |
| 13 | #include "wpa_supplicant_i.h" |
| 14 | } |
| 15 | |
| 16 | GLDEF_C TInt E32Main(void) |
| 17 | { |
| 18 | struct wpa_interface iface; |
| 19 | int exitcode = 0; |
| 20 | struct wpa_params params; |
| 21 | struct wpa_global *global; |
| 22 | |
| 23 | memset(¶ms, 0, sizeof(params)); |
| 24 | params.wpa_debug_level = MSG_INFO; |
| 25 | |
| 26 | global = wpa_supplicant_init(¶ms); |
| 27 | if (global == NULL) |
| 28 | return -1; |
| 29 | |
| 30 | memset(&iface, 0, sizeof(iface)); |
| 31 | /* TODO: set interface parameters */ |
| 32 | |
| 33 | if (wpa_supplicant_add_iface(global, &iface) == NULL) |
| 34 | exitcode = -1; |
| 35 | |
| 36 | if (exitcode == 0) |
| 37 | exitcode = wpa_supplicant_run(global); |
| 38 | |
| 39 | wpa_supplicant_deinit(global); |
| 40 | |
| 41 | return exitcode; |
| 42 | } |