2 * WPA Supplicant / Example program entrypoint
3 * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>
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.
9 * Alternatively, this software may be distributed under the terms of BSD
12 * See README and COPYING for more details.
18 #include "wpa_supplicant_i.h"
20 int main(int argc, char *argv[])
22 struct wpa_interface iface;
24 struct wpa_params params;
25 struct wpa_global *global;
27 memset(¶ms, 0, sizeof(params));
28 params.wpa_debug_level = MSG_INFO;
30 global = wpa_supplicant_init(¶ms);
34 memset(&iface, 0, sizeof(iface));
35 /* TODO: set interface parameters */
37 if (wpa_supplicant_add_iface(global, &iface) == NULL)
41 exitcode = wpa_supplicant_run(global);
43 wpa_supplicant_deinit(global);