diff options
authorJouni Malinen <j@w1.fi>2005-12-18 20:28:40 (GMT)
committerJouni Malinen <j@w1.fi>2005-12-18 20:28:40 (GMT)
commit3e4f859a0f77278d0a06a3f7dd45a8e31ba91574 (patch)
parenta5e8053a11996cc1447158e3882b11b5833d9db5 (diff)
Added wpasvc.exe into the Windows binary release.
Start using Windows-specific eloop_win.c and l2_packet_winpcap.c implementations. Removed ndis_events.exe since it is now integrated into wpa_supplicant.exe and wpasvc.exe. Updated README-Windows.txt with information about the wpasvc.exe configuration.
3 files changed, 86 insertions, 23 deletions
diff --git a/build_gpl_release b/build_gpl_release
index 87053a9..78b2514 100755
--- a/build_gpl_release
+++ b/build_gpl_release
@@ -3,8 +3,6 @@
# Path to the Windows cross compiler (mingw)
-# Pre-built ndis_events.exe (building this requires Visual C++)
set -e
@@ -59,7 +57,7 @@ mkdir -p $RELDIR
# New style tarballs
mv $DIR/wpa_supplicant wpa_supplicant-$VER
cp $DIR/COPYING wpa_supplicant-$VER
-cp $DIR/hostapd/{eloop.[ch],common.[ch],md5.[ch],rc4.[ch],sha1.[ch],aes_wrap.[ch],aes.c,radius.[ch],radius_client.[ch],config_types.h,os*[ch],includes.h,build_config.h,wpa_common.h,state_machine.h} wpa_supplicant-$VER
+cp $DIR/hostapd/{eloop*.[ch],common.[ch],md5.[ch],rc4.[ch],sha1.[ch],aes_wrap.[ch],aes.c,radius.[ch],radius_client.[ch],config_types.h,os*[ch],includes.h,build_config.h,wpa_common.h,state_machine.h} wpa_supplicant-$VER
cp $DIR/utils/wireless_copy.h wpa_supplicant-$VER
cd wpa_supplicant-$VER
cat Makefile | sed "s%../hostapd/%%g" > Makefile.tmp
@@ -120,6 +118,8 @@ CONFIG_NATIVE_WINDOWS=y
CFLAGS += -I/opt/xmingw/i386-mingw32msvc/include/ddk
@@ -138,13 +138,32 @@ CONFIG_EAP_PEAP=y
+ # First, build the Windows service & registry version and rename it
PATH=$PATH:$WINCROSS make windows-bin
+ mv wpa_supplicant.exe wpasvc.exe
+ # Then, build "the standard" wpa_supplicant.exe
+ cat >> .config <<EOF
+ PATH=$PATH:$WINCROSS make windows-bin
for i in COPYING README README-Windows.txt wpa_supplicant.conf; do
unix2dos < $i > ../"$WDIR"/$i
mv *.exe ../"$WDIR"
+ cp win_example.reg ../"$WDIR"
cd wpa_gui-qt4
PATH=$QT4HOSTBIN:$PATH:$WINCROSS ./setup-mingw-cross-compiling
@@ -154,7 +173,6 @@ EOF
cd ..
rm -rf "$PDIR"
zip "$WDIR.zip" "$WDIR"/*
rm -rf "$WDIR"
diff --git a/wpa_supplicant/ChangeLog b/wpa_supplicant/ChangeLog
index d068549..a70661e 100644
--- a/wpa_supplicant/ChangeLog
+++ b/wpa_supplicant/ChangeLog
@@ -60,6 +60,13 @@ ChangeLog for wpa_supplicant
* added C version of ndis_events.cpp and made it possible to build this
with MinGW so that CONFIG_NDIS_EVENTS_INTEGRATED can be used more
easily on cross-compilation builds
+ * added wpasvc.exe into Windows binary release; this is an alternative
+ version of wpa_supplicant.exe with configuration backend using
+ Windows registry and with the entry point designed to run as a
+ Windows service
+ * integrated ndis_events.exe functionality into wpa_supplicant.exe and
+ wpasvc.exe and removed this additional tool from the Windows binary
+ release since it is not needed anymore
2005-11-20 - v0.4.7 (beginning of 0.4.x stable releases)
* l2_packet_pcap: fixed wired IEEE 802.1X authentication with libpcap
diff --git a/wpa_supplicant/README-Windows.txt b/wpa_supplicant/README-Windows.txt
index 62d7bfd..3207956 100644
--- a/wpa_supplicant/README-Windows.txt
+++ b/wpa_supplicant/README-Windows.txt
@@ -94,9 +94,13 @@ Using wpa_supplicant for Windows
wpa_supplicant and wpa_cli behave more or less identically to Linux
version, so instructions in README and example wpa_supplicant.conf
-should be applicable for most parts. When using access points in
-"hidden SSID" mode, ap_scan=2 mode need to be used (see
-wpa_supplicant.conf for more information).
+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
@@ -107,10 +111,7 @@ name.
Example steps in starting up wpa_supplicant:
-First, start NDIS event received, ndis_events.exe. This will be used
-to collect NDIS events and send them to wpa_supplicant with a mechanism that is easier to process with the current model of one thread in an event loop.
-# ./win_if_list.exe
+# win_if_list.exe
ifname: \Device\NPF_GenericNdisWanAdapter
description: Generic NdisWan adapter
@@ -126,7 +127,7 @@ is the correct interface in this case. The interface name for -i
command line option is the full string following "ifname:". In other
words, wpa_supplicant would be started with following command:
-./wpa_supplicant.exe -i'\Device\NPF_{769E012B-FD17-4935-A5E3-8090C38E25D2}' -c wpa_supplicant.conf -d
+# wpa_supplicant.exe -i'\Device\NPF_{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.
@@ -134,7 +135,7 @@ 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
+# wpa_supplicant.exe -iAtheros -c wpa_supplicant.conf -d
Simple configuration example for WPA-PSK:
@@ -162,15 +163,36 @@ configuration item is ignore for this case. Anyway, this variable has
to be included in the configuration to enable the control interface.
-Starting wpa_supplicant as a Windows service
-wpa_supplicant can be started as a Windows service by using a wrapper
-program that starts wpa_supplicant. If this 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.
+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' and 'config' 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>'. After this, it 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
@@ -179,9 +201,25 @@ 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.
+ 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 sotware used in this product:
+License information for third party software used in this product:
OpenSSL License