Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

main_none.c 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * WPA Supplicant / Example program entrypoint
  3. * Copyright (c) 2003-2005, 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. #include "includes.h"
  15. #include "common.h"
  16. #include "wpa_supplicant_i.h"
  17. int main(int argc, char *argv[])
  18. {
  19. struct wpa_interface iface;
  20. int exitcode = 0;
  21. struct wpa_params params;
  22. struct wpa_global *global;
  23. memset(&params, 0, sizeof(params));
  24. params.wpa_debug_level = MSG_INFO;
  25. global = wpa_supplicant_init(&params);
  26. if (global == NULL)
  27. return -1;
  28. memset(&iface, 0, sizeof(iface));
  29. /* TODO: set interface parameters */
  30. if (wpa_supplicant_add_iface(global, &iface) == NULL)
  31. exitcode = -1;
  32. if (exitcode == 0)
  33. exitcode = wpa_supplicant_run(global);
  34. wpa_supplicant_deinit(global);
  35. return exitcode;
  36. }