main_none.c
Go to the documentation of this file.
00001 /*
00002  * WPA Supplicant / Example program entrypoint
00003  * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #include "includes.h"
00016 
00017 #include "common.h"
00018 #include "wpa_supplicant_i.h"
00019 
00020 int main(int argc, char *argv[])
00021 {
00022         struct wpa_interface iface;
00023         int exitcode = 0;
00024         struct wpa_params params;
00025         struct wpa_global *global;
00026 
00027         memset(&params, 0, sizeof(params));
00028         params.wpa_debug_level = MSG_INFO;
00029 
00030         global = wpa_supplicant_init(&params);
00031         if (global == NULL)
00032                 return -1;
00033 
00034         memset(&iface, 0, sizeof(iface));
00035         /* TODO: set interface parameters */
00036 
00037         if (wpa_supplicant_add_iface(global, &iface) == NULL)
00038                 exitcode = -1;
00039 
00040         if (exitcode == 0)
00041                 exitcode = wpa_supplicant_run(global);
00042 
00043         wpa_supplicant_deinit(global);
00044 
00045         return exitcode;
00046 }


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:25:14