Remove non-FreeBSD related code.
This commit is contained in:
parent
1160bdd6ba
commit
19f9885f6a
@ -1,450 +0,0 @@
|
||||
wpa_supplicant for Windows
|
||||
==========================
|
||||
|
||||
Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi> 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 <full path to
|
||||
wpasvc.exe>'. 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
|
@ -1,24 +0,0 @@
|
||||
wpa_supplicant for Symbian
|
||||
==========================
|
||||
|
||||
Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi> 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
|
@ -1,8 +0,0 @@
|
||||
PRJ_PLATFORMS
|
||||
WINSCW GCCE
|
||||
|
||||
PRJ_EXPORTS
|
||||
|
||||
PRJ_MMPFILES
|
||||
|
||||
wpa_supplicant.mmp
|
@ -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
|
@ -1,465 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="eapol_test"
|
||||
ProjectGUID="{0E3F2C6D-1372-48D6-BCAB-E584917C4DE3}"
|
||||
RootNamespace="eapol_test"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..;..\..\..\src;..\..\..\src\utils;C:\dev\WpdPack\include;C:\dev\openssl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4244;4267;4311"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib Crypt32.lib Winscard.lib Packet.lib wpcap.lib libeay32MT.lib ssleay32Mt.lib"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="C:\dev\WpdPack\lib;C:\dev\openssl\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..;..\..\..\src;..\..\..\src\utils;C:\dev\WpdPack\include;C:\dev\openssl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4244;4267;4311"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib Crypt32.lib Winscard.lib Packet.lib wpcap.lib libeay32MT.lib ssleay32Mt.lib"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="C:\dev\WpdPack\lib;C:\dev\openssl\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-cbc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-ctr.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-eax.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-encblock.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-omac1.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-unwrap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-wrap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\base64.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\blacklist.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\bss.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_common\chap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\config.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\config_file.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\crypto_openssl.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ctrl_iface.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ctrl_iface_named_pipe.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_aka.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_common\eap_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_gtc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_leap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_md5.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_methods.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_mschapv2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_otp.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_peap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_common\eap_peap_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\eap_register.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_sim.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_common\eap_sim_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_tls.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_tls_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_tnc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_ttls.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eapol_supp\eapol_supp_sm.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\eapol_test.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\eloop_win.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\events.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\fips_prf_openssl.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\ip_addr.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\l2_packet\l2_packet_winpcap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\md5.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\ms_funcs.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\mschapv2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\notify.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\os_win32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\pcsc_funcs.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\peerkey.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\pmksa_cache.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\preauth.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\radius\radius.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\radius\radius_client.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\scan.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\sha1.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\sha1-pbkdf2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\sha1-tlsprf.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\tls_openssl.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\tncc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\wpa.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\wpa_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\wpa_debug.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\wpa_ie.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\wpa_supplicant.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\wpabuf.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\wpas_glue.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -1,203 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="win_if_list"
|
||||
ProjectGUID="{9E87CD9C-60CE-4533-85CF-85CA3A9BF26A}"
|
||||
RootNamespace="win_if_list"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\src\utils;C:\dev\WpdPack\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wpcap.lib"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="C:\dev\WpdPack\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\src\utils;C:\dev\WpdPack\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wpcap.lib"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="C:\dev\WpdPack\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\win_if_list.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -1,215 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="wpa_cli"
|
||||
ProjectGUID="{E3A7B181-22CC-4DA3-8410-6AD69879A9EC}"
|
||||
RootNamespace="wpa_cli"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\src;..\..\..\src\utils"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4244;4267"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\src;..\..\..\src\utils"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4244;4267"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\os_win32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\wpa_cli.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\wpa_ctrl.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -1,232 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="wpa_passphrase"
|
||||
ProjectGUID="{ADBE4EA8-F0C5-40C2-AE89-C56D0F2EC1DF}"
|
||||
RootNamespace="wpa_passphrase"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\src;..\..\..\src\utils;C:\dev\openssl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4244;4267"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\src;..\..\..\src\utils;C:\dev\openssl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4244;4267"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\md5.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\md5-internal.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\os_win32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\sha1.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\sha1-internal.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\sha1-pbkdf2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\wpa_passphrase.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -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
|
@ -1,453 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="wpa_supplicant"
|
||||
ProjectGUID="{8BCFDA77-AEDC-4168-8897-5B73105BBB87}"
|
||||
RootNamespace="wpa_supplicant"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..;..\..\..\src;..\..\..\src\utils;C:\dev\WpdPack\include;C:\dev\openssl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4244;4267;4311"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wbemuuid.lib ws2_32.lib Crypt32.lib Winscard.lib Packet.lib wpcap.lib libeay32MT.lib ssleay32Mt.lib"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="C:\dev\WpdPack\lib;C:\dev\openssl\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..;..\..\..\src;..\..\..\src\utils;C:\dev\WpdPack\include;C:\dev\openssl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4244;4267;4311"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wbemuuid.lib ws2_32.lib Crypt32.lib Winscard.lib Packet.lib wpcap.lib libeay32MT.lib ssleay32Mt.lib"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="C:\dev\WpdPack\lib;C:\dev\openssl\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-cbc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-ctr.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-eax.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-encblock.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-omac1.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-unwrap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-wrap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\base64.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\blacklist.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\bss.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_common\chap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\config.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\config_file.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\crypto_openssl.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ctrl_iface.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ctrl_iface_named_pipe.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\drivers\driver_ndis.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\drivers\driver_ndis_.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\drivers\drivers.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_common\eap_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_gtc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_leap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_md5.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_methods.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_mschapv2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_otp.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_peap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_common\eap_peap_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\eap_register.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_tls.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_tls_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_tnc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_ttls.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eapol_supp\eapol_supp_sm.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\eloop_win.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\events.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\l2_packet\l2_packet_winpcap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\main.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\md5.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\ms_funcs.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\mschapv2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\drivers\ndis_events.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\notify.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\os_win32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\pcsc_funcs.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\peerkey.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\pmksa_cache.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\preauth.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\scan.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\sha1.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\sha1-pbkdf2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\sha1-tlsprf.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\tls_openssl.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\tncc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\wpa.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\wpa_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\wpa_debug.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\wpa_ie.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\wpa_supplicant.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\wpabuf.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\wpas_glue.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -1,453 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="wpasvc"
|
||||
ProjectGUID="{E2A4A85F-CA77-406D-8ABF-63EF94545ACC}"
|
||||
RootNamespace="wpasvc"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..;..\..\..\src;..\..\..\src\utils;C:\dev\WpdPack\include;C:\dev\openssl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4244;4267;4311"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wbemuuid.lib ws2_32.lib Crypt32.lib Winscard.lib Packet.lib wpcap.lib libeay32MT.lib ssleay32Mt.lib"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="C:\dev\WpdPack\lib;C:\dev\openssl\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..;..\..\..\src;..\..\..\src\utils;C:\dev\WpdPack\include;C:\dev\openssl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4244;4267;4311"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wbemuuid.lib ws2_32.lib Crypt32.lib Winscard.lib Packet.lib wpcap.lib libeay32MT.lib ssleay32Mt.lib"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="C:\dev\WpdPack\lib;C:\dev\openssl\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-cbc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-ctr.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-eax.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-encblock.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-omac1.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-unwrap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\aes-wrap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\base64.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\blacklist.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\bss.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_common\chap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\config.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\config_winreg.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\crypto_openssl.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ctrl_iface.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ctrl_iface_named_pipe.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\drivers\driver_ndis.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\drivers\driver_ndis_.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\drivers\drivers.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_common\eap_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_gtc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_leap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_md5.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_methods.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_mschapv2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_otp.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_peap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_common\eap_peap_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\eap_register.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_tls.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_tls_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_tnc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\eap_ttls.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eapol_supp\eapol_supp_sm.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\eloop_win.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\events.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\l2_packet\l2_packet_winpcap.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\main_winsvc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\md5.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\ms_funcs.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\mschapv2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\drivers\ndis_events.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\notify.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\os_win32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\pcsc_funcs.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\peerkey.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\pmksa_cache.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\preauth.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\scan.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\sha1.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\sha1-pbkdf2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\sha1-tlsprf.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\crypto\tls_openssl.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\eap_peer\tncc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\wpa.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\wpa_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\wpa_debug.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\rsn_supp\wpa_ie.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\wpa_supplicant.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\utils\wpabuf.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\wpas_glue.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -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
|
||||
|
@ -1,179 +0,0 @@
|
||||
/*
|
||||
* win_if_list - Display network interfaces with description (for Windows)
|
||||
* Copyright (c) 2004-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <stdio.h>
|
||||
#ifdef CONFIG_USE_NDISUIO
|
||||
#include <winsock2.h>
|
||||
#include <ntddndis.h>
|
||||
#else /* CONFIG_USE_NDISUIO */
|
||||
#include "pcap.h"
|
||||
#include <winsock.h>
|
||||
#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;
|
||||
}
|
6
wpa_supplicant/wpa_gui-qt4/.gitignore
vendored
6
wpa_supplicant/wpa_gui-qt4/.gitignore
vendored
@ -1,6 +0,0 @@
|
||||
.moc
|
||||
.obj
|
||||
.ui
|
||||
Makefile
|
||||
wpa_gui
|
||||
qrc_icons.cpp
|
@ -1,245 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - AddInterface class
|
||||
* Copyright (c) 2008, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <cstdio>
|
||||
#include "common/wpa_ctrl.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "wpagui.h"
|
||||
#include "addinterface.h"
|
||||
|
||||
#ifdef CONFIG_NATIVE_WINDOWS
|
||||
#include <windows.h>
|
||||
|
||||
#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 <ifname>TAB<confname>TAB<driver>TAB<ctrl_interface>TAB
|
||||
* <driver_param>TAB<bridge_name>
|
||||
*/
|
||||
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();
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - AddInterface class
|
||||
* Copyright (c) 2008, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <QObject>
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
#include <QtGui/QTreeWidget>
|
||||
#include <QtGui/QVBoxLayout>
|
||||
|
||||
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 */
|
@ -1,130 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - EventHistory class
|
||||
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <QHeaderView>
|
||||
#include <QScrollBar>
|
||||
|
||||
#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();
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - EventHistory class
|
||||
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <QObject>
|
||||
#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 */
|
@ -1,61 +0,0 @@
|
||||
<ui version="4.0" >
|
||||
<class>EventHistory</class>
|
||||
<widget class="QDialog" name="EventHistory" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>533</width>
|
||||
<height>285</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Event history</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" colspan="2" >
|
||||
<widget class="QTreeView" name="eventListView" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy" >
|
||||
<enum>Qt::ScrollBarAlwaysOn</enum>
|
||||
</property>
|
||||
<property name="selectionMode" >
|
||||
<enum>QAbstractItemView::NoSelection</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QPushButton" name="closeButton" >
|
||||
<property name="text" >
|
||||
<string>Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<includes>
|
||||
<include location="local" >wpamsg.h</include>
|
||||
</includes>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -1,7 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/icons" >
|
||||
<file alias="wpa_gui.svg">icons/wpa_gui.svg</file>
|
||||
<file alias="ap.svg">icons/ap.svg</file>
|
||||
<file alias="laptop.svg">icons/laptop.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -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
|
@ -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 <bernard.gray@gmail.com>
|
||||
|
||||
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
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 67 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 289 KiB |
@ -1,256 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.0"
|
||||
width="128"
|
||||
height="128"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.46"
|
||||
sodipodi:docname="wpa_gui.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
||||
<metadata
|
||||
id="metadata47">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
inkscape:window-height="771"
|
||||
inkscape:window-width="640"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
guidetolerance="10.0"
|
||||
gridtolerance="10.0"
|
||||
objecttolerance="10.0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base"
|
||||
showgrid="false"
|
||||
inkscape:zoom="4.2421875"
|
||||
inkscape:cx="64"
|
||||
inkscape:cy="64"
|
||||
inkscape:window-x="634"
|
||||
inkscape:window-y="0"
|
||||
inkscape:current-layer="svg2" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 64 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="128 : 64 : 1"
|
||||
inkscape:persp3d-origin="64 : 42.666667 : 1"
|
||||
id="perspective49" />
|
||||
<linearGradient
|
||||
id="linearGradient39133">
|
||||
<stop
|
||||
id="stop39135"
|
||||
style="stop-color:#252525;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop39137"
|
||||
style="stop-color:#515151;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop39139"
|
||||
style="stop-color:#878787;stop-opacity:1"
|
||||
offset="0.28677997" />
|
||||
<stop
|
||||
id="stop39141"
|
||||
style="stop-color:#000000;stop-opacity:1"
|
||||
offset="0.92151743" />
|
||||
<stop
|
||||
id="stop39143"
|
||||
style="stop-color:#ffffff;stop-opacity:0.73786408"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient39119">
|
||||
<stop
|
||||
id="stop39121"
|
||||
style="stop-color:#ffffff;stop-opacity:0.82905984"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop39123"
|
||||
style="stop-color:#ffffff;stop-opacity:0"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient39106">
|
||||
<stop
|
||||
id="stop39108"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop39110"
|
||||
style="stop-color:#a8a8a8;stop-opacity:0"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient39094">
|
||||
<stop
|
||||
id="stop39096"
|
||||
style="stop-color:#000000;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop39098"
|
||||
style="stop-color:#333333;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient39062">
|
||||
<stop
|
||||
id="stop39064"
|
||||
style="stop-color:#252525;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop39086"
|
||||
style="stop-color:#515151;stop-opacity:1"
|
||||
offset="0.21101321" />
|
||||
<stop
|
||||
id="stop39088"
|
||||
style="stop-color:#878787;stop-opacity:1"
|
||||
offset="0.75" />
|
||||
<stop
|
||||
id="stop39090"
|
||||
style="stop-color:#6c6c6c;stop-opacity:1"
|
||||
offset="0.875" />
|
||||
<stop
|
||||
id="stop39066"
|
||||
style="stop-color:#1e1e1e;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
x1="4"
|
||||
y1="40"
|
||||
x2="124"
|
||||
y2="60"
|
||||
id="linearGradient39068"
|
||||
xlink:href="#linearGradient39062"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
cx="100.70589"
|
||||
cy="96"
|
||||
r="60"
|
||||
fx="158.07428"
|
||||
fy="95.718063"
|
||||
id="radialGradient39100"
|
||||
xlink:href="#linearGradient39094"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(2.7837903e-8,-1,0.99999999,-2.1864248e-6,-32.000004,164.7061)" />
|
||||
<radialGradient
|
||||
cx="100.44444"
|
||||
cy="34.363636"
|
||||
r="32"
|
||||
fx="83.18"
|
||||
fy="34.228985"
|
||||
id="radialGradient39104"
|
||||
xlink:href="#linearGradient39106"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(3.1472435e-6,1.0227273,-0.87499999,-9.5061964e-8,94.067865,-4.7272712)" />
|
||||
<radialGradient
|
||||
cx="75.999977"
|
||||
cy="-2.7730541"
|
||||
r="48"
|
||||
fx="55.266491"
|
||||
fy="-2.5338216"
|
||||
id="radialGradient39125"
|
||||
xlink:href="#linearGradient39119"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,0.83333324,-1.6666667,2.518705e-6,59.378243,-35.333302)" />
|
||||
<radialGradient
|
||||
cx="64.066589"
|
||||
cy="63.713329"
|
||||
r="60"
|
||||
fx="64.066589"
|
||||
fy="63.713329"
|
||||
id="radialGradient39131"
|
||||
xlink:href="#linearGradient39133"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.1333333,5.1768857e-8,5.2556881e-6,1.1666667,-8.6091298,-10.332226)" />
|
||||
<filter
|
||||
id="filter39153">
|
||||
<feGaussianBlur
|
||||
id="feGaussianBlur39155"
|
||||
stdDeviation="2.28"
|
||||
inkscape:collect="always" />
|
||||
</filter>
|
||||
<filter
|
||||
id="filter39159">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="1.68"
|
||||
id="feGaussianBlur39161" />
|
||||
</filter>
|
||||
</defs>
|
||||
<g
|
||||
id="layer1"
|
||||
style="display:inline">
|
||||
<path
|
||||
d="M 29,4 C 15.147058,4 4,15.14706 4,29 l 0,70 c 0,13.85294 11.147058,25 25,25 l 70,0 c 13.85294,0 25,-11.14706 25,-25 l 0,-70 C 124,15.14706 112.85294,4 99,4 L 29,4 z"
|
||||
id="path39151"
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;filter:url(#filter39153)" />
|
||||
<path
|
||||
d="M 29,4 C 15.147058,4 4,15.14706 4,29 l 0,70 c 0,13.85294 11.147058,25 25,25 l 70,0 c 13.85294,0 25,-11.14706 25,-25 l 0,-70 C 124,15.14706 112.85294,4 99,4 L 29,4 z"
|
||||
id="path39157"
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;filter:url(#filter39159)" />
|
||||
<rect
|
||||
width="120"
|
||||
height="120"
|
||||
ry="25.00531"
|
||||
x="4"
|
||||
y="0"
|
||||
id="rect2573"
|
||||
style="opacity:1;fill:url(#radialGradient39100);fill-opacity:1;stroke:none" />
|
||||
<path
|
||||
d="M 29,0 C 15.147058,0 4,11.14706 4,25 l 0,70 c 0,13.85294 11.147058,25 25,25 l 70,0 c 13.85294,0 25,-11.14706 25,-25 l 0,-70 C 124,11.14706 112.85294,0 99,0 L 29,0 z"
|
||||
id="path39127"
|
||||
style="opacity:0.20512821;fill:url(#radialGradient39131);fill-opacity:1;stroke:none" />
|
||||
<path
|
||||
d="m 44,68 40,0 12,40 c -20,7.27273 -44,7.27273 -64,0 L 44,68 z"
|
||||
id="path39102"
|
||||
style="opacity:0.53418801;fill:url(#radialGradient39104);fill-opacity:1;stroke:none" />
|
||||
<path
|
||||
d="M 25.339207,12 C 52,8 76,8 102.66079,12 107.83471,12 112,16.165286 112,21.339207 L 116,52 C 100,73.339207 28,73.339207 12,52 L 16,21.339207 C 16,16.165286 20.165286,12 25.339207,12 z"
|
||||
id="rect39116"
|
||||
style="opacity:0.92307691;fill:url(#radialGradient39125);fill-opacity:1;stroke:none" />
|
||||
<path
|
||||
d="M 29,8 C 15.147058,8 4,19.14706 4,33 l 0,70 c 0,13.85294 11.147058,25 25,25 l 70,0 c 13.85294,0 25,-11.14706 25,-25 l 0,-70 C 124,19.14706 112.85294,8 99,8 L 29,8 z"
|
||||
id="path39147"
|
||||
style="opacity:0.20512821;fill:#000000;fill-opacity:1;stroke:none" />
|
||||
<path
|
||||
d="M 29,0 C 15.147058,0 4,11.147058 4,25 l 0,70 c 0,13.85294 11.147058,25 25,25 l 70,0 c 13.85294,0 25,-11.14706 25,-25 l 0,-70 C 124,11.147058 112.85294,0 99,0 L 29,0 z m 0,4 70,0 c 11.70613,0 21,9.293869 21,21 l 0,70 c 0,11.70613 -9.29387,21 -21,21 l -70,0 C 17.293869,116 8,106.70613 8,95 L 8,25 C 8,13.293869 17.293869,4 29,4 z"
|
||||
id="rect39029"
|
||||
style="opacity:1;fill:url(#linearGradient39068);fill-opacity:1;stroke:none" />
|
||||
<path
|
||||
d="M 66.35081,74.771345 A 36,36 0 1 1 54.34964,35.777782"
|
||||
transform="matrix(-0.16680323,0.53082142,-0.53082142,-0.16680323,103.31027,53.117897)"
|
||||
id="path3351"
|
||||
style="opacity:1;fill:none;stroke:#ffffff;stroke-width:21.56673813;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<path
|
||||
d="m 36,56 a 4,4 0 1 1 -8,0 4,4 0 1 1 8,0 z"
|
||||
transform="matrix(1.4851301,0,0,1.4851301,16.475837,-23.948973)"
|
||||
id="path3353"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none" />
|
||||
<path
|
||||
d="M 66.35081,74.771345 A 36,36 0 1 1 54.34964,35.777782"
|
||||
transform="matrix(-0.35033273,1.1148712,-1.1148712,-0.35033273,146.5624,46.88078)"
|
||||
id="path2622"
|
||||
style="opacity:1;fill:none;stroke:#ffffff;stroke-width:10.26852894;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 9.0 KiB |
@ -1,7 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/icons" >
|
||||
<file alias="wpa_gui.png">icons/hicolor/16x16/apps/wpa_gui.png</file>
|
||||
<file alias="ap.png">icons/hicolor/32x32/apps/ap.png</file>
|
||||
<file alias="laptop.png">icons/hicolor/32x32/apps/laptop.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
1
wpa_supplicant/wpa_gui-qt4/lang/.gitignore
vendored
1
wpa_supplicant/wpa_gui-qt4/lang/.gitignore
vendored
@ -1 +0,0 @@
|
||||
*.qm
|
File diff suppressed because it is too large
Load Diff
@ -1,82 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - Application startup
|
||||
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <winsock.h>
|
||||
#endif /* CONFIG_NATIVE_WINDOWS */
|
||||
#include <QApplication>
|
||||
#include <QtCore/QLibraryInfo>
|
||||
#include <QtCore/QTranslator>
|
||||
#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;
|
||||
}
|
@ -1,858 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - NetworkConfig class
|
||||
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <cstdio>
|
||||
#include <QMessageBox>
|
||||
|
||||
#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();
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - NetworkConfig class
|
||||
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <QObject>
|
||||
#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 */
|
@ -1,435 +0,0 @@
|
||||
<ui version="4.0" >
|
||||
<class>NetworkConfig</class>
|
||||
<widget class="QDialog" name="NetworkConfig" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>410</width>
|
||||
<height>534</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>NetworkConfig</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="1" column="3" >
|
||||
<widget class="QPushButton" name="cancelButton" >
|
||||
<property name="text" >
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="4" >
|
||||
<widget class="QFrame" name="frame9" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="ssidLabel" >
|
||||
<property name="text" >
|
||||
<string>SSID</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="ssidEdit" >
|
||||
<property name="toolTip" >
|
||||
<string>Network name (Service Set IDentifier)</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="authLabel" >
|
||||
<property name="text" >
|
||||
<string>Authentication</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QComboBox" name="authSelect" >
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Plaintext (open / no authentication)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Static WEP (no authentication)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Static WEP (Shared Key authentication)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>IEEE 802.1X</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>WPA-Personal (PSK)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>WPA-Enterprise (EAP)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>WPA2-Personal (PSK)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>WPA2-Enterprise (EAP)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="encrLabel" >
|
||||
<property name="text" >
|
||||
<string>Encryption</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QComboBox" name="encrSelect" >
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>WEP</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>TKIP</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>CCMP</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="pskLabel" >
|
||||
<property name="text" >
|
||||
<string>PSK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="pskEdit" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>WPA/WPA2 pre-shared key or passphrase</string>
|
||||
</property>
|
||||
<property name="whatsThis" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="echoMode" >
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="eapLabel" >
|
||||
<property name="text" >
|
||||
<string>EAP method</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<widget class="QComboBox" name="eapSelect" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" >
|
||||
<widget class="QLabel" name="identityLabel" >
|
||||
<property name="text" >
|
||||
<string>Identity</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" >
|
||||
<widget class="QLineEdit" name="identityEdit" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Username/Identity for EAP methods</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<widget class="QLabel" name="passwordLabel" >
|
||||
<property name="text" >
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" >
|
||||
<widget class="QLineEdit" name="passwordEdit" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Password for EAP methods</string>
|
||||
</property>
|
||||
<property name="echoMode" >
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" >
|
||||
<widget class="QLabel" name="cacertLabel" >
|
||||
<property name="text" >
|
||||
<string>CA certificate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1" >
|
||||
<widget class="QLineEdit" name="cacertEdit" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2" >
|
||||
<widget class="QGroupBox" name="wepBox" >
|
||||
<property name="enabled" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>WEP keys</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QRadioButton" name="wep0Radio" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>key 0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QRadioButton" name="wep1Radio" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>key 1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QRadioButton" name="wep3Radio" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>key 3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QRadioButton" name="wep2Radio" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>key 2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="wep0Edit" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="wep1Edit" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="wep2Edit" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="wep3Edit" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0" colspan="2" >
|
||||
<widget class="QGroupBox" name="optionalSettingsBox" >
|
||||
<property name="enabled" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Optional Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="idstrEdit" >
|
||||
<property name="toolTip" >
|
||||
<string>Network Identification String</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<widget class="QSpinBox" name="prioritySpinBox" >
|
||||
<property name="toolTip" >
|
||||
<string>Network Priority</string>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<number>10000</number>
|
||||
</property>
|
||||
<property name="singleStep" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="idstrLabel" >
|
||||
<property name="text" >
|
||||
<string>IDString</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLabel" name="priorityLabel" >
|
||||
<property name="text" >
|
||||
<string>Priority</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="phase2Label" >
|
||||
<property name="text" >
|
||||
<string>Inner auth</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QComboBox" name="phase2Select" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QPushButton" name="addButton" >
|
||||
<property name="text" >
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<widget class="QPushButton" name="removeButton" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QPushButton" name="useWpsButton" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>WPS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<tabstops>
|
||||
<tabstop>ssidEdit</tabstop>
|
||||
<tabstop>authSelect</tabstop>
|
||||
<tabstop>encrSelect</tabstop>
|
||||
<tabstop>pskEdit</tabstop>
|
||||
<tabstop>eapSelect</tabstop>
|
||||
<tabstop>identityEdit</tabstop>
|
||||
<tabstop>passwordEdit</tabstop>
|
||||
<tabstop>cacertEdit</tabstop>
|
||||
<tabstop>wep0Radio</tabstop>
|
||||
<tabstop>wep0Edit</tabstop>
|
||||
<tabstop>wep1Radio</tabstop>
|
||||
<tabstop>wep1Edit</tabstop>
|
||||
<tabstop>wep2Radio</tabstop>
|
||||
<tabstop>wep2Edit</tabstop>
|
||||
<tabstop>wep3Radio</tabstop>
|
||||
<tabstop>wep3Edit</tabstop>
|
||||
<tabstop>idstrEdit</tabstop>
|
||||
<tabstop>prioritySpinBox</tabstop>
|
||||
<tabstop>phase2Select</tabstop>
|
||||
<tabstop>addButton</tabstop>
|
||||
<tabstop>removeButton</tabstop>
|
||||
<tabstop>cancelButton</tabstop>
|
||||
</tabstops>
|
||||
<includes>
|
||||
<include location="global" >qtreewidget.h</include>
|
||||
</includes>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -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 <cstdio>
|
||||
#include <QImageReader>
|
||||
#include <QMessageBox>
|
||||
|
||||
#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();
|
||||
}
|
||||
}
|
@ -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 <QObject>
|
||||
#include <QStandardItemModel>
|
||||
#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 */
|
@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Peers</class>
|
||||
<widget class="QDialog" name="Peers">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Peers</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QListView" name="peers">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="viewMode">
|
||||
<enum>QListView::IconMode</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -1,144 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - ScanResults class
|
||||
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <cstdio>
|
||||
|
||||
#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();
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - ScanResults class
|
||||
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <QObject>
|
||||
#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 */
|
@ -1,94 +0,0 @@
|
||||
<ui version="4.0" >
|
||||
<class>ScanResults</class>
|
||||
<widget class="QDialog" name="ScanResults" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>452</width>
|
||||
<height>244</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Scan results</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="scanResultsWidget" >
|
||||
<property name="editTriggers" >
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="uniformRowHeights" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="columnCount" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
<column>
|
||||
<property name="text" >
|
||||
<string>SSID</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text" >
|
||||
<string>BSSID</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text" >
|
||||
<string>frequency</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text" >
|
||||
<string>signal</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text" >
|
||||
<string>flags</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="scanButton" >
|
||||
<property name="text" >
|
||||
<string>Scan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="closeButton" >
|
||||
<property name="text" >
|
||||
<string>Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -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 <cstdio>
|
||||
#include <QLabel>
|
||||
|
||||
#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();
|
||||
}
|
@ -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 <QDialog>
|
||||
#include <QLineEdit>
|
||||
#include <QGridLayout>
|
||||
|
||||
class StringQuery : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
StringQuery(QString label);
|
||||
QString get_string();
|
||||
|
||||
private:
|
||||
QLineEdit *edit;
|
||||
};
|
||||
|
||||
#endif /* STRINGQUERY_H */
|
@ -1,100 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - UserDataRequest class
|
||||
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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();
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - UserDataRequest class
|
||||
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <QObject>
|
||||
#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 */
|
@ -1,109 +0,0 @@
|
||||
<ui version="4.0" stdsetdef="1" >
|
||||
<author></author>
|
||||
<comment></comment>
|
||||
<exportmacro></exportmacro>
|
||||
<class>UserDataRequest</class>
|
||||
<widget class="QDialog" name="UserDataRequest" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>216</width>
|
||||
<height>103</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Authentication credentials required</string>
|
||||
</property>
|
||||
<property name="sizeGripEnabled" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="queryInfo" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="queryField" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="queryEdit" >
|
||||
<property name="enabled" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="echoMode" >
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="spacer4" >
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property name="orientation" >
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonOk" >
|
||||
<property name="text" >
|
||||
<string>&OK</string>
|
||||
</property>
|
||||
<property name="shortcut" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="default" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonCancel" >
|
||||
<property name="text" >
|
||||
<string>&Cancel</string>
|
||||
</property>
|
||||
<property name="shortcut" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
</ui>
|
@ -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;
|
@ -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
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,150 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - WpaGui class
|
||||
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <QSystemTrayIcon>
|
||||
#include <QObject>
|
||||
#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 */
|
@ -1,524 +0,0 @@
|
||||
<ui version="4.0" >
|
||||
<class>WpaGui</class>
|
||||
<widget class="QMainWindow" name="WpaGui" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>345</width>
|
||||
<height>330</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>wpa_gui</string>
|
||||
</property>
|
||||
<property name="windowIcon" >
|
||||
<iconset resource="icons.qrc" >
|
||||
<normaloff>:/icons/wpa_gui.svg</normaloff>:/icons/wpa_gui.svg</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="widget" >
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="adapterLabel" >
|
||||
<property name="text" >
|
||||
<string>Adapter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QComboBox" name="adapterSelect" />
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="networkLabel" >
|
||||
<property name="text" >
|
||||
<string>Network:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QComboBox" name="networkSelect" />
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<widget class="QTabWidget" name="wpaguiTab" >
|
||||
<property name="currentIndex" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="statusTab" >
|
||||
<attribute name="title" >
|
||||
<string>Current Status</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" colspan="5" >
|
||||
<widget class="QFrame" name="frame3" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="statusLabel" >
|
||||
<property name="text" >
|
||||
<string>Status:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="lastMessageLabel" >
|
||||
<property name="text" >
|
||||
<string>Last message:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="authenticationLabel" >
|
||||
<property name="text" >
|
||||
<string>Authentication:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="encryptionLabel" >
|
||||
<property name="text" >
|
||||
<string>Encryption:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="ssidLabel" >
|
||||
<property name="text" >
|
||||
<string>SSID:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" >
|
||||
<widget class="QLabel" name="bssidLabel" >
|
||||
<property name="text" >
|
||||
<string>BSSID:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<widget class="QLabel" name="ipAddressLabel" >
|
||||
<property name="text" >
|
||||
<string>IP address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLabel" name="textStatus" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="3" >
|
||||
<widget class="QLabel" name="textLastMessage" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLabel" name="textAuthentication" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLabel" name="textEncryption" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<widget class="QLabel" name="textSsid" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" >
|
||||
<widget class="QLabel" name="textBssid" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" >
|
||||
<widget class="QLabel" name="textIpAddress" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QPushButton" name="connectButton" >
|
||||
<property name="text" >
|
||||
<string>Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QPushButton" name="disconnectButton" >
|
||||
<property name="text" >
|
||||
<string>Disconnect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<widget class="QPushButton" name="scanButton" >
|
||||
<property name="text" >
|
||||
<string>Scan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="networkconfigTab" >
|
||||
<attribute name="title" >
|
||||
<string>Manage Networks</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" colspan="5" >
|
||||
<widget class="QListWidget" name="networkList" >
|
||||
<property name="selectionRectVisible" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="2" row="1" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>61</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QRadioButton" name="enableRadioButton" >
|
||||
<property name="text" >
|
||||
<string>Enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QPushButton" name="editNetworkButton" >
|
||||
<property name="text" >
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<widget class="QPushButton" name="removeNetworkButton" >
|
||||
<property name="text" >
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="2" row="1" column="4" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>61</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QRadioButton" name="disableRadioButton" >
|
||||
<property name="text" >
|
||||
<string>Disabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" >
|
||||
<widget class="QPushButton" name="addNetworkButton" >
|
||||
<property name="text" >
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" >
|
||||
<widget class="QPushButton" name="scanNetworkButton" >
|
||||
<property name="text" >
|
||||
<string>Scan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="wpsTab" >
|
||||
<attribute name="title" >
|
||||
<string>WPS</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="wpsGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<string>Status:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="3" >
|
||||
<widget class="QLabel" name="wpsStatusText" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<widget class="QPushButton" name="wpsPbcButton" >
|
||||
<property name="text" >
|
||||
<string>PBC - push button</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<widget class="QPushButton" name="wpsPinButton" >
|
||||
<property name="text" >
|
||||
<string>Generate PIN</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string>PIN:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" >
|
||||
<widget class="QLineEdit" name="wpsPinEdit" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="readOnly" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<widget class="QPushButton" name="wpsApPinButton" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Use AP PIN</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<string>AP PIN:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3" >
|
||||
<widget class="QLineEdit" name="wpsApPinEdit" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="4" >
|
||||
<widget class="QTextEdit" name="wpsInstructions" >
|
||||
<property name="readOnly" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="MenuBar" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>345</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="fileMenu" >
|
||||
<property name="title" >
|
||||
<string>&File</string>
|
||||
</property>
|
||||
<addaction name="fileEventHistoryAction" />
|
||||
<addaction name="fileSaveConfigAction" />
|
||||
<addaction name="actionWPS" />
|
||||
<addaction name="actionPeers" />
|
||||
<addaction name="separator" />
|
||||
<addaction name="fileExitAction" />
|
||||
</widget>
|
||||
<widget class="QMenu" name="networkMenu" >
|
||||
<property name="title" >
|
||||
<string>&Network</string>
|
||||
</property>
|
||||
<addaction name="networkAddAction" />
|
||||
<addaction name="networkEditAction" />
|
||||
<addaction name="networkRemoveAction" />
|
||||
<addaction name="separator" />
|
||||
<addaction name="networkEnableAllAction" />
|
||||
<addaction name="networkDisableAllAction" />
|
||||
<addaction name="networkRemoveAllAction" />
|
||||
</widget>
|
||||
<widget class="QMenu" name="helpMenu" >
|
||||
<property name="title" >
|
||||
<string>&Help</string>
|
||||
</property>
|
||||
<addaction name="helpContentsAction" />
|
||||
<addaction name="helpIndexAction" />
|
||||
<addaction name="separator" />
|
||||
<addaction name="helpAboutAction" />
|
||||
</widget>
|
||||
<addaction name="fileMenu" />
|
||||
<addaction name="networkMenu" />
|
||||
<addaction name="helpMenu" />
|
||||
</widget>
|
||||
<action name="fileEventHistoryAction" >
|
||||
<property name="text" >
|
||||
<string>Event &History</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="fileSaveConfigAction" >
|
||||
<property name="text" >
|
||||
<string>&Save Configuration</string>
|
||||
</property>
|
||||
<property name="shortcut" >
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="fileExitAction" >
|
||||
<property name="text" >
|
||||
<string>E&xit</string>
|
||||
</property>
|
||||
<property name="shortcut" >
|
||||
<string>Ctrl+Q</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="networkAddAction" >
|
||||
<property name="text" >
|
||||
<string>&Add</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="networkEditAction" >
|
||||
<property name="text" >
|
||||
<string>&Edit</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="networkRemoveAction" >
|
||||
<property name="text" >
|
||||
<string>&Remove</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="networkEnableAllAction" >
|
||||
<property name="text" >
|
||||
<string>E&nable All</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="networkDisableAllAction" >
|
||||
<property name="text" >
|
||||
<string>&Disable All</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="networkRemoveAllAction" >
|
||||
<property name="text" >
|
||||
<string>Re&move All</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="helpContentsAction" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Contents...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="helpIndexAction" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Index...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="helpAboutAction" >
|
||||
<property name="text" >
|
||||
<string>&About</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionWPS" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Wi-Fi Protected Setup</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPeers" >
|
||||
<property name="text" >
|
||||
<string>&Peers</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<includes>
|
||||
<include location="global" >qtimer.h</include>
|
||||
<include location="global" >qsocketnotifier.h</include>
|
||||
<include location="local" >wpamsg.h</include>
|
||||
<include location="local" >eventhistory.h</include>
|
||||
<include location="local" >scanresults.h</include>
|
||||
<include location="local" >peers.h</include>
|
||||
</includes>
|
||||
<resources>
|
||||
<include location="icons.qrc" />
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
@ -1,41 +0,0 @@
|
||||
/*
|
||||
* wpa_gui - WpaMsg class for storing event messages
|
||||
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* 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 <QDateTime>
|
||||
#include <QLinkedList>
|
||||
|
||||
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<WpaMsg> WpaMsgList;
|
||||
|
||||
#endif /* WPAMSG_H */
|
5
wpa_supplicant/wpa_gui/.gitignore
vendored
5
wpa_supplicant/wpa_gui/.gitignore
vendored
@ -1,5 +0,0 @@
|
||||
.moc
|
||||
.obj
|
||||
.ui
|
||||
Makefile
|
||||
wpa_gui
|
@ -1,125 +0,0 @@
|
||||
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
|
||||
<class>EventHistory</class>
|
||||
<widget class="QDialog">
|
||||
<property name="name">
|
||||
<cstring>EventHistory</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>533</width>
|
||||
<height>285</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="caption">
|
||||
<string>Event history</string>
|
||||
</property>
|
||||
<vbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QListView">
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Timestamp</string>
|
||||
</property>
|
||||
<property name="clickable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="resizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Message</string>
|
||||
</property>
|
||||
<property name="clickable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="resizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</column>
|
||||
<property name="name">
|
||||
<cstring>eventListView</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>7</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="resizePolicy">
|
||||
<enum>Manual</enum>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>NoSelection</enum>
|
||||
</property>
|
||||
<property name="resizeMode">
|
||||
<enum>LastColumn</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout30</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<spacer>
|
||||
<property name="name">
|
||||
<cstring>spacer3</cstring>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget class="QPushButton">
|
||||
<property name="name">
|
||||
<cstring>closeButton</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>closeButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>EventHistory</receiver>
|
||||
<slot>close()</slot>
|
||||
</connection>
|
||||
</connections>
|
||||
<includes>
|
||||
<include location="local" impldecl="in declaration">wpamsg.h</include>
|
||||
<include location="local" impldecl="in implementation">eventhistory.ui.h</include>
|
||||
</includes>
|
||||
<slots>
|
||||
<slot>addEvents( WpaMsgList msgs )</slot>
|
||||
<slot>addEvent( WpaMsg msg )</slot>
|
||||
</slots>
|
||||
<functions>
|
||||
<function access="private" specifier="non virtual">init()</function>
|
||||
<function access="private" specifier="non virtual">destroy()</function>
|
||||
</functions>
|
||||
<pixmapinproject/>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
</UI>
|
@ -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);
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
#ifdef CONFIG_NATIVE_WINDOWS
|
||||
#include <winsock.h>
|
||||
#endif /* CONFIG_NATIVE_WINDOWS */
|
||||
#include <qapplication.h>
|
||||
#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;
|
||||
}
|
@ -1,475 +0,0 @@
|
||||
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
|
||||
<class>NetworkConfig</class>
|
||||
<widget class="QDialog">
|
||||
<property name="name">
|
||||
<cstring>NetworkConfig</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>380</width>
|
||||
<height>430</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="caption">
|
||||
<string>NetworkConfig</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QPushButton" row="1" column="3">
|
||||
<property name="name">
|
||||
<cstring>cancelButton</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" row="0" column="0" rowspan="1" colspan="4">
|
||||
<property name="name">
|
||||
<cstring>frame9</cstring>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>Raised</enum>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel0</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>SSID</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>ssidEdit</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>Network name (Service Set IDentifier)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="1" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel1</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Network ID</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="1" column="1">
|
||||
<property name="name">
|
||||
<cstring>idstrEdit</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>Network Identification String</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="2" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel2</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Authentication</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" row="2" column="1">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Plaintext or static WEP</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>IEEE 802.1X</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>WPA-Personal (PSK)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>WPA-Enterprise (EAP)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>WPA2-Personal (PSK)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>WPA2-Enterprise (EAP)</string>
|
||||
</property>
|
||||
</item>
|
||||
<property name="name">
|
||||
<cstring>authSelect</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="3" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel3</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Encryption</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" row="3" column="1">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>WEP</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>TKIP</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>CCMP</string>
|
||||
</property>
|
||||
</item>
|
||||
<property name="name">
|
||||
<cstring>encrSelect</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="4" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel4</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PSK</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="4" column="1">
|
||||
<property name="name">
|
||||
<cstring>pskEdit</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>Password</enum>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>WPA/WPA2 pre-shared key or passphrase</string>
|
||||
</property>
|
||||
<property name="whatsThis" stdset="0">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="5" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel5</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>EAP method</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" row="5" column="1">
|
||||
<property name="name">
|
||||
<cstring>eapSelect</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="6" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel6</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Identity</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="6" column="1">
|
||||
<property name="name">
|
||||
<cstring>identityEdit</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>Username/Identity for EAP methods</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="7" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel7</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="7" column="1">
|
||||
<property name="name">
|
||||
<cstring>passwordEdit</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>Password</enum>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>Password for EAP methods</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="8" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel1_2</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CA certificate</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="8" column="1">
|
||||
<property name="name">
|
||||
<cstring>cacertEdit</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QButtonGroup" row="9" column="0" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>buttonGroup1</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>WEP keys</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QRadioButton" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>wep0Radio</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>key 0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QRadioButton" row="1" column="0">
|
||||
<property name="name">
|
||||
<cstring>wep1Radio</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>key 1</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QRadioButton" row="3" column="0">
|
||||
<property name="name">
|
||||
<cstring>wep3Radio</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>key 3</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QRadioButton" row="2" column="0">
|
||||
<property name="name">
|
||||
<cstring>wep2Radio</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>key 2</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>wep0Edit</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="1" column="1">
|
||||
<property name="name">
|
||||
<cstring>wep1Edit</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="2" column="1">
|
||||
<property name="name">
|
||||
<cstring>wep2Edit</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="3" column="1">
|
||||
<property name="name">
|
||||
<cstring>wep3Edit</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<spacer row="1" column="0">
|
||||
<property name="name">
|
||||
<cstring>spacer5</cstring>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget class="QPushButton" row="1" column="1">
|
||||
<property name="name">
|
||||
<cstring>addButton</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" row="1" column="2">
|
||||
<property name="name">
|
||||
<cstring>removeButton</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>authSelect</sender>
|
||||
<signal>activated(int)</signal>
|
||||
<receiver>NetworkConfig</receiver>
|
||||
<slot>authChanged(int)</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cancelButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NetworkConfig</receiver>
|
||||
<slot>close()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>addButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NetworkConfig</receiver>
|
||||
<slot>addNetwork()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>encrSelect</sender>
|
||||
<signal>activated(const QString&)</signal>
|
||||
<receiver>NetworkConfig</receiver>
|
||||
<slot>encrChanged(const QString&)</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>removeButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NetworkConfig</receiver>
|
||||
<slot>removeNetwork()</slot>
|
||||
</connection>
|
||||
</connections>
|
||||
<tabstops>
|
||||
<tabstop>ssidEdit</tabstop>
|
||||
<tabstop>idstrEdit</tabstop>
|
||||
<tabstop>authSelect</tabstop>
|
||||
<tabstop>encrSelect</tabstop>
|
||||
<tabstop>pskEdit</tabstop>
|
||||
<tabstop>eapSelect</tabstop>
|
||||
<tabstop>identityEdit</tabstop>
|
||||
<tabstop>passwordEdit</tabstop>
|
||||
<tabstop>cacertEdit</tabstop>
|
||||
<tabstop>wep0Radio</tabstop>
|
||||
<tabstop>wep1Radio</tabstop>
|
||||
<tabstop>wep2Radio</tabstop>
|
||||
<tabstop>wep3Radio</tabstop>
|
||||
<tabstop>wep0Edit</tabstop>
|
||||
<tabstop>wep1Edit</tabstop>
|
||||
<tabstop>wep2Edit</tabstop>
|
||||
<tabstop>wep3Edit</tabstop>
|
||||
<tabstop>addButton</tabstop>
|
||||
<tabstop>removeButton</tabstop>
|
||||
<tabstop>cancelButton</tabstop>
|
||||
</tabstops>
|
||||
<includes>
|
||||
<include location="global" impldecl="in declaration">qlistview.h</include>
|
||||
<include location="global" impldecl="in implementation">qmessagebox.h</include>
|
||||
<include location="local" impldecl="in implementation">wpagui.h</include>
|
||||
<include location="local" impldecl="in implementation">networkconfig.ui.h</include>
|
||||
</includes>
|
||||
<forwards>
|
||||
<forward>class WpaGui;</forward>
|
||||
</forwards>
|
||||
<variables>
|
||||
<variable access="private">WpaGui *wpagui;</variable>
|
||||
<variable access="private">int edit_network_id;</variable>
|
||||
<variable access="private">bool new_network;</variable>
|
||||
</variables>
|
||||
<slots>
|
||||
<slot>authChanged( int sel )</slot>
|
||||
<slot>addNetwork()</slot>
|
||||
<slot>encrChanged( const QString & sel )</slot>
|
||||
<slot>writeWepKey( int network_id, QLineEdit * edit, int id )</slot>
|
||||
<slot>removeNetwork()</slot>
|
||||
</slots>
|
||||
<functions>
|
||||
<function access="private" specifier="non virtual">init()</function>
|
||||
<function>paramsFromScanResults( QListViewItem * sel )</function>
|
||||
<function>setWpaGui( WpaGui * _wpagui )</function>
|
||||
<function returnType="int">setNetworkParam( int id, const char * field, const char * value, bool quote )</function>
|
||||
<function access="private">wepEnabled( bool enabled )</function>
|
||||
<function>paramsFromConfig( int network_id )</function>
|
||||
<function>newNetwork()</function>
|
||||
<function access="private">getEapCapa()</function>
|
||||
</functions>
|
||||
<pixmapinproject/>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
</UI>
|
@ -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 <stdlib.h>
|
||||
|
||||
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);
|
||||
}
|
@ -1,179 +0,0 @@
|
||||
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
|
||||
<class>ScanResults</class>
|
||||
<widget class="QDialog">
|
||||
<property name="name">
|
||||
<cstring>ScanResults</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>452</width>
|
||||
<height>225</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="caption">
|
||||
<string>Scan results</string>
|
||||
</property>
|
||||
<vbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QListView">
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>SSID</string>
|
||||
</property>
|
||||
<property name="clickable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="resizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>BSSID</string>
|
||||
</property>
|
||||
<property name="clickable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="resizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>frequency</string>
|
||||
</property>
|
||||
<property name="clickable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="resizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>signal</string>
|
||||
</property>
|
||||
<property name="clickable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="resizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>flags</string>
|
||||
</property>
|
||||
<property name="clickable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="resizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</column>
|
||||
<property name="name">
|
||||
<cstring>scanResultsView</cstring>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>Sunken</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout24</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<spacer>
|
||||
<property name="name">
|
||||
<cstring>spacer6</cstring>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget class="QPushButton">
|
||||
<property name="name">
|
||||
<cstring>scanButton</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scan</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton">
|
||||
<property name="name">
|
||||
<cstring>closeButton</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>closeButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>ScanResults</receiver>
|
||||
<slot>close()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>scanButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>ScanResults</receiver>
|
||||
<slot>scanRequest()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>scanResultsView</sender>
|
||||
<signal>doubleClicked(QListViewItem*)</signal>
|
||||
<receiver>ScanResults</receiver>
|
||||
<slot>bssSelected(QListViewItem*)</slot>
|
||||
</connection>
|
||||
</connections>
|
||||
<includes>
|
||||
<include location="local" impldecl="in implementation">common/wpa_ctrl.h</include>
|
||||
<include location="local" impldecl="in implementation">wpagui.h</include>
|
||||
<include location="local" impldecl="in implementation">networkconfig.h</include>
|
||||
<include location="local" impldecl="in implementation">scanresults.ui.h</include>
|
||||
</includes>
|
||||
<forwards>
|
||||
<forward>class WpaGui;</forward>
|
||||
</forwards>
|
||||
<variables>
|
||||
<variable access="private">WpaGui *wpagui;</variable>
|
||||
<variable access="private">QTimer *timer;</variable>
|
||||
</variables>
|
||||
<slots>
|
||||
<slot>setWpaGui( WpaGui * _wpagui )</slot>
|
||||
<slot>updateResults()</slot>
|
||||
<slot>scanRequest()</slot>
|
||||
<slot>getResults()</slot>
|
||||
<slot>bssSelected( QListViewItem * sel )</slot>
|
||||
</slots>
|
||||
<functions>
|
||||
<function access="private" specifier="non virtual">init()</function>
|
||||
<function access="private" specifier="non virtual">destroy()</function>
|
||||
</functions>
|
||||
<pixmapinproject/>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
</UI>
|
@ -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();
|
||||
}
|
@ -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
|
@ -1,163 +0,0 @@
|
||||
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
|
||||
<class>UserDataRequest</class>
|
||||
<widget class="QDialog">
|
||||
<property name="name">
|
||||
<cstring>UserDataRequest</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>216</width>
|
||||
<height>103</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="caption">
|
||||
<string>Authentication credentials required</string>
|
||||
</property>
|
||||
<property name="sizeGripEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<vbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>queryInfo</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout28</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>queryField</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit">
|
||||
<property name="name">
|
||||
<cstring>queryEdit</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout27</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<spacer>
|
||||
<property name="name">
|
||||
<cstring>spacer4</cstring>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget class="QPushButton">
|
||||
<property name="name">
|
||||
<cstring>buttonOk</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&OK</string>
|
||||
</property>
|
||||
<property name="accel">
|
||||
<string></string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton">
|
||||
<property name="name">
|
||||
<cstring>buttonCancel</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Cancel</string>
|
||||
</property>
|
||||
<property name="accel">
|
||||
<string></string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonOk</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>UserDataRequest</receiver>
|
||||
<slot>sendReply()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonCancel</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>UserDataRequest</receiver>
|
||||
<slot>reject()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>queryEdit</sender>
|
||||
<signal>returnPressed()</signal>
|
||||
<receiver>UserDataRequest</receiver>
|
||||
<slot>sendReply()</slot>
|
||||
</connection>
|
||||
</connections>
|
||||
<includes>
|
||||
<include location="local" impldecl="in implementation">common/wpa_ctrl.h</include>
|
||||
<include location="local" impldecl="in implementation">wpagui.h</include>
|
||||
<include location="local" impldecl="in implementation">userdatarequest.ui.h</include>
|
||||
</includes>
|
||||
<forwards>
|
||||
<forward>class WpaGui;</forward>
|
||||
</forwards>
|
||||
<variables>
|
||||
<variable access="private">WpaGui *wpagui;</variable>
|
||||
<variable access="private">int networkid;</variable>
|
||||
<variable access="private">QString field;</variable>
|
||||
</variables>
|
||||
<slots>
|
||||
<slot>sendReply()</slot>
|
||||
</slots>
|
||||
<functions>
|
||||
<function specifier="non virtual" returnType="int">setParams( WpaGui * _wpagui, const char * reqMsg )</function>
|
||||
</functions>
|
||||
<pixmapinproject/>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
</UI>
|
@ -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 <stdlib.h>
|
||||
|
||||
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();
|
||||
}
|
@ -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
|
||||
}
|
@ -1,471 +0,0 @@
|
||||
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
|
||||
<class>WpaGui</class>
|
||||
<widget class="QMainWindow">
|
||||
<property name="name">
|
||||
<cstring>WpaGui</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>279</width>
|
||||
<height>308</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="caption">
|
||||
<string>wpa_gui</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>textLabel16</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Adapter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" row="0" column="2" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>adapterSelect</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="1" column="0" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>textLabel8</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Network:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" row="1" column="2" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>networkSelect</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" row="2" column="0" rowspan="1" colspan="4">
|
||||
<property name="name">
|
||||
<cstring>frame3</cstring>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>Raised</enum>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel1</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Status:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="1" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel2</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Last message:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="2" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel3</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Authentication:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="3" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel4</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Encryption:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="4" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel5</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>SSID:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="5" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel6</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>BSSID:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="6" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel7</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>IP address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>textStatus</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="1" column="1" rowspan="1" colspan="3">
|
||||
<property name="name">
|
||||
<cstring>textLastMessage</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="2" column="1">
|
||||
<property name="name">
|
||||
<cstring>textAuthentication</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="3" column="1">
|
||||
<property name="name">
|
||||
<cstring>textEncryption</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="4" column="1">
|
||||
<property name="name">
|
||||
<cstring>textSsid</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="5" column="1">
|
||||
<property name="name">
|
||||
<cstring>textBssid</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="6" column="1">
|
||||
<property name="name">
|
||||
<cstring>textIpAddress</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<spacer row="3" column="0">
|
||||
<property name="name">
|
||||
<cstring>spacer7</cstring>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget class="QPushButton" row="3" column="1">
|
||||
<property name="name">
|
||||
<cstring>connectButton</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" row="3" column="2">
|
||||
<property name="name">
|
||||
<cstring>disconnectButton</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Disconnect</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" row="3" column="3">
|
||||
<property name="name">
|
||||
<cstring>scanButton</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<menubar>
|
||||
<property name="name">
|
||||
<cstring>MenuBar</cstring>
|
||||
</property>
|
||||
<item text="&File" name="fileMenu">
|
||||
<separator/>
|
||||
<action name="fileEventHistoryAction"/>
|
||||
<action name="fileAdd_NetworkAction"/>
|
||||
<action name="fileEdit_networkAction"/>
|
||||
<separator/>
|
||||
<action name="fileExitAction"/>
|
||||
</item>
|
||||
<item text="&Help" name="helpMenu">
|
||||
<action name="helpContentsAction"/>
|
||||
<action name="helpIndexAction"/>
|
||||
<separator/>
|
||||
<action name="helpAboutAction"/>
|
||||
</item>
|
||||
</menubar>
|
||||
<toolbars>
|
||||
</toolbars>
|
||||
<actions>
|
||||
<action>
|
||||
<property name="name">
|
||||
<cstring>fileExitAction</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Exit</string>
|
||||
</property>
|
||||
<property name="menuText">
|
||||
<string>E&xit</string>
|
||||
</property>
|
||||
<property name="accel">
|
||||
<string>Ctrl+Q</string>
|
||||
</property>
|
||||
</action>
|
||||
<action>
|
||||
<property name="name">
|
||||
<cstring>helpContentsAction</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Contents</string>
|
||||
</property>
|
||||
<property name="menuText">
|
||||
<string>&Contents...</string>
|
||||
</property>
|
||||
<property name="accel">
|
||||
<string></string>
|
||||
</property>
|
||||
</action>
|
||||
<action>
|
||||
<property name="name">
|
||||
<cstring>helpIndexAction</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Index</string>
|
||||
</property>
|
||||
<property name="menuText">
|
||||
<string>&Index...</string>
|
||||
</property>
|
||||
<property name="accel">
|
||||
<string></string>
|
||||
</property>
|
||||
</action>
|
||||
<action>
|
||||
<property name="name">
|
||||
<cstring>helpAboutAction</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>About</string>
|
||||
</property>
|
||||
<property name="menuText">
|
||||
<string>&About</string>
|
||||
</property>
|
||||
<property name="accel">
|
||||
<string></string>
|
||||
</property>
|
||||
</action>
|
||||
<action>
|
||||
<property name="name">
|
||||
<cstring>fileEventHistoryAction</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Event History</string>
|
||||
</property>
|
||||
<property name="menuText">
|
||||
<string>Event &History</string>
|
||||
</property>
|
||||
</action>
|
||||
<action>
|
||||
<property name="name">
|
||||
<cstring>fileAdd_NetworkAction</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Network</string>
|
||||
</property>
|
||||
<property name="menuText">
|
||||
<string>&Add Network</string>
|
||||
</property>
|
||||
</action>
|
||||
<action>
|
||||
<property name="name">
|
||||
<cstring>fileEdit_networkAction</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Edit Network</string>
|
||||
</property>
|
||||
<property name="menuText">
|
||||
<string>&Edit Network</string>
|
||||
</property>
|
||||
</action>
|
||||
</actions>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>helpIndexAction</sender>
|
||||
<signal>activated()</signal>
|
||||
<receiver>WpaGui</receiver>
|
||||
<slot>helpIndex()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>helpContentsAction</sender>
|
||||
<signal>activated()</signal>
|
||||
<receiver>WpaGui</receiver>
|
||||
<slot>helpContents()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>helpAboutAction</sender>
|
||||
<signal>activated()</signal>
|
||||
<receiver>WpaGui</receiver>
|
||||
<slot>helpAbout()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>fileExitAction</sender>
|
||||
<signal>activated()</signal>
|
||||
<receiver>WpaGui</receiver>
|
||||
<slot>close()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>disconnectButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>WpaGui</receiver>
|
||||
<slot>disconnect()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>scanButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>WpaGui</receiver>
|
||||
<slot>scan()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>connectButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>WpaGui</receiver>
|
||||
<slot>connectB()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>fileEventHistoryAction</sender>
|
||||
<signal>activated()</signal>
|
||||
<receiver>WpaGui</receiver>
|
||||
<slot>eventHistory()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>networkSelect</sender>
|
||||
<signal>activated(const QString&)</signal>
|
||||
<receiver>WpaGui</receiver>
|
||||
<slot>selectNetwork(const QString&)</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>fileEdit_networkAction</sender>
|
||||
<signal>activated()</signal>
|
||||
<receiver>WpaGui</receiver>
|
||||
<slot>editNetwork()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>fileAdd_NetworkAction</sender>
|
||||
<signal>activated()</signal>
|
||||
<receiver>WpaGui</receiver>
|
||||
<slot>addNetwork()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>adapterSelect</sender>
|
||||
<signal>activated(const QString&)</signal>
|
||||
<receiver>WpaGui</receiver>
|
||||
<slot>selectAdapter(const QString&)</slot>
|
||||
</connection>
|
||||
</connections>
|
||||
<includes>
|
||||
<include location="global" impldecl="in declaration">qtimer.h</include>
|
||||
<include location="global" impldecl="in declaration">qsocketnotifier.h</include>
|
||||
<include location="local" impldecl="in declaration">wpamsg.h</include>
|
||||
<include location="local" impldecl="in declaration">eventhistory.h</include>
|
||||
<include location="local" impldecl="in declaration">scanresults.h</include>
|
||||
<include location="local" impldecl="in implementation">common/wpa_ctrl.h</include>
|
||||
<include location="global" impldecl="in implementation">dirent.h</include>
|
||||
<include location="global" impldecl="in implementation">qmessagebox.h</include>
|
||||
<include location="global" impldecl="in implementation">qapplication.h</include>
|
||||
<include location="local" impldecl="in implementation">userdatarequest.h</include>
|
||||
<include location="local" impldecl="in implementation">networkconfig.h</include>
|
||||
<include location="local" impldecl="in implementation">wpagui.ui.h</include>
|
||||
</includes>
|
||||
<forwards>
|
||||
<forward>class UserDataRequest;</forward>
|
||||
</forwards>
|
||||
<variables>
|
||||
<variable access="private">ScanResults *scanres;</variable>
|
||||
<variable access="private">bool networkMayHaveChanged;</variable>
|
||||
<variable access="private">char *ctrl_iface;</variable>
|
||||
<variable access="private">EventHistory *eh;</variable>
|
||||
<variable access="private">struct wpa_ctrl *ctrl_conn;</variable>
|
||||
<variable access="private">QSocketNotifier *msgNotifier;</variable>
|
||||
<variable access="private">QTimer *timer;</variable>
|
||||
<variable access="private">int pingsToStatusUpdate;</variable>
|
||||
<variable access="private">WpaMsgList msgs;</variable>
|
||||
<variable access="private">char *ctrl_iface_dir;</variable>
|
||||
<variable access="private">struct wpa_ctrl *monitor_conn;</variable>
|
||||
<variable access="private">UserDataRequest *udr;</variable>
|
||||
</variables>
|
||||
<slots>
|
||||
<slot>parse_argv()</slot>
|
||||
<slot>updateStatus()</slot>
|
||||
<slot>updateNetworks()</slot>
|
||||
<slot>helpIndex()</slot>
|
||||
<slot>helpContents()</slot>
|
||||
<slot>helpAbout()</slot>
|
||||
<slot>disconnect()</slot>
|
||||
<slot>scan()</slot>
|
||||
<slot>eventHistory()</slot>
|
||||
<slot>ping()</slot>
|
||||
<slot>processMsg( char * msg )</slot>
|
||||
<slot>processCtrlReq( const char * req )</slot>
|
||||
<slot>receiveMsgs()</slot>
|
||||
<slot>connectB()</slot>
|
||||
<slot>selectNetwork( const QString & sel )</slot>
|
||||
<slot>editNetwork()</slot>
|
||||
<slot>addNetwork()</slot>
|
||||
<slot>selectAdapter( const QString & sel )</slot>
|
||||
</slots>
|
||||
<functions>
|
||||
<function access="private" specifier="non virtual">init()</function>
|
||||
<function access="private" specifier="non virtual">destroy()</function>
|
||||
<function access="private" specifier="non virtual" returnType="int">openCtrlConnection( const char * ifname )</function>
|
||||
<function returnType="int">ctrlRequest( const char * cmd, char * buf, size_t * buflen )</function>
|
||||
<function>triggerUpdate()</function>
|
||||
</functions>
|
||||
<pixmapinproject/>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
</UI>
|
@ -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 <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
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 <j@w1.fi>\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();
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
#ifndef WPAMSG_H
|
||||
#define WPAMSG_H
|
||||
|
||||
class WpaMsg;
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
#include <QDateTime>
|
||||
#include <QLinkedList>
|
||||
typedef QLinkedList<WpaMsg> WpaMsgList;
|
||||
#else
|
||||
#include <qdatetime.h>
|
||||
typedef QValueList<WpaMsg> 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 */
|
@ -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 = "<absolute>"; };
|
||||
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 = "<group>";
|
||||
};
|
||||
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 = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8DD76FB20486AB0100D96B5E /* wpa_supplicant */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6A0FF2B0290797F04C91782 /* Documentation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Documentation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* 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 */;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user