main_symbian.cpp 851 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * WPA Supplicant / Program entrypoint for Symbian
  3. * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #include "includes.h"
  9. extern "C" {
  10. #include "common.h"
  11. #include "wpa_supplicant_i.h"
  12. }
  13. GLDEF_C TInt E32Main(void)
  14. {
  15. struct wpa_interface iface;
  16. int exitcode = 0;
  17. struct wpa_params params;
  18. struct wpa_global *global;
  19. memset(&params, 0, sizeof(params));
  20. params.wpa_debug_level = MSG_INFO;
  21. global = wpa_supplicant_init(&params);
  22. if (global == NULL)
  23. return -1;
  24. memset(&iface, 0, sizeof(iface));
  25. /* TODO: set interface parameters */
  26. if (wpa_supplicant_add_iface(global, &iface) == NULL)
  27. exitcode = -1;
  28. if (exitcode == 0)
  29. exitcode = wpa_supplicant_run(global);
  30. wpa_supplicant_deinit(global);
  31. return exitcode;
  32. }