diff --git a/wpa_supplicant/README-Windows.txt b/wpa_supplicant/README-Windows.txt deleted file mode 100644 index 292223d2d5fe..000000000000 --- a/wpa_supplicant/README-Windows.txt +++ /dev/null @@ -1,450 +0,0 @@ -wpa_supplicant for Windows -========================== - -Copyright (c) 2003-2009, Jouni Malinen and contributors -All Rights Reserved. - -This program is dual-licensed under both the GPL version 2 and BSD -license. Either license may be used at your option. - -This product includes software developed by the OpenSSL Project -for use in the OpenSSL Toolkit (http://www.openssl.org/). This -product includes cryptographic software written by Eric Young -(eay@cryptsoft.com). - - -wpa_supplicant has support for being used as a WPA/WPA2/IEEE 802.1X -Supplicant on Windows. The current port requires that WinPcap -(http://winpcap.polito.it/) is installed for accessing packets and the -driver interface. Both release versions 3.0 and 3.1 are supported. - -The current port is still somewhat experimental. It has been tested -mainly on Windows XP (SP2) with limited set of NDIS drivers. In -addition, the current version has been reported to work with Windows -2000. - -All security modes have been verified to work (at least complete -authentication and successfully ping a wired host): -- plaintext -- static WEP / open system authentication -- static WEP / shared key authentication -- IEEE 802.1X with dynamic WEP keys -- WPA-PSK, TKIP, CCMP, TKIP+CCMP -- WPA-EAP, TKIP, CCMP, TKIP+CCMP -- WPA2-PSK, TKIP, CCMP, TKIP+CCMP -- WPA2-EAP, TKIP, CCMP, TKIP+CCMP - - -Binary version --------------- - -Compiled binary version of the wpa_supplicant and additional tools is -available from http://w1.fi/wpa_supplicant/. These binaries can be -used after installing WinPcap. - -wpa_gui uses Qt 4 framework and may need additional dynamic libraries -(DLLs). These libraries are available from -http://w1.fi/wpa_supplicant/qt4/wpa_gui-qt433-windows-dll.zip -You can copy the DLL files from this ZIP package into the same directory -with wpa_gui.exe to allow wpa_gui to be started. - - -Building wpa_supplicant with mingw ----------------------------------- - -The default build setup for wpa_supplicant is to use MinGW and -cross-compiling from Linux to MinGW/Windows. It should also be -possible to build this under Windows using the MinGW tools, but that -is not tested nor supported and is likely to require some changes to -the Makefile unless cygwin is used. - - -Building wpa_supplicant with MSVC ---------------------------------- - -wpa_supplicant can be built with Microsoft Visual C++ compiler. This -has been tested with Microsoft Visual C++ Toolkit 2003 and Visual -Studio 2005 using the included nmake.mak as a Makefile for nmake. IDE -can also be used by creating a project that includes the files and -defines mentioned in nmake.mak. Example VS2005 solution and project -files are included in vs2005 subdirectory. This can be used as a -starting point for building the programs with VS2005 IDE. Visual Studio -2008 Express Edition is also able to use these project files. - -WinPcap development package is needed for the build and this can be -downloaded from http://www.winpcap.org/install/bin/WpdPack_4_0_2.zip. The -default nmake.mak expects this to be unpacked into C:\dev\WpdPack so -that Include and Lib directories are in this directory. The files can be -stored elsewhere as long as the WINPCAPDIR in nmake.mak is updated to -match with the selected directory. In case a project file in the IDE is -used, these Include and Lib directories need to be added to project -properties as additional include/library directories. - -OpenSSL source package can be downloaded from -http://www.openssl.org/source/openssl-0.9.8i.tar.gz and built and -installed following instructions in INSTALL.W32. Note that if EAP-FAST -support will be included in the wpa_supplicant, OpenSSL needs to be -patched to# support it openssl-0.9.8i-tls-extensions.patch. The example -nmake.mak file expects OpenSSL to be installed into C:\dev\openssl, but -this directory can be modified by changing OPENSSLDIR variable in -nmake.mak. - -If you do not need EAP-FAST support, you may also be able to use Win32 -binary installation package of OpenSSL from -http://www.slproweb.com/products/Win32OpenSSL.html instead of building -the library yourself. In this case, you will need to copy Include and -Lib directories in suitable directory, e.g., C:\dev\openssl for the -default nmake.mak. Copy {Win32OpenSSLRoot}\include into -C:\dev\openssl\include and make C:\dev\openssl\lib subdirectory with -files from {Win32OpenSSLRoot}\VC (i.e., libeay*.lib and ssleay*.lib). -This will end up using dynamically linked OpenSSL (i.e., .dll files are -needed) for it. Alternative, you can copy files from -{Win32OpenSSLRoot}\VC\static to create a static build (no OpenSSL .dll -files needed). - - -Building wpa_supplicant for cygwin ----------------------------------- - -wpa_supplicant can be built for cygwin by installing the needed -development packages for cygwin. This includes things like compiler, -make, openssl development package, etc. In addition, developer's pack -for WinPcap (WPdpack.zip) from -http://winpcap.polito.it/install/default.htm is needed. - -.config file should enable only one driver interface, -CONFIG_DRIVER_NDIS. In addition, include directories may need to be -added to match the system. An example configuration is available in -defconfig. The library and include files for WinPcap will either need -to be installed in compiler/linker default directories or their -location will need to be adding to .config when building -wpa_supplicant. - -Othen than this, the build should be more or less identical to Linux -version, i.e., just run make after having created .config file. An -additional tool, win_if_list.exe, can be built by running "make -win_if_list". - - -Building wpa_gui ----------------- - -wpa_gui uses Qt application framework from Trolltech. It can be built -with the open source version of Qt4 and MinGW. Following commands can -be used to build the binary in the Qt 4 Command Prompt: - -# go to the root directory of wpa_supplicant source code -cd wpa_gui-qt4 -qmake -o Makefile wpa_gui.pro -make -# the wpa_gui.exe binary is created into 'release' subdirectory - - -Using wpa_supplicant for Windows --------------------------------- - -wpa_supplicant, wpa_cli, and wpa_gui behave more or less identically to -Linux version, so instructions in README and example wpa_supplicant.conf -should be applicable for most parts. In addition, there is another -version of wpa_supplicant, wpasvc.exe, which can be used as a Windows -service and which reads its configuration from registry instead of -text file. - -When using access points in "hidden SSID" mode, ap_scan=2 mode need to -be used (see wpa_supplicant.conf for more information). - -Windows NDIS/WinPcap uses quite long interface names, so some care -will be needed when starting wpa_supplicant. Alternatively, the -adapter description can be used as the interface name which may be -easier since it is usually in more human-readable -format. win_if_list.exe can be used to find out the proper interface -name. - -Example steps in starting up wpa_supplicant: - -# win_if_list.exe -ifname: \Device\NPF_GenericNdisWanAdapter -description: Generic NdisWan adapter - -ifname: \Device\NPF_{769E012B-FD17-4935-A5E3-8090C38E25D2} -description: Atheros Wireless Network Adapter (Microsoft's Packet Scheduler) - -ifname: \Device\NPF_{732546E7-E26C-48E3-9871-7537B020A211} -description: Intel 8255x-based Integrated Fast Ethernet (Microsoft's Packet Scheduler) - - -Since the example configuration used Atheros WLAN card, the middle one -is the correct interface in this case. The interface name for -i -command line option is the full string following "ifname:" (the -"\Device\NPF_" prefix can be removed). In other words, wpa_supplicant -would be started with the following command: - -# wpa_supplicant.exe -i'{769E012B-FD17-4935-A5E3-8090C38E25D2}' -c wpa_supplicant.conf -d - --d optional enables some more debugging (use -dd for even more, if -needed). It can be left out if debugging information is not needed. - -With the alternative mechanism for selecting the interface, this -command has identical results in this case: - -# wpa_supplicant.exe -iAtheros -c wpa_supplicant.conf -d - - -Simple configuration example for WPA-PSK: - -#ap_scan=2 -ctrl_interface= -network={ - ssid="test" - key_mgmt=WPA-PSK - proto=WPA - pairwise=TKIP - psk="secret passphrase" -} - -(remove '#' from the comment out ap_scan line to enable mode in which -wpa_supplicant tries to associate with the SSID without doing -scanning; this allows APs with hidden SSIDs to be used) - - -wpa_cli.exe and wpa_gui.exe can be used to interact with the -wpa_supplicant.exe program in the same way as with Linux. Note that -ctrl_interface is using UNIX domain sockets when built for cygwin, but -the native build for Windows uses named pipes and the contents of the -ctrl_interface configuration item is used to control access to the -interface. Anyway, this variable has to be included in the configuration -to enable the control interface. - - -Example SDDL string formats: - -(local admins group has permission, but nobody else): - -ctrl_interface=SDDL=D:(A;;GA;;;BA) - -("A" == "access allowed", "GA" == GENERIC_ALL == all permissions, and -"BA" == "builtin administrators" == the local admins. The empty fields -are for flags and object GUIDs, none of which should be required in this -case.) - -(local admins and the local "power users" group have permissions, -but nobody else): - -ctrl_interface=SDDL=D:(A;;GA;;;BA)(A;;GA;;;PU) - -(One ACCESS_ALLOWED ACE for GENERIC_ALL for builtin administrators, and -one ACCESS_ALLOWED ACE for GENERIC_ALL for power users.) - -(close to wide open, but you have to be a valid user on -the machine): - -ctrl_interface=SDDL=D:(A;;GA;;;AU) - -(One ACCESS_ALLOWED ACE for GENERIC_ALL for the "authenticated users" -group.) - -This one would allow absolutely everyone (including anonymous -users) -- this is *not* recommended, since named pipes can be attached -to from anywhere on the network (i.e. there's no "this machine only" -like there is with 127.0.0.1 sockets): - -ctrl_interface=SDDL=D:(A;;GA;;;BU)(A;;GA;;;AN) - -(BU == "builtin users", "AN" == "anonymous") - -See also [1] for the format of ACEs, and [2] for the possible strings -that can be used for principal names. - -[1] -http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/ace_strings.asp -[2] -http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/sid_strings.asp - - -Starting wpa_supplicant as a Windows service (wpasvc.exe) ---------------------------------------------------------- - -wpa_supplicant can be started as a Windows service by using wpasvc.exe -program that is alternative build of wpa_supplicant.exe. Most of the -core functionality of wpasvc.exe is identical to wpa_supplicant.exe, -but it is using Windows registry for configuration information instead -of a text file and command line parameters. In addition, it can be -registered as a service that can be started automatically or manually -like any other Windows service. - -The root of wpa_supplicant configuration in registry is -HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant. This level includes global -parameters and a 'interfaces' subkey with all the interface configuration -(adapter to confname mapping). Each such mapping is a subkey that has -'adapter', 'config', and 'ctrl_interface' values. - -This program can be run either as a normal command line application, -e.g., for debugging, with 'wpasvc.exe app' or as a Windows service. -Service need to be registered with 'wpasvc.exe reg '. Alternatively, 'wpasvc.exe reg' can be used to register -the service with the current location of wpasvc.exe. After this, wpasvc -can be started like any other Windows service (e.g., 'net start wpasvc') -or it can be configured to start automatically through the Services tool -in administrative tasks. The service can be unregistered with -'wpasvc.exe unreg'. - -If the service is set to start during system bootup to make the -network connection available before any user has logged in, there may -be a long (half a minute or so) delay in starting up wpa_supplicant -due to WinPcap needing a driver called "Network Monitor Driver" which -is started by default on demand. - -To speed up wpa_supplicant start during system bootup, "Network -Monitor Driver" can be configured to be started sooner by setting its -startup type to System instead of the default Demand. To do this, open -up Device Manager, select Show Hidden Devices, expand the "Non -Plug-and-Play devices" branch, double click "Network Monitor Driver", -go to the Driver tab, and change the Demand setting to System instead. - -Configuration data is in HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs -key. Each configuration profile has its own key under this. In terms of text -files, each profile would map to a separate text file with possibly multiple -networks. Under each profile, there is a networks key that lists all -networks as a subkey. Each network has set of values in the same way as -network block in the configuration file. In addition, blobs subkey has -possible blobs as values. - -HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test\networks\0000 - ssid="example" - key_mgmt=WPA-PSK - -See win_example.reg for an example on how to setup wpasvc.exe -parameters in registry. It can also be imported to registry as a -starting point for the configuration. - - - -License information for third party software used in this product: - - OpenSSL License - --------------- - -/* ==================================================================== - * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - - Original SSLeay License - ----------------------- - -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - - - - Qt Open Source Edition - ---------------------- - -The Qt GUI Toolkit is Copyright (C) 1994-2007 Trolltech ASA. -Qt Open Source Edition is licensed under GPL version 2. - -Source code for the library is available at -http://w1.fi/wpa_supplicant/qt4/qt-win-opensource-src-4.3.3.zip diff --git a/wpa_supplicant/symbian/README.symbian b/wpa_supplicant/symbian/README.symbian deleted file mode 100644 index 9d3b811f0fc0..000000000000 --- a/wpa_supplicant/symbian/README.symbian +++ /dev/null @@ -1,24 +0,0 @@ -wpa_supplicant for Symbian -========================== - -Copyright (c) 2003-2007, Jouni Malinen and -contributors -All Rights Reserved. - -This program is dual-licensed under both the GPL version 2 and BSD -license. Either license may be used at your option. - - -This directory includes project files for testing experimental Symbian -(e.g., Nokia S60 3rd Ed) builds. The Symbian port is not really -complete or expected to work, but these files can be used to verify -that the build itself can be completed successfully. - -These files have been successfully tested with Nokia S60 3rd Edition -MR SDK. - -Build files can be created and a phone release build can be run with -following commands: - -bldmake bldfiles -abld build gcce urel diff --git a/wpa_supplicant/symbian/bld.inf b/wpa_supplicant/symbian/bld.inf deleted file mode 100644 index a1fc582c52b5..000000000000 --- a/wpa_supplicant/symbian/bld.inf +++ /dev/null @@ -1,8 +0,0 @@ -PRJ_PLATFORMS -WINSCW GCCE - -PRJ_EXPORTS - -PRJ_MMPFILES - -wpa_supplicant.mmp diff --git a/wpa_supplicant/symbian/wpa_supplicant.mmp b/wpa_supplicant/symbian/wpa_supplicant.mmp deleted file mode 100644 index 217908e9b003..000000000000 --- a/wpa_supplicant/symbian/wpa_supplicant.mmp +++ /dev/null @@ -1,38 +0,0 @@ -TARGET wpa_supplicant.exe -UID 0x0 0x0 -VENDORID 0 -TARGETTYPE exe - -SYSTEMINCLUDE \epoc32\include \epoc32\include\variant \epoc32\include\ecom \epoc32\include\libc - -USERINCLUDE .. ..\..\src ..\..\src\utils - -SOURCEPATH .. -SOURCE main_symbian.cpp -SOURCE config.c config_file.c -SOURCE eapol_sm.c -SOURCE wpa_supplicant.c events.c -SOURCEPATH ..\..\src\rsn_supp -SOURCE wpa.c preauth.c pmksa_cache.c peerkey.c wpa_ie.c -SOURCEPATH ..\..\src\drivers -SOURCE drivers.c -SOURCEPATH ..\..\src\common -SOURCE wpa_common.c -SOURCEPATH ..\..\src\utils -SOURCE os_none.c common.c wpa_debug.c eloop_none.c base64.c -SOURCEPATH ..\..\src\crypto -SOURCE sha1.c md5.c rc4.c des.c aes-cbc.c aes-ctr.c aes-eax.c aes-encblock.c aes-omac1.c aes-unwrap.c aes-wrap.c aes.c ms_funcs.c -SOURCE tls_internal.c crypto_internal.c -SOURCEPATH ..\..\src\tls -SOURCE asn1.c bignum.c rsa.c x509v3.c tlsv1_client.c tlsv1_common.c -SOURCEPATH ..\..\src\l2_packet -SOURCE l2_packet_none.c -SOURCEPATH ..\..\src\eap_peer -SOURCE eap.c eap_methods.c -SOURCE eap_md5.c eap_tls.c eap_mschapv2.c eap_peap.c eap_gtc.c -SOURCE eap_ttls.c eap_otp.c eap_leap.c eap_tls_common.c eap_tlv.c -SOURCE eap_fast.c eap_fast_pac.c -SOURCEPATH ..\..\src\eap_common -SOURCE eap_common.c - -LIBRARY euser.lib estlib.lib diff --git a/wpa_supplicant/vs2005/eapol_test/eapol_test.vcproj b/wpa_supplicant/vs2005/eapol_test/eapol_test.vcproj deleted file mode 100755 index d96f6613cd54..000000000000 --- a/wpa_supplicant/vs2005/eapol_test/eapol_test.vcproj +++ /dev/null @@ -1,465 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wpa_supplicant/vs2005/win_if_list/win_if_list.vcproj b/wpa_supplicant/vs2005/win_if_list/win_if_list.vcproj deleted file mode 100755 index e79fc0f4666f..000000000000 --- a/wpa_supplicant/vs2005/win_if_list/win_if_list.vcproj +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wpa_supplicant/vs2005/wpa_cli/wpa_cli.vcproj b/wpa_supplicant/vs2005/wpa_cli/wpa_cli.vcproj deleted file mode 100755 index d2de768e7cdc..000000000000 --- a/wpa_supplicant/vs2005/wpa_cli/wpa_cli.vcproj +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wpa_supplicant/vs2005/wpa_passphrase/wpa_passphrase.vcproj b/wpa_supplicant/vs2005/wpa_passphrase/wpa_passphrase.vcproj deleted file mode 100755 index b10784246d71..000000000000 --- a/wpa_supplicant/vs2005/wpa_passphrase/wpa_passphrase.vcproj +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wpa_supplicant/vs2005/wpa_supplicant.sln b/wpa_supplicant/vs2005/wpa_supplicant.sln deleted file mode 100755 index df89e3198d2f..000000000000 --- a/wpa_supplicant/vs2005/wpa_supplicant.sln +++ /dev/null @@ -1,52 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wpa_supplicant", "wpa_supplicant\wpa_supplicant.vcproj", "{8BCFDA77-AEDC-4168-8897-5B73105BBB87}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wpa_cli", "wpa_cli\wpa_cli.vcproj", "{E3A7B181-22CC-4DA3-8410-6AD69879A9EC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wpasvc", "wpasvc\wpasvc.vcproj", "{E2A4A85F-CA77-406D-8ABF-63EF94545ACC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wpa_passphrase", "wpa_passphrase\wpa_passphrase.vcproj", "{ADBE4EA8-F0C5-40C2-AE89-C56D0F2EC1DF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win_if_list", "win_if_list\win_if_list.vcproj", "{9E87CD9C-60CE-4533-85CF-85CA3A9BF26A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eapol_test", "eapol_test\eapol_test.vcproj", "{0E3F2C6D-1372-48D6-BCAB-E584917C4DE3}" -EndProject -Global - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8BCFDA77-AEDC-4168-8897-5B73105BBB87}.Debug|Win32.ActiveCfg = Debug|Win32 - {8BCFDA77-AEDC-4168-8897-5B73105BBB87}.Debug|Win32.Build.0 = Debug|Win32 - {8BCFDA77-AEDC-4168-8897-5B73105BBB87}.Release|Win32.ActiveCfg = Release|Win32 - {8BCFDA77-AEDC-4168-8897-5B73105BBB87}.Release|Win32.Build.0 = Release|Win32 - {E3A7B181-22CC-4DA3-8410-6AD69879A9EC}.Debug|Win32.ActiveCfg = Debug|Win32 - {E3A7B181-22CC-4DA3-8410-6AD69879A9EC}.Debug|Win32.Build.0 = Debug|Win32 - {E3A7B181-22CC-4DA3-8410-6AD69879A9EC}.Release|Win32.ActiveCfg = Release|Win32 - {E3A7B181-22CC-4DA3-8410-6AD69879A9EC}.Release|Win32.Build.0 = Release|Win32 - {E2A4A85F-CA77-406D-8ABF-63EF94545ACC}.Debug|Win32.ActiveCfg = Debug|Win32 - {E2A4A85F-CA77-406D-8ABF-63EF94545ACC}.Debug|Win32.Build.0 = Debug|Win32 - {E2A4A85F-CA77-406D-8ABF-63EF94545ACC}.Release|Win32.ActiveCfg = Release|Win32 - {E2A4A85F-CA77-406D-8ABF-63EF94545ACC}.Release|Win32.Build.0 = Release|Win32 - {ADBE4EA8-F0C5-40C2-AE89-C56D0F2EC1DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {ADBE4EA8-F0C5-40C2-AE89-C56D0F2EC1DF}.Debug|Win32.Build.0 = Debug|Win32 - {ADBE4EA8-F0C5-40C2-AE89-C56D0F2EC1DF}.Release|Win32.ActiveCfg = Release|Win32 - {ADBE4EA8-F0C5-40C2-AE89-C56D0F2EC1DF}.Release|Win32.Build.0 = Release|Win32 - {9E87CD9C-60CE-4533-85CF-85CA3A9BF26A}.Debug|Win32.ActiveCfg = Debug|Win32 - {9E87CD9C-60CE-4533-85CF-85CA3A9BF26A}.Debug|Win32.Build.0 = Debug|Win32 - {9E87CD9C-60CE-4533-85CF-85CA3A9BF26A}.Release|Win32.ActiveCfg = Release|Win32 - {9E87CD9C-60CE-4533-85CF-85CA3A9BF26A}.Release|Win32.Build.0 = Release|Win32 - {0E3F2C6D-1372-48D6-BCAB-E584917C4DE3}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E3F2C6D-1372-48D6-BCAB-E584917C4DE3}.Debug|Win32.Build.0 = Debug|Win32 - {0E3F2C6D-1372-48D6-BCAB-E584917C4DE3}.Release|Win32.ActiveCfg = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj b/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj deleted file mode 100755 index e59cc6cce874..000000000000 --- a/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj b/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj deleted file mode 100755 index 4d402e5ce851..000000000000 --- a/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wpa_supplicant/win_example.reg b/wpa_supplicant/win_example.reg deleted file mode 100755 index 875d4ef28046..000000000000 --- a/wpa_supplicant/win_example.reg +++ /dev/null @@ -1,42 +0,0 @@ -REGEDIT4 - -[HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant] -"debug_level"=dword:00000000 -"debug_show_keys"=dword:00000001 -"debug_timestamp"=dword:00000000 -"debug_use_file"=dword:00000000 - -[HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs] - -[HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test] -"ap_scan"=dword:00000002 -"update_config"=dword:00000001 -"uuid"="12345678-9abc-def0-1234-56789abcdef0" -"device_name"="Wireless Client" -"manufacturer"="Company" -"model_name"="cmodel" -"serial_number"="12345" -"device_type"="1-0050F204-1" -"os_version"="01020300" - -[HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test\blobs] -"testblob"=hex:01,02,03,04,05 - -[HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test\networks] - -[HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test\networks\0000] -"ssid"="\"example network\"" -"key_mgmt"="WPA-PSK" -"psk"="\"secret password\"" -"pairwise"="CCMP" -"group"="CCMP" -"proto"="WPA" - -[HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\interfaces] - -[HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\interfaces\0000] -"adapter"="{A7627643-C310-49E5-BD89-7E77709C04AB}" -"config"="test" -"ctrl_interface"="" -"skip_on_error"=dword:00000000 - diff --git a/wpa_supplicant/win_if_list.c b/wpa_supplicant/win_if_list.c deleted file mode 100644 index 0e1532ed71f1..000000000000 --- a/wpa_supplicant/win_if_list.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * win_if_list - Display network interfaces with description (for Windows) - * Copyright (c) 2004-2006, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - * - * This small tool is for the Windows build to provide an easy way of fetching - * a list of available network interfaces. - */ - -#include "includes.h" -#include -#ifdef CONFIG_USE_NDISUIO -#include -#include -#else /* CONFIG_USE_NDISUIO */ -#include "pcap.h" -#include -#endif /* CONFIG_USE_NDISUIO */ - -#ifdef CONFIG_USE_NDISUIO - -/* from nuiouser.h */ -#define FSCTL_NDISUIO_BASE FILE_DEVICE_NETWORK - -#define _NDISUIO_CTL_CODE(_Function, _Method, _Access) \ - CTL_CODE(FSCTL_NDISUIO_BASE, _Function, _Method, _Access) - -#define IOCTL_NDISUIO_QUERY_BINDING \ - _NDISUIO_CTL_CODE(0x203, METHOD_BUFFERED, \ - FILE_READ_ACCESS | FILE_WRITE_ACCESS) - -#define IOCTL_NDISUIO_BIND_WAIT \ - _NDISUIO_CTL_CODE(0x204, METHOD_BUFFERED, \ - FILE_READ_ACCESS | FILE_WRITE_ACCESS) - -typedef struct _NDISUIO_QUERY_BINDING -{ - ULONG BindingIndex; - ULONG DeviceNameOffset; - ULONG DeviceNameLength; - ULONG DeviceDescrOffset; - ULONG DeviceDescrLength; -} NDISUIO_QUERY_BINDING, *PNDISUIO_QUERY_BINDING; - - -static HANDLE ndisuio_open(void) -{ - DWORD written; - HANDLE h; - - h = CreateFile(TEXT("\\\\.\\\\Ndisuio"), - GENERIC_READ | GENERIC_WRITE, 0, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, - INVALID_HANDLE_VALUE); - if (h == INVALID_HANDLE_VALUE) - return h; - -#ifndef _WIN32_WCE - if (!DeviceIoControl(h, IOCTL_NDISUIO_BIND_WAIT, NULL, 0, NULL, 0, - &written, NULL)) { - printf("IOCTL_NDISUIO_BIND_WAIT failed: %d", - (int) GetLastError()); - CloseHandle(h); - return INVALID_HANDLE_VALUE; - } -#endif /* _WIN32_WCE */ - - return h; -} - - -static void ndisuio_query_bindings(HANDLE ndisuio) -{ - NDISUIO_QUERY_BINDING *b; - size_t blen = sizeof(*b) + 1024; - int i, error; - DWORD written; - char name[256], desc[256]; - WCHAR *pos; - size_t j, len; - - b = malloc(blen); - if (b == NULL) - return; - - for (i = 0; ; i++) { - memset(b, 0, blen); - b->BindingIndex = i; - if (!DeviceIoControl(ndisuio, IOCTL_NDISUIO_QUERY_BINDING, - b, sizeof(NDISUIO_QUERY_BINDING), b, - (DWORD) blen, &written, NULL)) { - error = (int) GetLastError(); - if (error == ERROR_NO_MORE_ITEMS) - break; - printf("IOCTL_NDISUIO_QUERY_BINDING failed: %d", - error); - break; - } - - pos = (WCHAR *) ((char *) b + b->DeviceNameOffset); - len = b->DeviceNameLength; - if (len >= sizeof(name)) - len = sizeof(name) - 1; - for (j = 0; j < len; j++) - name[j] = (char) pos[j]; - name[len] = '\0'; - - pos = (WCHAR *) ((char *) b + b->DeviceDescrOffset); - len = b->DeviceDescrLength; - if (len >= sizeof(desc)) - len = sizeof(desc) - 1; - for (j = 0; j < len; j++) - desc[j] = (char) pos[j]; - desc[len] = '\0'; - - printf("ifname: %s\ndescription: %s\n\n", name, desc); - } - - free(b); -} - - -static void ndisuio_enum_bindings(void) -{ - HANDLE ndisuio = ndisuio_open(); - if (ndisuio == INVALID_HANDLE_VALUE) - return; - - ndisuio_query_bindings(ndisuio); - CloseHandle(ndisuio); -} - -#else /* CONFIG_USE_NDISUIO */ - -static void show_dev(pcap_if_t *dev) -{ - printf("ifname: %s\ndescription: %s\n\n", - dev->name, dev->description); -} - - -static void pcap_enum_devs(void) -{ - pcap_if_t *devs, *dev; - char err[PCAP_ERRBUF_SIZE + 1]; - - if (pcap_findalldevs(&devs, err) < 0) { - fprintf(stderr, "Error - pcap_findalldevs: %s\n", err); - return; - } - - for (dev = devs; dev; dev = dev->next) { - show_dev(dev); - } - - pcap_freealldevs(devs); -} - -#endif /* CONFIG_USE_NDISUIO */ - - -int main(int argc, char *argv[]) -{ -#ifdef CONFIG_USE_NDISUIO - ndisuio_enum_bindings(); -#else /* CONFIG_USE_NDISUIO */ - pcap_enum_devs(); -#endif /* CONFIG_USE_NDISUIO */ - - return 0; -} diff --git a/wpa_supplicant/wpa_gui-qt4/.gitignore b/wpa_supplicant/wpa_gui-qt4/.gitignore deleted file mode 100644 index efcb6660002e..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.moc -.obj -.ui -Makefile -wpa_gui -qrc_icons.cpp diff --git a/wpa_supplicant/wpa_gui-qt4/addinterface.cpp b/wpa_supplicant/wpa_gui-qt4/addinterface.cpp deleted file mode 100644 index 88d4603d03f9..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/addinterface.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/* - * wpa_gui - AddInterface class - * Copyright (c) 2008, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#include -#include "common/wpa_ctrl.h" - -#include - -#include "wpagui.h" -#include "addinterface.h" - -#ifdef CONFIG_NATIVE_WINDOWS -#include - -#ifndef WPA_KEY_ROOT -#define WPA_KEY_ROOT HKEY_LOCAL_MACHINE -#endif -#ifndef WPA_KEY_PREFIX -#define WPA_KEY_PREFIX TEXT("SOFTWARE\\wpa_supplicant") -#endif -#endif /* CONFIG_NATIVE_WINDOWS */ - - -AddInterface::AddInterface(WpaGui *_wpagui, QWidget *parent) - : QDialog(parent), wpagui(_wpagui) -{ - setWindowTitle(tr("Select network interface to add")); - resize(400, 200); - vboxLayout = new QVBoxLayout(this); - - interfaceWidget = new QTreeWidget(this); - interfaceWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); - interfaceWidget->setUniformRowHeights(true); - interfaceWidget->setSortingEnabled(true); - interfaceWidget->setColumnCount(3); - interfaceWidget->headerItem()->setText(0, tr("driver")); - interfaceWidget->headerItem()->setText(1, tr("interface")); - interfaceWidget->headerItem()->setText(2, tr("description")); - interfaceWidget->setItemsExpandable(FALSE); - interfaceWidget->setRootIsDecorated(FALSE); - vboxLayout->addWidget(interfaceWidget); - - connect(interfaceWidget, - SIGNAL(itemActivated(QTreeWidgetItem *, int)), this, - SLOT(interfaceSelected(QTreeWidgetItem *))); - - addInterfaces(); -} - - -void AddInterface::addInterfaces() -{ -#ifdef CONFIG_CTRL_IFACE_NAMED_PIPE - struct wpa_ctrl *ctrl; - int ret; - char buf[2048]; - size_t len; - - ctrl = wpa_ctrl_open(NULL); - if (ctrl == NULL) - return; - - len = sizeof(buf) - 1; - ret = wpa_ctrl_request(ctrl, "INTERFACE_LIST", 14, buf, &len, NULL); - if (ret < 0) { - wpa_ctrl_close(ctrl); - return; - } - buf[len] = '\0'; - - wpa_ctrl_close(ctrl); - - QString ifaces(buf); - QStringList lines = ifaces.split(QRegExp("\\n")); - for (QStringList::Iterator it = lines.begin(); - it != lines.end(); it++) { - QStringList arg = (*it).split(QChar('\t')); - if (arg.size() < 3) - continue; - QTreeWidgetItem *item = new QTreeWidgetItem(interfaceWidget); - if (!item) - break; - - item->setText(0, arg[0]); - item->setText(1, arg[1]); - item->setText(2, arg[2]); - } - - interfaceWidget->resizeColumnToContents(0); - interfaceWidget->resizeColumnToContents(1); - interfaceWidget->resizeColumnToContents(2); -#endif /* CONFIG_CTRL_IFACE_NAMED_PIPE */ -} - - -#ifdef CONFIG_NATIVE_WINDOWS -bool AddInterface::addRegistryInterface(const QString &ifname) -{ - HKEY hk, ihk; - LONG ret; - int id, tmp; - TCHAR name[10]; - DWORD val, i; - - ret = RegOpenKeyEx(WPA_KEY_ROOT, WPA_KEY_PREFIX TEXT("\\interfaces"), - 0, KEY_ENUMERATE_SUB_KEYS | KEY_CREATE_SUB_KEY, - &hk); - if (ret != ERROR_SUCCESS) - return false; - - id = -1; - - for (i = 0; ; i++) { - TCHAR name[255]; - DWORD namelen; - - namelen = 255; - ret = RegEnumKeyEx(hk, i, name, &namelen, NULL, NULL, NULL, - NULL); - - if (ret == ERROR_NO_MORE_ITEMS) - break; - - if (ret != ERROR_SUCCESS) - break; - - if (namelen >= 255) - namelen = 255 - 1; - name[namelen] = '\0'; - -#ifdef UNICODE - QString s((QChar *) name, namelen); -#else /* UNICODE */ - QString s(name); -#endif /* UNICODE */ - tmp = s.toInt(); - if (tmp > id) - id = tmp; - } - - id += 1; - -#ifdef UNICODE - wsprintf(name, L"%04d", id); -#else /* UNICODE */ - os_snprintf(name, sizeof(name), "%04d", id); -#endif /* UNICODE */ - ret = RegCreateKeyEx(hk, name, 0, NULL, 0, KEY_WRITE, NULL, &ihk, - NULL); - RegCloseKey(hk); - if (ret != ERROR_SUCCESS) - return false; - -#ifdef UNICODE - RegSetValueEx(ihk, TEXT("adapter"), 0, REG_SZ, - (LPBYTE) ifname.unicode(), - (ifname.length() + 1) * sizeof(TCHAR)); - -#else /* UNICODE */ - RegSetValueEx(ihk, TEXT("adapter"), 0, REG_SZ, - (LPBYTE) ifname.toLocal8Bit(), ifname.length() + 1); -#endif /* UNICODE */ - RegSetValueEx(ihk, TEXT("config"), 0, REG_SZ, - (LPBYTE) TEXT("default"), 8 * sizeof(TCHAR)); - RegSetValueEx(ihk, TEXT("ctrl_interface"), 0, REG_SZ, - (LPBYTE) TEXT(""), 1 * sizeof(TCHAR)); - val = 1; - RegSetValueEx(ihk, TEXT("skip_on_error"), 0, REG_DWORD, (LPBYTE) &val, - sizeof(val)); - - RegCloseKey(ihk); - return true; -} -#endif /* CONFIG_NATIVE_WINDOWS */ - - -void AddInterface::interfaceSelected(QTreeWidgetItem *sel) -{ - if (!sel) - return; - -#ifdef CONFIG_CTRL_IFACE_NAMED_PIPE - struct wpa_ctrl *ctrl; - int ret; - char buf[20], cmd[256]; - size_t len; - - /* - * INTERFACE_ADD TABTABTABTAB - * TAB - */ - snprintf(cmd, sizeof(cmd), - "INTERFACE_ADD %s\t%s\t%s\t%s\t%s\t%s", - sel->text(1).toAscii().constData(), - "default", - sel->text(0).toAscii().constData(), - "yes", "", ""); - cmd[sizeof(cmd) - 1] = '\0'; - - ctrl = wpa_ctrl_open(NULL); - if (ctrl == NULL) - return; - - len = sizeof(buf) - 1; - ret = wpa_ctrl_request(ctrl, cmd, strlen(cmd), buf, &len, NULL); - wpa_ctrl_close(ctrl); - - if (ret < 0) { - QMessageBox::warning(this, "wpa_gui", - tr("Add interface command could not be " - "completed.")); - return; - } - - buf[len] = '\0'; - if (buf[0] != 'O' || buf[1] != 'K') { - QMessageBox::warning(this, "wpa_gui", - tr("Failed to add the interface.")); - return; - } - -#endif /* CONFIG_CTRL_IFACE_NAMED_PIPE */ - -#ifdef CONFIG_NATIVE_WINDOWS - if (!addRegistryInterface(sel->text(1))) { - QMessageBox::information(this, "wpa_gui", - tr("Failed to add the interface into " - "registry.")); - } -#endif /* CONFIG_NATIVE_WINDOWS */ - - wpagui->selectAdapter(sel->text(1)); - close(); -} diff --git a/wpa_supplicant/wpa_gui-qt4/addinterface.h b/wpa_supplicant/wpa_gui-qt4/addinterface.h deleted file mode 100644 index 9d9476a46d99..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/addinterface.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * wpa_gui - AddInterface class - * Copyright (c) 2008, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#ifndef ADDINTERFACE_H -#define ADDINTERFACE_H - -#include - -#include -#include -#include - -class WpaGui; - -class AddInterface : public QDialog -{ - Q_OBJECT - -public: - AddInterface(WpaGui *_wpagui, QWidget *parent = 0); - -public slots: - virtual void interfaceSelected(QTreeWidgetItem *sel); - -private: - void addInterfaces(); - bool addRegistryInterface(const QString &ifname); - - QVBoxLayout *vboxLayout; - QTreeWidget *interfaceWidget; - WpaGui *wpagui; -}; - -#endif /* ADDINTERFACE_H */ diff --git a/wpa_supplicant/wpa_gui-qt4/eventhistory.cpp b/wpa_supplicant/wpa_gui-qt4/eventhistory.cpp deleted file mode 100644 index 1eb0b7b14386..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/eventhistory.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/* - * wpa_gui - EventHistory class - * Copyright (c) 2005-2006, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#include -#include - -#include "eventhistory.h" - - -int EventListModel::rowCount(const QModelIndex &) const -{ - return msgList.count(); -} - - -int EventListModel::columnCount(const QModelIndex &) const -{ - return 2; -} - - -QVariant EventListModel::data(const QModelIndex &index, int role) const -{ - if (!index.isValid()) - return QVariant(); - - if (role == Qt::DisplayRole) - if (index.column() == 0) { - if (index.row() >= timeList.size()) - return QVariant(); - return timeList.at(index.row()); - } else { - if (index.row() >= msgList.size()) - return QVariant(); - return msgList.at(index.row()); - } - else - return QVariant(); -} - - -QVariant EventListModel::headerData(int section, Qt::Orientation orientation, - int role) const -{ - if (role != Qt::DisplayRole) - return QVariant(); - - if (orientation == Qt::Horizontal) { - switch (section) { - case 0: - return QString(tr("Timestamp")); - case 1: - return QString(tr("Message")); - default: - return QVariant(); - } - } else - return QString("%1").arg(section); -} - - -void EventListModel::addEvent(QString time, QString msg) -{ - beginInsertRows(QModelIndex(), msgList.size(), msgList.size() + 1); - timeList << time; - msgList << msg; - endInsertRows(); -} - - -EventHistory::EventHistory(QWidget *parent, const char *, bool, Qt::WFlags) - : QDialog(parent) -{ - setupUi(this); - - connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); - - eventListView->setItemsExpandable(FALSE); - eventListView->setRootIsDecorated(FALSE); - elm = new EventListModel(parent); - eventListView->setModel(elm); -} - - -EventHistory::~EventHistory() -{ - destroy(); - delete elm; -} - - -void EventHistory::languageChange() -{ - retranslateUi(this); -} - - -void EventHistory::addEvents(WpaMsgList msgs) -{ - WpaMsgList::iterator it; - for (it = msgs.begin(); it != msgs.end(); it++) - addEvent(*it); -} - - -void EventHistory::addEvent(WpaMsg msg) -{ - bool scroll = true; - - if (eventListView->verticalScrollBar()->value() < - eventListView->verticalScrollBar()->maximum()) - scroll = false; - - elm->addEvent(msg.getTimestamp().toString("yyyy-MM-dd hh:mm:ss.zzz"), - msg.getMsg()); - - if (scroll) - eventListView->scrollToBottom(); -} diff --git a/wpa_supplicant/wpa_gui-qt4/eventhistory.h b/wpa_supplicant/wpa_gui-qt4/eventhistory.h deleted file mode 100644 index 40dff6d6d779..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/eventhistory.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * wpa_gui - EventHistory class - * Copyright (c) 2005-2006, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#ifndef EVENTHISTORY_H -#define EVENTHISTORY_H - -#include -#include "ui_eventhistory.h" - - -class EventListModel : public QAbstractTableModel -{ - Q_OBJECT - -public: - EventListModel(QObject *parent = 0) - : QAbstractTableModel(parent) {} - - int rowCount(const QModelIndex &parent = QModelIndex()) const; - int columnCount(const QModelIndex &parent = QModelIndex()) const; - QVariant data(const QModelIndex &index, int role) const; - QVariant headerData(int section, Qt::Orientation orientation, - int role = Qt::DisplayRole) const; - void addEvent(QString time, QString msg); - -private: - QStringList timeList; - QStringList msgList; -}; - - -class EventHistory : public QDialog, public Ui::EventHistory -{ - Q_OBJECT - -public: - EventHistory(QWidget *parent = 0, const char *name = 0, - bool modal = false, Qt::WFlags fl = 0); - ~EventHistory(); - -public slots: - virtual void addEvents(WpaMsgList msgs); - virtual void addEvent(WpaMsg msg); - -protected slots: - virtual void languageChange(); - -private: - EventListModel *elm; -}; - -#endif /* EVENTHISTORY_H */ diff --git a/wpa_supplicant/wpa_gui-qt4/eventhistory.ui b/wpa_supplicant/wpa_gui-qt4/eventhistory.ui deleted file mode 100644 index afe9149cfa0f..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/eventhistory.ui +++ /dev/null @@ -1,61 +0,0 @@ - - EventHistory - - - - 0 - 0 - 533 - 285 - - - - Event history - - - - - - - 0 - 0 - - - - Qt::ScrollBarAlwaysOn - - - QAbstractItemView::NoSelection - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Close - - - - - - - - - wpamsg.h - - - - diff --git a/wpa_supplicant/wpa_gui-qt4/icons.qrc b/wpa_supplicant/wpa_gui-qt4/icons.qrc deleted file mode 100644 index 316ee89b95a2..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/icons.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - icons/wpa_gui.svg - icons/ap.svg - icons/laptop.svg - - diff --git a/wpa_supplicant/wpa_gui-qt4/icons/Makefile b/wpa_supplicant/wpa_gui-qt4/icons/Makefile deleted file mode 100644 index 8e0b12f3b34d..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/icons/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/make -f - -NAMES := wpa_gui ap laptop -SIZES := 16x16 22x22 32x32 48x48 64x64 128x128 -ICONS := $(addsuffix .png, $(foreach name, $(NAMES), $(foreach size, $(SIZES), $(size)/$(name)))) -ICONS += $(addsuffix .xpm, $(NAMES)) - -all: $(ICONS) - -%.png: - mkdir -p hicolor/$(word 1, $(subst /, ,$(@)))/apps/ - inkscape $(subst .png,.svg, $(word 2, $(subst /, , $(@)))) --without-gui \ - --export-width=$(word 1, $(subst x, , $(@))) \ - --export-height=$(word 2, $(subst x, , $(subst /, , $(@)))) \ - --export-png=hicolor/$(word 1, $(subst /, ,$(@)))/apps/$(word 2, $(subst /, , $@)) - -%.xpm: - mkdir -p pixmaps/ - convert hicolor/16x16/apps/$(@:.xpm=.png) pixmaps/$(@:.xpm=-16.xpm) - convert hicolor/32x32/apps/$(@:.xpm=.png) pixmaps/$@ - -clean: - $(RM) -r pixmaps hicolor diff --git a/wpa_supplicant/wpa_gui-qt4/icons/README b/wpa_supplicant/wpa_gui-qt4/icons/README deleted file mode 100644 index d73eed5a1b29..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/icons/README +++ /dev/null @@ -1,39 +0,0 @@ -wpa_gui icon files - -To convert the svg icons to other formats, make sure inkscape and imagemagick -are installed and use `make' to create various sized png and xpm icons. - - -wpa_gui.svg ------------ - -Copyright (c) 2008 Bernard Gray - -The wpa_gui icon is licensed under the GPL version 2. Alternatively, the icon -may be distributed under the terms of BSD license. - - -ap.svg ------- - -mystica_Wireless_Router.svg - -http://openclipart.org/media/files/mystica/8390 -Wireless Router -by: mystica -last change: April 20, 2008 10:32 pm (File added) -date: April 20, 2008 10:31 pm -license: PD - - -laptop.svg ----------- - -metalmarious_Laptop.svg - -http://openclipart.org/media/files/metalmarious/4056 -Laptop -by: metalmarious -last change: May 18, 2008 07:04 pm (File added) -date: August 27, 2007 04:44 am -license: PD diff --git a/wpa_supplicant/wpa_gui-qt4/icons/ap.svg b/wpa_supplicant/wpa_gui-qt4/icons/ap.svg deleted file mode 100644 index 51cc8ce646ad..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/icons/ap.svg +++ /dev/null @@ -1,832 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wpa_supplicant/wpa_gui-qt4/icons/laptop.svg b/wpa_supplicant/wpa_gui-qt4/icons/laptop.svg deleted file mode 100644 index 06235f02d5a3..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/icons/laptop.svg +++ /dev/null @@ -1,1568 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wpa_supplicant/wpa_gui-qt4/icons/wpa_gui.svg b/wpa_supplicant/wpa_gui-qt4/icons/wpa_gui.svg deleted file mode 100644 index b3abf0a288d8..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/icons/wpa_gui.svg +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wpa_supplicant/wpa_gui-qt4/icons_png.qrc b/wpa_supplicant/wpa_gui-qt4/icons_png.qrc deleted file mode 100644 index f26221733432..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/icons_png.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - icons/hicolor/16x16/apps/wpa_gui.png - icons/hicolor/32x32/apps/ap.png - icons/hicolor/32x32/apps/laptop.png - - diff --git a/wpa_supplicant/wpa_gui-qt4/lang/.gitignore b/wpa_supplicant/wpa_gui-qt4/lang/.gitignore deleted file mode 100644 index 8df47d550c7d..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/lang/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.qm diff --git a/wpa_supplicant/wpa_gui-qt4/lang/wpa_gui_de.ts b/wpa_supplicant/wpa_gui-qt4/lang/wpa_gui_de.ts deleted file mode 100644 index d7a9c89fa18a..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/lang/wpa_gui_de.ts +++ /dev/null @@ -1,1262 +0,0 @@ - - - - - AddInterface - - - Select network interface to add - Wähle die Netzwerkschnittstelle zum hinzufügen aus - - - - driver - Treiber - - - - interface - Schnittstelle - - - - description - Beschreibung - - - - Add interface command could not be completed. - Das Schnittstellen hinzufügen Kommando konnte nicht abgeschlossen werden. - - - - Failed to add the interface. - Fehler beim hinzufügen der Schnittstelle. - - - - Failed to add the interface into registry. - Fehler beim hinzufügen der Schnittstelle in die Registry. - - - - ErrorMsg - - - wpa_gui error - wpa_gui Fehler - - - - EventHistory - - - Event history - Ereignis Historie - - - - Close - Schließen - - - - EventListModel - - - Timestamp - Zeit - - - - Message - Meldung - - - - NetworkConfig - - - NetworkConfig - - - - - Cancel - Abbrechen - - - - SSID - SSID - - - - Network name (Service Set IDentifier) - Netzwerkname (Service Set IDentifier) - - - - Authentication - Authentifizierung - - - - Plaintext (open / no authentication) - Plaintext (offen / keine Authentifizierung) - - - - Static WEP (no authentication) - Static WEP (keine Authentifizierung) - - - - Static WEP (Shared Key authentication) - - - - - IEEE 802.1X - - - - - WPA-Personal (PSK) - - - - - WPA-Enterprise (EAP) - - - - - WPA2-Personal (PSK) - - - - - WPA2-Enterprise (EAP) - - - - - Encryption - Verschlüsselung - - - - None - Keine - - - - WEP - - - - - TKIP - - - - - CCMP - - - - - PSK - - - - - WPA/WPA2 pre-shared key or passphrase - WPA/WPA2 Pre-Shared Key oder Passphrase - - - - EAP method - EAP Verfahren - - - - Identity - Identität - - - - Username/Identity for EAP methods - Nutzername/Identitär für die EAP Verfahren - - - - Password - Passwort - - - - Password for EAP methods - Passwort für die EAP Verfahren - - - - CA certificate - CA Zertifikat - - - - WEP keys - WEP Schlüssel - - - - key 0 - Schlüssel 0 - - - - key 1 - Schlüssel 1 - - - - key 3 - Schlüssel 3 - - - - key 2 - Schlüssel 2 - - - - Optional Settings - Optionale Einstellungen - - - - Network Identification String - Netzwerk Indentifikations Zeichenfolge - - - - Network Priority - Netzwerk Priorität - - - - IDString - - - - - Priority - Priorität - - - - Inner auth - Geheime Auth - - - - Add - Hinzufügen - - - - Remove - Entfernen - - - - WPS - - - - - WPA Pre-Shared Key Error - WPA Pre Shared Key Fehler - - - - WPA-PSK requires a passphrase of 8 to 63 characters -or 64 hex digit PSK - WPA PSK benötigt ein Passphrase mit 8 bis 63 Zeichen -oder 64 hexadezimal stelligen PSK - - - - Network ID Error - Netzwerk ID Fehler - - - - Network ID String contains non-word characters. -It must be a simple string, without spaces, containing -only characters in this range: [A-Za-z0-9_-] - - Netzwerk ID Zeichnfolge beinhaltet ungültige Zeichen. -Es muss eine einfache Zeichnfolge aus [A-Za-z0-9_] ohne -Leerzeichen sein - - - - - Failed to add network to wpa_supplicant -configuration. - Hinzufügen des Netzwerks in die wpa_supplicant -Konfiguration fehlgeschlagen. - - - - Failed to enable network in wpa_supplicant -configuration. - Aktivieren des Netzwerks in der wpa_supplicant -Konfiguration fehlgeschlagen. - - - - This will permanently remove the network -from the configuration. Do you really want -to remove this network? - Dies wird das Netzwerk permanent aus -der Konfiguration entfernen. Möchtest du -das Netzwerk wirklich entfernen? - - - - Yes - Ja - - - - No - Nein - - - - Failed to remove network from wpa_supplicant -configuration. - Entfernen des Netzwerks aus der wpa_supplicant -Konfiguration fehlgeschlagen. - - - - Peers - - - Peers - - - - - Associated station - Verbundene Stationen - - - - AP - - - - - WPS AP - - - - - WPS PIN needed - WPS PIN wird benötigt - - - - ER: WPS AP - - - - - ER: WPS AP (Unconfigured) - ER: WPS AP (nicht konfiguriert) - - - - ER: WPS Enrollee - - - - - WPS Enrollee - - - - - Enter WPS PIN - WPS PIN Eingabe - - - - Connect (PBC) - Verbinden (PBC) - - - - Enroll (PBC) - Anmelden (PBC) - - - - Learn Configuration - Konfiguration lernen - - - - Properties - Eigenschaften - - - - Refresh - Aktualisieren - - - - PIN: - - - - - PIN for - Pin für - - - - Failed to set the WPS PIN. - Setzten des WPS PIN fehlgeschlagen. - - - - Peer Properties - Peer Eigenschaften - - - - Name: - - - - - Address: - - - - - UUID: - - - - - Primary Device Type: - Primärer Geräte Typ: - - - - SSID: - - - - - Configuration Methods: - Konfigurationsverfahren: - - - - [USBA] - - - - - [Ethernet] - - - - - [Label] - - - - - [Display] - - - - - [Ext. NFC Token] - - - - - [Int. NFC Token] - - - - - [NFC Interface] - - - - - [Push Button] - - - - - [Keypad] - - - - - Device Password ID: - Geräte Passwort ID: - - - - (Default PIN) - - - - - (User-specified PIN) - - - - - (Machine-specified PIN) - - - - - (Rekey) - - - - - (Push Button) - - - - - (Registrar-specified) - - - - - Failed to start WPS PBC. - Starten von WPS PBC fehlgeschlagen. - - - - AP PIN: - - - - - AP PIN for - AP PIN für - - - - Failed to start learning AP configuration. - Fehler beim erkennen der AP Konfiguration. - - - - ScanResults - - - Scan results - Scan Ergebnisse - - - - SSID - - - - - BSSID - - - - - frequency - Frequenz - - - - signal - Signal - - - - flags - Flags - - - - Scan - Scannen - - - - Close - Schließen - - - - UserDataRequest - - - Authentication credentials required - Authentifzierungs Beglaubigung nötig - - - - &OK - - - - - &Cancel - - - - - Password: - Passwort: - - - - New password: - Neues Passwort: - - - - Identity: - Identität: - - - - Private key passphrase: - Privater Key Passphrase: - - - - WpaGui - - - wpa_gui - - - - - Adapter: - - - - - Network: - Netzwerk: - - - - Current Status - Aktueller Status - - - - - Status: - - - - - Last message: - Letzte Meldung: - - - - Authentication: - Authentifizierung: - - - - Encryption: - Verschlüsselung: - - - - SSID: - - - - - BSSID: - - - - - IP address: - IP Adresse: - - - - Connect - Verbinden - - - - Disconnect - Trennen - - - - - Scan - Scannen - - - - Manage Networks - Netzwerke verwalten - - - - Enabled - Aktiviert - - - - Edit - Bearbeiten - - - - Remove - Entfernen - - - - Disabled - Deaktiviert - - - - Add - Hinzufügen - - - - WPS - - - - - PBC - push button - PBC - Taste - - - - Generate PIN - PIN erzeugen - - - - PIN: - - - - - Use AP PIN - AP PIN verwenden - - - - AP PIN: - - - - - &File - &Datei - - - - &Network - &Netzwerk - - - - &Help - &Hilfe - - - - Event &History - Ereignis &Historie - - - - &Save Configuration - Konfiguration &Speichern - - - - Ctrl+S - - - - - E&xit - &Beenden - - - - Ctrl+Q - - - - - &Add - &Hinzufügen - - - - &Edit - &Bearbeiten - - - - &Remove - &Entfernen - - - - E&nable All - Alle &aktivieren - - - - &Disable All - Alle &deaktivieren - - - - Re&move All - Alle &entfernen - - - - &Contents... - &Inhalt... - - - - &Index... - - - - - &About - &Über - - - - &Wi-Fi Protected Setup - - - - - &Peers - - - - - Stop Service - Dienst stoppen - - - - Start Service - Dienst starten - - - - Add Interface - Schnittstelle hinzufügen - - - - connecting to wpa_supplicant - Verbindungsaufbau zu wpa_supplicant - - - - wpa_supplicant service is not running. -Do you want to start it? - wpa_supplicant ist nicht gestartet. -Möchtest du ihn starten? - - - - Disconnected - Getrennt - - - - Inactive - Inaktiv - - - - Scanning - Scannen - - - - Authenticating - Authentifizieren - - - - Associating - Assoziieren - - - - Associated - Assoziiert - - - - 4-Way Handshake - 4-Wege Handshake - - - - Group Handshake - Gruppen Handshake - - - - Completed - Abgeschlossen - - - - Unknown - Unbekannt - - - - Could not get status from wpa_supplicant - Status konnte nicht von wpa_supplicant abgerufen werden - - - - No network interfaces in use. -Would you like to add one? - Es ist keine Netzwerkschnittstelle in verwendung. -Möchtest du eine hinzufügen? - - - - - - - Select any network - Wähle beliebiges Netzwerk - - - - Disconnected from network. - Getrennt vom Netzwerk. - - - - Connection to network established. - Verbindung zum Netzwerk wurde aufgebaut. - - - - - WPS AP in active PBC mode found - WPS AP im aktiven PBC Modus gefunden - - - - Press the PBC button on the screen to start registration - Drücke den PBC Knopf auf dem Bildschirm um die Registrierung zu starten - - - - WPS AP with recently selected registrar - WPS AP mit kürzlich ausgewähltem Registrator - - - - WPS AP detected - WPS AP erkannt - - - - PBC mode overlap detected - PBC Modus Overlap erkannt - - - - More than one AP is currently in active WPS PBC mode. Wait couple of minutes and try again - Mehr als ein AP ist momentan im aktiven WPS PBC Modus. Versuch es in ein paar Minuten nochmal - - - - Network configuration received - Netzwerk Konfiguration empfangen - - - - Registration started - Registrierung gestartet - - - - Registrar does not yet know PIN - Registrator kennt den PIN noch nicht - - - - Registration failed - Registrierung fehlgeschlagen - - - - Registration succeeded - Registrierung erfolgreich - - - - - No Networks - Keine Netzwerke - - - - There are no networks to edit. - - Keine Netzwerke zum bearbeiten. - - - - - - Select A Network - Wähle ein Netzwerk - - - - Select a network from the list to edit it. - - Wähle ein Netzwerk aus der Liste zum bearbeiten. - - - - - There are no networks to remove. - - Es sind keine Netzwerke zum entfernen vorhanden. - - - - - Select a network from the list to remove it. - - Wähle ein Netzwerk aus der Liste zum entfernen. - - - - - Failed to save configuration - Speichern der Konfiguration fehlgeschlagen - - - - The configuration could not be saved. - -The update_config=1 configuration option -must be used for configuration saving to -be permitted. - - Die Konfiguration konnte nicht gespeichert werden. - -Die Einstellung update_config=1 muss gesetzt sein, -damit Konfigurationen gespeichert werden können. - - - - - Saved configuration - Konfiguration gespeichert - - - - The current configuration was saved. - - Die aktuelle Konfiguration wurde gespeichert. - - - - - - wpa_supplicant user interface - - wpa_supplicant Benutzerschnittstelle - - - - &Disconnect - &Trennen - - - - Re&connect - &Wiederverbinden - - - - &Event History - &Ereignis Historie - - - - Scan &Results - Scan E&rgebnisse - - - - S&tatus - - - - - &Show Window - &Fenster anzeigen - - - - &Hide Window - &Fenster ausblenden - - - - &Quit - &Beenden - - - - will keep running in the system tray. - wird weiterhin in der System Ablage laufen. - - - - systray - System Ablage - - - - The program will keep running in the system tray. - Das Programm wird weiterhin in der System Ablage laufen. - - - - Press the push button on the AP to start the PBC mode. - Drücke die Taste am AP um den PBC Modus zu starten. - - - - If you have not yet done so, press the push button on the AP to start the PBC mode. - Wenn Sie es noch nicht getan haben, so drücken Sie die Taste am AP um den PBC Modus zu starten. - - - - - Waiting for Registrar - Warte auf Registrator - - - - Enter the generated PIN into the Registrar (either the internal one in the AP or an external one). - Geben Sie den generierten PIN in der Registrierungsstelle ein (entweder der interne oder der externe im AP). - - - - WPS AP selected from scan results - WPS AP ausgewählt aus Scan Ergebnissen - - - - If you want to use an AP device PIN, e.g., from a label in the device, enter the eight digit AP PIN and click Use AP PIN button. - Wenn Sie einen AP Geräte PIN verwenden möchten, z.B.: von einem Aufkleber am Gerät, geben Sie denn acht stelligen AP PIN ein und klicken Sie auf den AP PIN Knopf. - - - - Waiting for AP/Enrollee - Warte auf AP/Bewerber - - - - Connected to the network - Verbunden zum Netzwerk - - - - Stopped - Gestoppt - - - - - OpenSCManager failed - OpenSCManager fehlgeschlagen - - - - - OpenService failed - OpenService fehlgeschlagen - - - - Failed to start wpa_supplicant service - Starten des wpa_supplicant Dienstes fehlgeschlagen - - - - Failed to stop wpa_supplicant service - Stoppen des wpa_supplicant Dienstes fehlgeschlagen - - - OpenSCManager failed: %d - - OpenSCManager fehlgeschlagen: %d - - - - OpenService failed: %d - - - OpenService fehlgeschlagen: %d - - - - - diff --git a/wpa_supplicant/wpa_gui-qt4/main.cpp b/wpa_supplicant/wpa_gui-qt4/main.cpp deleted file mode 100644 index 6170b1549f22..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/main.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * wpa_gui - Application startup - * Copyright (c) 2005-2006, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#ifdef CONFIG_NATIVE_WINDOWS -#include -#endif /* CONFIG_NATIVE_WINDOWS */ -#include -#include -#include -#include "wpagui.h" - - -class WpaGuiApp : public QApplication -{ -public: - WpaGuiApp(int &argc, char **argv); - -#ifndef QT_NO_SESSIONMANAGER - virtual void saveState(QSessionManager &manager); -#endif - - WpaGui *w; -}; - -WpaGuiApp::WpaGuiApp(int &argc, char **argv) : QApplication(argc, argv) -{ -} - -#ifndef QT_NO_SESSIONMANAGER -void WpaGuiApp::saveState(QSessionManager &manager) -{ - QApplication::saveState(manager); - w->saveState(); -} -#endif - - -int main(int argc, char *argv[]) -{ - WpaGuiApp app(argc, argv); - QTranslator translator; - QString locale; - QString resourceDir; - int ret; - - locale = QLocale::system().name(); - resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath); - if (!translator.load("wpa_gui_" + locale, resourceDir)) - translator.load("wpa_gui_" + locale, "lang"); - app.installTranslator(&translator); - - WpaGui w(&app); - -#ifdef CONFIG_NATIVE_WINDOWS - WSADATA wsaData; - if (WSAStartup(MAKEWORD(2, 0), &wsaData)) { - /* printf("Could not find a usable WinSock.dll\n"); */ - return -1; - } -#endif /* CONFIG_NATIVE_WINDOWS */ - - app.w = &w; - - ret = app.exec(); - -#ifdef CONFIG_NATIVE_WINDOWS - WSACleanup(); -#endif /* CONFIG_NATIVE_WINDOWS */ - - return ret; -} diff --git a/wpa_supplicant/wpa_gui-qt4/networkconfig.cpp b/wpa_supplicant/wpa_gui-qt4/networkconfig.cpp deleted file mode 100644 index fe50a8d06da4..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/networkconfig.cpp +++ /dev/null @@ -1,858 +0,0 @@ -/* - * wpa_gui - NetworkConfig class - * Copyright (c) 2005-2006, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#include -#include - -#include "networkconfig.h" -#include "wpagui.h" - -enum { - AUTH_NONE_OPEN, - AUTH_NONE_WEP, - AUTH_NONE_WEP_SHARED, - AUTH_IEEE8021X, - AUTH_WPA_PSK, - AUTH_WPA_EAP, - AUTH_WPA2_PSK, - AUTH_WPA2_EAP -}; - -#define WPA_GUI_KEY_DATA "[key is configured]" - - -NetworkConfig::NetworkConfig(QWidget *parent, const char *, bool, Qt::WFlags) - : QDialog(parent) -{ - setupUi(this); - - encrSelect->setEnabled(false); - connect(authSelect, SIGNAL(activated(int)), this, - SLOT(authChanged(int))); - connect(cancelButton, SIGNAL(clicked()), this, SLOT(close())); - connect(addButton, SIGNAL(clicked()), this, SLOT(addNetwork())); - connect(encrSelect, SIGNAL(activated(const QString &)), this, - SLOT(encrChanged(const QString &))); - connect(removeButton, SIGNAL(clicked()), this, SLOT(removeNetwork())); - connect(eapSelect, SIGNAL(activated(int)), this, - SLOT(eapChanged(int))); - connect(useWpsButton, SIGNAL(clicked()), this, SLOT(useWps())); - - wpagui = NULL; - new_network = false; -} - - -NetworkConfig::~NetworkConfig() -{ -} - - -void NetworkConfig::languageChange() -{ - retranslateUi(this); -} - - -void NetworkConfig::paramsFromScanResults(QTreeWidgetItem *sel) -{ - new_network = true; - - /* SSID BSSID frequency signal flags */ - setWindowTitle(sel->text(0)); - ssidEdit->setText(sel->text(0)); - - QString flags = sel->text(4); - int auth, encr = 0; - if (flags.indexOf("[WPA2-EAP") >= 0) - auth = AUTH_WPA2_EAP; - else if (flags.indexOf("[WPA-EAP") >= 0) - auth = AUTH_WPA_EAP; - else if (flags.indexOf("[WPA2-PSK") >= 0) - auth = AUTH_WPA2_PSK; - else if (flags.indexOf("[WPA-PSK") >= 0) - auth = AUTH_WPA_PSK; - else - auth = AUTH_NONE_OPEN; - - if (flags.indexOf("-CCMP") >= 0) - encr = 1; - else if (flags.indexOf("-TKIP") >= 0) - encr = 0; - else if (flags.indexOf("WEP") >= 0) { - encr = 1; - if (auth == AUTH_NONE_OPEN) - auth = AUTH_NONE_WEP; - } else - encr = 0; - - authSelect->setCurrentIndex(auth); - authChanged(auth); - encrSelect->setCurrentIndex(encr); - - wepEnabled(auth == AUTH_NONE_WEP); - - getEapCapa(); - - if (flags.indexOf("[WPS") >= 0) - useWpsButton->setEnabled(true); - bssid = sel->text(1); -} - - -void NetworkConfig::authChanged(int sel) -{ - encrSelect->setEnabled(sel != AUTH_NONE_OPEN && sel != AUTH_NONE_WEP && - sel != AUTH_NONE_WEP_SHARED); - pskEdit->setEnabled(sel == AUTH_WPA_PSK || sel == AUTH_WPA2_PSK); - bool eap = sel == AUTH_IEEE8021X || sel == AUTH_WPA_EAP || - sel == AUTH_WPA2_EAP; - eapSelect->setEnabled(eap); - identityEdit->setEnabled(eap); - passwordEdit->setEnabled(eap); - cacertEdit->setEnabled(eap); - phase2Select->setEnabled(eap); - if (eap) - eapChanged(eapSelect->currentIndex()); - - while (encrSelect->count()) - encrSelect->removeItem(0); - - if (sel == AUTH_NONE_OPEN || sel == AUTH_NONE_WEP || - sel == AUTH_NONE_WEP_SHARED || sel == AUTH_IEEE8021X) { - encrSelect->addItem("None"); - encrSelect->addItem("WEP"); - encrSelect->setCurrentIndex(sel == AUTH_NONE_OPEN ? 0 : 1); - } else { - encrSelect->addItem("TKIP"); - encrSelect->addItem("CCMP"); - encrSelect->setCurrentIndex((sel == AUTH_WPA2_PSK || - sel == AUTH_WPA2_EAP) ? 1 : 0); - } - - wepEnabled(sel == AUTH_NONE_WEP || sel == AUTH_NONE_WEP_SHARED); -} - - -void NetworkConfig::eapChanged(int sel) -{ - QString prev_val = phase2Select->currentText(); - while (phase2Select->count()) - phase2Select->removeItem(0); - - QStringList inner; - inner << "PEAP" << "TTLS" << "FAST"; - if (!inner.contains(eapSelect->itemText(sel))) - return; - - phase2Select->addItem("[ any ]"); - - /* Add special cases based on outer method */ - if (eapSelect->currentText().compare("TTLS") == 0) { - phase2Select->addItem("PAP"); - phase2Select->addItem("CHAP"); - phase2Select->addItem("MSCHAP"); - phase2Select->addItem("MSCHAPv2"); - } else if (eapSelect->currentText().compare("FAST") == 0) - phase2Select->addItem("GTC(auth) + MSCHAPv2(prov)"); - - /* Add all enabled EAP methods that can be used in the tunnel */ - int i; - QStringList allowed; - allowed << "MSCHAPV2" << "MD5" << "GTC" << "TLS" << "OTP" << "SIM" - << "AKA"; - for (i = 0; i < eapSelect->count(); i++) { - if (allowed.contains(eapSelect->itemText(i))) { - phase2Select->addItem("EAP-" + eapSelect->itemText(i)); - } - } - - for (i = 0; i < phase2Select->count(); i++) { - if (phase2Select->itemText(i).compare(prev_val) == 0) { - phase2Select->setCurrentIndex(i); - break; - } - } -} - - -void NetworkConfig::addNetwork() -{ - char reply[10], cmd[256]; - size_t reply_len; - int id; - int psklen = pskEdit->text().length(); - int auth = authSelect->currentIndex(); - - if (auth == AUTH_WPA_PSK || auth == AUTH_WPA2_PSK) { - if (psklen < 8 || psklen > 64) { - QMessageBox::warning( - this, - tr("WPA Pre-Shared Key Error"), - tr("WPA-PSK requires a passphrase of 8 to 63 " - "characters\n" - "or 64 hex digit PSK")); - pskEdit->setFocus(); - return; - } - } - - if (idstrEdit->isEnabled() && !idstrEdit->text().isEmpty()) { - QRegExp rx("^(\\w|-)+$"); - if (rx.indexIn(idstrEdit->text()) < 0) { - QMessageBox::warning( - this, tr("Network ID Error"), - tr("Network ID String contains non-word " - "characters.\n" - "It must be a simple string, " - "without spaces, containing\n" - "only characters in this range: " - "[A-Za-z0-9_-]\n")); - idstrEdit->setFocus(); - return; - } - } - - if (wpagui == NULL) - return; - - memset(reply, 0, sizeof(reply)); - reply_len = sizeof(reply) - 1; - - if (new_network) { - wpagui->ctrlRequest("ADD_NETWORK", reply, &reply_len); - if (reply[0] == 'F') { - QMessageBox::warning(this, "wpa_gui", - tr("Failed to add " - "network to wpa_supplicant\n" - "configuration.")); - return; - } - id = atoi(reply); - } else - id = edit_network_id; - - setNetworkParam(id, "ssid", ssidEdit->text().toAscii().constData(), - true); - - const char *key_mgmt = NULL, *proto = NULL, *pairwise = NULL; - switch (auth) { - case AUTH_NONE_OPEN: - case AUTH_NONE_WEP: - case AUTH_NONE_WEP_SHARED: - key_mgmt = "NONE"; - break; - case AUTH_IEEE8021X: - key_mgmt = "IEEE8021X"; - break; - case AUTH_WPA_PSK: - key_mgmt = "WPA-PSK"; - proto = "WPA"; - break; - case AUTH_WPA_EAP: - key_mgmt = "WPA-EAP"; - proto = "WPA"; - break; - case AUTH_WPA2_PSK: - key_mgmt = "WPA-PSK"; - proto = "WPA2"; - break; - case AUTH_WPA2_EAP: - key_mgmt = "WPA-EAP"; - proto = "WPA2"; - break; - } - - if (auth == AUTH_NONE_WEP_SHARED) - setNetworkParam(id, "auth_alg", "SHARED", false); - else - setNetworkParam(id, "auth_alg", "OPEN", false); - - if (auth == AUTH_WPA_PSK || auth == AUTH_WPA_EAP || - auth == AUTH_WPA2_PSK || auth == AUTH_WPA2_EAP) { - int encr = encrSelect->currentIndex(); - if (encr == 0) - pairwise = "TKIP"; - else - pairwise = "CCMP"; - } - - if (proto) - setNetworkParam(id, "proto", proto, false); - if (key_mgmt) - setNetworkParam(id, "key_mgmt", key_mgmt, false); - if (pairwise) { - setNetworkParam(id, "pairwise", pairwise, false); - setNetworkParam(id, "group", "TKIP CCMP WEP104 WEP40", false); - } - if (pskEdit->isEnabled() && - strcmp(pskEdit->text().toAscii().constData(), - WPA_GUI_KEY_DATA) != 0) - setNetworkParam(id, "psk", - pskEdit->text().toAscii().constData(), - psklen != 64); - if (eapSelect->isEnabled()) { - const char *eap = - eapSelect->currentText().toAscii().constData(); - setNetworkParam(id, "eap", eap, false); - if (strcmp(eap, "SIM") == 0 || strcmp(eap, "AKA") == 0) - setNetworkParam(id, "pcsc", "", true); - else - setNetworkParam(id, "pcsc", "NULL", false); - } - if (phase2Select->isEnabled()) { - QString eap = eapSelect->currentText(); - QString inner = phase2Select->currentText(); - char phase2[32]; - phase2[0] = '\0'; - if (eap.compare("PEAP") == 0) { - if (inner.startsWith("EAP-")) - snprintf(phase2, sizeof(phase2), "auth=%s", - inner.right(inner.size() - 4). - toAscii().constData()); - } else if (eap.compare("TTLS") == 0) { - if (inner.startsWith("EAP-")) - snprintf(phase2, sizeof(phase2), "autheap=%s", - inner.right(inner.size() - 4). - toAscii().constData()); - else - snprintf(phase2, sizeof(phase2), "auth=%s", - inner.toAscii().constData()); - } else if (eap.compare("FAST") == 0) { - const char *provisioning = NULL; - if (inner.startsWith("EAP-")) { - snprintf(phase2, sizeof(phase2), "auth=%s", - inner.right(inner.size() - 4). - toAscii().constData()); - provisioning = "fast_provisioning=2"; - } else if (inner.compare("GTC(auth) + MSCHAPv2(prov)") - == 0) { - snprintf(phase2, sizeof(phase2), - "auth=GTC auth=MSCHAPV2"); - provisioning = "fast_provisioning=1"; - } else - provisioning = "fast_provisioning=3"; - if (provisioning) { - char blob[32]; - setNetworkParam(id, "phase1", provisioning, - true); - snprintf(blob, sizeof(blob), - "blob://fast-pac-%d", id); - setNetworkParam(id, "pac_file", blob, true); - } - } - if (phase2[0]) - setNetworkParam(id, "phase2", phase2, true); - else - setNetworkParam(id, "phase2", "NULL", false); - } else - setNetworkParam(id, "phase2", "NULL", false); - if (identityEdit->isEnabled() && identityEdit->text().length() > 0) - setNetworkParam(id, "identity", - identityEdit->text().toAscii().constData(), - true); - else - setNetworkParam(id, "identity", "NULL", false); - if (passwordEdit->isEnabled() && passwordEdit->text().length() > 0 && - strcmp(passwordEdit->text().toAscii().constData(), - WPA_GUI_KEY_DATA) != 0) - setNetworkParam(id, "password", - passwordEdit->text().toAscii().constData(), - true); - else if (passwordEdit->text().length() == 0) - setNetworkParam(id, "password", "NULL", false); - if (cacertEdit->isEnabled() && cacertEdit->text().length() > 0) - setNetworkParam(id, "ca_cert", - cacertEdit->text().toAscii().constData(), - true); - else - setNetworkParam(id, "ca_cert", "NULL", false); - writeWepKey(id, wep0Edit, 0); - writeWepKey(id, wep1Edit, 1); - writeWepKey(id, wep2Edit, 2); - writeWepKey(id, wep3Edit, 3); - - if (wep0Radio->isEnabled() && wep0Radio->isChecked()) - setNetworkParam(id, "wep_tx_keyidx", "0", false); - else if (wep1Radio->isEnabled() && wep1Radio->isChecked()) - setNetworkParam(id, "wep_tx_keyidx", "1", false); - else if (wep2Radio->isEnabled() && wep2Radio->isChecked()) - setNetworkParam(id, "wep_tx_keyidx", "2", false); - else if (wep3Radio->isEnabled() && wep3Radio->isChecked()) - setNetworkParam(id, "wep_tx_keyidx", "3", false); - - if (idstrEdit->isEnabled() && idstrEdit->text().length() > 0) - setNetworkParam(id, "id_str", - idstrEdit->text().toAscii().constData(), - true); - else - setNetworkParam(id, "id_str", "NULL", false); - - if (prioritySpinBox->isEnabled()) { - QString prio; - prio = prio.setNum(prioritySpinBox->value()); - setNetworkParam(id, "priority", prio.toAscii().constData(), - false); - } - - snprintf(cmd, sizeof(cmd), "ENABLE_NETWORK %d", id); - reply_len = sizeof(reply); - wpagui->ctrlRequest(cmd, reply, &reply_len); - if (strncmp(reply, "OK", 2) != 0) { - QMessageBox::warning(this, "wpa_gui", - tr("Failed to enable " - "network in wpa_supplicant\n" - "configuration.")); - /* Network was added, so continue anyway */ - } - wpagui->triggerUpdate(); - wpagui->ctrlRequest("SAVE_CONFIG", reply, &reply_len); - - close(); -} - - -void NetworkConfig::setWpaGui(WpaGui *_wpagui) -{ - wpagui = _wpagui; -} - - -int NetworkConfig::setNetworkParam(int id, const char *field, - const char *value, bool quote) -{ - char reply[10], cmd[256]; - size_t reply_len; - snprintf(cmd, sizeof(cmd), "SET_NETWORK %d %s %s%s%s", - id, field, quote ? "\"" : "", value, quote ? "\"" : ""); - reply_len = sizeof(reply); - wpagui->ctrlRequest(cmd, reply, &reply_len); - return strncmp(reply, "OK", 2) == 0 ? 0 : -1; -} - - -void NetworkConfig::encrChanged(const QString &) -{ -} - - -void NetworkConfig::wepEnabled(bool enabled) -{ - wep0Edit->setEnabled(enabled); - wep1Edit->setEnabled(enabled); - wep2Edit->setEnabled(enabled); - wep3Edit->setEnabled(enabled); - wep0Radio->setEnabled(enabled); - wep1Radio->setEnabled(enabled); - wep2Radio->setEnabled(enabled); - wep3Radio->setEnabled(enabled); -} - - -void NetworkConfig::writeWepKey(int network_id, QLineEdit *edit, int id) -{ - char buf[10]; - bool hex; - const char *txt, *pos; - size_t len; - - if (!edit->isEnabled() || edit->text().isEmpty()) - return; - - /* - * Assume hex key if only hex characters are present and length matches - * with 40, 104, or 128-bit key - */ - txt = edit->text().toAscii().constData(); - if (strcmp(txt, WPA_GUI_KEY_DATA) == 0) - return; - len = strlen(txt); - if (len == 0) - return; - pos = txt; - hex = true; - while (*pos) { - if (!((*pos >= '0' && *pos <= '9') || - (*pos >= 'a' && *pos <= 'f') || - (*pos >= 'A' && *pos <= 'F'))) { - hex = false; - break; - } - pos++; - } - if (hex && len != 10 && len != 26 && len != 32) - hex = false; - snprintf(buf, sizeof(buf), "wep_key%d", id); - setNetworkParam(network_id, buf, txt, !hex); -} - - -static int key_value_isset(const char *reply, size_t reply_len) -{ - return reply_len > 0 && (reply_len < 4 || memcmp(reply, "FAIL", 4) != 0); -} - - -void NetworkConfig::paramsFromConfig(int network_id) -{ - int i, res; - - edit_network_id = network_id; - getEapCapa(); - - char reply[1024], cmd[256], *pos; - size_t reply_len; - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d ssid", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && - reply_len >= 2 && reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - ssidEdit->setText(reply + 1); - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d proto", network_id); - reply_len = sizeof(reply) - 1; - int wpa = 0; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0) { - reply[reply_len] = '\0'; - if (strstr(reply, "RSN") || strstr(reply, "WPA2")) - wpa = 2; - else if (strstr(reply, "WPA")) - wpa = 1; - } - - int auth = AUTH_NONE_OPEN, encr = 0; - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d key_mgmt", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0) { - reply[reply_len] = '\0'; - if (strstr(reply, "WPA-EAP")) - auth = wpa & 2 ? AUTH_WPA2_EAP : AUTH_WPA_EAP; - else if (strstr(reply, "WPA-PSK")) - auth = wpa & 2 ? AUTH_WPA2_PSK : AUTH_WPA_PSK; - else if (strstr(reply, "IEEE8021X")) { - auth = AUTH_IEEE8021X; - encr = 1; - } - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d pairwise", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0) { - reply[reply_len] = '\0'; - if (strstr(reply, "CCMP") && auth != AUTH_NONE_OPEN && - auth != AUTH_NONE_WEP && auth != AUTH_NONE_WEP_SHARED) - encr = 1; - else if (strstr(reply, "TKIP")) - encr = 0; - else if (strstr(reply, "WEP")) - encr = 1; - else - encr = 0; - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d psk", network_id); - reply_len = sizeof(reply) - 1; - res = wpagui->ctrlRequest(cmd, reply, &reply_len); - if (res >= 0 && reply_len >= 2 && reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - pskEdit->setText(reply + 1); - } else if (res >= 0 && key_value_isset(reply, reply_len)) { - pskEdit->setText(WPA_GUI_KEY_DATA); - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d identity", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && - reply_len >= 2 && reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - identityEdit->setText(reply + 1); - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d password", network_id); - reply_len = sizeof(reply) - 1; - res = wpagui->ctrlRequest(cmd, reply, &reply_len); - if (res >= 0 && reply_len >= 2 && reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - passwordEdit->setText(reply + 1); - } else if (res >= 0 && key_value_isset(reply, reply_len)) { - passwordEdit->setText(WPA_GUI_KEY_DATA); - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d ca_cert", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && - reply_len >= 2 && reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - cacertEdit->setText(reply + 1); - } - - enum { NO_INNER, PEAP_INNER, TTLS_INNER, FAST_INNER } eap = NO_INNER; - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d eap", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && - reply_len >= 1) { - reply[reply_len] = '\0'; - for (i = 0; i < eapSelect->count(); i++) { - if (eapSelect->itemText(i).compare(reply) == 0) { - eapSelect->setCurrentIndex(i); - if (strcmp(reply, "PEAP") == 0) - eap = PEAP_INNER; - else if (strcmp(reply, "TTLS") == 0) - eap = TTLS_INNER; - else if (strcmp(reply, "FAST") == 0) - eap = FAST_INNER; - break; - } - } - } - - if (eap != NO_INNER) { - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d phase2", - network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && - reply_len >= 1) { - reply[reply_len] = '\0'; - eapChanged(eapSelect->currentIndex()); - } else - eap = NO_INNER; - } - - char *val; - val = reply + 1; - while (*(val + 1)) - val++; - if (*val == '"') - *val = '\0'; - - switch (eap) { - case PEAP_INNER: - if (strncmp(reply, "\"auth=", 6)) - break; - val = reply + 2; - memcpy(val, "EAP-", 4); - break; - case TTLS_INNER: - if (strncmp(reply, "\"autheap=", 9) == 0) { - val = reply + 5; - memcpy(val, "EAP-", 4); - } else if (strncmp(reply, "\"auth=", 6) == 0) - val = reply + 6; - break; - case FAST_INNER: - if (strncmp(reply, "\"auth=", 6)) - break; - if (strcmp(reply + 6, "GTC auth=MSCHAPV2") == 0) { - val = (char *) "GTC(auth) + MSCHAPv2(prov)"; - break; - } - val = reply + 2; - memcpy(val, "EAP-", 4); - break; - case NO_INNER: - break; - } - - for (i = 0; i < phase2Select->count(); i++) { - if (phase2Select->itemText(i).compare(val) == 0) { - phase2Select->setCurrentIndex(i); - break; - } - } - - for (i = 0; i < 4; i++) { - QLineEdit *wepEdit; - switch (i) { - default: - case 0: - wepEdit = wep0Edit; - break; - case 1: - wepEdit = wep1Edit; - break; - case 2: - wepEdit = wep2Edit; - break; - case 3: - wepEdit = wep3Edit; - break; - } - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d wep_key%d", - network_id, i); - reply_len = sizeof(reply) - 1; - res = wpagui->ctrlRequest(cmd, reply, &reply_len); - if (res >= 0 && reply_len >= 2 && reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - if (auth == AUTH_NONE_OPEN || auth == AUTH_IEEE8021X) { - if (auth == AUTH_NONE_OPEN) - auth = AUTH_NONE_WEP; - encr = 1; - } - - wepEdit->setText(reply + 1); - } else if (res >= 0 && key_value_isset(reply, reply_len)) { - if (auth == AUTH_NONE_OPEN || auth == AUTH_IEEE8021X) { - if (auth == AUTH_NONE_OPEN) - auth = AUTH_NONE_WEP; - encr = 1; - } - wepEdit->setText(WPA_GUI_KEY_DATA); - } - } - - if (auth == AUTH_NONE_WEP) { - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d auth_alg", - network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0) { - reply[reply_len] = '\0'; - if (strcmp(reply, "SHARED") == 0) - auth = AUTH_NONE_WEP_SHARED; - } - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d wep_tx_keyidx", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && reply_len >= 1) - { - reply[reply_len] = '\0'; - switch (atoi(reply)) { - case 0: - wep0Radio->setChecked(true); - break; - case 1: - wep1Radio->setChecked(true); - break; - case 2: - wep2Radio->setChecked(true); - break; - case 3: - wep3Radio->setChecked(true); - break; - } - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d id_str", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && - reply_len >= 2 && reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - idstrEdit->setText(reply + 1); - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d priority", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && reply_len >= 1) - { - reply[reply_len] = '\0'; - prioritySpinBox->setValue(atoi(reply)); - } - - authSelect->setCurrentIndex(auth); - authChanged(auth); - encrSelect->setCurrentIndex(encr); - wepEnabled(auth == AUTH_NONE_WEP || auth == AUTH_NONE_WEP_SHARED); - - removeButton->setEnabled(true); - addButton->setText("Save"); -} - - -void NetworkConfig::removeNetwork() -{ - char reply[10], cmd[256]; - size_t reply_len; - - if (QMessageBox::information( - this, "wpa_gui", - tr("This will permanently remove the network\n" - "from the configuration. Do you really want\n" - "to remove this network?"), - tr("Yes"), tr("No")) != 0) - return; - - snprintf(cmd, sizeof(cmd), "REMOVE_NETWORK %d", edit_network_id); - reply_len = sizeof(reply); - wpagui->ctrlRequest(cmd, reply, &reply_len); - if (strncmp(reply, "OK", 2) != 0) { - QMessageBox::warning(this, "wpa_gui", - tr("Failed to remove network from " - "wpa_supplicant\n" - "configuration.")); - } else { - wpagui->triggerUpdate(); - wpagui->ctrlRequest("SAVE_CONFIG", reply, &reply_len); - } - - close(); -} - - -void NetworkConfig::newNetwork() -{ - new_network = true; - getEapCapa(); -} - - -void NetworkConfig::getEapCapa() -{ - char reply[256]; - size_t reply_len; - - if (wpagui == NULL) - return; - - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest("GET_CAPABILITY eap", reply, &reply_len) < 0) - return; - reply[reply_len] = '\0'; - - QString res(reply); - QStringList types = res.split(QChar(' ')); - eapSelect->insertItems(-1, types); -} - - -void NetworkConfig::useWps() -{ - if (wpagui == NULL) - return; - wpagui->setBssFromScan(bssid); - wpagui->wpsDialog(); - close(); -} diff --git a/wpa_supplicant/wpa_gui-qt4/networkconfig.h b/wpa_supplicant/wpa_gui-qt4/networkconfig.h deleted file mode 100644 index 0ceeb417f028..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/networkconfig.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * wpa_gui - NetworkConfig class - * Copyright (c) 2005-2006, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#ifndef NETWORKCONFIG_H -#define NETWORKCONFIG_H - -#include -#include "ui_networkconfig.h" - -class WpaGui; - -class NetworkConfig : public QDialog, public Ui::NetworkConfig -{ - Q_OBJECT - -public: - NetworkConfig(QWidget *parent = 0, const char *name = 0, - bool modal = false, Qt::WFlags fl = 0); - ~NetworkConfig(); - - virtual void paramsFromScanResults(QTreeWidgetItem *sel); - virtual void setWpaGui(WpaGui *_wpagui); - virtual int setNetworkParam(int id, const char *field, - const char *value, bool quote); - virtual void paramsFromConfig(int network_id); - virtual void newNetwork(); - -public slots: - virtual void authChanged(int sel); - virtual void addNetwork(); - virtual void encrChanged(const QString &sel); - virtual void writeWepKey(int network_id, QLineEdit *edit, int id); - virtual void removeNetwork(); - virtual void eapChanged(int sel); - virtual void useWps(); - -protected slots: - virtual void languageChange(); - -private: - WpaGui *wpagui; - int edit_network_id; - bool new_network; - QString bssid; - - virtual void wepEnabled(bool enabled); - virtual void getEapCapa(); -}; - -#endif /* NETWORKCONFIG_H */ diff --git a/wpa_supplicant/wpa_gui-qt4/networkconfig.ui b/wpa_supplicant/wpa_gui-qt4/networkconfig.ui deleted file mode 100644 index 217a8ff58704..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/networkconfig.ui +++ /dev/null @@ -1,435 +0,0 @@ - - NetworkConfig - - - - 0 - 0 - 410 - 534 - - - - NetworkConfig - - - - - - Cancel - - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - SSID - - - - - - - Network name (Service Set IDentifier) - - - - - - - - - - Authentication - - - - - - - - Plaintext (open / no authentication) - - - - - Static WEP (no authentication) - - - - - Static WEP (Shared Key authentication) - - - - - IEEE 802.1X - - - - - WPA-Personal (PSK) - - - - - WPA-Enterprise (EAP) - - - - - WPA2-Personal (PSK) - - - - - WPA2-Enterprise (EAP) - - - - - - - - Encryption - - - - - - - - None - - - - - WEP - - - - - TKIP - - - - - CCMP - - - - - - - - PSK - - - - - - - false - - - WPA/WPA2 pre-shared key or passphrase - - - - - - QLineEdit::Password - - - - - - - EAP method - - - - - - - false - - - - - - - Identity - - - - - - - false - - - Username/Identity for EAP methods - - - - - - - Password - - - - - - - false - - - Password for EAP methods - - - QLineEdit::Password - - - - - - - CA certificate - - - - - - - false - - - - - - - true - - - WEP keys - - - - - - false - - - key 0 - - - - - - - false - - - key 1 - - - - - - - false - - - key 3 - - - - - - - false - - - key 2 - - - - - - - false - - - - - - - false - - - - - - - false - - - - - - - false - - - - - - - - - - true - - - Optional Settings - - - - - - Network Identification String - - - - - - - Network Priority - - - 10000 - - - 10 - - - - - - - IDString - - - - - - - Priority - - - - - - - Inner auth - - - - - - - false - - - - - - - - - - - - - Add - - - - - - - false - - - Remove - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - false - - - WPS - - - - - - - - - ssidEdit - authSelect - encrSelect - pskEdit - eapSelect - identityEdit - passwordEdit - cacertEdit - wep0Radio - wep0Edit - wep1Radio - wep1Edit - wep2Radio - wep2Edit - wep3Radio - wep3Edit - idstrEdit - prioritySpinBox - phase2Select - addButton - removeButton - cancelButton - - - qtreewidget.h - - - - diff --git a/wpa_supplicant/wpa_gui-qt4/peers.cpp b/wpa_supplicant/wpa_gui-qt4/peers.cpp deleted file mode 100644 index 7a992993d81b..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/peers.cpp +++ /dev/null @@ -1,956 +0,0 @@ -/* - * wpa_gui - Peers class - * Copyright (c) 2009, Atheros Communications - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#include -#include -#include - -#include "common/wpa_ctrl.h" -#include "wpagui.h" -#include "stringquery.h" -#include "peers.h" - - -enum { - peer_role_address = Qt::UserRole + 1, - peer_role_type, - peer_role_uuid, - peer_role_details, - peer_role_pri_dev_type, - peer_role_ssid, - peer_role_config_methods, - peer_role_dev_passwd_id, - peer_role_bss_id -}; - -/* - * TODO: - * - add current AP info (e.g., from WPS) in station mode - */ - -enum peer_type { - PEER_TYPE_ASSOCIATED_STATION, - PEER_TYPE_AP, - PEER_TYPE_AP_WPS, - PEER_TYPE_WPS_PIN_NEEDED, - PEER_TYPE_WPS_ER_AP, - PEER_TYPE_WPS_ER_AP_UNCONFIGURED, - PEER_TYPE_WPS_ER_ENROLLEE, - PEER_TYPE_WPS_ENROLLEE -}; - - -Peers::Peers(QWidget *parent, const char *, bool, Qt::WFlags) - : QDialog(parent) -{ - setupUi(this); - - if (QImageReader::supportedImageFormats().contains(QByteArray("svg"))) - { - default_icon = new QIcon(":/icons/wpa_gui.svg"); - ap_icon = new QIcon(":/icons/ap.svg"); - laptop_icon = new QIcon(":/icons/laptop.svg"); - } else { - default_icon = new QIcon(":/icons/wpa_gui.png"); - ap_icon = new QIcon(":/icons/ap.png"); - laptop_icon = new QIcon(":/icons/laptop.png"); - } - - peers->setModel(&model); - peers->setResizeMode(QListView::Adjust); - - peers->setContextMenuPolicy(Qt::CustomContextMenu); - connect(peers, SIGNAL(customContextMenuRequested(const QPoint &)), - this, SLOT(context_menu(const QPoint &))); - - wpagui = NULL; -} - - -void Peers::setWpaGui(WpaGui *_wpagui) -{ - wpagui = _wpagui; - update_peers(); -} - - -Peers::~Peers() -{ - delete default_icon; - delete ap_icon; - delete laptop_icon; -} - - -void Peers::languageChange() -{ - retranslateUi(this); -} - - -QString Peers::ItemType(int type) -{ - QString title; - switch (type) { - case PEER_TYPE_ASSOCIATED_STATION: - title = tr("Associated station"); - break; - case PEER_TYPE_AP: - title = tr("AP"); - break; - case PEER_TYPE_AP_WPS: - title = tr("WPS AP"); - break; - case PEER_TYPE_WPS_PIN_NEEDED: - title = tr("WPS PIN needed"); - break; - case PEER_TYPE_WPS_ER_AP: - title = tr("ER: WPS AP"); - break; - case PEER_TYPE_WPS_ER_AP_UNCONFIGURED: - title = tr("ER: WPS AP (Unconfigured)"); - break; - case PEER_TYPE_WPS_ER_ENROLLEE: - title = tr("ER: WPS Enrollee"); - break; - case PEER_TYPE_WPS_ENROLLEE: - title = tr("WPS Enrollee"); - break; - } - return title; -} - - -void Peers::context_menu(const QPoint &pos) -{ - QMenu *menu = new QMenu; - if (menu == NULL) - return; - - QModelIndex idx = peers->indexAt(pos); - if (idx.isValid()) { - ctx_item = model.itemFromIndex(idx); - int type = ctx_item->data(peer_role_type).toInt(); - menu->addAction(Peers::ItemType(type))->setEnabled(false); - menu->addSeparator(); - - int config_methods = -1; - QVariant var = ctx_item->data(peer_role_config_methods); - if (var.isValid()) - config_methods = var.toInt(); - - if ((type == PEER_TYPE_ASSOCIATED_STATION || - type == PEER_TYPE_AP_WPS || - type == PEER_TYPE_WPS_PIN_NEEDED || - type == PEER_TYPE_WPS_ER_ENROLLEE || - type == PEER_TYPE_WPS_ENROLLEE) && - (config_methods == -1 || (config_methods & 0x010c))) { - menu->addAction(tr("Enter WPS PIN"), this, - SLOT(enter_pin())); - } - - if (type == PEER_TYPE_AP_WPS) { - menu->addAction(tr("Connect (PBC)"), this, - SLOT(connect_pbc())); - } - - if ((type == PEER_TYPE_ASSOCIATED_STATION || - type == PEER_TYPE_WPS_ER_ENROLLEE || - type == PEER_TYPE_WPS_ENROLLEE) && - config_methods >= 0 && (config_methods & 0x0080)) { - menu->addAction(tr("Enroll (PBC)"), this, - SLOT(connect_pbc())); - } - - if (type == PEER_TYPE_WPS_ER_AP) { - menu->addAction(tr("Learn Configuration"), this, - SLOT(learn_ap_config())); - } - - menu->addAction(tr("Properties"), this, SLOT(properties())); - } else { - ctx_item = NULL; - menu->addAction(QString(tr("Refresh")), this, - SLOT(ctx_refresh())); - } - - menu->exec(peers->mapToGlobal(pos)); -} - - -void Peers::enter_pin() -{ - if (ctx_item == NULL) - return; - - int peer_type = ctx_item->data(peer_role_type).toInt(); - QString uuid; - QString addr; - if (peer_type == PEER_TYPE_WPS_ER_ENROLLEE) - uuid = ctx_item->data(peer_role_uuid).toString(); - else - addr = ctx_item->data(peer_role_address).toString(); - - StringQuery input(tr("PIN:")); - input.setWindowTitle(tr("PIN for ") + ctx_item->text()); - if (input.exec() != QDialog::Accepted) - return; - - char cmd[100]; - char reply[100]; - size_t reply_len; - - if (peer_type == PEER_TYPE_WPS_ER_ENROLLEE) { - snprintf(cmd, sizeof(cmd), "WPS_ER_PIN %s %s", - uuid.toAscii().constData(), - input.get_string().toAscii().constData()); - } else { - snprintf(cmd, sizeof(cmd), "WPS_PIN %s %s", - addr.toAscii().constData(), - input.get_string().toAscii().constData()); - } - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) < 0) { - QMessageBox msg; - msg.setIcon(QMessageBox::Warning); - msg.setText(tr("Failed to set the WPS PIN.")); - msg.exec(); - } -} - - -void Peers::ctx_refresh() -{ - update_peers(); -} - - -void Peers::add_station(QString info) -{ - QStringList lines = info.split(QRegExp("\\n")); - QString name; - - for (QStringList::Iterator it = lines.begin(); - it != lines.end(); it++) { - int pos = (*it).indexOf('=') + 1; - if (pos < 1) - continue; - - if ((*it).startsWith("wpsDeviceName=")) - name = (*it).mid(pos); - } - - if (name.isEmpty()) - name = lines[0]; - - QStandardItem *item = new QStandardItem(*laptop_icon, name); - if (item) { - item->setData(lines[0], peer_role_address); - item->setData(PEER_TYPE_ASSOCIATED_STATION, - peer_role_type); - item->setData(info, peer_role_details); - item->setToolTip(ItemType(PEER_TYPE_ASSOCIATED_STATION)); - model.appendRow(item); - } -} - - -void Peers::add_stations() -{ - char reply[2048]; - size_t reply_len; - char cmd[30]; - int res; - - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest("STA-FIRST", reply, &reply_len) < 0) - return; - - do { - reply[reply_len] = '\0'; - QString info(reply); - char *txt = reply; - while (*txt != '\0' && *txt != '\n') - txt++; - *txt++ = '\0'; - if (strncmp(reply, "FAIL", 4) == 0 || - strncmp(reply, "UNKNOWN", 7) == 0) - break; - - add_station(info); - - reply_len = sizeof(reply) - 1; - snprintf(cmd, sizeof(cmd), "STA-NEXT %s", reply); - res = wpagui->ctrlRequest(cmd, reply, &reply_len); - } while (res >= 0); -} - - -void Peers::add_single_station(const char *addr) -{ - char reply[2048]; - size_t reply_len; - char cmd[30]; - - reply_len = sizeof(reply) - 1; - snprintf(cmd, sizeof(cmd), "STA %s", addr); - if (wpagui->ctrlRequest(cmd, reply, &reply_len) < 0) - return; - - reply[reply_len] = '\0'; - QString info(reply); - char *txt = reply; - while (*txt != '\0' && *txt != '\n') - txt++; - *txt++ = '\0'; - if (strncmp(reply, "FAIL", 4) == 0 || - strncmp(reply, "UNKNOWN", 7) == 0) - return; - - add_station(info); -} - - -void Peers::remove_bss(int id) -{ - if (model.rowCount() == 0) - return; - - QModelIndexList lst = model.match(model.index(0, 0), peer_role_bss_id, - id); - if (lst.size() == 0) - return; - model.removeRow(lst[0].row()); -} - - -bool Peers::add_bss(const char *cmd) -{ - char reply[2048]; - size_t reply_len; - - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) < 0) - return false; - reply[reply_len] = '\0'; - - QString bss(reply); - if (bss.isEmpty() || bss.startsWith("FAIL")) - return false; - - QString ssid, bssid, flags, wps_name, pri_dev_type; - int id = -1; - - QStringList lines = bss.split(QRegExp("\\n")); - for (QStringList::Iterator it = lines.begin(); - it != lines.end(); it++) { - int pos = (*it).indexOf('=') + 1; - if (pos < 1) - continue; - - if ((*it).startsWith("bssid=")) - bssid = (*it).mid(pos); - else if ((*it).startsWith("id=")) - id = (*it).mid(pos).toInt(); - else if ((*it).startsWith("flags=")) - flags = (*it).mid(pos); - else if ((*it).startsWith("ssid=")) - ssid = (*it).mid(pos); - else if ((*it).startsWith("wps_device_name=")) - wps_name = (*it).mid(pos); - else if ((*it).startsWith("wps_primary_device_type=")) - pri_dev_type = (*it).mid(pos); - } - - QString name = wps_name; - if (name.isEmpty()) - name = ssid + "\n" + bssid; - - QStandardItem *item = new QStandardItem(*ap_icon, name); - if (item) { - item->setData(bssid, peer_role_address); - if (id >= 0) - item->setData(id, peer_role_bss_id); - int type; - if (flags.contains("[WPS")) - type = PEER_TYPE_AP_WPS; - else - type = PEER_TYPE_AP; - item->setData(type, peer_role_type); - - for (int i = 0; i < lines.size(); i++) { - if (lines[i].length() > 60) { - lines[i].remove(60, lines[i].length()); - lines[i] += ".."; - } - } - item->setToolTip(ItemType(type)); - item->setData(lines.join("\n"), peer_role_details); - if (!pri_dev_type.isEmpty()) - item->setData(pri_dev_type, - peer_role_pri_dev_type); - if (!ssid.isEmpty()) - item->setData(ssid, peer_role_ssid); - model.appendRow(item); - } - - return true; -} - - -void Peers::add_scan_results() -{ - int index; - char cmd[20]; - - index = 0; - while (wpagui) { - snprintf(cmd, sizeof(cmd), "BSS %d", index++); - if (index > 1000) - break; - - if (!add_bss(cmd)) - break; - } -} - - -void Peers::update_peers() -{ - model.clear(); - if (wpagui == NULL) - return; - - char reply[20]; - size_t replylen = sizeof(reply) - 1; - wpagui->ctrlRequest("WPS_ER_START", reply, &replylen); - - add_stations(); - add_scan_results(); -} - - -QStandardItem * Peers::find_addr(QString addr) -{ - if (model.rowCount() == 0) - return NULL; - - QModelIndexList lst = model.match(model.index(0, 0), peer_role_address, - addr); - if (lst.size() == 0) - return NULL; - return model.itemFromIndex(lst[0]); -} - - -QStandardItem * Peers::find_uuid(QString uuid) -{ - if (model.rowCount() == 0) - return NULL; - - QModelIndexList lst = model.match(model.index(0, 0), peer_role_uuid, - uuid); - if (lst.size() == 0) - return NULL; - return model.itemFromIndex(lst[0]); -} - - -void Peers::event_notify(WpaMsg msg) -{ - QString text = msg.getMsg(); - - if (text.startsWith(WPS_EVENT_PIN_NEEDED)) { - /* - * WPS-PIN-NEEDED 5a02a5fa-9199-5e7c-bc46-e183d3cb32f7 - * 02:2a:c4:18:5b:f3 - * [Wireless Client|Company|cmodel|123|12345|1-0050F204-1] - */ - QStringList items = text.split(' '); - QString uuid = items[1]; - QString addr = items[2]; - QString name = ""; - - QStandardItem *item = find_addr(addr); - if (item) - return; - - int pos = text.indexOf('['); - if (pos >= 0) { - int pos2 = text.lastIndexOf(']'); - if (pos2 >= pos) { - items = text.mid(pos + 1, pos2 - pos - 1). - split('|'); - name = items[0]; - items.append(addr); - } - } - - item = new QStandardItem(*laptop_icon, name); - if (item) { - item->setData(addr, peer_role_address); - item->setData(PEER_TYPE_WPS_PIN_NEEDED, - peer_role_type); - item->setToolTip(ItemType(PEER_TYPE_WPS_PIN_NEEDED)); - item->setData(items.join("\n"), peer_role_details); - item->setData(items[5], peer_role_pri_dev_type); - model.appendRow(item); - } - return; - } - - if (text.startsWith(AP_STA_CONNECTED)) { - /* AP-STA-CONNECTED 02:2a:c4:18:5b:f3 */ - QStringList items = text.split(' '); - QString addr = items[1]; - QStandardItem *item = find_addr(addr); - if (item == NULL || item->data(peer_role_type).toInt() != - PEER_TYPE_ASSOCIATED_STATION) - add_single_station(addr.toAscii().constData()); - return; - } - - if (text.startsWith(AP_STA_DISCONNECTED)) { - /* AP-STA-DISCONNECTED 02:2a:c4:18:5b:f3 */ - QStringList items = text.split(' '); - QString addr = items[1]; - - if (model.rowCount() == 0) - return; - - QModelIndexList lst = model.match(model.index(0, 0), - peer_role_address, addr); - for (int i = 0; i < lst.size(); i++) { - QStandardItem *item = model.itemFromIndex(lst[i]); - if (item && item->data(peer_role_type).toInt() == - PEER_TYPE_ASSOCIATED_STATION) - model.removeRow(lst[i].row()); - } - return; - } - - if (text.startsWith(WPS_EVENT_ER_AP_ADD)) { - /* - * WPS-ER-AP-ADD 87654321-9abc-def0-1234-56789abc0002 - * 02:11:22:33:44:55 pri_dev_type=6-0050F204-1 wps_state=1 - * |Very friendly name|Company|Long description of the model| - * WAP|http://w1.fi/|http://w1.fi/hostapd/ - */ - QStringList items = text.split(' '); - if (items.size() < 5) - return; - QString uuid = items[1]; - QString addr = items[2]; - QString pri_dev_type = items[3].mid(13); - int wps_state = items[4].mid(10).toInt(); - - int pos = text.indexOf('|'); - if (pos < 0) - return; - items = text.mid(pos + 1).split('|'); - if (items.size() < 1) - return; - - QStandardItem *item = find_uuid(uuid); - if (item) - return; - - item = new QStandardItem(*ap_icon, items[0]); - if (item) { - item->setData(uuid, peer_role_uuid); - item->setData(addr, peer_role_address); - int type = wps_state == 2 ? PEER_TYPE_WPS_ER_AP: - PEER_TYPE_WPS_ER_AP_UNCONFIGURED; - item->setData(type, peer_role_type); - item->setToolTip(ItemType(type)); - item->setData(pri_dev_type, peer_role_pri_dev_type); - item->setData(items.join(QString("\n")), - peer_role_details); - model.appendRow(item); - } - - return; - } - - if (text.startsWith(WPS_EVENT_ER_AP_REMOVE)) { - /* WPS-ER-AP-REMOVE 87654321-9abc-def0-1234-56789abc0002 */ - QStringList items = text.split(' '); - if (items.size() < 2) - return; - if (model.rowCount() == 0) - return; - - QModelIndexList lst = model.match(model.index(0, 0), - peer_role_uuid, items[1]); - for (int i = 0; i < lst.size(); i++) { - QStandardItem *item = model.itemFromIndex(lst[i]); - if (item && - (item->data(peer_role_type).toInt() == - PEER_TYPE_WPS_ER_AP || - item->data(peer_role_type).toInt() == - PEER_TYPE_WPS_ER_AP_UNCONFIGURED)) - model.removeRow(lst[i].row()); - } - return; - } - - if (text.startsWith(WPS_EVENT_ER_ENROLLEE_ADD)) { - /* - * WPS-ER-ENROLLEE-ADD 2b7093f1-d6fb-5108-adbb-bea66bb87333 - * 02:66:a0:ee:17:27 M1=1 config_methods=0x14d dev_passwd_id=0 - * pri_dev_type=1-0050F204-1 - * |Wireless Client|Company|cmodel|123|12345| - */ - QStringList items = text.split(' '); - if (items.size() < 3) - return; - QString uuid = items[1]; - QString addr = items[2]; - QString pri_dev_type = items[6].mid(13); - int config_methods = -1; - int dev_passwd_id = -1; - - for (int i = 3; i < items.size(); i++) { - int pos = items[i].indexOf('=') + 1; - if (pos < 1) - continue; - QString val = items[i].mid(pos); - if (items[i].startsWith("config_methods=")) { - config_methods = val.toInt(0, 0); - } else if (items[i].startsWith("dev_passwd_id=")) { - dev_passwd_id = val.toInt(); - } - } - - int pos = text.indexOf('|'); - if (pos < 0) - return; - items = text.mid(pos + 1).split('|'); - if (items.size() < 1) - return; - QString name = items[0]; - if (name.length() == 0) - name = addr; - - remove_enrollee_uuid(uuid); - - QStandardItem *item; - item = new QStandardItem(*laptop_icon, name); - if (item) { - item->setData(uuid, peer_role_uuid); - item->setData(addr, peer_role_address); - item->setData(PEER_TYPE_WPS_ER_ENROLLEE, - peer_role_type); - item->setToolTip(ItemType(PEER_TYPE_WPS_ER_ENROLLEE)); - item->setData(items.join(QString("\n")), - peer_role_details); - item->setData(pri_dev_type, peer_role_pri_dev_type); - if (config_methods >= 0) - item->setData(config_methods, - peer_role_config_methods); - if (dev_passwd_id >= 0) - item->setData(dev_passwd_id, - peer_role_dev_passwd_id); - model.appendRow(item); - } - - return; - } - - if (text.startsWith(WPS_EVENT_ER_ENROLLEE_REMOVE)) { - /* - * WPS-ER-ENROLLEE-REMOVE 2b7093f1-d6fb-5108-adbb-bea66bb87333 - * 02:66:a0:ee:17:27 - */ - QStringList items = text.split(' '); - if (items.size() < 2) - return; - remove_enrollee_uuid(items[1]); - return; - } - - if (text.startsWith(WPS_EVENT_ENROLLEE_SEEN)) { - /* TODO: need to time out this somehow or remove on successful - * WPS run, etc. */ - /* - * WPS-ENROLLEE-SEEN 02:00:00:00:01:00 - * 572cf82f-c957-5653-9b16-b5cfb298abf1 1-0050F204-1 0x80 4 1 - * [Wireless Client] - * (MAC addr, UUID-E, pri dev type, config methods, - * dev passwd id, request type, [dev name]) - */ - QStringList items = text.split(' '); - if (items.size() < 7) - return; - QString addr = items[1]; - QString uuid = items[2]; - QString pri_dev_type = items[3]; - int config_methods = items[4].toInt(0, 0); - int dev_passwd_id = items[5].toInt(); - QString name; - - int pos = text.indexOf('['); - if (pos >= 0) { - int pos2 = text.lastIndexOf(']'); - if (pos2 >= pos) { - QStringList items2 = - text.mid(pos + 1, pos2 - pos - 1). - split('|'); - name = items2[0]; - } - } - if (name.isEmpty()) - name = addr; - - QStandardItem *item; - - item = find_uuid(uuid); - if (item) { - QVariant var = item->data(peer_role_config_methods); - QVariant var2 = item->data(peer_role_dev_passwd_id); - if ((var.isValid() && config_methods != var.toInt()) || - (var2.isValid() && dev_passwd_id != var2.toInt())) - remove_enrollee_uuid(uuid); - else - return; - } - - item = new QStandardItem(*laptop_icon, name); - if (item) { - item->setData(uuid, peer_role_uuid); - item->setData(addr, peer_role_address); - item->setData(PEER_TYPE_WPS_ENROLLEE, - peer_role_type); - item->setToolTip(ItemType(PEER_TYPE_WPS_ENROLLEE)); - item->setData(items.join(QString("\n")), - peer_role_details); - item->setData(pri_dev_type, peer_role_pri_dev_type); - item->setData(config_methods, - peer_role_config_methods); - item->setData(dev_passwd_id, peer_role_dev_passwd_id); - model.appendRow(item); - } - - return; - } - - if (text.startsWith(WPA_EVENT_BSS_ADDED)) { - /* CTRL-EVENT-BSS-ADDED 34 00:11:22:33:44:55 */ - QStringList items = text.split(' '); - if (items.size() < 2) - return; - char cmd[20]; - snprintf(cmd, sizeof(cmd), "BSS ID-%d", items[1].toInt()); - add_bss(cmd); - return; - } - - if (text.startsWith(WPA_EVENT_BSS_REMOVED)) { - /* CTRL-EVENT-BSS-REMOVED 34 00:11:22:33:44:55 */ - QStringList items = text.split(' '); - if (items.size() < 2) - return; - remove_bss(items[1].toInt()); - return; - } -} - - -void Peers::closeEvent(QCloseEvent *) -{ - if (wpagui) { - char reply[20]; - size_t replylen = sizeof(reply) - 1; - wpagui->ctrlRequest("WPS_ER_STOP", reply, &replylen); - } -} - - -void Peers::done(int r) -{ - QDialog::done(r); - close(); -} - - -void Peers::remove_enrollee_uuid(QString uuid) -{ - if (model.rowCount() == 0) - return; - - QModelIndexList lst = model.match(model.index(0, 0), - peer_role_uuid, uuid); - for (int i = 0; i < lst.size(); i++) { - QStandardItem *item = model.itemFromIndex(lst[i]); - if (item == NULL) - continue; - int type = item->data(peer_role_type).toInt(); - if (type == PEER_TYPE_WPS_ER_ENROLLEE || - type == PEER_TYPE_WPS_ENROLLEE) - model.removeRow(lst[i].row()); - } -} - - -void Peers::properties() -{ - if (ctx_item == NULL) - return; - - QMessageBox msg(this); - msg.setStandardButtons(QMessageBox::Ok); - msg.setDefaultButton(QMessageBox::Ok); - msg.setEscapeButton(QMessageBox::Ok); - msg.setWindowTitle(tr("Peer Properties")); - - int type = ctx_item->data(peer_role_type).toInt(); - QString title = Peers::ItemType(type); - - msg.setText(title + QString("\n") + tr("Name: ") + ctx_item->text()); - - QVariant var; - QString info; - - var = ctx_item->data(peer_role_address); - if (var.isValid()) - info += tr("Address: ") + var.toString() + QString("\n"); - - var = ctx_item->data(peer_role_uuid); - if (var.isValid()) - info += tr("UUID: ") + var.toString() + QString("\n"); - - var = ctx_item->data(peer_role_pri_dev_type); - if (var.isValid()) - info += tr("Primary Device Type: ") + var.toString() + - QString("\n"); - - var = ctx_item->data(peer_role_ssid); - if (var.isValid()) - info += tr("SSID: ") + var.toString() + QString("\n"); - - var = ctx_item->data(peer_role_config_methods); - if (var.isValid()) { - int methods = var.toInt(); - info += tr("Configuration Methods: "); - if (methods & 0x0001) - info += tr("[USBA]"); - if (methods & 0x0002) - info += tr("[Ethernet]"); - if (methods & 0x0004) - info += tr("[Label]"); - if (methods & 0x0008) - info += tr("[Display]"); - if (methods & 0x0010) - info += tr("[Ext. NFC Token]"); - if (methods & 0x0020) - info += tr("[Int. NFC Token]"); - if (methods & 0x0040) - info += tr("[NFC Interface]"); - if (methods & 0x0080) - info += tr("[Push Button]"); - if (methods & 0x0100) - info += tr("[Keypad]"); - info += "\n"; - } - - var = ctx_item->data(peer_role_dev_passwd_id); - if (var.isValid()) { - info += tr("Device Password ID: ") + var.toString(); - switch (var.toInt()) { - case 0: - info += tr(" (Default PIN)"); - break; - case 1: - info += tr(" (User-specified PIN)"); - break; - case 2: - info += tr(" (Machine-specified PIN)"); - break; - case 3: - info += tr(" (Rekey)"); - break; - case 4: - info += tr(" (Push Button)"); - break; - case 5: - info += tr(" (Registrar-specified)"); - break; - } - info += "\n"; - } - - msg.setInformativeText(info); - - var = ctx_item->data(peer_role_details); - if (var.isValid()) - msg.setDetailedText(var.toString()); - - msg.exec(); -} - - -void Peers::connect_pbc() -{ - if (ctx_item == NULL) - return; - - char cmd[100]; - char reply[100]; - size_t reply_len; - - int peer_type = ctx_item->data(peer_role_type).toInt(); - if (peer_type == PEER_TYPE_WPS_ER_ENROLLEE) { - snprintf(cmd, sizeof(cmd), "WPS_ER_PBC %s", - ctx_item->data(peer_role_uuid).toString().toAscii(). - constData()); - } else { - snprintf(cmd, sizeof(cmd), "WPS_PBC"); - } - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) < 0) { - QMessageBox msg; - msg.setIcon(QMessageBox::Warning); - msg.setText(tr("Failed to start WPS PBC.")); - msg.exec(); - } -} - - -void Peers::learn_ap_config() -{ - if (ctx_item == NULL) - return; - - QString uuid = ctx_item->data(peer_role_uuid).toString(); - - StringQuery input(tr("AP PIN:")); - input.setWindowTitle(tr("AP PIN for ") + ctx_item->text()); - if (input.exec() != QDialog::Accepted) - return; - - char cmd[100]; - char reply[100]; - size_t reply_len; - - snprintf(cmd, sizeof(cmd), "WPS_ER_LEARN %s %s", - uuid.toAscii().constData(), - input.get_string().toAscii().constData()); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) < 0) { - QMessageBox msg; - msg.setIcon(QMessageBox::Warning); - msg.setText(tr("Failed to start learning AP configuration.")); - msg.exec(); - } -} diff --git a/wpa_supplicant/wpa_gui-qt4/peers.h b/wpa_supplicant/wpa_gui-qt4/peers.h deleted file mode 100644 index 89b7b5bbabd6..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/peers.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * wpa_gui - Peers class - * Copyright (c) 2009, Atheros Communications - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#ifndef PEERS_H -#define PEERS_H - -#include -#include -#include "wpamsg.h" -#include "ui_peers.h" - -class WpaGui; - -class Peers : public QDialog, public Ui::Peers -{ - Q_OBJECT - -public: - Peers(QWidget *parent = 0, const char *name = 0, - bool modal = false, Qt::WFlags fl = 0); - ~Peers(); - void setWpaGui(WpaGui *_wpagui); - void event_notify(WpaMsg msg); - -public slots: - virtual void context_menu(const QPoint &pos); - virtual void enter_pin(); - virtual void connect_pbc(); - virtual void learn_ap_config(); - virtual void ctx_refresh(); - virtual void properties(); - -protected slots: - virtual void languageChange(); - virtual void closeEvent(QCloseEvent *event); - -private: - void add_station(QString info); - void add_stations(); - void add_single_station(const char *addr); - bool add_bss(const char *cmd); - void remove_bss(int id); - void add_scan_results(); - void update_peers(); - QStandardItem * find_addr(QString addr); - QStandardItem * find_uuid(QString uuid); - void done(int r); - void remove_enrollee_uuid(QString uuid); - QString ItemType(int type); - - WpaGui *wpagui; - QStandardItemModel model; - QIcon *default_icon; - QIcon *ap_icon; - QIcon *laptop_icon; - QStandardItem *ctx_item; -}; - -#endif /* PEERS_H */ diff --git a/wpa_supplicant/wpa_gui-qt4/peers.ui b/wpa_supplicant/wpa_gui-qt4/peers.ui deleted file mode 100644 index 9508c254b70e..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/peers.ui +++ /dev/null @@ -1,40 +0,0 @@ - - - Peers - - - - 0 - 0 - 400 - 300 - - - - Peers - - - - - - - 0 - 0 - - - - true - - - QAbstractItemView::NoEditTriggers - - - QListView::IconMode - - - - - - - - diff --git a/wpa_supplicant/wpa_gui-qt4/scanresults.cpp b/wpa_supplicant/wpa_gui-qt4/scanresults.cpp deleted file mode 100644 index 459aa8c69637..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/scanresults.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* - * wpa_gui - ScanResults class - * Copyright (c) 2005-2006, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#include - -#include "scanresults.h" -#include "wpagui.h" -#include "networkconfig.h" - - -ScanResults::ScanResults(QWidget *parent, const char *, bool, Qt::WFlags) - : QDialog(parent) -{ - setupUi(this); - - connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); - connect(scanButton, SIGNAL(clicked()), this, SLOT(scanRequest())); - connect(scanResultsWidget, - SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, - SLOT(bssSelected(QTreeWidgetItem *))); - - wpagui = NULL; - scanResultsWidget->setItemsExpandable(FALSE); - scanResultsWidget->setRootIsDecorated(FALSE); -} - - -ScanResults::~ScanResults() -{ -} - - -void ScanResults::languageChange() -{ - retranslateUi(this); -} - - -void ScanResults::setWpaGui(WpaGui *_wpagui) -{ - wpagui = _wpagui; - updateResults(); -} - - -void ScanResults::updateResults() -{ - char reply[2048]; - size_t reply_len; - int index; - char cmd[20]; - - scanResultsWidget->clear(); - - index = 0; - while (wpagui) { - snprintf(cmd, sizeof(cmd), "BSS %d", index++); - if (index > 1000) - break; - - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) < 0) - break; - reply[reply_len] = '\0'; - - QString bss(reply); - if (bss.isEmpty() || bss.startsWith("FAIL")) - break; - - QString ssid, bssid, freq, signal, flags; - - QStringList lines = bss.split(QRegExp("\\n")); - for (QStringList::Iterator it = lines.begin(); - it != lines.end(); it++) { - int pos = (*it).indexOf('=') + 1; - if (pos < 1) - continue; - - if ((*it).startsWith("bssid=")) - bssid = (*it).mid(pos); - else if ((*it).startsWith("freq=")) - freq = (*it).mid(pos); - else if ((*it).startsWith("qual=")) - signal = (*it).mid(pos); - else if ((*it).startsWith("flags=")) - flags = (*it).mid(pos); - else if ((*it).startsWith("ssid=")) - ssid = (*it).mid(pos); - } - - QTreeWidgetItem *item = new QTreeWidgetItem(scanResultsWidget); - if (item) { - item->setText(0, ssid); - item->setText(1, bssid); - item->setText(2, freq); - item->setText(3, signal); - item->setText(4, flags); - } - - if (bssid.isEmpty()) - break; - } -} - - -void ScanResults::scanRequest() -{ - char reply[10]; - size_t reply_len = sizeof(reply); - - if (wpagui == NULL) - return; - - wpagui->ctrlRequest("SCAN", reply, &reply_len); -} - - -void ScanResults::getResults() -{ - updateResults(); -} - - -void ScanResults::bssSelected(QTreeWidgetItem *sel) -{ - NetworkConfig *nc = new NetworkConfig(); - if (nc == NULL) - return; - nc->setWpaGui(wpagui); - nc->paramsFromScanResults(sel); - nc->show(); - nc->exec(); -} diff --git a/wpa_supplicant/wpa_gui-qt4/scanresults.h b/wpa_supplicant/wpa_gui-qt4/scanresults.h deleted file mode 100644 index 2c4a1b0ace11..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/scanresults.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * wpa_gui - ScanResults class - * Copyright (c) 2005-2006, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#ifndef SCANRESULTS_H -#define SCANRESULTS_H - -#include -#include "ui_scanresults.h" - -class WpaGui; - -class ScanResults : public QDialog, public Ui::ScanResults -{ - Q_OBJECT - -public: - ScanResults(QWidget *parent = 0, const char *name = 0, - bool modal = false, Qt::WFlags fl = 0); - ~ScanResults(); - -public slots: - virtual void setWpaGui(WpaGui *_wpagui); - virtual void updateResults(); - virtual void scanRequest(); - virtual void getResults(); - virtual void bssSelected(QTreeWidgetItem *sel); - -protected slots: - virtual void languageChange(); - -private: - WpaGui *wpagui; -}; - -#endif /* SCANRESULTS_H */ diff --git a/wpa_supplicant/wpa_gui-qt4/scanresults.ui b/wpa_supplicant/wpa_gui-qt4/scanresults.ui deleted file mode 100644 index 81e405efc319..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/scanresults.ui +++ /dev/null @@ -1,94 +0,0 @@ - - ScanResults - - - - 0 - 0 - 452 - 244 - - - - Scan results - - - - - - QAbstractItemView::NoEditTriggers - - - true - - - true - - - 5 - - - - SSID - - - - - BSSID - - - - - frequency - - - - - signal - - - - - flags - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Scan - - - - - - - Close - - - - - - - - - - - - diff --git a/wpa_supplicant/wpa_gui-qt4/stringquery.cpp b/wpa_supplicant/wpa_gui-qt4/stringquery.cpp deleted file mode 100644 index 1ca98d9ffaed..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/stringquery.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - * wpa_gui - StringQuery class - * Copyright (c) 2009, Atheros Communications - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#include -#include - -#include "stringquery.h" - - -StringQuery::StringQuery(QString label) -{ - edit = new QLineEdit; - edit->setFocus(); - QGridLayout *layout = new QGridLayout; - layout->addWidget(new QLabel(label), 0, 0); - layout->addWidget(edit, 0, 1); - setLayout(layout); - - connect(edit, SIGNAL(returnPressed()), this, SLOT(accept())); -} - - -QString StringQuery::get_string() -{ - return edit->text(); -} diff --git a/wpa_supplicant/wpa_gui-qt4/stringquery.h b/wpa_supplicant/wpa_gui-qt4/stringquery.h deleted file mode 100644 index 1b68217c765f..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/stringquery.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * wpa_gui - StringQuery class - * Copyright (c) 2009, Atheros Communications - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#ifndef STRINGQUERY_H -#define STRINGQUERY_H - -#include -#include -#include - -class StringQuery : public QDialog -{ - Q_OBJECT - -public: - StringQuery(QString label); - QString get_string(); - -private: - QLineEdit *edit; -}; - -#endif /* STRINGQUERY_H */ diff --git a/wpa_supplicant/wpa_gui-qt4/userdatarequest.cpp b/wpa_supplicant/wpa_gui-qt4/userdatarequest.cpp deleted file mode 100644 index 345f965bc475..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/userdatarequest.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * wpa_gui - UserDataRequest class - * Copyright (c) 2005-2006, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#include "userdatarequest.h" -#include "wpagui.h" -#include "common/wpa_ctrl.h" - - -UserDataRequest::UserDataRequest(QWidget *parent, const char *, bool, - Qt::WFlags) - : QDialog(parent) -{ - setupUi(this); - - connect(buttonOk, SIGNAL(clicked()), this, SLOT(sendReply())); - connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject())); - connect(queryEdit, SIGNAL(returnPressed()), this, SLOT(sendReply())); -} - - -UserDataRequest::~UserDataRequest() -{ -} - - -void UserDataRequest::languageChange() -{ - retranslateUi(this); -} - - -int UserDataRequest::setParams(WpaGui *_wpagui, const char *reqMsg) -{ - char *tmp, *pos, *pos2; - wpagui = _wpagui; - tmp = strdup(reqMsg); - if (tmp == NULL) - return -1; - pos = strchr(tmp, '-'); - if (pos == NULL) { - free(tmp); - return -1; - } - *pos++ = '\0'; - field = tmp; - pos2 = strchr(pos, ':'); - if (pos2 == NULL) { - free(tmp); - return -1; - } - *pos2++ = '\0'; - - networkid = atoi(pos); - queryInfo->setText(pos2); - if (strcmp(tmp, "PASSWORD") == 0) { - queryField->setText(tr("Password: ")); - queryEdit->setEchoMode(QLineEdit::Password); - } else if (strcmp(tmp, "NEW_PASSWORD") == 0) { - queryField->setText(tr("New password: ")); - queryEdit->setEchoMode(QLineEdit::Password); - } else if (strcmp(tmp, "IDENTITY") == 0) - queryField->setText(tr("Identity: ")); - else if (strcmp(tmp, "PASSPHRASE") == 0) { - queryField->setText(tr("Private key passphrase: ")); - queryEdit->setEchoMode(QLineEdit::Password); - } else - queryField->setText(field + ":"); - free(tmp); - - return 0; -} - - -void UserDataRequest::sendReply() -{ - char reply[10]; - size_t reply_len = sizeof(reply); - - if (wpagui == NULL) { - reject(); - return; - } - - QString cmd = QString(WPA_CTRL_RSP) + field + '-' + - QString::number(networkid) + ':' + - queryEdit->text(); - wpagui->ctrlRequest(cmd.toAscii().constData(), reply, &reply_len); - accept(); -} diff --git a/wpa_supplicant/wpa_gui-qt4/userdatarequest.h b/wpa_supplicant/wpa_gui-qt4/userdatarequest.h deleted file mode 100644 index 2b6e8371bc65..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/userdatarequest.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * wpa_gui - UserDataRequest class - * Copyright (c) 2005-2006, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#ifndef USERDATAREQUEST_H -#define USERDATAREQUEST_H - -#include -#include "ui_userdatarequest.h" - -class WpaGui; - -class UserDataRequest : public QDialog, public Ui::UserDataRequest -{ - Q_OBJECT - -public: - UserDataRequest(QWidget *parent = 0, const char *name = 0, - bool modal = false, Qt::WFlags fl = 0); - ~UserDataRequest(); - - int setParams(WpaGui *_wpagui, const char *reqMsg); - -public slots: - virtual void sendReply(); - -protected slots: - virtual void languageChange(); - -private: - WpaGui *wpagui; - int networkid; - QString field; -}; - -#endif /* USERDATAREQUEST_H */ diff --git a/wpa_supplicant/wpa_gui-qt4/userdatarequest.ui b/wpa_supplicant/wpa_gui-qt4/userdatarequest.ui deleted file mode 100644 index 1de2a26da1cd..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/userdatarequest.ui +++ /dev/null @@ -1,109 +0,0 @@ - - - - - UserDataRequest - - - - 0 - 0 - 216 - 103 - - - - Authentication credentials required - - - true - - - - - - - - - - - - - 0 - - - - - - - - - - - - true - - - QLineEdit::Password - - - - - - - - - 0 - - - - - - 20 - 20 - - - - Expanding - - - Horizontal - - - - - - - &OK - - - - - - true - - - true - - - - - - - &Cancel - - - - - - true - - - - - - - - - - diff --git a/wpa_supplicant/wpa_gui-qt4/wpa_gui.desktop b/wpa_supplicant/wpa_gui-qt4/wpa_gui.desktop deleted file mode 100644 index ccc7d8741d02..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/wpa_gui.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=wpa_gui -Comment=Graphical user interface for wpa_supplicant -Exec=wpa_gui -Icon=wpa_gui -GenericName=wpa_supplicant user interface -Terminal=false -Type=Application -Categories=Qt;Network; diff --git a/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro b/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro deleted file mode 100644 index 85848d79949f..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro +++ /dev/null @@ -1,68 +0,0 @@ -TEMPLATE = app -LANGUAGE = C++ -TRANSLATIONS = lang/wpa_gui_de.ts - -CONFIG += qt warn_on release - -DEFINES += CONFIG_CTRL_IFACE - -win32 { - LIBS += -lws2_32 -static - DEFINES += CONFIG_NATIVE_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE - SOURCES += ../../src/utils/os_win32.c -} else:win32-g++ { - # cross compilation to win32 - LIBS += -lws2_32 -static -mwindows - DEFINES += CONFIG_NATIVE_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE - SOURCES += ../../src/utils/os_win32.c - RESOURCES += icons_png.qrc -} else:win32-x-g++ { - # cross compilation to win32 - LIBS += -lws2_32 -static -mwindows - DEFINES += CONFIG_NATIVE_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE - DEFINES += _X86_ - SOURCES += ../../src/utils/os_win32.c - RESOURCES += icons_png.qrc -} else { - DEFINES += CONFIG_CTRL_IFACE_UNIX - SOURCES += ../../src/utils/os_unix.c -} - -INCLUDEPATH += . .. ../../src ../../src/utils - -HEADERS += wpamsg.h \ - wpagui.h \ - eventhistory.h \ - scanresults.h \ - userdatarequest.h \ - networkconfig.h \ - addinterface.h \ - peers.h \ - stringquery.h - -SOURCES += main.cpp \ - wpagui.cpp \ - eventhistory.cpp \ - scanresults.cpp \ - userdatarequest.cpp \ - networkconfig.cpp \ - addinterface.cpp \ - peers.cpp \ - stringquery.cpp \ - ../../src/common/wpa_ctrl.c - -RESOURCES += icons.qrc - -FORMS = wpagui.ui \ - eventhistory.ui \ - scanresults.ui \ - userdatarequest.ui \ - networkconfig.ui \ - peers.ui - - -unix { - UI_DIR = .ui - MOC_DIR = .moc - OBJECTS_DIR = .obj -} diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp deleted file mode 100644 index 2057d67234e1..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp +++ /dev/null @@ -1,1732 +0,0 @@ -/* - * wpa_gui - WpaGui class - * Copyright (c) 2005-2010, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#ifdef __MINGW32__ -/* Need to get getopt() */ -#include -#endif - -#ifdef CONFIG_NATIVE_WINDOWS -#include -#endif /* CONFIG_NATIVE_WINDOWS */ - -#include -#include -#include -#include -#include - -#include "wpagui.h" -#include "dirent.h" -#include "common/wpa_ctrl.h" -#include "userdatarequest.h" -#include "networkconfig.h" - -#if 1 -/* Silence stdout */ -#define printf wpagui_printf -static int wpagui_printf(const char *, ...) -{ - return 0; -} -#endif - -WpaGui::WpaGui(QApplication *_app, QWidget *parent, const char *, Qt::WFlags) - : QMainWindow(parent), app(_app) -{ - setupUi(this); - -#ifdef CONFIG_NATIVE_WINDOWS - fileStopServiceAction = new QAction(this); - fileStopServiceAction->setObjectName("Stop Service"); - fileStopServiceAction->setIconText(tr("Stop Service")); - fileMenu->insertAction(actionWPS, fileStopServiceAction); - - fileStartServiceAction = new QAction(this); - fileStartServiceAction->setObjectName("Start Service"); - fileStartServiceAction->setIconText(tr("Start Service")); - fileMenu->insertAction(fileStopServiceAction, fileStartServiceAction); - - connect(fileStartServiceAction, SIGNAL(triggered()), this, - SLOT(startService())); - connect(fileStopServiceAction, SIGNAL(triggered()), this, - SLOT(stopService())); - - addInterfaceAction = new QAction(this); - addInterfaceAction->setIconText(tr("Add Interface")); - fileMenu->insertAction(fileStartServiceAction, addInterfaceAction); - - connect(addInterfaceAction, SIGNAL(triggered()), this, - SLOT(addInterface())); -#endif /* CONFIG_NATIVE_WINDOWS */ - - (void) statusBar(); - - /* - * Disable WPS tab by default; it will be enabled if wpa_supplicant is - * built with WPS support. - */ - wpsTab->setEnabled(false); - wpaguiTab->setTabEnabled(wpaguiTab->indexOf(wpsTab), false); - - connect(fileEventHistoryAction, SIGNAL(triggered()), this, - SLOT(eventHistory())); - connect(fileSaveConfigAction, SIGNAL(triggered()), this, - SLOT(saveConfig())); - connect(actionWPS, SIGNAL(triggered()), this, SLOT(wpsDialog())); - connect(actionPeers, SIGNAL(triggered()), this, SLOT(peersDialog())); - connect(fileExitAction, SIGNAL(triggered()), qApp, SLOT(quit())); - connect(networkAddAction, SIGNAL(triggered()), this, - SLOT(addNetwork())); - connect(networkEditAction, SIGNAL(triggered()), this, - SLOT(editSelectedNetwork())); - connect(networkRemoveAction, SIGNAL(triggered()), this, - SLOT(removeSelectedNetwork())); - connect(networkEnableAllAction, SIGNAL(triggered()), this, - SLOT(enableAllNetworks())); - connect(networkDisableAllAction, SIGNAL(triggered()), this, - SLOT(disableAllNetworks())); - connect(networkRemoveAllAction, SIGNAL(triggered()), this, - SLOT(removeAllNetworks())); - connect(helpIndexAction, SIGNAL(triggered()), this, SLOT(helpIndex())); - connect(helpContentsAction, SIGNAL(triggered()), this, - SLOT(helpContents())); - connect(helpAboutAction, SIGNAL(triggered()), this, SLOT(helpAbout())); - connect(disconnectButton, SIGNAL(clicked()), this, SLOT(disconnect())); - connect(scanButton, SIGNAL(clicked()), this, SLOT(scan())); - connect(connectButton, SIGNAL(clicked()), this, SLOT(connectB())); - connect(adapterSelect, SIGNAL(activated(const QString&)), this, - SLOT(selectAdapter(const QString&))); - connect(networkSelect, SIGNAL(activated(const QString&)), this, - SLOT(selectNetwork(const QString&))); - connect(addNetworkButton, SIGNAL(clicked()), this, SLOT(addNetwork())); - connect(editNetworkButton, SIGNAL(clicked()), this, - SLOT(editListedNetwork())); - connect(removeNetworkButton, SIGNAL(clicked()), this, - SLOT(removeListedNetwork())); - connect(networkList, SIGNAL(itemSelectionChanged()), this, - SLOT(updateNetworkDisabledStatus())); - connect(enableRadioButton, SIGNAL(toggled(bool)), this, - SLOT(enableListedNetwork(bool))); - connect(disableRadioButton, SIGNAL(toggled(bool)), this, - SLOT(disableListedNetwork(bool))); - connect(scanNetworkButton, SIGNAL(clicked()), this, SLOT(scan())); - connect(networkList, SIGNAL(itemDoubleClicked(QListWidgetItem *)), - this, SLOT(editListedNetwork())); - connect(wpaguiTab, SIGNAL(currentChanged(int)), this, - SLOT(tabChanged(int))); - connect(wpsPbcButton, SIGNAL(clicked()), this, SLOT(wpsPbc())); - connect(wpsPinButton, SIGNAL(clicked()), this, SLOT(wpsGeneratePin())); - connect(wpsApPinEdit, SIGNAL(textChanged(const QString &)), this, - SLOT(wpsApPinChanged(const QString &))); - connect(wpsApPinButton, SIGNAL(clicked()), this, SLOT(wpsApPin())); - - eh = NULL; - scanres = NULL; - peers = NULL; - add_iface = NULL; - udr = NULL; - tray_icon = NULL; - startInTray = false; - ctrl_iface = NULL; - ctrl_conn = NULL; - monitor_conn = NULL; - msgNotifier = NULL; - ctrl_iface_dir = strdup("/var/run/wpa_supplicant"); - - parse_argv(); - -#ifndef QT_NO_SESSIONMANAGER - if (app->isSessionRestored()) { - QSettings settings("wpa_supplicant", "wpa_gui"); - settings.beginGroup("state"); - if (app->sessionId().compare(settings.value("session_id"). - toString()) == 0) - startInTray = settings.value("in_tray").toBool(); - settings.endGroup(); - } -#endif - - if (QSystemTrayIcon::isSystemTrayAvailable()) - createTrayIcon(startInTray); - else - show(); - - connectedToService = false; - textStatus->setText(tr("connecting to wpa_supplicant")); - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), SLOT(ping())); - timer->setSingleShot(FALSE); - timer->start(1000); - - if (openCtrlConnection(ctrl_iface) < 0) { - printf("Failed to open control connection to " - "wpa_supplicant.\n"); - } - - updateStatus(); - networkMayHaveChanged = true; - updateNetworks(); -} - - -WpaGui::~WpaGui() -{ - delete msgNotifier; - - if (monitor_conn) { - wpa_ctrl_detach(monitor_conn); - wpa_ctrl_close(monitor_conn); - monitor_conn = NULL; - } - if (ctrl_conn) { - wpa_ctrl_close(ctrl_conn); - ctrl_conn = NULL; - } - - if (eh) { - eh->close(); - delete eh; - eh = NULL; - } - - if (scanres) { - scanres->close(); - delete scanres; - scanres = NULL; - } - - if (peers) { - peers->close(); - delete peers; - peers = NULL; - } - - if (add_iface) { - add_iface->close(); - delete add_iface; - add_iface = NULL; - } - - if (udr) { - udr->close(); - delete udr; - udr = NULL; - } - - free(ctrl_iface); - ctrl_iface = NULL; - - free(ctrl_iface_dir); - ctrl_iface_dir = NULL; -} - - -void WpaGui::languageChange() -{ - retranslateUi(this); -} - - -void WpaGui::parse_argv() -{ - int c; - for (;;) { - c = getopt(qApp->argc(), qApp->argv(), "i:p:t"); - if (c < 0) - break; - switch (c) { - case 'i': - free(ctrl_iface); - ctrl_iface = strdup(optarg); - break; - case 'p': - free(ctrl_iface_dir); - ctrl_iface_dir = strdup(optarg); - break; - case 't': - startInTray = true; - break; - } - } -} - - -int WpaGui::openCtrlConnection(const char *ifname) -{ - char *cfile; - int flen; - char buf[2048], *pos, *pos2; - size_t len; - - if (ifname) { - if (ifname != ctrl_iface) { - free(ctrl_iface); - ctrl_iface = strdup(ifname); - } - } else { -#ifdef CONFIG_CTRL_IFACE_UDP - free(ctrl_iface); - ctrl_iface = strdup("udp"); -#endif /* CONFIG_CTRL_IFACE_UDP */ -#ifdef CONFIG_CTRL_IFACE_UNIX - struct dirent *dent; - DIR *dir = opendir(ctrl_iface_dir); - free(ctrl_iface); - ctrl_iface = NULL; - if (dir) { - while ((dent = readdir(dir))) { -#ifdef _DIRENT_HAVE_D_TYPE - /* Skip the file if it is not a socket. - * Also accept DT_UNKNOWN (0) in case - * the C library or underlying file - * system does not support d_type. */ - if (dent->d_type != DT_SOCK && - dent->d_type != DT_UNKNOWN) - continue; -#endif /* _DIRENT_HAVE_D_TYPE */ - - if (strcmp(dent->d_name, ".") == 0 || - strcmp(dent->d_name, "..") == 0) - continue; - printf("Selected interface '%s'\n", - dent->d_name); - ctrl_iface = strdup(dent->d_name); - break; - } - closedir(dir); - } -#endif /* CONFIG_CTRL_IFACE_UNIX */ -#ifdef CONFIG_CTRL_IFACE_NAMED_PIPE - struct wpa_ctrl *ctrl; - int ret; - - free(ctrl_iface); - ctrl_iface = NULL; - - ctrl = wpa_ctrl_open(NULL); - if (ctrl) { - len = sizeof(buf) - 1; - ret = wpa_ctrl_request(ctrl, "INTERFACES", 10, buf, - &len, NULL); - if (ret >= 0) { - connectedToService = true; - buf[len] = '\0'; - pos = strchr(buf, '\n'); - if (pos) - *pos = '\0'; - ctrl_iface = strdup(buf); - } - wpa_ctrl_close(ctrl); - } -#endif /* CONFIG_CTRL_IFACE_NAMED_PIPE */ - } - - if (ctrl_iface == NULL) { -#ifdef CONFIG_NATIVE_WINDOWS - static bool first = true; - if (first && !serviceRunning()) { - first = false; - if (QMessageBox::warning( - this, qAppName(), - tr("wpa_supplicant service is not " - "running.\n" - "Do you want to start it?"), - QMessageBox::Yes | QMessageBox::No) == - QMessageBox::Yes) - startService(); - } -#endif /* CONFIG_NATIVE_WINDOWS */ - return -1; - } - -#ifdef CONFIG_CTRL_IFACE_UNIX - flen = strlen(ctrl_iface_dir) + strlen(ctrl_iface) + 2; - cfile = (char *) malloc(flen); - if (cfile == NULL) - return -1; - snprintf(cfile, flen, "%s/%s", ctrl_iface_dir, ctrl_iface); -#else /* CONFIG_CTRL_IFACE_UNIX */ - flen = strlen(ctrl_iface) + 1; - cfile = (char *) malloc(flen); - if (cfile == NULL) - return -1; - snprintf(cfile, flen, "%s", ctrl_iface); -#endif /* CONFIG_CTRL_IFACE_UNIX */ - - if (ctrl_conn) { - wpa_ctrl_close(ctrl_conn); - ctrl_conn = NULL; - } - - if (monitor_conn) { - delete msgNotifier; - msgNotifier = NULL; - wpa_ctrl_detach(monitor_conn); - wpa_ctrl_close(monitor_conn); - monitor_conn = NULL; - } - - printf("Trying to connect to '%s'\n", cfile); - ctrl_conn = wpa_ctrl_open(cfile); - if (ctrl_conn == NULL) { - free(cfile); - return -1; - } - monitor_conn = wpa_ctrl_open(cfile); - free(cfile); - if (monitor_conn == NULL) { - wpa_ctrl_close(ctrl_conn); - return -1; - } - if (wpa_ctrl_attach(monitor_conn)) { - printf("Failed to attach to wpa_supplicant\n"); - wpa_ctrl_close(monitor_conn); - monitor_conn = NULL; - wpa_ctrl_close(ctrl_conn); - ctrl_conn = NULL; - return -1; - } - -#if defined(CONFIG_CTRL_IFACE_UNIX) || defined(CONFIG_CTRL_IFACE_UDP) - msgNotifier = new QSocketNotifier(wpa_ctrl_get_fd(monitor_conn), - QSocketNotifier::Read, this); - connect(msgNotifier, SIGNAL(activated(int)), SLOT(receiveMsgs())); -#endif - - adapterSelect->clear(); - adapterSelect->addItem(ctrl_iface); - adapterSelect->setCurrentIndex(0); - - len = sizeof(buf) - 1; - if (wpa_ctrl_request(ctrl_conn, "INTERFACES", 10, buf, &len, NULL) >= - 0) { - buf[len] = '\0'; - pos = buf; - while (*pos) { - pos2 = strchr(pos, '\n'); - if (pos2) - *pos2 = '\0'; - if (strcmp(pos, ctrl_iface) != 0) - adapterSelect->addItem(pos); - if (pos2) - pos = pos2 + 1; - else - break; - } - } - - len = sizeof(buf) - 1; - if (wpa_ctrl_request(ctrl_conn, "GET_CAPABILITY eap", 18, buf, &len, - NULL) >= 0) { - buf[len] = '\0'; - - QString res(buf); - QStringList types = res.split(QChar(' ')); - bool wps = types.contains("WSC"); - actionWPS->setEnabled(wps); - wpsTab->setEnabled(wps); - wpaguiTab->setTabEnabled(wpaguiTab->indexOf(wpsTab), wps); - } - - return 0; -} - - -int WpaGui::ctrlRequest(const char *cmd, char *buf, size_t *buflen) -{ - int ret; - - if (ctrl_conn == NULL) - return -3; - ret = wpa_ctrl_request(ctrl_conn, cmd, strlen(cmd), buf, buflen, NULL); - if (ret == -2) - printf("'%s' command timed out.\n", cmd); - else if (ret < 0) - printf("'%s' command failed.\n", cmd); - - return ret; -} - - -QString WpaGui::wpaStateTranslate(char *state) -{ - if (!strcmp(state, "DISCONNECTED")) - return tr("Disconnected"); - else if (!strcmp(state, "INACTIVE")) - return tr("Inactive"); - else if (!strcmp(state, "SCANNING")) - return tr("Scanning"); - else if (!strcmp(state, "AUTHENTICATING")) - return tr("Authenticating"); - else if (!strcmp(state, "ASSOCIATING")) - return tr("Associating"); - else if (!strcmp(state, "ASSOCIATED")) - return tr("Associated"); - else if (!strcmp(state, "4WAY_HANDSHAKE")) - return tr("4-Way Handshake"); - else if (!strcmp(state, "GROUP_HANDSHAKE")) - return tr("Group Handshake"); - else if (!strcmp(state, "COMPLETED")) - return tr("Completed"); - else - return tr("Unknown"); -} - - -void WpaGui::updateStatus() -{ - char buf[2048], *start, *end, *pos; - size_t len; - - pingsToStatusUpdate = 10; - - len = sizeof(buf) - 1; - if (ctrl_conn == NULL || ctrlRequest("STATUS", buf, &len) < 0) { - textStatus->setText(tr("Could not get status from " - "wpa_supplicant")); - textAuthentication->clear(); - textEncryption->clear(); - textSsid->clear(); - textBssid->clear(); - textIpAddress->clear(); - -#ifdef CONFIG_NATIVE_WINDOWS - static bool first = true; - if (first && connectedToService && - (ctrl_iface == NULL || *ctrl_iface == '\0')) { - first = false; - if (QMessageBox::information( - this, qAppName(), - tr("No network interfaces in use.\n" - "Would you like to add one?"), - QMessageBox::Yes | QMessageBox::No) == - QMessageBox::Yes) - addInterface(); - } -#endif /* CONFIG_NATIVE_WINDOWS */ - return; - } - - buf[len] = '\0'; - - bool auth_updated = false, ssid_updated = false; - bool bssid_updated = false, ipaddr_updated = false; - bool status_updated = false; - char *pairwise_cipher = NULL, *group_cipher = NULL; - char *mode = NULL; - - start = buf; - while (*start) { - bool last = false; - end = strchr(start, '\n'); - if (end == NULL) { - last = true; - end = start; - while (end[0] && end[1]) - end++; - } - *end = '\0'; - - pos = strchr(start, '='); - if (pos) { - *pos++ = '\0'; - if (strcmp(start, "bssid") == 0) { - bssid_updated = true; - textBssid->setText(pos); - } else if (strcmp(start, "ssid") == 0) { - ssid_updated = true; - textSsid->setText(pos); - } else if (strcmp(start, "ip_address") == 0) { - ipaddr_updated = true; - textIpAddress->setText(pos); - } else if (strcmp(start, "wpa_state") == 0) { - status_updated = true; - textStatus->setText(wpaStateTranslate(pos)); - } else if (strcmp(start, "key_mgmt") == 0) { - auth_updated = true; - textAuthentication->setText(pos); - /* TODO: could add EAP status to this */ - } else if (strcmp(start, "pairwise_cipher") == 0) { - pairwise_cipher = pos; - } else if (strcmp(start, "group_cipher") == 0) { - group_cipher = pos; - } else if (strcmp(start, "mode") == 0) { - mode = pos; - } - } - - if (last) - break; - start = end + 1; - } - if (status_updated && mode) - textStatus->setText(textStatus->text() + " (" + mode + ")"); - - if (pairwise_cipher || group_cipher) { - QString encr; - if (pairwise_cipher && group_cipher && - strcmp(pairwise_cipher, group_cipher) != 0) { - encr.append(pairwise_cipher); - encr.append(" + "); - encr.append(group_cipher); - } else if (pairwise_cipher) { - encr.append(pairwise_cipher); - } else { - encr.append(group_cipher); - encr.append(" [group key only]"); - } - textEncryption->setText(encr); - } else - textEncryption->clear(); - - if (!status_updated) - textStatus->clear(); - if (!auth_updated) - textAuthentication->clear(); - if (!ssid_updated) - textSsid->clear(); - if (!bssid_updated) - textBssid->clear(); - if (!ipaddr_updated) - textIpAddress->clear(); -} - - -void WpaGui::updateNetworks() -{ - char buf[2048], *start, *end, *id, *ssid, *bssid, *flags; - size_t len; - int first_active = -1; - int was_selected = -1; - bool current = false; - - if (!networkMayHaveChanged) - return; - - if (networkList->currentRow() >= 0) - was_selected = networkList->currentRow(); - - networkSelect->clear(); - networkList->clear(); - - if (ctrl_conn == NULL) - return; - - len = sizeof(buf) - 1; - if (ctrlRequest("LIST_NETWORKS", buf, &len) < 0) - return; - - buf[len] = '\0'; - start = strchr(buf, '\n'); - if (start == NULL) - return; - start++; - - while (*start) { - bool last = false; - end = strchr(start, '\n'); - if (end == NULL) { - last = true; - end = start; - while (end[0] && end[1]) - end++; - } - *end = '\0'; - - id = start; - ssid = strchr(id, '\t'); - if (ssid == NULL) - break; - *ssid++ = '\0'; - bssid = strchr(ssid, '\t'); - if (bssid == NULL) - break; - *bssid++ = '\0'; - flags = strchr(bssid, '\t'); - if (flags == NULL) - break; - *flags++ = '\0'; - - QString network(id); - network.append(": "); - network.append(ssid); - networkSelect->addItem(network); - networkList->addItem(network); - - if (strstr(flags, "[CURRENT]")) { - networkSelect->setCurrentIndex(networkSelect->count() - - 1); - current = true; - } else if (first_active < 0 && - strstr(flags, "[DISABLED]") == NULL) - first_active = networkSelect->count() - 1; - - if (last) - break; - start = end + 1; - } - - if (networkSelect->count() > 1) - networkSelect->addItem(tr("Select any network")); - - if (!current && first_active >= 0) - networkSelect->setCurrentIndex(first_active); - - if (was_selected >= 0 && networkList->count() > 0) { - if (was_selected < networkList->count()) - networkList->setCurrentRow(was_selected); - else - networkList->setCurrentRow(networkList->count() - 1); - } - else - networkList->setCurrentRow(networkSelect->currentIndex()); - - networkMayHaveChanged = false; -} - - -void WpaGui::helpIndex() -{ - printf("helpIndex\n"); -} - - -void WpaGui::helpContents() -{ - printf("helpContents\n"); -} - - -void WpaGui::helpAbout() -{ - QMessageBox::about(this, "wpa_gui for wpa_supplicant", - "Copyright (c) 2003-2010,\n" - "Jouni Malinen \n" - "and contributors.\n" - "\n" - "This program is free software. You can\n" - "distribute it and/or modify it under the terms " - "of\n" - "the GNU General Public License version 2.\n" - "\n" - "Alternatively, this software may be distributed\n" - "under the terms of the BSD license.\n" - "\n" - "This product includes software developed\n" - "by the OpenSSL Project for use in the\n" - "OpenSSL Toolkit (http://www.openssl.org/)\n"); -} - - -void WpaGui::disconnect() -{ - char reply[10]; - size_t reply_len = sizeof(reply); - ctrlRequest("DISCONNECT", reply, &reply_len); - stopWpsRun(false); -} - - -void WpaGui::scan() -{ - if (scanres) { - scanres->close(); - delete scanres; - } - - scanres = new ScanResults(); - if (scanres == NULL) - return; - scanres->setWpaGui(this); - scanres->show(); - scanres->exec(); -} - - -void WpaGui::eventHistory() -{ - if (eh) { - eh->close(); - delete eh; - } - - eh = new EventHistory(); - if (eh == NULL) - return; - eh->addEvents(msgs); - eh->show(); - eh->exec(); -} - - -void WpaGui::ping() -{ - char buf[10]; - size_t len; - -#ifdef CONFIG_CTRL_IFACE_NAMED_PIPE - /* - * QSocketNotifier cannot be used with Windows named pipes, so use a - * timer to check for received messages for now. This could be - * optimized be doing something specific to named pipes or Windows - * events, but it is not clear what would be the best way of doing that - * in Qt. - */ - receiveMsgs(); -#endif /* CONFIG_CTRL_IFACE_NAMED_PIPE */ - - if (scanres && !scanres->isVisible()) { - delete scanres; - scanres = NULL; - } - - if (eh && !eh->isVisible()) { - delete eh; - eh = NULL; - } - - if (udr && !udr->isVisible()) { - delete udr; - udr = NULL; - } - - len = sizeof(buf) - 1; - if (ctrlRequest("PING", buf, &len) < 0) { - printf("PING failed - trying to reconnect\n"); - if (openCtrlConnection(ctrl_iface) >= 0) { - printf("Reconnected successfully\n"); - pingsToStatusUpdate = 0; - } - } - - pingsToStatusUpdate--; - if (pingsToStatusUpdate <= 0) { - updateStatus(); - updateNetworks(); - } - -#ifndef CONFIG_CTRL_IFACE_NAMED_PIPE - /* Use less frequent pings and status updates when the main window is - * hidden (running in taskbar). */ - int interval = isHidden() ? 5000 : 1000; - if (timer->interval() != interval) - timer->setInterval(interval); -#endif /* CONFIG_CTRL_IFACE_NAMED_PIPE */ -} - - -static int str_match(const char *a, const char *b) -{ - return strncmp(a, b, strlen(b)) == 0; -} - - -void WpaGui::processMsg(char *msg) -{ - char *pos = msg, *pos2; - int priority = 2; - - if (*pos == '<') { - /* skip priority */ - pos++; - priority = atoi(pos); - pos = strchr(pos, '>'); - if (pos) - pos++; - else - pos = msg; - } - - WpaMsg wm(pos, priority); - if (eh) - eh->addEvent(wm); - if (peers) - peers->event_notify(wm); - msgs.append(wm); - while (msgs.count() > 100) - msgs.pop_front(); - - /* Update last message with truncated version of the event */ - if (strncmp(pos, "CTRL-", 5) == 0) { - pos2 = strchr(pos, str_match(pos, WPA_CTRL_REQ) ? ':' : ' '); - if (pos2) - pos2++; - else - pos2 = pos; - } else - pos2 = pos; - QString lastmsg = pos2; - lastmsg.truncate(40); - textLastMessage->setText(lastmsg); - - pingsToStatusUpdate = 0; - networkMayHaveChanged = true; - - if (str_match(pos, WPA_CTRL_REQ)) - processCtrlReq(pos + strlen(WPA_CTRL_REQ)); - else if (str_match(pos, WPA_EVENT_SCAN_RESULTS) && scanres) - scanres->updateResults(); - else if (str_match(pos, WPA_EVENT_DISCONNECTED)) - showTrayMessage(QSystemTrayIcon::Information, 3, - tr("Disconnected from network.")); - else if (str_match(pos, WPA_EVENT_CONNECTED)) { - showTrayMessage(QSystemTrayIcon::Information, 3, - tr("Connection to network established.")); - QTimer::singleShot(5 * 1000, this, SLOT(showTrayStatus())); - stopWpsRun(true); - } else if (str_match(pos, WPS_EVENT_AP_AVAILABLE_PBC)) { - wpsStatusText->setText(tr("WPS AP in active PBC mode found")); - if (textStatus->text() == "INACTIVE" || - textStatus->text() == "DISCONNECTED") - wpaguiTab->setCurrentWidget(wpsTab); - wpsInstructions->setText(tr("Press the PBC button on the " - "screen to start registration")); - } else if (str_match(pos, WPS_EVENT_AP_AVAILABLE_PIN)) { - wpsStatusText->setText(tr("WPS AP with recently selected " - "registrar")); - if (textStatus->text() == "INACTIVE" || - textStatus->text() == "DISCONNECTED") - wpaguiTab->setCurrentWidget(wpsTab); - } else if (str_match(pos, WPS_EVENT_AP_AVAILABLE)) { - wpsStatusText->setText(tr("WPS AP detected")); - } else if (str_match(pos, WPS_EVENT_OVERLAP)) { - wpsStatusText->setText(tr("PBC mode overlap detected")); - wpsInstructions->setText(tr("More than one AP is currently in " - "active WPS PBC mode. Wait couple " - "of minutes and try again")); - wpaguiTab->setCurrentWidget(wpsTab); - } else if (str_match(pos, WPS_EVENT_CRED_RECEIVED)) { - wpsStatusText->setText(tr("Network configuration received")); - wpaguiTab->setCurrentWidget(wpsTab); - } else if (str_match(pos, WPA_EVENT_EAP_METHOD)) { - if (strstr(pos, "(WSC)")) - wpsStatusText->setText(tr("Registration started")); - } else if (str_match(pos, WPS_EVENT_M2D)) { - wpsStatusText->setText(tr("Registrar does not yet know PIN")); - } else if (str_match(pos, WPS_EVENT_FAIL)) { - wpsStatusText->setText(tr("Registration failed")); - } else if (str_match(pos, WPS_EVENT_SUCCESS)) { - wpsStatusText->setText(tr("Registration succeeded")); - } -} - - -void WpaGui::processCtrlReq(const char *req) -{ - if (udr) { - udr->close(); - delete udr; - } - udr = new UserDataRequest(); - if (udr == NULL) - return; - if (udr->setParams(this, req) < 0) { - delete udr; - udr = NULL; - return; - } - udr->show(); - udr->exec(); -} - - -void WpaGui::receiveMsgs() -{ - char buf[256]; - size_t len; - - while (monitor_conn && wpa_ctrl_pending(monitor_conn) > 0) { - len = sizeof(buf) - 1; - if (wpa_ctrl_recv(monitor_conn, buf, &len) == 0) { - buf[len] = '\0'; - processMsg(buf); - } - } -} - - -void WpaGui::connectB() -{ - char reply[10]; - size_t reply_len = sizeof(reply); - ctrlRequest("REASSOCIATE", reply, &reply_len); -} - - -void WpaGui::selectNetwork( const QString &sel ) -{ - QString cmd(sel); - char reply[10]; - size_t reply_len = sizeof(reply); - - if (cmd.contains(QRegExp("^\\d+:"))) - cmd.truncate(cmd.indexOf(':')); - else - cmd = "any"; - cmd.prepend("SELECT_NETWORK "); - ctrlRequest(cmd.toAscii().constData(), reply, &reply_len); - triggerUpdate(); - stopWpsRun(false); -} - - -void WpaGui::enableNetwork(const QString &sel) -{ - QString cmd(sel); - char reply[10]; - size_t reply_len = sizeof(reply); - - if (cmd.contains(QRegExp("^\\d+:"))) - cmd.truncate(cmd.indexOf(':')); - else if (!cmd.startsWith("all")) { - printf("Invalid editNetwork '%s'\n", - cmd.toAscii().constData()); - return; - } - cmd.prepend("ENABLE_NETWORK "); - ctrlRequest(cmd.toAscii().constData(), reply, &reply_len); - triggerUpdate(); -} - - -void WpaGui::disableNetwork(const QString &sel) -{ - QString cmd(sel); - char reply[10]; - size_t reply_len = sizeof(reply); - - if (cmd.contains(QRegExp("^\\d+:"))) - cmd.truncate(cmd.indexOf(':')); - else if (!cmd.startsWith("all")) { - printf("Invalid editNetwork '%s'\n", - cmd.toAscii().constData()); - return; - } - cmd.prepend("DISABLE_NETWORK "); - ctrlRequest(cmd.toAscii().constData(), reply, &reply_len); - triggerUpdate(); -} - - -void WpaGui::editNetwork(const QString &sel) -{ - QString cmd(sel); - int id = -1; - - if (cmd.contains(QRegExp("^\\d+:"))) { - cmd.truncate(cmd.indexOf(':')); - id = cmd.toInt(); - } - - NetworkConfig *nc = new NetworkConfig(); - if (nc == NULL) - return; - nc->setWpaGui(this); - - if (id >= 0) - nc->paramsFromConfig(id); - else - nc->newNetwork(); - - nc->show(); - nc->exec(); -} - - -void WpaGui::editSelectedNetwork() -{ - if (networkSelect->count() < 1) { - QMessageBox::information( - this, tr("No Networks"), - tr("There are no networks to edit.\n")); - return; - } - QString sel(networkSelect->currentText()); - editNetwork(sel); -} - - -void WpaGui::editListedNetwork() -{ - if (networkList->currentRow() < 0) { - QMessageBox::information(this, tr("Select A Network"), - tr("Select a network from the list to" - " edit it.\n")); - return; - } - QString sel(networkList->currentItem()->text()); - editNetwork(sel); -} - - -void WpaGui::triggerUpdate() -{ - updateStatus(); - networkMayHaveChanged = true; - updateNetworks(); -} - - -void WpaGui::addNetwork() -{ - NetworkConfig *nc = new NetworkConfig(); - if (nc == NULL) - return; - nc->setWpaGui(this); - nc->newNetwork(); - nc->show(); - nc->exec(); -} - - -void WpaGui::removeNetwork(const QString &sel) -{ - QString cmd(sel); - char reply[10]; - size_t reply_len = sizeof(reply); - - if (cmd.contains(QRegExp("^\\d+:"))) - cmd.truncate(cmd.indexOf(':')); - else if (!cmd.startsWith("all")) { - printf("Invalid editNetwork '%s'\n", - cmd.toAscii().constData()); - return; - } - cmd.prepend("REMOVE_NETWORK "); - ctrlRequest(cmd.toAscii().constData(), reply, &reply_len); - triggerUpdate(); -} - - -void WpaGui::removeSelectedNetwork() -{ - if (networkSelect->count() < 1) { - QMessageBox::information(this, tr("No Networks"), - tr("There are no networks to remove." - "\n")); - return; - } - QString sel(networkSelect->currentText()); - removeNetwork(sel); -} - - -void WpaGui::removeListedNetwork() -{ - if (networkList->currentRow() < 0) { - QMessageBox::information(this, tr("Select A Network"), - tr("Select a network from the list " - "to remove it.\n")); - return; - } - QString sel(networkList->currentItem()->text()); - removeNetwork(sel); -} - - -void WpaGui::enableAllNetworks() -{ - QString sel("all"); - enableNetwork(sel); -} - - -void WpaGui::disableAllNetworks() -{ - QString sel("all"); - disableNetwork(sel); -} - - -void WpaGui::removeAllNetworks() -{ - QString sel("all"); - removeNetwork(sel); -} - - -int WpaGui::getNetworkDisabled(const QString &sel) -{ - QString cmd(sel); - char reply[10]; - size_t reply_len = sizeof(reply) - 1; - int pos = cmd.indexOf(':'); - if (pos < 0) { - printf("Invalid getNetworkDisabled '%s'\n", - cmd.toAscii().constData()); - return -1; - } - cmd.truncate(pos); - cmd.prepend("GET_NETWORK "); - cmd.append(" disabled"); - - if (ctrlRequest(cmd.toAscii().constData(), reply, &reply_len) >= 0 - && reply_len >= 1) { - reply[reply_len] = '\0'; - if (!str_match(reply, "FAIL")) - return atoi(reply); - } - - return -1; -} - - -void WpaGui::updateNetworkDisabledStatus() -{ - if (networkList->currentRow() < 0) - return; - - QString sel(networkList->currentItem()->text()); - - switch (getNetworkDisabled(sel)) { - case 0: - if (!enableRadioButton->isChecked()) - enableRadioButton->setChecked(true); - return; - case 1: - if (!disableRadioButton->isChecked()) - disableRadioButton->setChecked(true); - return; - } -} - - -void WpaGui::enableListedNetwork(bool enabled) -{ - if (networkList->currentRow() < 0 || !enabled) - return; - - QString sel(networkList->currentItem()->text()); - - if (getNetworkDisabled(sel) == 1) - enableNetwork(sel); -} - - -void WpaGui::disableListedNetwork(bool disabled) -{ - if (networkList->currentRow() < 0 || !disabled) - return; - - QString sel(networkList->currentItem()->text()); - - if (getNetworkDisabled(sel) == 0) - disableNetwork(sel); -} - - -void WpaGui::saveConfig() -{ - char buf[10]; - size_t len; - - len = sizeof(buf) - 1; - ctrlRequest("SAVE_CONFIG", buf, &len); - - buf[len] = '\0'; - - if (str_match(buf, "FAIL")) - QMessageBox::warning( - this, tr("Failed to save configuration"), - tr("The configuration could not be saved.\n" - "\n" - "The update_config=1 configuration option\n" - "must be used for configuration saving to\n" - "be permitted.\n")); - else - QMessageBox::information( - this, tr("Saved configuration"), - tr("The current configuration was saved." - "\n")); -} - - -void WpaGui::selectAdapter( const QString & sel ) -{ - if (openCtrlConnection(sel.toAscii().constData()) < 0) - printf("Failed to open control connection to " - "wpa_supplicant.\n"); - updateStatus(); - updateNetworks(); -} - - -void WpaGui::createTrayIcon(bool trayOnly) -{ - QApplication::setQuitOnLastWindowClosed(false); - - tray_icon = new QSystemTrayIcon(this); - tray_icon->setToolTip(qAppName() + tr(" - wpa_supplicant user interface")); - if (QImageReader::supportedImageFormats().contains(QByteArray("svg"))) - tray_icon->setIcon(QIcon(":/icons/wpa_gui.svg")); - else - tray_icon->setIcon(QIcon(":/icons/wpa_gui.png")); - - connect(tray_icon, - SIGNAL(activated(QSystemTrayIcon::ActivationReason)), - this, SLOT(trayActivated(QSystemTrayIcon::ActivationReason))); - - ackTrayIcon = false; - - tray_menu = new QMenu(this); - - disconnectAction = new QAction(tr("&Disconnect"), this); - reconnectAction = new QAction(tr("Re&connect"), this); - connect(disconnectAction, SIGNAL(triggered()), this, - SLOT(disconnect())); - connect(reconnectAction, SIGNAL(triggered()), this, - SLOT(connectB())); - tray_menu->addAction(disconnectAction); - tray_menu->addAction(reconnectAction); - tray_menu->addSeparator(); - - eventAction = new QAction(tr("&Event History"), this); - scanAction = new QAction(tr("Scan &Results"), this); - statAction = new QAction(tr("S&tatus"), this); - connect(eventAction, SIGNAL(triggered()), this, SLOT(eventHistory())); - connect(scanAction, SIGNAL(triggered()), this, SLOT(scan())); - connect(statAction, SIGNAL(triggered()), this, SLOT(showTrayStatus())); - tray_menu->addAction(eventAction); - tray_menu->addAction(scanAction); - tray_menu->addAction(statAction); - tray_menu->addSeparator(); - - showAction = new QAction(tr("&Show Window"), this); - hideAction = new QAction(tr("&Hide Window"), this); - quitAction = new QAction(tr("&Quit"), this); - connect(showAction, SIGNAL(triggered()), this, SLOT(show())); - connect(hideAction, SIGNAL(triggered()), this, SLOT(hide())); - connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); - tray_menu->addAction(showAction); - tray_menu->addAction(hideAction); - tray_menu->addSeparator(); - tray_menu->addAction(quitAction); - - tray_icon->setContextMenu(tray_menu); - - tray_icon->show(); - - if (!trayOnly) - show(); - inTray = trayOnly; -} - - -void WpaGui::showTrayMessage(QSystemTrayIcon::MessageIcon type, int sec, - const QString & msg) -{ - if (!QSystemTrayIcon::supportsMessages()) - return; - - if (isVisible() || !tray_icon || !tray_icon->isVisible()) - return; - - tray_icon->showMessage(qAppName(), msg, type, sec * 1000); -} - - -void WpaGui::trayActivated(QSystemTrayIcon::ActivationReason how) - { - switch (how) { - /* use close() here instead of hide() and allow the - * custom closeEvent handler take care of children */ - case QSystemTrayIcon::Trigger: - ackTrayIcon = true; - if (isVisible()) { - close(); - inTray = true; - } else { - show(); - inTray = false; - } - break; - case QSystemTrayIcon::MiddleClick: - showTrayStatus(); - break; - default: - break; - } -} - - -void WpaGui::showTrayStatus() -{ - char buf[2048]; - size_t len; - - len = sizeof(buf) - 1; - if (ctrlRequest("STATUS", buf, &len) < 0) - return; - buf[len] = '\0'; - - QString msg, status(buf); - - QStringList lines = status.split(QRegExp("\\n")); - for (QStringList::Iterator it = lines.begin(); - it != lines.end(); it++) { - int pos = (*it).indexOf('=') + 1; - if (pos < 1) - continue; - - if ((*it).startsWith("bssid=")) - msg.append("BSSID:\t" + (*it).mid(pos) + "\n"); - else if ((*it).startsWith("ssid=")) - msg.append("SSID: \t" + (*it).mid(pos) + "\n"); - else if ((*it).startsWith("pairwise_cipher=")) - msg.append("PAIR: \t" + (*it).mid(pos) + "\n"); - else if ((*it).startsWith("group_cipher=")) - msg.append("GROUP:\t" + (*it).mid(pos) + "\n"); - else if ((*it).startsWith("key_mgmt=")) - msg.append("AUTH: \t" + (*it).mid(pos) + "\n"); - else if ((*it).startsWith("wpa_state=")) - msg.append("STATE:\t" + (*it).mid(pos) + "\n"); - else if ((*it).startsWith("ip_address=")) - msg.append("IP: \t" + (*it).mid(pos) + "\n"); - else if ((*it).startsWith("Supplicant PAE state=")) - msg.append("PAE: \t" + (*it).mid(pos) + "\n"); - else if ((*it).startsWith("EAP state=")) - msg.append("EAP: \t" + (*it).mid(pos) + "\n"); - } - - if (!msg.isEmpty()) - showTrayMessage(QSystemTrayIcon::Information, 10, msg); -} - - -void WpaGui::closeEvent(QCloseEvent *event) -{ - if (eh) { - eh->close(); - delete eh; - eh = NULL; - } - - if (scanres) { - scanres->close(); - delete scanres; - scanres = NULL; - } - - if (peers) { - peers->close(); - delete peers; - peers = NULL; - } - - if (udr) { - udr->close(); - delete udr; - udr = NULL; - } - - if (tray_icon && !ackTrayIcon) { - /* give user a visual hint that the tray icon exists */ - if (QSystemTrayIcon::supportsMessages()) { - hide(); - showTrayMessage(QSystemTrayIcon::Information, 3, - qAppName() + - tr(" will keep running in " - "the system tray.")); - } else { - QMessageBox::information(this, qAppName() + - tr(" systray"), - tr("The program will keep " - "running in the system " - "tray.")); - } - ackTrayIcon = true; - } - - event->accept(); -} - - -void WpaGui::wpsDialog() -{ - wpaguiTab->setCurrentWidget(wpsTab); -} - - -void WpaGui::peersDialog() -{ - if (peers) { - peers->close(); - delete peers; - } - - peers = new Peers(); - if (peers == NULL) - return; - peers->setWpaGui(this); - peers->show(); - peers->exec(); -} - - -void WpaGui::tabChanged(int index) -{ - if (index != 2) - return; - - if (wpsRunning) - return; - - wpsApPinEdit->setEnabled(!bssFromScan.isEmpty()); - if (bssFromScan.isEmpty()) - wpsApPinButton->setEnabled(false); -} - - -void WpaGui::wpsPbc() -{ - char reply[20]; - size_t reply_len = sizeof(reply); - - if (ctrlRequest("WPS_PBC", reply, &reply_len) < 0) - return; - - wpsPinEdit->setEnabled(false); - if (wpsStatusText->text().compare(tr("WPS AP in active PBC mode found"))) { - wpsInstructions->setText(tr("Press the push button on the AP to " - "start the PBC mode.")); - } else { - wpsInstructions->setText(tr("If you have not yet done so, press " - "the push button on the AP to start " - "the PBC mode.")); - } - wpsStatusText->setText(tr("Waiting for Registrar")); - wpsRunning = true; -} - - -void WpaGui::wpsGeneratePin() -{ - char reply[20]; - size_t reply_len = sizeof(reply) - 1; - - if (ctrlRequest("WPS_PIN any", reply, &reply_len) < 0) - return; - - reply[reply_len] = '\0'; - - wpsPinEdit->setText(reply); - wpsPinEdit->setEnabled(true); - wpsInstructions->setText(tr("Enter the generated PIN into the Registrar " - "(either the internal one in the AP or an " - "external one).")); - wpsStatusText->setText(tr("Waiting for Registrar")); - wpsRunning = true; -} - - -void WpaGui::setBssFromScan(const QString &bssid) -{ - bssFromScan = bssid; - wpsApPinEdit->setEnabled(!bssFromScan.isEmpty()); - wpsApPinButton->setEnabled(wpsApPinEdit->text().length() == 8); - wpsStatusText->setText(tr("WPS AP selected from scan results")); - wpsInstructions->setText(tr("If you want to use an AP device PIN, e.g., " - "from a label in the device, enter the eight " - "digit AP PIN and click Use AP PIN button.")); -} - - -void WpaGui::wpsApPinChanged(const QString &text) -{ - wpsApPinButton->setEnabled(text.length() == 8); -} - - -void WpaGui::wpsApPin() -{ - char reply[20]; - size_t reply_len = sizeof(reply); - - QString cmd("WPS_REG " + bssFromScan + " " + wpsApPinEdit->text()); - if (ctrlRequest(cmd.toAscii().constData(), reply, &reply_len) < 0) - return; - - wpsStatusText->setText(tr("Waiting for AP/Enrollee")); - wpsRunning = true; -} - - -void WpaGui::stopWpsRun(bool success) -{ - if (wpsRunning) - wpsStatusText->setText(success ? tr("Connected to the network") : - tr("Stopped")); - else - wpsStatusText->setText(""); - wpsPinEdit->setEnabled(false); - wpsInstructions->setText(""); - wpsRunning = false; - bssFromScan = ""; - wpsApPinEdit->setEnabled(false); - wpsApPinButton->setEnabled(false); -} - - -#ifdef CONFIG_NATIVE_WINDOWS - -#ifndef WPASVC_NAME -#define WPASVC_NAME TEXT("wpasvc") -#endif - -class ErrorMsg : public QMessageBox { -public: - ErrorMsg(QWidget *parent, DWORD last_err = GetLastError()); - void showMsg(QString msg); -private: - DWORD err; -}; - -ErrorMsg::ErrorMsg(QWidget *parent, DWORD last_err) : - QMessageBox(parent), err(last_err) -{ - setWindowTitle(tr("wpa_gui error")); - setIcon(QMessageBox::Warning); -} - -void ErrorMsg::showMsg(QString msg) -{ - LPTSTR buf; - - setText(msg); - if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM, - NULL, err, 0, (LPTSTR) (void *) &buf, - 0, NULL) > 0) { - QString msg = QString::fromWCharArray(buf); - setInformativeText(QString("[%1] %2").arg(err).arg(msg)); - LocalFree(buf); - } else { - setInformativeText(QString("[%1]").arg(err)); - } - - exec(); -} - - -void WpaGui::startService() -{ - SC_HANDLE svc, scm; - - scm = OpenSCManager(0, 0, SC_MANAGER_CONNECT); - if (!scm) { - ErrorMsg(this).showMsg(tr("OpenSCManager failed")); - return; - } - - svc = OpenService(scm, WPASVC_NAME, SERVICE_START); - if (!svc) { - ErrorMsg(this).showMsg(tr("OpenService failed")); - CloseServiceHandle(scm); - return; - } - - if (!StartService(svc, 0, NULL)) { - ErrorMsg(this).showMsg(tr("Failed to start wpa_supplicant " - "service")); - } - - CloseServiceHandle(svc); - CloseServiceHandle(scm); -} - - -void WpaGui::stopService() -{ - SC_HANDLE svc, scm; - SERVICE_STATUS status; - - scm = OpenSCManager(0, 0, SC_MANAGER_CONNECT); - if (!scm) { - ErrorMsg(this).showMsg(tr("OpenSCManager failed")); - return; - } - - svc = OpenService(scm, WPASVC_NAME, SERVICE_STOP); - if (!svc) { - ErrorMsg(this).showMsg(tr("OpenService failed")); - CloseServiceHandle(scm); - return; - } - - if (!ControlService(svc, SERVICE_CONTROL_STOP, &status)) { - ErrorMsg(this).showMsg(tr("Failed to stop wpa_supplicant " - "service")); - } - - CloseServiceHandle(svc); - CloseServiceHandle(scm); -} - - -bool WpaGui::serviceRunning() -{ - SC_HANDLE svc, scm; - SERVICE_STATUS status; - bool running = false; - - scm = OpenSCManager(0, 0, SC_MANAGER_CONNECT); - if (!scm) { - printf("OpenSCManager failed: %d\n", (int) GetLastError()); - return false; - } - - svc = OpenService(scm, WPASVC_NAME, SERVICE_QUERY_STATUS); - if (!svc) { - printf("OpenService failed: %d\n\n", (int) GetLastError()); - CloseServiceHandle(scm); - return false; - } - - if (QueryServiceStatus(svc, &status)) { - if (status.dwCurrentState != SERVICE_STOPPED) - running = true; - } - - CloseServiceHandle(svc); - CloseServiceHandle(scm); - - return running; -} - -#endif /* CONFIG_NATIVE_WINDOWS */ - - -void WpaGui::addInterface() -{ - if (add_iface) { - add_iface->close(); - delete add_iface; - } - add_iface = new AddInterface(this, this); - add_iface->show(); - add_iface->exec(); -} - - -#ifndef QT_NO_SESSIONMANAGER -void WpaGui::saveState() -{ - QSettings settings("wpa_supplicant", "wpa_gui"); - settings.beginGroup("state"); - settings.setValue("session_id", app->sessionId()); - settings.setValue("in_tray", inTray); - settings.endGroup(); -} -#endif diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.h b/wpa_supplicant/wpa_gui-qt4/wpagui.h deleted file mode 100644 index 2e1af8e77619..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/wpagui.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * wpa_gui - WpaGui class - * Copyright (c) 2005-2006, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#ifndef WPAGUI_H -#define WPAGUI_H - -#include -#include -#include "ui_wpagui.h" -#include "addinterface.h" - -class UserDataRequest; - - -class WpaGui : public QMainWindow, public Ui::WpaGui -{ - Q_OBJECT - -public: - WpaGui(QApplication *app, QWidget *parent = 0, const char *name = 0, - Qt::WFlags fl = 0); - ~WpaGui(); - - virtual int ctrlRequest(const char *cmd, char *buf, size_t *buflen); - virtual void triggerUpdate(); - virtual void editNetwork(const QString &sel); - virtual void removeNetwork(const QString &sel); - virtual void enableNetwork(const QString &sel); - virtual void disableNetwork(const QString &sel); - virtual int getNetworkDisabled(const QString &sel); - void setBssFromScan(const QString &bssid); -#ifndef QT_NO_SESSIONMANAGER - void saveState(); -#endif - -public slots: - virtual void parse_argv(); - virtual void updateStatus(); - virtual void updateNetworks(); - virtual void helpIndex(); - virtual void helpContents(); - virtual void helpAbout(); - virtual void disconnect(); - virtual void scan(); - virtual void eventHistory(); - virtual void ping(); - virtual void processMsg(char *msg); - virtual void processCtrlReq(const char *req); - virtual void receiveMsgs(); - virtual void connectB(); - virtual void selectNetwork(const QString &sel); - virtual void editSelectedNetwork(); - virtual void editListedNetwork(); - virtual void removeSelectedNetwork(); - virtual void removeListedNetwork(); - virtual void addNetwork(); - virtual void enableAllNetworks(); - virtual void disableAllNetworks(); - virtual void removeAllNetworks(); - virtual void saveConfig(); - virtual void selectAdapter(const QString &sel); - virtual void updateNetworkDisabledStatus(); - virtual void enableListedNetwork(bool); - virtual void disableListedNetwork(bool); - virtual void showTrayMessage(QSystemTrayIcon::MessageIcon type, - int sec, const QString &msg); - virtual void showTrayStatus(); - virtual void wpsDialog(); - virtual void peersDialog(); - virtual void tabChanged(int index); - virtual void wpsPbc(); - virtual void wpsGeneratePin(); - virtual void wpsApPinChanged(const QString &text); - virtual void wpsApPin(); -#ifdef CONFIG_NATIVE_WINDOWS - virtual void startService(); - virtual void stopService(); -#endif /* CONFIG_NATIVE_WINDOWS */ - virtual void addInterface(); - -protected slots: - virtual void languageChange(); - virtual void trayActivated(QSystemTrayIcon::ActivationReason how); - virtual void closeEvent(QCloseEvent *event); - -private: - ScanResults *scanres; - Peers *peers; - bool networkMayHaveChanged; - char *ctrl_iface; - EventHistory *eh; - struct wpa_ctrl *ctrl_conn; - QSocketNotifier *msgNotifier; - QTimer *timer; - int pingsToStatusUpdate; - WpaMsgList msgs; - char *ctrl_iface_dir; - struct wpa_ctrl *monitor_conn; - UserDataRequest *udr; - QAction *disconnectAction; - QAction *reconnectAction; - QAction *eventAction; - QAction *scanAction; - QAction *statAction; - QAction *showAction; - QAction *hideAction; - QAction *quitAction; - QMenu *tray_menu; - QSystemTrayIcon *tray_icon; - QString wpaStateTranslate(char *state); - void createTrayIcon(bool); - bool ackTrayIcon; - bool startInTray; - - int openCtrlConnection(const char *ifname); - - bool wpsRunning; - - QString bssFromScan; - - void stopWpsRun(bool success); - -#ifdef CONFIG_NATIVE_WINDOWS - QAction *fileStartServiceAction; - QAction *fileStopServiceAction; - - bool serviceRunning(); -#endif /* CONFIG_NATIVE_WINDOWS */ - - QAction *addInterfaceAction; - AddInterface *add_iface; - - bool connectedToService; - - QApplication *app; - bool inTray; -}; - -#endif /* WPAGUI_H */ diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.ui b/wpa_supplicant/wpa_gui-qt4/wpagui.ui deleted file mode 100644 index 9f9039f6c916..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/wpagui.ui +++ /dev/null @@ -1,524 +0,0 @@ - - WpaGui - - - - 0 - 0 - 345 - 330 - - - - wpa_gui - - - - :/icons/wpa_gui.svg:/icons/wpa_gui.svg - - - - - - - Adapter: - - - - - - - - - - Network: - - - - - - - - - - 0 - - - - Current Status - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - Status: - - - - - - - Last message: - - - - - - - Authentication: - - - - - - - Encryption: - - - - - - - SSID: - - - - - - - BSSID: - - - - - - - IP address: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Connect - - - - - - - Disconnect - - - - - - - Scan - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - Manage Networks - - - - - - true - - - - - - - Qt::Vertical - - - - 20 - 61 - - - - - - - - Enabled - - - - - - - Edit - - - - - - - Remove - - - - - - - Qt::Vertical - - - - 20 - 61 - - - - - - - - Disabled - - - - - - - Add - - - - - - - Scan - - - - - - - - WPS - - - - - - Status: - - - - - - - - - - - - - - PBC - push button - - - - - - - Generate PIN - - - - - - - PIN: - - - - - - - false - - - true - - - - - - - false - - - Use AP PIN - - - - - - - AP PIN: - - - - - - - false - - - - - - - true - - - - - - - - - - - - - 0 - 0 - 345 - 24 - - - - - &File - - - - - - - - - - - &Network - - - - - - - - - - - - &Help - - - - - - - - - - - - - Event &History - - - - - &Save Configuration - - - Ctrl+S - - - - - E&xit - - - Ctrl+Q - - - - - &Add - - - - - &Edit - - - - - &Remove - - - - - E&nable All - - - - - &Disable All - - - - - Re&move All - - - - - false - - - &Contents... - - - - - false - - - &Index... - - - - - &About - - - - - false - - - &Wi-Fi Protected Setup - - - - - &Peers - - - - - - - qtimer.h - qsocketnotifier.h - wpamsg.h - eventhistory.h - scanresults.h - peers.h - - - - - - diff --git a/wpa_supplicant/wpa_gui-qt4/wpamsg.h b/wpa_supplicant/wpa_gui-qt4/wpamsg.h deleted file mode 100644 index 4950b213a2e3..000000000000 --- a/wpa_supplicant/wpa_gui-qt4/wpamsg.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * wpa_gui - WpaMsg class for storing event messages - * Copyright (c) 2005-2006, Jouni Malinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. - */ - -#ifndef WPAMSG_H -#define WPAMSG_H - -#include -#include - -class WpaMsg { -public: - WpaMsg(const QString &_msg, int _priority = 2) - : msg(_msg), priority(_priority) - { - timestamp = QDateTime::currentDateTime(); - } - - QString getMsg() const { return msg; } - int getPriority() const { return priority; } - QDateTime getTimestamp() const { return timestamp; } - -private: - QString msg; - int priority; - QDateTime timestamp; -}; - -typedef QLinkedList WpaMsgList; - -#endif /* WPAMSG_H */ diff --git a/wpa_supplicant/wpa_gui/.gitignore b/wpa_supplicant/wpa_gui/.gitignore deleted file mode 100644 index 11963c84daa3..000000000000 --- a/wpa_supplicant/wpa_gui/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.moc -.obj -.ui -Makefile -wpa_gui diff --git a/wpa_supplicant/wpa_gui/eventhistory.ui b/wpa_supplicant/wpa_gui/eventhistory.ui deleted file mode 100644 index 3735fb70e8f9..000000000000 --- a/wpa_supplicant/wpa_gui/eventhistory.ui +++ /dev/null @@ -1,125 +0,0 @@ - -EventHistory - - - EventHistory - - - - 0 - 0 - 533 - 285 - - - - Event history - - - - unnamed - - - - - Timestamp - - - true - - - true - - - - - Message - - - true - - - true - - - - eventListView - - - - 7 - 7 - 0 - 0 - - - - Manual - - - NoSelection - - - LastColumn - - - - - layout30 - - - - unnamed - - - - spacer3 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - closeButton - - - Close - - - - - - - - - closeButton - clicked() - EventHistory - close() - - - - wpamsg.h - eventhistory.ui.h - - - addEvents( WpaMsgList msgs ) - addEvent( WpaMsg msg ) - - - init() - destroy() - - - - diff --git a/wpa_supplicant/wpa_gui/eventhistory.ui.h b/wpa_supplicant/wpa_gui/eventhistory.ui.h deleted file mode 100644 index cb2caab2e4e1..000000000000 --- a/wpa_supplicant/wpa_gui/eventhistory.ui.h +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. -** -** You should not define a constructor or destructor in this file. -** Instead, write your code in functions called init() and destroy(). -** These will automatically be called by the form's constructor and -** destructor. -*****************************************************************************/ - -void EventHistory::init() -{ -} - - -void EventHistory::destroy() -{ -} - - -void EventHistory::addEvents(WpaMsgList msgs) -{ - WpaMsgList::iterator it; - for (it = msgs.begin(); it != msgs.end(); it++) { - addEvent(*it); - } -} - - -void EventHistory::addEvent(WpaMsg msg) -{ - Q3ListViewItem *item; - item = new Q3ListViewItem(eventListView, - msg.getTimestamp().toString("yyyy-MM-dd hh:mm:ss.zzz"), - msg.getMsg()); - if (item == NULL) - return; - eventListView->setSelected(item, false); -} diff --git a/wpa_supplicant/wpa_gui/main.cpp b/wpa_supplicant/wpa_gui/main.cpp deleted file mode 100644 index a78473a8c6b1..000000000000 --- a/wpa_supplicant/wpa_gui/main.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#ifdef CONFIG_NATIVE_WINDOWS -#include -#endif /* CONFIG_NATIVE_WINDOWS */ -#include -#include "wpagui.h" - -int main( int argc, char ** argv ) -{ - QApplication a( argc, argv ); - WpaGui w; - int ret; - -#ifdef CONFIG_NATIVE_WINDOWS - WSADATA wsaData; - if (WSAStartup(MAKEWORD(2, 0), &wsaData)) { - printf("Could not find a usable WinSock.dll\n"); - return -1; - } -#endif /* CONFIG_NATIVE_WINDOWS */ - - w.show(); - a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) ); - ret = a.exec(); - -#ifdef CONFIG_NATIVE_WINDOWS - WSACleanup(); -#endif /* CONFIG_NATIVE_WINDOWS */ - - return ret; -} diff --git a/wpa_supplicant/wpa_gui/networkconfig.ui b/wpa_supplicant/wpa_gui/networkconfig.ui deleted file mode 100644 index 019ecf7e259d..000000000000 --- a/wpa_supplicant/wpa_gui/networkconfig.ui +++ /dev/null @@ -1,475 +0,0 @@ - -NetworkConfig - - - NetworkConfig - - - - 0 - 0 - 380 - 430 - - - - NetworkConfig - - - - unnamed - - - - cancelButton - - - Cancel - - - - - frame9 - - - StyledPanel - - - Raised - - - - unnamed - - - - textLabel0 - - - SSID - - - - - ssidEdit - - - - - - Network name (Service Set IDentifier) - - - - - textLabel1 - - - Network ID - - - - - idstrEdit - - - - - - Network Identification String - - - - - textLabel2 - - - Authentication - - - - - - Plaintext or static WEP - - - - - IEEE 802.1X - - - - - WPA-Personal (PSK) - - - - - WPA-Enterprise (EAP) - - - - - WPA2-Personal (PSK) - - - - - WPA2-Enterprise (EAP) - - - - authSelect - - - - - textLabel3 - - - Encryption - - - - - - None - - - - - WEP - - - - - TKIP - - - - - CCMP - - - - encrSelect - - - - - textLabel4 - - - PSK - - - - - pskEdit - - - false - - - Password - - - WPA/WPA2 pre-shared key or passphrase - - - - - - - - textLabel5 - - - EAP method - - - - - eapSelect - - - false - - - - - textLabel6 - - - Identity - - - - - identityEdit - - - false - - - Username/Identity for EAP methods - - - - - textLabel7 - - - Password - - - - - passwordEdit - - - false - - - Password - - - Password for EAP methods - - - - - textLabel1_2 - - - CA certificate - - - - - cacertEdit - - - false - - - - - buttonGroup1 - - - true - - - WEP keys - - - - unnamed - - - - wep0Radio - - - false - - - key 0 - - - - - wep1Radio - - - false - - - key 1 - - - - - wep3Radio - - - false - - - key 3 - - - - - wep2Radio - - - false - - - key 2 - - - - - wep0Edit - - - false - - - - - wep1Edit - - - false - - - - - wep2Edit - - - false - - - - - wep3Edit - - - false - - - - - - - - - spacer5 - - - Horizontal - - - Expanding - - - - 130 - 20 - - - - - - addButton - - - Add - - - - - removeButton - - - false - - - Remove - - - - - - - authSelect - activated(int) - NetworkConfig - authChanged(int) - - - cancelButton - clicked() - NetworkConfig - close() - - - addButton - clicked() - NetworkConfig - addNetwork() - - - encrSelect - activated(const QString&) - NetworkConfig - encrChanged(const QString&) - - - removeButton - clicked() - NetworkConfig - removeNetwork() - - - - ssidEdit - idstrEdit - authSelect - encrSelect - pskEdit - eapSelect - identityEdit - passwordEdit - cacertEdit - wep0Radio - wep1Radio - wep2Radio - wep3Radio - wep0Edit - wep1Edit - wep2Edit - wep3Edit - addButton - removeButton - cancelButton - - - qlistview.h - qmessagebox.h - wpagui.h - networkconfig.ui.h - - - class WpaGui; - - - WpaGui *wpagui; - int edit_network_id; - bool new_network; - - - authChanged( int sel ) - addNetwork() - encrChanged( const QString & sel ) - writeWepKey( int network_id, QLineEdit * edit, int id ) - removeNetwork() - - - init() - paramsFromScanResults( QListViewItem * sel ) - setWpaGui( WpaGui * _wpagui ) - setNetworkParam( int id, const char * field, const char * value, bool quote ) - wepEnabled( bool enabled ) - paramsFromConfig( int network_id ) - newNetwork() - getEapCapa() - - - - diff --git a/wpa_supplicant/wpa_gui/networkconfig.ui.h b/wpa_supplicant/wpa_gui/networkconfig.ui.h deleted file mode 100644 index 501d5d26556a..000000000000 --- a/wpa_supplicant/wpa_gui/networkconfig.ui.h +++ /dev/null @@ -1,552 +0,0 @@ -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. -** -** You should not define a constructor or destructor in this file. -** Instead, write your code in functions called init() and destroy(). -** These will automatically be called by the form's constructor and -** destructor. -*****************************************************************************/ - -#include - -enum { - AUTH_NONE = 0, - AUTH_IEEE8021X = 1, - AUTH_WPA_PSK = 2, - AUTH_WPA_EAP = 3, - AUTH_WPA2_PSK = 4, - AUTH_WPA2_EAP = 5 -}; - -#define WPA_GUI_KEY_DATA "[key is configured]" - -void NetworkConfig::init() -{ - wpagui = NULL; - new_network = false; -} - -void NetworkConfig::paramsFromScanResults(Q3ListViewItem *sel) -{ - new_network = true; - - /* SSID BSSID frequency signal flags */ - setCaption(sel->text(0)); - ssidEdit->setText(sel->text(0)); - - QString flags = sel->text(4); - int auth, encr = 0; - if (flags.find("[WPA2-EAP") >= 0) - auth = AUTH_WPA2_EAP; - else if (flags.find("[WPA-EAP") >= 0) - auth = AUTH_WPA_EAP; - else if (flags.find("[WPA2-PSK") >= 0) - auth = AUTH_WPA2_PSK; - else if (flags.find("[WPA-PSK") >= 0) - auth = AUTH_WPA_PSK; - else - auth = AUTH_NONE; - - if (flags.find("-CCMP") >= 0) - encr = 1; - else if (flags.find("-TKIP") >= 0) - encr = 0; - else if (flags.find("WEP") >= 0) - encr = 1; - else - encr = 0; - - authSelect->setCurrentItem(auth); - authChanged(auth); - encrSelect->setCurrentItem(encr); - - getEapCapa(); -} - - -void NetworkConfig::authChanged(int sel) -{ - pskEdit->setEnabled(sel == AUTH_WPA_PSK || sel == AUTH_WPA2_PSK); - bool eap = sel == AUTH_IEEE8021X || sel == AUTH_WPA_EAP || - sel == AUTH_WPA2_EAP; - eapSelect->setEnabled(eap); - identityEdit->setEnabled(eap); - passwordEdit->setEnabled(eap); - cacertEdit->setEnabled(eap); - - while (encrSelect->count()) - encrSelect->removeItem(0); - - if (sel == AUTH_NONE || sel == AUTH_IEEE8021X) { - encrSelect->insertItem("None"); - encrSelect->insertItem("WEP"); - encrSelect->setCurrentItem(sel == AUTH_NONE ? 0 : 1); - } else { - encrSelect->insertItem("TKIP"); - encrSelect->insertItem("CCMP"); - encrSelect->setCurrentItem((sel == AUTH_WPA2_PSK || - sel == AUTH_WPA2_EAP) ? 1 : 0); - } - - wepEnabled(sel == AUTH_IEEE8021X); -} - - -void NetworkConfig::addNetwork() -{ - char reply[10], cmd[256]; - size_t reply_len; - int id; - int psklen = pskEdit->text().length(); - int auth = authSelect->currentItem(); - - if (auth == AUTH_WPA_PSK || auth == AUTH_WPA2_PSK) { - if (psklen < 8 || psklen > 64) { - QMessageBox::warning(this, "wpa_gui", "WPA-PSK requires a passphrase " - "of 8 to 63 characters\n" - "or 64 hex digit PSK"); - return; - } - } - - if (wpagui == NULL) - return; - - memset(reply, 0, sizeof(reply)); - reply_len = sizeof(reply) - 1; - - if (new_network) { - wpagui->ctrlRequest("ADD_NETWORK", reply, &reply_len); - if (reply[0] == 'F') { - QMessageBox::warning(this, "wpa_gui", "Failed to add network to wpa_supplicant\n" - "configuration."); - return; - } - id = atoi(reply); - } else { - id = edit_network_id; - } - - setNetworkParam(id, "ssid", ssidEdit->text().ascii(), true); - - if (idstrEdit->isEnabled()) - setNetworkParam(id, "id_str", idstrEdit->text().ascii(), true); - - const char *key_mgmt = NULL, *proto = NULL, *pairwise = NULL; - switch (auth) { - case AUTH_NONE: - key_mgmt = "NONE"; - break; - case AUTH_IEEE8021X: - key_mgmt = "IEEE8021X"; - break; - case AUTH_WPA_PSK: - key_mgmt = "WPA-PSK"; - proto = "WPA"; - break; - case AUTH_WPA_EAP: - key_mgmt = "WPA-EAP"; - proto = "WPA"; - break; - case AUTH_WPA2_PSK: - key_mgmt = "WPA-PSK"; - proto = "WPA2"; - break; - case AUTH_WPA2_EAP: - key_mgmt = "WPA-EAP"; - proto = "WPA2"; - break; - } - - if (auth == AUTH_WPA_PSK || auth == AUTH_WPA_EAP || - auth == AUTH_WPA2_PSK || auth == AUTH_WPA2_EAP) { - int encr = encrSelect->currentItem(); - if (encr == 0) - pairwise = "TKIP"; - else - pairwise = "CCMP"; - } - - if (proto) - setNetworkParam(id, "proto", proto, false); - if (key_mgmt) - setNetworkParam(id, "key_mgmt", key_mgmt, false); - if (pairwise) { - setNetworkParam(id, "pairwise", pairwise, false); - setNetworkParam(id, "group", "TKIP CCMP WEP104 WEP40", false); - } - if (pskEdit->isEnabled() && - strcmp(pskEdit->text().ascii(), WPA_GUI_KEY_DATA) != 0) - setNetworkParam(id, "psk", pskEdit->text().ascii(), psklen != 64); - if (eapSelect->isEnabled()) - setNetworkParam(id, "eap", eapSelect->currentText().ascii(), false); - if (identityEdit->isEnabled()) - setNetworkParam(id, "identity", identityEdit->text().ascii(), true); - if (passwordEdit->isEnabled() && - strcmp(passwordEdit->text().ascii(), WPA_GUI_KEY_DATA) != 0) - setNetworkParam(id, "password", passwordEdit->text().ascii(), true); - if (cacertEdit->isEnabled()) - setNetworkParam(id, "ca_cert", cacertEdit->text().ascii(), true); - writeWepKey(id, wep0Edit, 0); - writeWepKey(id, wep1Edit, 1); - writeWepKey(id, wep2Edit, 2); - writeWepKey(id, wep3Edit, 3); - - if (wep0Radio->isEnabled() && wep0Radio->isChecked()) - setNetworkParam(id, "wep_tx_keyidx", "0", false); - else if (wep1Radio->isEnabled() && wep1Radio->isChecked()) - setNetworkParam(id, "wep_tx_keyidx", "1", false); - else if (wep2Radio->isEnabled() && wep2Radio->isChecked()) - setNetworkParam(id, "wep_tx_keyidx", "2", false); - else if (wep3Radio->isEnabled() && wep3Radio->isChecked()) - setNetworkParam(id, "wep_tx_keyidx", "3", false); - - snprintf(cmd, sizeof(cmd), "ENABLE_NETWORK %d", id); - reply_len = sizeof(reply); - wpagui->ctrlRequest(cmd, reply, &reply_len); - if (strncmp(reply, "OK", 2) != 0) { - QMessageBox::warning(this, "wpa_gui", "Failed to enable network in wpa_supplicant\n" - "configuration."); - /* Network was added, so continue anyway */ - } - wpagui->triggerUpdate(); - wpagui->ctrlRequest("SAVE_CONFIG", reply, &reply_len); - - close(); -} - - -void NetworkConfig::setWpaGui( WpaGui *_wpagui ) -{ - wpagui = _wpagui; -} - - -int NetworkConfig::setNetworkParam(int id, const char *field, const char *value, bool quote) -{ - char reply[10], cmd[256]; - size_t reply_len; - snprintf(cmd, sizeof(cmd), "SET_NETWORK %d %s %s%s%s", - id, field, quote ? "\"" : "", value, quote ? "\"" : ""); - reply_len = sizeof(reply); - wpagui->ctrlRequest(cmd, reply, &reply_len); - return strncmp(reply, "OK", 2) == 0 ? 0 : -1; -} - - -void NetworkConfig::encrChanged( const QString &sel ) -{ - wepEnabled(sel.find("WEP") == 0); -} - - -void NetworkConfig::wepEnabled( bool enabled ) -{ - wep0Edit->setEnabled(enabled); - wep1Edit->setEnabled(enabled); - wep2Edit->setEnabled(enabled); - wep3Edit->setEnabled(enabled); - wep0Radio->setEnabled(enabled); - wep1Radio->setEnabled(enabled); - wep2Radio->setEnabled(enabled); - wep3Radio->setEnabled(enabled); -} - - -void NetworkConfig::writeWepKey( int network_id, QLineEdit *edit, int id ) -{ - char buf[10]; - bool hex; - const char *txt, *pos; - size_t len; - - if (!edit->isEnabled() || edit->text().isEmpty()) - return; - - /* - * Assume hex key if only hex characters are present and length matches - * with 40, 104, or 128-bit key - */ - txt = edit->text().ascii(); - if (strcmp(txt, WPA_GUI_KEY_DATA) == 0) - return; - len = strlen(txt); - if (len == 0) - return; - pos = txt; - hex = true; - while (*pos) { - if (!((*pos >= '0' && *pos <= '9') || (*pos >= 'a' && *pos <= 'f') || - (*pos >= 'A' && *pos <= 'F'))) { - hex = false; - break; - } - pos++; - } - if (hex && len != 10 && len != 26 && len != 32) - hex = false; - snprintf(buf, sizeof(buf), "wep_key%d", id); - setNetworkParam(network_id, buf, txt, !hex); -} - - -static int key_value_isset(const char *reply, size_t reply_len) -{ - return reply_len > 0 && (reply_len < 4 || memcmp(reply, "FAIL", 4) != 0); -} - - -void NetworkConfig::paramsFromConfig( int network_id ) -{ - int i, res; - - edit_network_id = network_id; - getEapCapa(); - - char reply[1024], cmd[256], *pos; - size_t reply_len; - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d ssid", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && reply_len >= 2 && - reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - ssidEdit->setText(reply + 1); - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d id_str", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && reply_len >= 2 && - reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - idstrEdit->setText(reply + 1); - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d proto", network_id); - reply_len = sizeof(reply) - 1; - int wpa = 0; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0) { - reply[reply_len] = '\0'; - if (strstr(reply, "RSN") || strstr(reply, "WPA2")) - wpa = 2; - else if (strstr(reply, "WPA")) - wpa = 1; - } - - int auth = AUTH_NONE, encr = 0; - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d key_mgmt", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0) { - reply[reply_len] = '\0'; - if (strstr(reply, "WPA-EAP")) - auth = wpa & 2 ? AUTH_WPA2_EAP : AUTH_WPA_EAP; - else if (strstr(reply, "WPA-PSK")) - auth = wpa & 2 ? AUTH_WPA2_PSK : AUTH_WPA_PSK; - else if (strstr(reply, "IEEE8021X")) { - auth = AUTH_IEEE8021X; - encr = 1; - } - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d pairwise", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0) { - reply[reply_len] = '\0'; - if (strstr(reply, "CCMP") && auth != AUTH_NONE) - encr = 1; - else if (strstr(reply, "TKIP")) - encr = 0; - else if (strstr(reply, "WEP")) - encr = 1; - else - encr = 0; - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d psk", network_id); - reply_len = sizeof(reply) - 1; - res = wpagui->ctrlRequest(cmd, reply, &reply_len); - if (res >= 0 && reply_len >= 2 && reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - pskEdit->setText(reply + 1); - } else if (res >= 0 && key_value_isset(reply, reply_len)) { - pskEdit->setText(WPA_GUI_KEY_DATA); - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d identity", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && reply_len >= 2 && - reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - identityEdit->setText(reply + 1); - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d password", network_id); - reply_len = sizeof(reply) - 1; - res = wpagui->ctrlRequest(cmd, reply, &reply_len); - if (res >= 0 && reply_len >= 2 && - reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - passwordEdit->setText(reply + 1); - } else if (res >= 0 && key_value_isset(reply, reply_len)) { - passwordEdit->setText(WPA_GUI_KEY_DATA); - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d ca_cert", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && reply_len >= 2 && - reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - cacertEdit->setText(reply + 1); - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d eap", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && reply_len >= 1) { - reply[reply_len] = '\0'; - for (i = 0; i < eapSelect->count(); i++) { - if (eapSelect->text(i).compare(reply) == 0) { - eapSelect->setCurrentItem(i); - break; - } - } - } - - for (i = 0; i < 4; i++) { - QLineEdit *wepEdit; - switch (i) { - default: - case 0: - wepEdit = wep0Edit; - break; - case 1: - wepEdit = wep1Edit; - break; - case 2: - wepEdit = wep2Edit; - break; - case 3: - wepEdit = wep3Edit; - break; - } - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d wep_key%d", network_id, i); - reply_len = sizeof(reply) - 1; - res = wpagui->ctrlRequest(cmd, reply, &reply_len); - if (res >= 0 && reply_len >= 2 && reply[0] == '"') { - reply[reply_len] = '\0'; - pos = strchr(reply + 1, '"'); - if (pos) - *pos = '\0'; - if (auth == AUTH_NONE || auth == AUTH_IEEE8021X) - encr = 1; - - wepEdit->setText(reply + 1); - } else if (res >= 0 && key_value_isset(reply, reply_len)) { - if (auth == AUTH_NONE || auth == AUTH_IEEE8021X) - encr = 1; - wepEdit->setText(WPA_GUI_KEY_DATA); - } - } - - snprintf(cmd, sizeof(cmd), "GET_NETWORK %d wep_tx_keyidx", network_id); - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && reply_len >= 1) { - reply[reply_len] = '\0'; - switch (atoi(reply)) { - case 0: - wep0Radio->setChecked(true); - break; - case 1: - wep1Radio->setChecked(true); - break; - case 2: - wep2Radio->setChecked(true); - break; - case 3: - wep3Radio->setChecked(true); - break; - } - } - - authSelect->setCurrentItem(auth); - authChanged(auth); - encrSelect->setCurrentItem(encr); - if (auth == AUTH_NONE || auth == AUTH_IEEE8021X) - wepEnabled(encr == 1); - - removeButton->setEnabled(true); - addButton->setText("Save"); -} - - -void NetworkConfig::removeNetwork() -{ - char reply[10], cmd[256]; - size_t reply_len; - - if (QMessageBox::information(this, "wpa_gui", - "This will permanently remove the network\n" - "from the configuration. Do you really want\n" - "to remove this network?", "Yes", "No") != 0) - return; - - snprintf(cmd, sizeof(cmd), "REMOVE_NETWORK %d", edit_network_id); - reply_len = sizeof(reply); - wpagui->ctrlRequest(cmd, reply, &reply_len); - if (strncmp(reply, "OK", 2) != 0) { - QMessageBox::warning(this, "wpa_gui", - "Failed to remove network from wpa_supplicant\n" - "configuration."); - } else { - wpagui->triggerUpdate(); - wpagui->ctrlRequest("SAVE_CONFIG", reply, &reply_len); - } - - close(); -} - - -void NetworkConfig::newNetwork() -{ - new_network = true; - getEapCapa(); -} - - -void NetworkConfig::getEapCapa() -{ - char reply[256]; - size_t reply_len; - - if (wpagui == NULL) - return; - - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest("GET_CAPABILITY eap", reply, &reply_len) < 0) - return; - reply[reply_len] = '\0'; - - QString res(reply); - QStringList types = QStringList::split(QChar(' '), res); - eapSelect->insertStringList(types); -} diff --git a/wpa_supplicant/wpa_gui/scanresults.ui b/wpa_supplicant/wpa_gui/scanresults.ui deleted file mode 100644 index dea305b4f657..000000000000 --- a/wpa_supplicant/wpa_gui/scanresults.ui +++ /dev/null @@ -1,179 +0,0 @@ - -ScanResults - - - ScanResults - - - - 0 - 0 - 452 - 225 - - - - Scan results - - - - unnamed - - - - - SSID - - - true - - - true - - - - - BSSID - - - true - - - true - - - - - frequency - - - true - - - true - - - - - signal - - - true - - - true - - - - - flags - - - true - - - true - - - - scanResultsView - - - StyledPanel - - - Sunken - - - - - layout24 - - - - unnamed - - - - spacer6 - - - Horizontal - - - Expanding - - - - 50 - 20 - - - - - - scanButton - - - Scan - - - - - closeButton - - - Close - - - - - - - - - closeButton - clicked() - ScanResults - close() - - - scanButton - clicked() - ScanResults - scanRequest() - - - scanResultsView - doubleClicked(QListViewItem*) - ScanResults - bssSelected(QListViewItem*) - - - - common/wpa_ctrl.h - wpagui.h - networkconfig.h - scanresults.ui.h - - - class WpaGui; - - - WpaGui *wpagui; - QTimer *timer; - - - setWpaGui( WpaGui * _wpagui ) - updateResults() - scanRequest() - getResults() - bssSelected( QListViewItem * sel ) - - - init() - destroy() - - - - diff --git a/wpa_supplicant/wpa_gui/scanresults.ui.h b/wpa_supplicant/wpa_gui/scanresults.ui.h deleted file mode 100644 index 530d2e6a495c..000000000000 --- a/wpa_supplicant/wpa_gui/scanresults.ui.h +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. -** -** You should not define a constructor or destructor in this file. -** Instead, write your code in functions called init() and destroy(). -** These will automatically be called by the form's constructor and -** destructor. -*****************************************************************************/ - -void ScanResults::init() -{ - wpagui = NULL; -} - - -void ScanResults::destroy() -{ - delete timer; -} - - -void ScanResults::setWpaGui(WpaGui *_wpagui) -{ - wpagui = _wpagui; - updateResults(); - - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), SLOT(getResults())); - timer->start(10000, FALSE); -} - - -void ScanResults::updateResults() -{ - char reply[8192]; - size_t reply_len; - - if (wpagui == NULL) - return; - - reply_len = sizeof(reply) - 1; - if (wpagui->ctrlRequest("SCAN_RESULTS", reply, &reply_len) < 0) - return; - reply[reply_len] = '\0'; - - scanResultsView->clear(); - - QString res(reply); - QStringList lines = QStringList::split(QChar('\n'), res); - bool first = true; - for (QStringList::Iterator it = lines.begin(); it != lines.end(); it++) { - if (first) { - first = false; - continue; - } - - QStringList cols = QStringList::split(QChar('\t'), *it, true); - QString ssid, bssid, freq, signal, flags; - bssid = cols.count() > 0 ? cols[0] : ""; - freq = cols.count() > 1 ? cols[1] : ""; - signal = cols.count() > 2 ? cols[2] : ""; - flags = cols.count() > 3 ? cols[3] : ""; - ssid = cols.count() > 4 ? cols[4] : ""; - new Q3ListViewItem(scanResultsView, ssid, bssid, freq, signal, flags); - } -} - - -void ScanResults::scanRequest() -{ - char reply[10]; - size_t reply_len = sizeof(reply); - - if (wpagui == NULL) - return; - - wpagui->ctrlRequest("SCAN", reply, &reply_len); -} - - -void ScanResults::getResults() -{ - updateResults(); -} - - - - -void ScanResults::bssSelected( Q3ListViewItem * sel ) -{ - NetworkConfig *nc = new NetworkConfig(); - if (nc == NULL) - return; - nc->setWpaGui(wpagui); - nc->paramsFromScanResults(sel); - nc->show(); - nc->exec(); -} diff --git a/wpa_supplicant/wpa_gui/setup-mingw-cross-compiling b/wpa_supplicant/wpa_gui/setup-mingw-cross-compiling deleted file mode 100755 index e173b0013781..000000000000 --- a/wpa_supplicant/wpa_gui/setup-mingw-cross-compiling +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -# qmake seems to be forcing include and lib paths from the original build -# and I have no idea how to change these. For now, just override the -# directories in the Makefile.Release file after qmake run. - -qmake -spec /q/jm/qt4-win/4.0.0/mkspecs/win32-g++ wpa_gui.pro -o Makefile -cat Makefile.Release | - sed s%qt4/lib%qt4-win/4.0.0/lib%g | - sed s%qt4/include%qt4-win/4.0.0/include%g > tmp.Makefile.Release && -mv -f tmp.Makefile.Release Makefile.Release diff --git a/wpa_supplicant/wpa_gui/userdatarequest.ui b/wpa_supplicant/wpa_gui/userdatarequest.ui deleted file mode 100644 index 6106b1e8b355..000000000000 --- a/wpa_supplicant/wpa_gui/userdatarequest.ui +++ /dev/null @@ -1,163 +0,0 @@ - -UserDataRequest - - - UserDataRequest - - - - 0 - 0 - 216 - 103 - - - - Authentication credentials required - - - true - - - - unnamed - - - - queryInfo - - - - - - - - layout28 - - - - unnamed - - - - queryField - - - - - - - - queryEdit - - - true - - - Password - - - - - - - layout27 - - - - unnamed - - - - spacer4 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - - - - true - - - true - - - - - buttonCancel - - - &Cancel - - - - - - true - - - - - - - - - buttonOk - clicked() - UserDataRequest - sendReply() - - - buttonCancel - clicked() - UserDataRequest - reject() - - - queryEdit - returnPressed() - UserDataRequest - sendReply() - - - - common/wpa_ctrl.h - wpagui.h - userdatarequest.ui.h - - - class WpaGui; - - - WpaGui *wpagui; - int networkid; - QString field; - - - sendReply() - - - setParams( WpaGui * _wpagui, const char * reqMsg ) - - - - diff --git a/wpa_supplicant/wpa_gui/userdatarequest.ui.h b/wpa_supplicant/wpa_gui/userdatarequest.ui.h deleted file mode 100644 index 66d4478d23e2..000000000000 --- a/wpa_supplicant/wpa_gui/userdatarequest.ui.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. -** -** You should not define a constructor or destructor in this file. -** Instead, write your code in functions called init() and destroy(). -** These will automatically be called by the form's constructor and -** destructor. -*****************************************************************************/ - -#include - -int UserDataRequest::setParams(WpaGui *_wpagui, const char *reqMsg) -{ - char *tmp, *pos, *pos2; - wpagui = _wpagui; - tmp = strdup(reqMsg); - if (tmp == NULL) - return -1; - pos = strchr(tmp, '-'); - if (pos == NULL) { - free(tmp); - return -1; - } - *pos++ = '\0'; - field = tmp; - pos2 = strchr(pos, ':'); - if (pos2 == NULL) { - free(tmp); - return -1; - } - *pos2++ = '\0'; - - networkid = atoi(pos); - queryInfo->setText(pos2); - if (strcmp(tmp, "PASSWORD") == 0) { - queryField->setText("Password: "); - queryEdit->setEchoMode(QLineEdit::Password); - } else if (strcmp(tmp, "NEW_PASSWORD") == 0) { - queryField->setText("New password: "); - queryEdit->setEchoMode(QLineEdit::Password); - } else if (strcmp(tmp, "IDENTITY") == 0) - queryField->setText("Identity: "); - else if (strcmp(tmp, "PASSPHRASE") == 0) { - queryField->setText("Private key passphrase: "); - queryEdit->setEchoMode(QLineEdit::Password); - } else - queryField->setText(field + ":"); - free(tmp); - - return 0; -} - - -void UserDataRequest::sendReply() -{ - char reply[10]; - size_t reply_len = sizeof(reply); - - if (wpagui == NULL) { - reject(); - return; - } - - QString cmd = QString(WPA_CTRL_RSP) + field + '-' + - QString::number(networkid) + ':' + - queryEdit->text(); - wpagui->ctrlRequest(cmd.ascii(), reply, &reply_len); - accept(); -} diff --git a/wpa_supplicant/wpa_gui/wpa_gui.pro b/wpa_supplicant/wpa_gui/wpa_gui.pro deleted file mode 100644 index a42a4ac843f2..000000000000 --- a/wpa_supplicant/wpa_gui/wpa_gui.pro +++ /dev/null @@ -1,50 +0,0 @@ -TEMPLATE = app -LANGUAGE = C++ - -CONFIG += qt warn_on release - -DEFINES += CONFIG_CTRL_IFACE - -win32 { - LIBS += -lws2_32 -static - DEFINES += CONFIG_NATIVE_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE - SOURCES += ../../src/utils/os_win32.c -} else:win32-g++ { - # cross compilation to win32 - LIBS += -lws2_32 -static - DEFINES += CONFIG_NATIVE_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE - SOURCES += ../../src/utils/os_win32.c -} else { - DEFINES += CONFIG_CTRL_IFACE_UNIX - SOURCES += ../../src/utils/os_unix.c -} - -INCLUDEPATH += . .. ../../src ../../src/utils - -HEADERS += wpamsg.h - -SOURCES += main.cpp \ - ../../src/common/wpa_ctrl.c - -FORMS = wpagui.ui \ - eventhistory.ui \ - scanresults.ui \ - userdatarequest.ui \ - networkconfig.ui - - -unix { - UI_DIR = .ui - MOC_DIR = .moc - OBJECTS_DIR = .obj -} - -qtver = $$[QT_VERSION] -isEmpty( qtver ) { - message(Compiling for Qt 3.x) - DEFINES += Q3ListViewItem=QListViewItem -} else { - message(Compiling for Qt $$qtver) - QT += qt3support - CONFIG += uic3 -} diff --git a/wpa_supplicant/wpa_gui/wpagui.ui b/wpa_supplicant/wpa_gui/wpagui.ui deleted file mode 100644 index b49d96b1ebeb..000000000000 --- a/wpa_supplicant/wpa_gui/wpagui.ui +++ /dev/null @@ -1,471 +0,0 @@ - -WpaGui - - - WpaGui - - - - 0 - 0 - 279 - 308 - - - - wpa_gui - - - - unnamed - - - - textLabel16 - - - Adapter: - - - - - adapterSelect - - - - - textLabel8 - - - Network: - - - - - networkSelect - - - - - frame3 - - - StyledPanel - - - Raised - - - - unnamed - - - - textLabel1 - - - Status: - - - - - textLabel2 - - - Last message: - - - - - textLabel3 - - - Authentication: - - - - - textLabel4 - - - Encryption: - - - - - textLabel5 - - - SSID: - - - - - textLabel6 - - - BSSID: - - - - - textLabel7 - - - IP address: - - - - - textStatus - - - - - - - - textLastMessage - - - - - - - - textAuthentication - - - - - - - - textEncryption - - - - - - - - textSsid - - - - - - - - textBssid - - - - - - - - textIpAddress - - - - - - - - - - spacer7 - - - Horizontal - - - Expanding - - - - 16 - 16 - - - - - - connectButton - - - Connect - - - - - disconnectButton - - - Disconnect - - - - - scanButton - - - Scan - - - - - - - MenuBar - - - - - - - - - - - - - - - - - - - - - - fileExitAction - - - Exit - - - E&xit - - - Ctrl+Q - - - - - helpContentsAction - - - false - - - Contents - - - &Contents... - - - - - - - - helpIndexAction - - - false - - - Index - - - &Index... - - - - - - - - helpAboutAction - - - About - - - &About - - - - - - - - fileEventHistoryAction - - - Event History - - - Event &History - - - - - fileAdd_NetworkAction - - - Add Network - - - &Add Network - - - - - fileEdit_networkAction - - - Edit Network - - - &Edit Network - - - - - - helpIndexAction - activated() - WpaGui - helpIndex() - - - helpContentsAction - activated() - WpaGui - helpContents() - - - helpAboutAction - activated() - WpaGui - helpAbout() - - - fileExitAction - activated() - WpaGui - close() - - - disconnectButton - clicked() - WpaGui - disconnect() - - - scanButton - clicked() - WpaGui - scan() - - - connectButton - clicked() - WpaGui - connectB() - - - fileEventHistoryAction - activated() - WpaGui - eventHistory() - - - networkSelect - activated(const QString&) - WpaGui - selectNetwork(const QString&) - - - fileEdit_networkAction - activated() - WpaGui - editNetwork() - - - fileAdd_NetworkAction - activated() - WpaGui - addNetwork() - - - adapterSelect - activated(const QString&) - WpaGui - selectAdapter(const QString&) - - - - qtimer.h - qsocketnotifier.h - wpamsg.h - eventhistory.h - scanresults.h - common/wpa_ctrl.h - dirent.h - qmessagebox.h - qapplication.h - userdatarequest.h - networkconfig.h - wpagui.ui.h - - - class UserDataRequest; - - - ScanResults *scanres; - bool networkMayHaveChanged; - char *ctrl_iface; - EventHistory *eh; - struct wpa_ctrl *ctrl_conn; - QSocketNotifier *msgNotifier; - QTimer *timer; - int pingsToStatusUpdate; - WpaMsgList msgs; - char *ctrl_iface_dir; - struct wpa_ctrl *monitor_conn; - UserDataRequest *udr; - - - parse_argv() - updateStatus() - updateNetworks() - helpIndex() - helpContents() - helpAbout() - disconnect() - scan() - eventHistory() - ping() - processMsg( char * msg ) - processCtrlReq( const char * req ) - receiveMsgs() - connectB() - selectNetwork( const QString & sel ) - editNetwork() - addNetwork() - selectAdapter( const QString & sel ) - - - init() - destroy() - openCtrlConnection( const char * ifname ) - ctrlRequest( const char * cmd, char * buf, size_t * buflen ) - triggerUpdate() - - - - diff --git a/wpa_supplicant/wpa_gui/wpagui.ui.h b/wpa_supplicant/wpa_gui/wpagui.ui.h deleted file mode 100644 index 678ff1be354b..000000000000 --- a/wpa_supplicant/wpa_gui/wpagui.ui.h +++ /dev/null @@ -1,730 +0,0 @@ -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. -** -** You should not define a constructor or destructor in this file. -** Instead, write your code in functions called init() and destroy(). -** These will automatically be called by the form's constructor and -** destructor. -*****************************************************************************/ - - -#ifdef __MINGW32__ -/* Need to get getopt() */ -#include -#endif - -#include - -void WpaGui::init() -{ - eh = NULL; - scanres = NULL; - udr = NULL; - ctrl_iface = NULL; - ctrl_conn = NULL; - monitor_conn = NULL; - msgNotifier = NULL; - ctrl_iface_dir = strdup("/var/run/wpa_supplicant"); - - parse_argv(); - - textStatus->setText("connecting to wpa_supplicant"); - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), SLOT(ping())); - timer->start(1000, FALSE); - - if (openCtrlConnection(ctrl_iface) < 0) { - printf("Failed to open control connection to wpa_supplicant.\n"); - } - - updateStatus(); - networkMayHaveChanged = true; - updateNetworks(); -} - - -void WpaGui::destroy() -{ - delete msgNotifier; - - if (monitor_conn) { - wpa_ctrl_detach(monitor_conn); - wpa_ctrl_close(monitor_conn); - monitor_conn = NULL; - } - if (ctrl_conn) { - wpa_ctrl_close(ctrl_conn); - ctrl_conn = NULL; - } - - if (eh) { - eh->close(); - delete eh; - eh = NULL; - } - - if (scanres) { - scanres->close(); - delete scanres; - scanres = NULL; - } - - if (udr) { - udr->close(); - delete udr; - udr = NULL; - } - - free(ctrl_iface); - ctrl_iface = NULL; - - free(ctrl_iface_dir); - ctrl_iface_dir = NULL; -} - - -void WpaGui::parse_argv() -{ - int c; - for (;;) { - c = getopt(qApp->argc(), qApp->argv(), "i:p:"); - if (c < 0) - break; - switch (c) { - case 'i': - free(ctrl_iface); - ctrl_iface = strdup(optarg); - break; - case 'p': - free(ctrl_iface_dir); - ctrl_iface_dir = strdup(optarg); - break; - } - } -} - - -int WpaGui::openCtrlConnection(const char *ifname) -{ - char *cfile; - int flen; - char buf[2048], *pos, *pos2; - size_t len; - - if (ifname) { - if (ifname != ctrl_iface) { - free(ctrl_iface); - ctrl_iface = strdup(ifname); - } - } else { -#ifdef CONFIG_CTRL_IFACE_UDP - free(ctrl_iface); - ctrl_iface = strdup("udp"); -#endif /* CONFIG_CTRL_IFACE_UDP */ -#ifdef CONFIG_CTRL_IFACE_UNIX - struct dirent *dent; - DIR *dir = opendir(ctrl_iface_dir); - free(ctrl_iface); - ctrl_iface = NULL; - if (dir) { - while ((dent = readdir(dir))) { -#ifdef _DIRENT_HAVE_D_TYPE - /* Skip the file if it is not a socket. - * Also accept DT_UNKNOWN (0) in case - * the C library or underlying file - * system does not support d_type. */ - if (dent->d_type != DT_SOCK && - dent->d_type != DT_UNKNOWN) - continue; -#endif /* _DIRENT_HAVE_D_TYPE */ - - if (strcmp(dent->d_name, ".") == 0 || - strcmp(dent->d_name, "..") == 0) - continue; - printf("Selected interface '%s'\n", dent->d_name); - ctrl_iface = strdup(dent->d_name); - break; - } - closedir(dir); - } -#endif /* CONFIG_CTRL_IFACE_UNIX */ -#ifdef CONFIG_CTRL_IFACE_NAMED_PIPE - struct wpa_ctrl *ctrl; - int ret; - - free(ctrl_iface); - ctrl_iface = NULL; - - ctrl = wpa_ctrl_open(NULL); - if (ctrl) { - len = sizeof(buf) - 1; - ret = wpa_ctrl_request(ctrl, "INTERFACES", 10, buf, &len, NULL); - if (ret >= 0) { - buf[len] = '\0'; - pos = strchr(buf, '\n'); - if (pos) - *pos = '\0'; - ctrl_iface = strdup(buf); - } - wpa_ctrl_close(ctrl); - } -#endif /* CONFIG_CTRL_IFACE_NAMED_PIPE */ - } - - if (ctrl_iface == NULL) - return -1; - -#ifdef CONFIG_CTRL_IFACE_UNIX - flen = strlen(ctrl_iface_dir) + strlen(ctrl_iface) + 2; - cfile = (char *) malloc(flen); - if (cfile == NULL) - return -1; - snprintf(cfile, flen, "%s/%s", ctrl_iface_dir, ctrl_iface); -#else /* CONFIG_CTRL_IFACE_UNIX */ - flen = strlen(ctrl_iface) + 1; - cfile = (char *) malloc(flen); - if (cfile == NULL) - return -1; - snprintf(cfile, flen, "%s", ctrl_iface); -#endif /* CONFIG_CTRL_IFACE_UNIX */ - - if (ctrl_conn) { - wpa_ctrl_close(ctrl_conn); - ctrl_conn = NULL; - } - - if (monitor_conn) { - delete msgNotifier; - msgNotifier = NULL; - wpa_ctrl_detach(monitor_conn); - wpa_ctrl_close(monitor_conn); - monitor_conn = NULL; - } - - printf("Trying to connect to '%s'\n", cfile); - ctrl_conn = wpa_ctrl_open(cfile); - if (ctrl_conn == NULL) { - free(cfile); - return -1; - } - monitor_conn = wpa_ctrl_open(cfile); - free(cfile); - if (monitor_conn == NULL) { - wpa_ctrl_close(ctrl_conn); - return -1; - } - if (wpa_ctrl_attach(monitor_conn)) { - printf("Failed to attach to wpa_supplicant\n"); - wpa_ctrl_close(monitor_conn); - monitor_conn = NULL; - wpa_ctrl_close(ctrl_conn); - ctrl_conn = NULL; - return -1; - } - -#if defined(CONFIG_CTRL_IFACE_UNIX) || defined(CONFIG_CTRL_IFACE_UDP) - msgNotifier = new QSocketNotifier(wpa_ctrl_get_fd(monitor_conn), - QSocketNotifier::Read, this); - connect(msgNotifier, SIGNAL(activated(int)), SLOT(receiveMsgs())); -#endif - - adapterSelect->clear(); - adapterSelect->insertItem(ctrl_iface); - adapterSelect->setCurrentItem(0); - - len = sizeof(buf) - 1; - if (wpa_ctrl_request(ctrl_conn, "INTERFACES", 10, buf, &len, NULL) >= 0) { - buf[len] = '\0'; - pos = buf; - while (*pos) { - pos2 = strchr(pos, '\n'); - if (pos2) - *pos2 = '\0'; - if (strcmp(pos, ctrl_iface) != 0) - adapterSelect->insertItem(pos); - if (pos2) - pos = pos2 + 1; - else - break; - } - } - - return 0; -} - - -static void wpa_gui_msg_cb(char *msg, size_t) -{ - /* This should not happen anymore since two control connections are used. */ - printf("missed message: %s\n", msg); -} - - -int WpaGui::ctrlRequest(const char *cmd, char *buf, size_t *buflen) -{ - int ret; - - if (ctrl_conn == NULL) - return -3; - ret = wpa_ctrl_request(ctrl_conn, cmd, strlen(cmd), buf, buflen, - wpa_gui_msg_cb); - if (ret == -2) { - printf("'%s' command timed out.\n", cmd); - } else if (ret < 0) { - printf("'%s' command failed.\n", cmd); - } - - return ret; -} - - -void WpaGui::updateStatus() -{ - char buf[2048], *start, *end, *pos; - size_t len; - - pingsToStatusUpdate = 10; - - len = sizeof(buf) - 1; - if (ctrl_conn == NULL || ctrlRequest("STATUS", buf, &len) < 0) { - textStatus->setText("Could not get status from wpa_supplicant"); - textAuthentication->clear(); - textEncryption->clear(); - textSsid->clear(); - textBssid->clear(); - textIpAddress->clear(); - return; - } - - buf[len] = '\0'; - - bool auth_updated = false, ssid_updated = false; - bool bssid_updated = false, ipaddr_updated = false; - bool status_updated = false; - char *pairwise_cipher = NULL, *group_cipher = NULL; - - start = buf; - while (*start) { - bool last = false; - end = strchr(start, '\n'); - if (end == NULL) { - last = true; - end = start; - while (end[0] && end[1]) - end++; - } - *end = '\0'; - - pos = strchr(start, '='); - if (pos) { - *pos++ = '\0'; - if (strcmp(start, "bssid") == 0) { - bssid_updated = true; - textBssid->setText(pos); - } else if (strcmp(start, "ssid") == 0) { - ssid_updated = true; - textSsid->setText(pos); - } else if (strcmp(start, "ip_address") == 0) { - ipaddr_updated = true; - textIpAddress->setText(pos); - } else if (strcmp(start, "wpa_state") == 0) { - status_updated = true; - textStatus->setText(pos); - } else if (strcmp(start, "key_mgmt") == 0) { - auth_updated = true; - textAuthentication->setText(pos); - /* TODO: could add EAP status to this */ - } else if (strcmp(start, "pairwise_cipher") == 0) { - pairwise_cipher = pos; - } else if (strcmp(start, "group_cipher") == 0) { - group_cipher = pos; - } - } - - if (last) - break; - start = end + 1; - } - - if (pairwise_cipher || group_cipher) { - QString encr; - if (pairwise_cipher && group_cipher && - strcmp(pairwise_cipher, group_cipher) != 0) { - encr.append(pairwise_cipher); - encr.append(" + "); - encr.append(group_cipher); - } else if (pairwise_cipher) { - encr.append(pairwise_cipher); - } else { - encr.append(group_cipher); - encr.append(" [group key only]"); - } - textEncryption->setText(encr); - } else - textEncryption->clear(); - - if (!status_updated) - textStatus->clear(); - if (!auth_updated) - textAuthentication->clear(); - if (!ssid_updated) - textSsid->clear(); - if (!bssid_updated) - textBssid->clear(); - if (!ipaddr_updated) - textIpAddress->clear(); -} - - -void WpaGui::updateNetworks() -{ - char buf[2048], *start, *end, *id, *ssid, *bssid, *flags; - size_t len; - int first_active = -1; - bool selected = false; - - if (!networkMayHaveChanged) - return; - - networkSelect->clear(); - - if (ctrl_conn == NULL) - return; - - len = sizeof(buf) - 1; - if (ctrlRequest("LIST_NETWORKS", buf, &len) < 0) - return; - - buf[len] = '\0'; - start = strchr(buf, '\n'); - if (start == NULL) - return; - start++; - - while (*start) { - bool last = false; - end = strchr(start, '\n'); - if (end == NULL) { - last = true; - end = start; - while (end[0] && end[1]) - end++; - } - *end = '\0'; - - id = start; - ssid = strchr(id, '\t'); - if (ssid == NULL) - break; - *ssid++ = '\0'; - bssid = strchr(ssid, '\t'); - if (bssid == NULL) - break; - *bssid++ = '\0'; - flags = strchr(bssid, '\t'); - if (flags == NULL) - break; - *flags++ = '\0'; - - QString network(id); - network.append(": "); - network.append(ssid); - networkSelect->insertItem(network); - - if (strstr(flags, "[CURRENT]")) { - networkSelect->setCurrentItem(networkSelect->count() - 1); - selected = true; - } else if (first_active < 0 && strstr(flags, "[DISABLED]") == NULL) - first_active = networkSelect->count() - 1; - - if (last) - break; - start = end + 1; - } - - if (!selected && first_active >= 0) - networkSelect->setCurrentItem(first_active); - - networkMayHaveChanged = false; -} - - -void WpaGui::helpIndex() -{ - printf("helpIndex\n"); -} - - -void WpaGui::helpContents() -{ - printf("helpContents\n"); -} - - -void WpaGui::helpAbout() -{ - QMessageBox::about(this, "wpa_gui for wpa_supplicant", - "Copyright (c) 2003-2008,\n" - "Jouni Malinen \n" - "and contributors.\n" - "\n" - "This program is free software. You can\n" - "distribute it and/or modify it under the terms of\n" - "the GNU General Public License version 2.\n" - "\n" - "Alternatively, this software may be distributed\n" - "under the terms of the BSD license.\n" - "\n" - "This product includes software developed\n" - "by the OpenSSL Project for use in the\n" - "OpenSSL Toolkit (http://www.openssl.org/)\n"); -} - - -void WpaGui::disconnect() -{ - char reply[10]; - size_t reply_len = sizeof(reply); - ctrlRequest("DISCONNECT", reply, &reply_len); -} - - -void WpaGui::scan() -{ - if (scanres) { - scanres->close(); - delete scanres; - } - - scanres = new ScanResults(); - if (scanres == NULL) - return; - scanres->setWpaGui(this); - scanres->show(); - scanres->exec(); -} - - -void WpaGui::eventHistory() -{ - if (eh) { - eh->close(); - delete eh; - } - - eh = new EventHistory(); - if (eh == NULL) - return; - eh->addEvents(msgs); - eh->show(); - eh->exec(); -} - - -void WpaGui::ping() -{ - char buf[10]; - size_t len; - -#ifdef CONFIG_CTRL_IFACE_NAMED_PIPE - /* - * QSocketNotifier cannot be used with Windows named pipes, so use a timer - * to check for received messages for now. This could be optimized be doing - * something specific to named pipes or Windows events, but it is not clear - * what would be the best way of doing that in Qt. - */ - receiveMsgs(); -#endif /* CONFIG_CTRL_IFACE_NAMED_PIPE */ - - if (scanres && !scanres->isVisible()) { - delete scanres; - scanres = NULL; - } - - if (eh && !eh->isVisible()) { - delete eh; - eh = NULL; - } - - if (udr && !udr->isVisible()) { - delete udr; - udr = NULL; - } - - len = sizeof(buf) - 1; - if (ctrlRequest("PING", buf, &len) < 0) { - printf("PING failed - trying to reconnect\n"); - if (openCtrlConnection(ctrl_iface) >= 0) { - printf("Reconnected successfully\n"); - pingsToStatusUpdate = 0; - } - } - - pingsToStatusUpdate--; - if (pingsToStatusUpdate <= 0) { - updateStatus(); - updateNetworks(); - } -} - - -static int str_match(const char *a, const char *b) -{ - return strncmp(a, b, strlen(b)) == 0; -} - - -void WpaGui::processMsg(char *msg) -{ - char *pos = msg, *pos2; - int priority = 2; - - if (*pos == '<') { - /* skip priority */ - pos++; - priority = atoi(pos); - pos = strchr(pos, '>'); - if (pos) - pos++; - else - pos = msg; - } - - WpaMsg wm(pos, priority); - if (eh) - eh->addEvent(wm); - msgs.append(wm); - while (msgs.count() > 100) - msgs.pop_front(); - - /* Update last message with truncated version of the event */ - if (strncmp(pos, "CTRL-", 5) == 0) { - pos2 = strchr(pos, str_match(pos, WPA_CTRL_REQ) ? ':' : ' '); - if (pos2) - pos2++; - else - pos2 = pos; - } else - pos2 = pos; - QString lastmsg = pos2; - lastmsg.truncate(40); - textLastMessage->setText(lastmsg); - - pingsToStatusUpdate = 0; - networkMayHaveChanged = true; - - if (str_match(pos, WPA_CTRL_REQ)) - processCtrlReq(pos + strlen(WPA_CTRL_REQ)); -} - - -void WpaGui::processCtrlReq(const char *req) -{ - if (udr) { - udr->close(); - delete udr; - } - udr = new UserDataRequest(); - if (udr == NULL) - return; - if (udr->setParams(this, req) < 0) { - delete udr; - udr = NULL; - return; - } - udr->show(); - udr->exec(); -} - - -void WpaGui::receiveMsgs() -{ - char buf[256]; - size_t len; - - while (monitor_conn && wpa_ctrl_pending(monitor_conn) > 0) { - len = sizeof(buf) - 1; - if (wpa_ctrl_recv(monitor_conn, buf, &len) == 0) { - buf[len] = '\0'; - processMsg(buf); - } - } -} - - -void WpaGui::connectB() -{ - char reply[10]; - size_t reply_len = sizeof(reply); - ctrlRequest("REASSOCIATE", reply, &reply_len); -} - - -void WpaGui::selectNetwork( const QString &sel ) -{ - QString cmd(sel); - char reply[10]; - size_t reply_len = sizeof(reply); - - int pos = cmd.find(':'); - if (pos < 0) { - printf("Invalid selectNetwork '%s'\n", cmd.ascii()); - return; - } - cmd.truncate(pos); - cmd.prepend("SELECT_NETWORK "); - ctrlRequest(cmd.ascii(), reply, &reply_len); -} - - -void WpaGui::editNetwork() -{ - QString sel(networkSelect->currentText()); - int pos = sel.find(':'); - if (pos < 0) { - printf("Invalid selectNetwork '%s'\n", sel.ascii()); - return; - } - sel.truncate(pos); - - NetworkConfig *nc = new NetworkConfig(); - if (nc == NULL) - return; - nc->setWpaGui(this); - - nc->paramsFromConfig(sel.toInt()); - nc->show(); - nc->exec(); -} - - -void WpaGui::triggerUpdate() -{ - updateStatus(); - networkMayHaveChanged = true; - updateNetworks(); -} - - -void WpaGui::addNetwork() -{ - NetworkConfig *nc = new NetworkConfig(); - if (nc == NULL) - return; - nc->setWpaGui(this); - nc->newNetwork(); - nc->show(); - nc->exec(); -} - - -void WpaGui::selectAdapter( const QString & sel ) -{ - if (openCtrlConnection(sel.ascii()) < 0) - printf("Failed to open control connection to wpa_supplicant.\n"); - updateStatus(); - updateNetworks(); -} diff --git a/wpa_supplicant/wpa_gui/wpamsg.h b/wpa_supplicant/wpa_gui/wpamsg.h deleted file mode 100644 index f3fce06978c7..000000000000 --- a/wpa_supplicant/wpa_gui/wpamsg.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef WPAMSG_H -#define WPAMSG_H - -class WpaMsg; - -#if QT_VERSION >= 0x040000 -#include -#include -typedef QLinkedList WpaMsgList; -#else -#include -typedef QValueList WpaMsgList; -#endif - -class WpaMsg { -public: - WpaMsg() {} - WpaMsg(const QString &_msg, int _priority = 2) - : msg(_msg), priority(_priority) - { - timestamp = QDateTime::currentDateTime(); - } - - QString getMsg() const { return msg; } - int getPriority() const { return priority; } - QDateTime getTimestamp() const { return timestamp; } - -private: - QString msg; - int priority; - QDateTime timestamp; -}; - -#endif /* WPAMSG_H */ diff --git a/wpa_supplicant/xcode/wpa_supplicant.xcodeproj/project.pbxproj b/wpa_supplicant/xcode/wpa_supplicant.xcodeproj/project.pbxproj deleted file mode 100644 index 6fea81bfbc9e..000000000000 --- a/wpa_supplicant/xcode/wpa_supplicant.xcodeproj/project.pbxproj +++ /dev/null @@ -1,513 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 881EED0F10DC14EF009E449F /* eap_register.c in Sources */ = {isa = PBXBuildFile; fileRef = 881EED0E10DC14EF009E449F /* eap_register.c */; }; - 8853CB17109F385C00358CEF /* libpcap.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8853CB16109F385C00358CEF /* libpcap.dylib */; }; - 8853CB1B109F389800358CEF /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8853CB1A109F389800358CEF /* libcrypto.dylib */; }; - 8853CB1F109F38BD00358CEF /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8853CB1E109F38BD00358CEF /* CoreFoundation.framework */; }; - 8853CB2E109F3A3900358CEF /* scan_helpers.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CB2D109F3A3900358CEF /* scan_helpers.c */; }; - 8853CB32109F3A9400358CEF /* wpa_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CB31109F3A9400358CEF /* wpa_common.c */; }; - 8853CB36109F3AC700358CEF /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CB35109F3AC700358CEF /* md5.c */; }; - 8853CB3C109F3B5800358CEF /* Apple80211.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8853CB3B109F3B5800358CEF /* Apple80211.framework */; }; - 8853CBFB109F4C6E00358CEF /* eap_gtc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBEC109F4C6E00358CEF /* eap_gtc.c */; }; - 8853CBFC109F4C6E00358CEF /* eap_leap.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBED109F4C6E00358CEF /* eap_leap.c */; }; - 8853CBFD109F4C6E00358CEF /* eap_md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBEE109F4C6E00358CEF /* eap_md5.c */; }; - 8853CBFE109F4C6E00358CEF /* eap_methods.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBEF109F4C6E00358CEF /* eap_methods.c */; }; - 8853CBFF109F4C6E00358CEF /* eap_mschapv2.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF0109F4C6E00358CEF /* eap_mschapv2.c */; }; - 8853CC00109F4C6E00358CEF /* eap_otp.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF1109F4C6E00358CEF /* eap_otp.c */; }; - 8853CC01109F4C6E00358CEF /* eap_peap.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF2109F4C6E00358CEF /* eap_peap.c */; }; - 8853CC02109F4C6E00358CEF /* eap_tls_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF3109F4C6E00358CEF /* eap_tls_common.c */; }; - 8853CC03109F4C6E00358CEF /* eap_tls.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF4109F4C6E00358CEF /* eap_tls.c */; }; - 8853CC04109F4C6E00358CEF /* eap_tnc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF5109F4C6E00358CEF /* eap_tnc.c */; }; - 8853CC05109F4C6E00358CEF /* eap_ttls.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF6109F4C6E00358CEF /* eap_ttls.c */; }; - 8853CC06109F4C6E00358CEF /* eap_wsc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF7109F4C6E00358CEF /* eap_wsc.c */; }; - 8853CC07109F4C6E00358CEF /* eap.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF8109F4C6E00358CEF /* eap.c */; }; - 8853CC08109F4C6E00358CEF /* mschapv2.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF9109F4C6E00358CEF /* mschapv2.c */; }; - 8853CC09109F4C6E00358CEF /* tncc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBFA109F4C6E00358CEF /* tncc.c */; }; - 8853CC0E109F4CA100358CEF /* ctrl_iface_unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC0C109F4CA100358CEF /* ctrl_iface_unix.c */; }; - 8853CC0F109F4CA100358CEF /* ctrl_iface.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC0D109F4CA100358CEF /* ctrl_iface.c */; }; - 8853CC11109F4CC800358CEF /* eapol_supp_sm.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC10109F4CC800358CEF /* eapol_supp_sm.c */; }; - 8853CC18109F4D0800358CEF /* chap.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC14109F4D0800358CEF /* chap.c */; }; - 8853CC19109F4D0800358CEF /* eap_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC15109F4D0800358CEF /* eap_common.c */; }; - 8853CC1A109F4D0800358CEF /* eap_peap_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC16109F4D0800358CEF /* eap_peap_common.c */; }; - 8853CC1B109F4D0800358CEF /* eap_wsc_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC17109F4D0800358CEF /* eap_wsc_common.c */; }; - 8853CC26109F4D3500358CEF /* wps_attr_build.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC1E109F4D3500358CEF /* wps_attr_build.c */; }; - 8853CC27109F4D3500358CEF /* wps_attr_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC1F109F4D3500358CEF /* wps_attr_parse.c */; }; - 8853CC28109F4D3500358CEF /* wps_attr_process.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC20109F4D3500358CEF /* wps_attr_process.c */; }; - 8853CC29109F4D3500358CEF /* wps_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC21109F4D3500358CEF /* wps_common.c */; }; - 8853CC2A109F4D3500358CEF /* wps_dev_attr.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC22109F4D3500358CEF /* wps_dev_attr.c */; }; - 8853CC2B109F4D3500358CEF /* wps_enrollee.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC23109F4D3500358CEF /* wps_enrollee.c */; }; - 8853CC2C109F4D3500358CEF /* wps_registrar.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC24109F4D3500358CEF /* wps_registrar.c */; }; - 8853CC2D109F4D3500358CEF /* wps.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC25109F4D3500358CEF /* wps.c */; }; - 8853CC34109F4DE200358CEF /* ms_funcs.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC32109F4DE200358CEF /* ms_funcs.c */; }; - 8853CC35109F4DE200358CEF /* tls_openssl.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC33109F4DE200358CEF /* tls_openssl.c */; }; - 8853CC3C109F4E1D00358CEF /* libssl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8853CC3B109F4E1D00358CEF /* libssl.dylib */; }; - 8853CC40109F4E3A00358CEF /* wps_supplicant.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC3F109F4E3A00358CEF /* wps_supplicant.c */; }; - 8853CC44109F4E6200358CEF /* uuid.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC43109F4E6200358CEF /* uuid.c */; }; - 8853CC48109F4E8700358CEF /* ieee802_11_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC47109F4E8700358CEF /* ieee802_11_common.c */; }; - 8853CC4E109F4ED500358CEF /* sha256.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC4C109F4ED500358CEF /* sha256.c */; }; - 8853CC53109F4F3500358CEF /* aes-cbc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC51109F4F3500358CEF /* aes-cbc.c */; }; - 8853CC54109F4F3500358CEF /* sha1-tlsprf.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC52109F4F3500358CEF /* sha1-tlsprf.c */; }; - 88950831109F2FAB004FB35D /* blacklist.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950828109F2FAB004FB35D /* blacklist.c */; }; - 88950832109F2FAB004FB35D /* config_file.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950829109F2FAB004FB35D /* config_file.c */; }; - 88950833109F2FAB004FB35D /* config.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895082A109F2FAB004FB35D /* config.c */; }; - 88950834109F2FAB004FB35D /* events.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895082B109F2FAB004FB35D /* events.c */; }; - 88950835109F2FAB004FB35D /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895082C109F2FAB004FB35D /* main.c */; }; - 88950836109F2FAB004FB35D /* notify.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895082D109F2FAB004FB35D /* notify.c */; }; - 88950837109F2FAB004FB35D /* scan.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895082E109F2FAB004FB35D /* scan.c */; }; - 88950838109F2FAB004FB35D /* wpa_supplicant.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895082F109F2FAB004FB35D /* wpa_supplicant.c */; }; - 88950839109F2FAB004FB35D /* wpas_glue.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950830109F2FAB004FB35D /* wpas_glue.c */; }; - 88950840109F301A004FB35D /* base64.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895083A109F301A004FB35D /* base64.c */; }; - 88950841109F301A004FB35D /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895083B109F301A004FB35D /* common.c */; }; - 88950842109F301A004FB35D /* eloop.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895083C109F301A004FB35D /* eloop.c */; }; - 88950843109F301A004FB35D /* os_unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895083D109F301A004FB35D /* os_unix.c */; }; - 88950844109F301A004FB35D /* wpa_debug.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895083E109F301A004FB35D /* wpa_debug.c */; }; - 88950845109F301A004FB35D /* wpabuf.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895083F109F301A004FB35D /* wpabuf.c */; }; - 88950864109F32D1004FB35D /* peerkey.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895085F109F32D1004FB35D /* peerkey.c */; }; - 88950865109F32D1004FB35D /* pmksa_cache.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950860109F32D1004FB35D /* pmksa_cache.c */; }; - 88950866109F32D1004FB35D /* preauth.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950861109F32D1004FB35D /* preauth.c */; }; - 88950867109F32D1004FB35D /* wpa_ie.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950862109F32D1004FB35D /* wpa_ie.c */; }; - 88950868109F32D1004FB35D /* wpa.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950863109F32D1004FB35D /* wpa.c */; }; - 8895086C109F3316004FB35D /* l2_packet_freebsd.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895086B109F3316004FB35D /* l2_packet_freebsd.c */; }; - 88950871109F3367004FB35D /* aes-unwrap.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895086D109F3367004FB35D /* aes-unwrap.c */; }; - 88950872109F3367004FB35D /* crypto_openssl.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895086E109F3367004FB35D /* crypto_openssl.c */; }; - 88950873109F3367004FB35D /* sha1-pbkdf2.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895086F109F3367004FB35D /* sha1-pbkdf2.c */; }; - 88950874109F3367004FB35D /* sha1.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950870109F3367004FB35D /* sha1.c */; }; - 88950885109F3538004FB35D /* driver_osx.m in Sources */ = {isa = PBXBuildFile; fileRef = 88950883109F3538004FB35D /* driver_osx.m */; }; - 88950886109F3538004FB35D /* drivers.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950884109F3538004FB35D /* drivers.c */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 8DD76FAF0486AB0100D96B5E /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 881EED0E10DC14EF009E449F /* eap_register.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_register.c; path = ../eap_register.c; sourceTree = SOURCE_ROOT; }; - 8853CB16109F385C00358CEF /* libpcap.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpcap.dylib; path = usr/lib/libpcap.dylib; sourceTree = SDKROOT; }; - 8853CB1A109F389800358CEF /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = usr/lib/libcrypto.dylib; sourceTree = SDKROOT; }; - 8853CB1E109F38BD00358CEF /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; - 8853CB2D109F3A3900358CEF /* scan_helpers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = scan_helpers.c; path = ../../src/drivers/scan_helpers.c; sourceTree = SOURCE_ROOT; }; - 8853CB31109F3A9400358CEF /* wpa_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpa_common.c; path = ../../src/common/wpa_common.c; sourceTree = SOURCE_ROOT; }; - 8853CB35109F3AC700358CEF /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../src/crypto/md5.c; sourceTree = SOURCE_ROOT; }; - 8853CB3B109F3B5800358CEF /* Apple80211.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Apple80211.framework; path = /System/Library/PrivateFrameworks/Apple80211.framework; sourceTree = ""; }; - 8853CBEC109F4C6E00358CEF /* eap_gtc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_gtc.c; path = ../../src/eap_peer/eap_gtc.c; sourceTree = SOURCE_ROOT; }; - 8853CBED109F4C6E00358CEF /* eap_leap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_leap.c; path = ../../src/eap_peer/eap_leap.c; sourceTree = SOURCE_ROOT; }; - 8853CBEE109F4C6E00358CEF /* eap_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_md5.c; path = ../../src/eap_peer/eap_md5.c; sourceTree = SOURCE_ROOT; }; - 8853CBEF109F4C6E00358CEF /* eap_methods.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_methods.c; path = ../../src/eap_peer/eap_methods.c; sourceTree = SOURCE_ROOT; }; - 8853CBF0109F4C6E00358CEF /* eap_mschapv2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_mschapv2.c; path = ../../src/eap_peer/eap_mschapv2.c; sourceTree = SOURCE_ROOT; }; - 8853CBF1109F4C6E00358CEF /* eap_otp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_otp.c; path = ../../src/eap_peer/eap_otp.c; sourceTree = SOURCE_ROOT; }; - 8853CBF2109F4C6E00358CEF /* eap_peap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_peap.c; path = ../../src/eap_peer/eap_peap.c; sourceTree = SOURCE_ROOT; }; - 8853CBF3109F4C6E00358CEF /* eap_tls_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_tls_common.c; path = ../../src/eap_peer/eap_tls_common.c; sourceTree = SOURCE_ROOT; }; - 8853CBF4109F4C6E00358CEF /* eap_tls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_tls.c; path = ../../src/eap_peer/eap_tls.c; sourceTree = SOURCE_ROOT; }; - 8853CBF5109F4C6E00358CEF /* eap_tnc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_tnc.c; path = ../../src/eap_peer/eap_tnc.c; sourceTree = SOURCE_ROOT; }; - 8853CBF6109F4C6E00358CEF /* eap_ttls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_ttls.c; path = ../../src/eap_peer/eap_ttls.c; sourceTree = SOURCE_ROOT; }; - 8853CBF7109F4C6E00358CEF /* eap_wsc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_wsc.c; path = ../../src/eap_peer/eap_wsc.c; sourceTree = SOURCE_ROOT; }; - 8853CBF8109F4C6E00358CEF /* eap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap.c; path = ../../src/eap_peer/eap.c; sourceTree = SOURCE_ROOT; }; - 8853CBF9109F4C6E00358CEF /* mschapv2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mschapv2.c; path = ../../src/eap_peer/mschapv2.c; sourceTree = SOURCE_ROOT; }; - 8853CBFA109F4C6E00358CEF /* tncc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tncc.c; path = ../../src/eap_peer/tncc.c; sourceTree = SOURCE_ROOT; }; - 8853CC0C109F4CA100358CEF /* ctrl_iface_unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ctrl_iface_unix.c; path = ../ctrl_iface_unix.c; sourceTree = SOURCE_ROOT; }; - 8853CC0D109F4CA100358CEF /* ctrl_iface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ctrl_iface.c; path = ../ctrl_iface.c; sourceTree = SOURCE_ROOT; }; - 8853CC10109F4CC800358CEF /* eapol_supp_sm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eapol_supp_sm.c; path = ../../src/eapol_supp/eapol_supp_sm.c; sourceTree = SOURCE_ROOT; }; - 8853CC14109F4D0800358CEF /* chap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = chap.c; path = ../../src/eap_common/chap.c; sourceTree = SOURCE_ROOT; }; - 8853CC15109F4D0800358CEF /* eap_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_common.c; path = ../../src/eap_common/eap_common.c; sourceTree = SOURCE_ROOT; }; - 8853CC16109F4D0800358CEF /* eap_peap_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_peap_common.c; path = ../../src/eap_common/eap_peap_common.c; sourceTree = SOURCE_ROOT; }; - 8853CC17109F4D0800358CEF /* eap_wsc_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_wsc_common.c; path = ../../src/eap_common/eap_wsc_common.c; sourceTree = SOURCE_ROOT; }; - 8853CC1E109F4D3500358CEF /* wps_attr_build.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_attr_build.c; path = ../../src/wps/wps_attr_build.c; sourceTree = SOURCE_ROOT; }; - 8853CC1F109F4D3500358CEF /* wps_attr_parse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_attr_parse.c; path = ../../src/wps/wps_attr_parse.c; sourceTree = SOURCE_ROOT; }; - 8853CC20109F4D3500358CEF /* wps_attr_process.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_attr_process.c; path = ../../src/wps/wps_attr_process.c; sourceTree = SOURCE_ROOT; }; - 8853CC21109F4D3500358CEF /* wps_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_common.c; path = ../../src/wps/wps_common.c; sourceTree = SOURCE_ROOT; }; - 8853CC22109F4D3500358CEF /* wps_dev_attr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_dev_attr.c; path = ../../src/wps/wps_dev_attr.c; sourceTree = SOURCE_ROOT; }; - 8853CC23109F4D3500358CEF /* wps_enrollee.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_enrollee.c; path = ../../src/wps/wps_enrollee.c; sourceTree = SOURCE_ROOT; }; - 8853CC24109F4D3500358CEF /* wps_registrar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_registrar.c; path = ../../src/wps/wps_registrar.c; sourceTree = SOURCE_ROOT; }; - 8853CC25109F4D3500358CEF /* wps.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps.c; path = ../../src/wps/wps.c; sourceTree = SOURCE_ROOT; }; - 8853CC32109F4DE200358CEF /* ms_funcs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ms_funcs.c; path = ../../src/crypto/ms_funcs.c; sourceTree = SOURCE_ROOT; }; - 8853CC33109F4DE200358CEF /* tls_openssl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tls_openssl.c; path = ../../src/crypto/tls_openssl.c; sourceTree = SOURCE_ROOT; }; - 8853CC3B109F4E1D00358CEF /* libssl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libssl.dylib; path = usr/lib/libssl.dylib; sourceTree = SDKROOT; }; - 8853CC3F109F4E3A00358CEF /* wps_supplicant.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_supplicant.c; path = ../wps_supplicant.c; sourceTree = SOURCE_ROOT; }; - 8853CC43109F4E6200358CEF /* uuid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = uuid.c; path = ../../src/utils/uuid.c; sourceTree = SOURCE_ROOT; }; - 8853CC47109F4E8700358CEF /* ieee802_11_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ieee802_11_common.c; path = ../../src/common/ieee802_11_common.c; sourceTree = SOURCE_ROOT; }; - 8853CC4C109F4ED500358CEF /* sha256.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sha256.c; path = ../../src/crypto/sha256.c; sourceTree = SOURCE_ROOT; }; - 8853CC51109F4F3500358CEF /* aes-cbc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "aes-cbc.c"; path = "../../src/crypto/aes-cbc.c"; sourceTree = SOURCE_ROOT; }; - 8853CC52109F4F3500358CEF /* sha1-tlsprf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "sha1-tlsprf.c"; path = "../../src/crypto/sha1-tlsprf.c"; sourceTree = SOURCE_ROOT; }; - 88950828109F2FAB004FB35D /* blacklist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = blacklist.c; path = ../../wpa_supplicant/blacklist.c; sourceTree = SOURCE_ROOT; }; - 88950829109F2FAB004FB35D /* config_file.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = config_file.c; path = ../../wpa_supplicant/config_file.c; sourceTree = SOURCE_ROOT; }; - 8895082A109F2FAB004FB35D /* config.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = config.c; path = ../../wpa_supplicant/config.c; sourceTree = SOURCE_ROOT; }; - 8895082B109F2FAB004FB35D /* events.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = events.c; path = ../../wpa_supplicant/events.c; sourceTree = SOURCE_ROOT; }; - 8895082C109F2FAB004FB35D /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = ../../wpa_supplicant/main.c; sourceTree = SOURCE_ROOT; }; - 8895082D109F2FAB004FB35D /* notify.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = notify.c; path = ../../wpa_supplicant/notify.c; sourceTree = SOURCE_ROOT; }; - 8895082E109F2FAB004FB35D /* scan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = scan.c; path = ../../wpa_supplicant/scan.c; sourceTree = SOURCE_ROOT; }; - 8895082F109F2FAB004FB35D /* wpa_supplicant.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpa_supplicant.c; path = ../../wpa_supplicant/wpa_supplicant.c; sourceTree = SOURCE_ROOT; }; - 88950830109F2FAB004FB35D /* wpas_glue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpas_glue.c; path = ../../wpa_supplicant/wpas_glue.c; sourceTree = SOURCE_ROOT; }; - 8895083A109F301A004FB35D /* base64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = base64.c; path = ../../src/utils/base64.c; sourceTree = SOURCE_ROOT; }; - 8895083B109F301A004FB35D /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = common.c; path = ../../src/utils/common.c; sourceTree = SOURCE_ROOT; }; - 8895083C109F301A004FB35D /* eloop.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eloop.c; path = ../../src/utils/eloop.c; sourceTree = SOURCE_ROOT; }; - 8895083D109F301A004FB35D /* os_unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = os_unix.c; path = ../../src/utils/os_unix.c; sourceTree = SOURCE_ROOT; }; - 8895083E109F301A004FB35D /* wpa_debug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpa_debug.c; path = ../../src/utils/wpa_debug.c; sourceTree = SOURCE_ROOT; }; - 8895083F109F301A004FB35D /* wpabuf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpabuf.c; path = ../../src/utils/wpabuf.c; sourceTree = SOURCE_ROOT; }; - 8895085F109F32D1004FB35D /* peerkey.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = peerkey.c; path = ../../src/rsn_supp/peerkey.c; sourceTree = SOURCE_ROOT; }; - 88950860109F32D1004FB35D /* pmksa_cache.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pmksa_cache.c; path = ../../src/rsn_supp/pmksa_cache.c; sourceTree = SOURCE_ROOT; }; - 88950861109F32D1004FB35D /* preauth.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = preauth.c; path = ../../src/rsn_supp/preauth.c; sourceTree = SOURCE_ROOT; }; - 88950862109F32D1004FB35D /* wpa_ie.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpa_ie.c; path = ../../src/rsn_supp/wpa_ie.c; sourceTree = SOURCE_ROOT; }; - 88950863109F32D1004FB35D /* wpa.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpa.c; path = ../../src/rsn_supp/wpa.c; sourceTree = SOURCE_ROOT; }; - 8895086B109F3316004FB35D /* l2_packet_freebsd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = l2_packet_freebsd.c; path = ../../src/l2_packet/l2_packet_freebsd.c; sourceTree = SOURCE_ROOT; }; - 8895086D109F3367004FB35D /* aes-unwrap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "aes-unwrap.c"; path = "../../src/crypto/aes-unwrap.c"; sourceTree = SOURCE_ROOT; }; - 8895086E109F3367004FB35D /* crypto_openssl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = crypto_openssl.c; path = ../../src/crypto/crypto_openssl.c; sourceTree = SOURCE_ROOT; }; - 8895086F109F3367004FB35D /* sha1-pbkdf2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "sha1-pbkdf2.c"; path = "../../src/crypto/sha1-pbkdf2.c"; sourceTree = SOURCE_ROOT; }; - 88950870109F3367004FB35D /* sha1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sha1.c; path = ../../src/crypto/sha1.c; sourceTree = SOURCE_ROOT; }; - 88950883109F3538004FB35D /* driver_osx.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = driver_osx.m; path = ../../src/drivers/driver_osx.m; sourceTree = SOURCE_ROOT; }; - 88950884109F3538004FB35D /* drivers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = drivers.c; path = ../../src/drivers/drivers.c; sourceTree = SOURCE_ROOT; }; - 8DD76FB20486AB0100D96B5E /* wpa_supplicant */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = wpa_supplicant; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8DD76FAD0486AB0100D96B5E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8853CB17109F385C00358CEF /* libpcap.dylib in Frameworks */, - 8853CB1B109F389800358CEF /* libcrypto.dylib in Frameworks */, - 8853CB1F109F38BD00358CEF /* CoreFoundation.framework in Frameworks */, - 8853CB3C109F3B5800358CEF /* Apple80211.framework in Frameworks */, - 8853CC3C109F4E1D00358CEF /* libssl.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* wpa_supplicant */ = { - isa = PBXGroup; - children = ( - 08FB7795FE84155DC02AAC07 /* Source */, - C6A0FF2B0290797F04C91782 /* Documentation */, - 1AB674ADFE9D54B511CA2CBB /* Products */, - 8853CB16109F385C00358CEF /* libpcap.dylib */, - 8853CB1A109F389800358CEF /* libcrypto.dylib */, - 8853CB1E109F38BD00358CEF /* CoreFoundation.framework */, - 8853CB3B109F3B5800358CEF /* Apple80211.framework */, - 8853CC3B109F4E1D00358CEF /* libssl.dylib */, - ); - name = wpa_supplicant; - sourceTree = ""; - }; - 08FB7795FE84155DC02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 881EED0E10DC14EF009E449F /* eap_register.c */, - 8853CC51109F4F3500358CEF /* aes-cbc.c */, - 8853CC52109F4F3500358CEF /* sha1-tlsprf.c */, - 8853CC4C109F4ED500358CEF /* sha256.c */, - 8853CC47109F4E8700358CEF /* ieee802_11_common.c */, - 8853CC43109F4E6200358CEF /* uuid.c */, - 8853CC3F109F4E3A00358CEF /* wps_supplicant.c */, - 8853CC32109F4DE200358CEF /* ms_funcs.c */, - 8853CC33109F4DE200358CEF /* tls_openssl.c */, - 8853CC1E109F4D3500358CEF /* wps_attr_build.c */, - 8853CC1F109F4D3500358CEF /* wps_attr_parse.c */, - 8853CC20109F4D3500358CEF /* wps_attr_process.c */, - 8853CC21109F4D3500358CEF /* wps_common.c */, - 8853CC22109F4D3500358CEF /* wps_dev_attr.c */, - 8853CC23109F4D3500358CEF /* wps_enrollee.c */, - 8853CC24109F4D3500358CEF /* wps_registrar.c */, - 8853CC25109F4D3500358CEF /* wps.c */, - 8853CC14109F4D0800358CEF /* chap.c */, - 8853CC15109F4D0800358CEF /* eap_common.c */, - 8853CC16109F4D0800358CEF /* eap_peap_common.c */, - 8853CC17109F4D0800358CEF /* eap_wsc_common.c */, - 8853CC10109F4CC800358CEF /* eapol_supp_sm.c */, - 8853CC0C109F4CA100358CEF /* ctrl_iface_unix.c */, - 8853CC0D109F4CA100358CEF /* ctrl_iface.c */, - 8853CBEC109F4C6E00358CEF /* eap_gtc.c */, - 8853CBED109F4C6E00358CEF /* eap_leap.c */, - 8853CBEE109F4C6E00358CEF /* eap_md5.c */, - 8853CBEF109F4C6E00358CEF /* eap_methods.c */, - 8853CBF0109F4C6E00358CEF /* eap_mschapv2.c */, - 8853CBF1109F4C6E00358CEF /* eap_otp.c */, - 8853CBF2109F4C6E00358CEF /* eap_peap.c */, - 8853CBF3109F4C6E00358CEF /* eap_tls_common.c */, - 8853CBF4109F4C6E00358CEF /* eap_tls.c */, - 8853CBF5109F4C6E00358CEF /* eap_tnc.c */, - 8853CBF6109F4C6E00358CEF /* eap_ttls.c */, - 8853CBF7109F4C6E00358CEF /* eap_wsc.c */, - 8853CBF8109F4C6E00358CEF /* eap.c */, - 8853CBF9109F4C6E00358CEF /* mschapv2.c */, - 8853CBFA109F4C6E00358CEF /* tncc.c */, - 8853CB35109F3AC700358CEF /* md5.c */, - 8853CB31109F3A9400358CEF /* wpa_common.c */, - 8853CB2D109F3A3900358CEF /* scan_helpers.c */, - 88950883109F3538004FB35D /* driver_osx.m */, - 88950884109F3538004FB35D /* drivers.c */, - 8895086D109F3367004FB35D /* aes-unwrap.c */, - 8895086E109F3367004FB35D /* crypto_openssl.c */, - 8895086F109F3367004FB35D /* sha1-pbkdf2.c */, - 88950870109F3367004FB35D /* sha1.c */, - 8895086B109F3316004FB35D /* l2_packet_freebsd.c */, - 8895085F109F32D1004FB35D /* peerkey.c */, - 88950860109F32D1004FB35D /* pmksa_cache.c */, - 88950861109F32D1004FB35D /* preauth.c */, - 88950862109F32D1004FB35D /* wpa_ie.c */, - 88950863109F32D1004FB35D /* wpa.c */, - 8895083A109F301A004FB35D /* base64.c */, - 8895083B109F301A004FB35D /* common.c */, - 8895083C109F301A004FB35D /* eloop.c */, - 8895083D109F301A004FB35D /* os_unix.c */, - 8895083E109F301A004FB35D /* wpa_debug.c */, - 8895083F109F301A004FB35D /* wpabuf.c */, - 88950828109F2FAB004FB35D /* blacklist.c */, - 88950829109F2FAB004FB35D /* config_file.c */, - 8895082A109F2FAB004FB35D /* config.c */, - 8895082B109F2FAB004FB35D /* events.c */, - 8895082C109F2FAB004FB35D /* main.c */, - 8895082D109F2FAB004FB35D /* notify.c */, - 8895082E109F2FAB004FB35D /* scan.c */, - 8895082F109F2FAB004FB35D /* wpa_supplicant.c */, - 88950830109F2FAB004FB35D /* wpas_glue.c */, - ); - name = Source; - sourceTree = ""; - }; - 1AB674ADFE9D54B511CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8DD76FB20486AB0100D96B5E /* wpa_supplicant */, - ); - name = Products; - sourceTree = ""; - }; - C6A0FF2B0290797F04C91782 /* Documentation */ = { - isa = PBXGroup; - children = ( - ); - name = Documentation; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8DD76FA90486AB0100D96B5E /* wpa_supplicant */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "wpa_supplicant" */; - buildPhases = ( - 8DD76FAB0486AB0100D96B5E /* Sources */, - 8DD76FAD0486AB0100D96B5E /* Frameworks */, - 8DD76FAF0486AB0100D96B5E /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = wpa_supplicant; - productInstallPath = "$(HOME)/bin"; - productName = wpa_supplicant; - productReference = 8DD76FB20486AB0100D96B5E /* wpa_supplicant */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "wpa_supplicant" */; - compatibilityVersion = "Xcode 3.1"; - hasScannedForEncodings = 1; - mainGroup = 08FB7794FE84155DC02AAC07 /* wpa_supplicant */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8DD76FA90486AB0100D96B5E /* wpa_supplicant */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 8DD76FAB0486AB0100D96B5E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 88950831109F2FAB004FB35D /* blacklist.c in Sources */, - 88950832109F2FAB004FB35D /* config_file.c in Sources */, - 88950833109F2FAB004FB35D /* config.c in Sources */, - 88950834109F2FAB004FB35D /* events.c in Sources */, - 88950835109F2FAB004FB35D /* main.c in Sources */, - 88950836109F2FAB004FB35D /* notify.c in Sources */, - 88950837109F2FAB004FB35D /* scan.c in Sources */, - 88950838109F2FAB004FB35D /* wpa_supplicant.c in Sources */, - 88950839109F2FAB004FB35D /* wpas_glue.c in Sources */, - 88950840109F301A004FB35D /* base64.c in Sources */, - 88950841109F301A004FB35D /* common.c in Sources */, - 88950842109F301A004FB35D /* eloop.c in Sources */, - 88950843109F301A004FB35D /* os_unix.c in Sources */, - 88950844109F301A004FB35D /* wpa_debug.c in Sources */, - 88950845109F301A004FB35D /* wpabuf.c in Sources */, - 88950864109F32D1004FB35D /* peerkey.c in Sources */, - 88950865109F32D1004FB35D /* pmksa_cache.c in Sources */, - 88950866109F32D1004FB35D /* preauth.c in Sources */, - 88950867109F32D1004FB35D /* wpa_ie.c in Sources */, - 88950868109F32D1004FB35D /* wpa.c in Sources */, - 8895086C109F3316004FB35D /* l2_packet_freebsd.c in Sources */, - 88950871109F3367004FB35D /* aes-unwrap.c in Sources */, - 88950872109F3367004FB35D /* crypto_openssl.c in Sources */, - 88950873109F3367004FB35D /* sha1-pbkdf2.c in Sources */, - 88950874109F3367004FB35D /* sha1.c in Sources */, - 88950885109F3538004FB35D /* driver_osx.m in Sources */, - 88950886109F3538004FB35D /* drivers.c in Sources */, - 8853CB2E109F3A3900358CEF /* scan_helpers.c in Sources */, - 8853CB32109F3A9400358CEF /* wpa_common.c in Sources */, - 8853CB36109F3AC700358CEF /* md5.c in Sources */, - 8853CBFB109F4C6E00358CEF /* eap_gtc.c in Sources */, - 8853CBFC109F4C6E00358CEF /* eap_leap.c in Sources */, - 8853CBFD109F4C6E00358CEF /* eap_md5.c in Sources */, - 8853CBFE109F4C6E00358CEF /* eap_methods.c in Sources */, - 8853CBFF109F4C6E00358CEF /* eap_mschapv2.c in Sources */, - 8853CC00109F4C6E00358CEF /* eap_otp.c in Sources */, - 8853CC01109F4C6E00358CEF /* eap_peap.c in Sources */, - 8853CC02109F4C6E00358CEF /* eap_tls_common.c in Sources */, - 8853CC03109F4C6E00358CEF /* eap_tls.c in Sources */, - 8853CC04109F4C6E00358CEF /* eap_tnc.c in Sources */, - 8853CC05109F4C6E00358CEF /* eap_ttls.c in Sources */, - 8853CC06109F4C6E00358CEF /* eap_wsc.c in Sources */, - 8853CC07109F4C6E00358CEF /* eap.c in Sources */, - 8853CC08109F4C6E00358CEF /* mschapv2.c in Sources */, - 8853CC09109F4C6E00358CEF /* tncc.c in Sources */, - 8853CC0E109F4CA100358CEF /* ctrl_iface_unix.c in Sources */, - 8853CC0F109F4CA100358CEF /* ctrl_iface.c in Sources */, - 8853CC11109F4CC800358CEF /* eapol_supp_sm.c in Sources */, - 8853CC18109F4D0800358CEF /* chap.c in Sources */, - 8853CC19109F4D0800358CEF /* eap_common.c in Sources */, - 8853CC1A109F4D0800358CEF /* eap_peap_common.c in Sources */, - 8853CC1B109F4D0800358CEF /* eap_wsc_common.c in Sources */, - 8853CC26109F4D3500358CEF /* wps_attr_build.c in Sources */, - 8853CC27109F4D3500358CEF /* wps_attr_parse.c in Sources */, - 8853CC28109F4D3500358CEF /* wps_attr_process.c in Sources */, - 8853CC29109F4D3500358CEF /* wps_common.c in Sources */, - 8853CC2A109F4D3500358CEF /* wps_dev_attr.c in Sources */, - 8853CC2B109F4D3500358CEF /* wps_enrollee.c in Sources */, - 8853CC2C109F4D3500358CEF /* wps_registrar.c in Sources */, - 8853CC2D109F4D3500358CEF /* wps.c in Sources */, - 8853CC34109F4DE200358CEF /* ms_funcs.c in Sources */, - 8853CC35109F4DE200358CEF /* tls_openssl.c in Sources */, - 8853CC40109F4E3A00358CEF /* wps_supplicant.c in Sources */, - 8853CC44109F4E6200358CEF /* uuid.c in Sources */, - 8853CC48109F4E8700358CEF /* ieee802_11_common.c in Sources */, - 8853CC4E109F4ED500358CEF /* sha256.c in Sources */, - 8853CC53109F4F3500358CEF /* aes-cbc.c in Sources */, - 8853CC54109F4F3500358CEF /* sha1-tlsprf.c in Sources */, - 881EED0F10DC14EF009E449F /* eap_register.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1DEB928608733DD80010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"", - ); - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = wpa_supplicant; - }; - name = Debug; - }; - 1DEB928708733DD80010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"", - ); - GCC_MODEL_TUNING = G5; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = wpa_supplicant; - }; - name = Release; - }; - 1DEB928A08733DD80010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - FRAMEWORK_SEARCH_PATHS = /System/Library/PrivateFrameworks; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../../src, - ../../src/utils, - ); - ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = "-DCONFIG_XCODE_DEFAULTS"; - PREBINDING = NO; - PRELINK_LIBS = ""; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = macosx10.6; - }; - name = Debug; - }; - 1DEB928B08733DD80010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - FRAMEWORK_SEARCH_PATHS = /System/Library/PrivateFrameworks; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../../src, - ../../src/utils, - ); - OTHER_CFLAGS = "-DCONFIG_XCODE_DEFAULTS"; - PREBINDING = NO; - SDKROOT = macosx10.6; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "wpa_supplicant" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB928608733DD80010E9CD /* Debug */, - 1DEB928708733DD80010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "wpa_supplicant" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB928A08733DD80010E9CD /* Debug */, - 1DEB928B08733DD80010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -}