250fd0
diff -up wpa_supplicant-2.0/wpa_supplicant/doc/docbook/eapol_test.sgml.man-page wpa_supplicant-2.0/wpa_supplicant/doc/docbook/eapol_test.sgml
250fd0
--- wpa_supplicant-2.0/wpa_supplicant/doc/docbook/eapol_test.sgml.man-page	2014-01-20 16:40:02.340869189 -0600
250fd0
+++ wpa_supplicant-2.0/wpa_supplicant/doc/docbook/eapol_test.sgml	2014-01-20 16:40:02.340869189 -0600
250fd0
@@ -0,0 +1,205 @@
250fd0
+
250fd0
+
250fd0
+<refentry>
250fd0
+  <refmeta>
250fd0
+    <refentrytitle>eapol_test</refentrytitle>
250fd0
+    <manvolnum>8</manvolnum>
250fd0
+  </refmeta>
250fd0
+  <refnamediv>
250fd0
+    <refname>eapol_test</refname>
250fd0
+
250fd0
+    <refpurpose>EAP peer and RADIUS client testing</refpurpose>
250fd0
+  </refnamediv>
250fd0
+
250fd0
+  <refsynopsisdiv>
250fd0
+    <cmdsynopsis>
250fd0
+      <command>eapol_test</command>
250fd0
+      <arg>-nWS</arg>
250fd0
+      <arg>-c<replaceable>config file</replaceable></arg>
250fd0
+      <arg>-a<replaceable>server IP address</replaceable></arg>
250fd0
+      <arg>-A<replaceable>client IP address</replaceable></arg>
250fd0
+      <arg>-p<replaceable>UDP port</replaceable></arg>
250fd0
+      <arg>-s<replaceable>shared secret</replaceable></arg>
250fd0
+      <arg>-r<replaceable>re-authentications</replaceable></arg>
250fd0
+      <arg>-t<replaceable>timeout</replaceable></arg>
250fd0
+      <arg>-C<replaceable>Connect-Info</replaceable></arg>
250fd0
+      <arg>-M<replaceable>MAC address</replaceable></arg>
250fd0
+      <arg>-o<replaceable>file</replaceable></arg>
250fd0
+      <arg>-N<replaceable>attr spec</replaceable></arg>
250fd0
+    </cmdsynopsis>
250fd0
+    <cmdsynopsis>
250fd0
+      <command>eapol_test scard</command>
250fd0
+    </cmdsynopsis>
250fd0
+    <cmdsynopsis>
250fd0
+      <command>eapol_test sim</command>
250fd0
+      <arg>PIN</arg>
250fd0
+      <arg>num triplets</arg>
250fd0
+    </cmdsynopsis>
250fd0
+  </refsynopsisdiv>
250fd0
+
250fd0
+  <refsect1>
250fd0
+    <title>Overview</title>
250fd0
+
250fd0
+    <para>eapol_test is a program that links together the same EAP
250fd0
+    peer implementation that wpa_supplicant is using and the RADIUS
250fd0
+    authentication client code from hostapd. In addition, it has
250fd0
+    minimal glue code to combine these two components in similar
250fd0
+    ways to IEEE 802.1X/EAPOL Authenticator state machines. In other
250fd0
+    words, it integrates IEEE 802.1X Authenticator (normally, an
250fd0
+    access point) and IEEE 802.1X Supplicant (normally, a wireless
250fd0
+    client) together to generate a single program that can be used to
250fd0
+    test EAP methods without having to setup an access point and a
250fd0
+    wireless client.</para>
250fd0
+
250fd0
+    <para>The main uses for eapol_test are in interoperability testing
250fd0
+    of EAP methods against RADIUS servers and in development testing
250fd0
+    for new EAP methods. It can be easily used to automate EAP testing
250fd0
+    for interoperability and regression since the program can be run
250fd0
+    from shell scripts without require additional test components apart
250fd0
+    from a RADIUS server. For example, the automated EAP tests described
250fd0
+    in eap_testing.txt are implemented with eapol_test. Similarly,
250fd0
+    eapol_test could be used to implement an automated regression
250fd0
+    test suite for a RADIUS authentication server.</para>
250fd0
+
250fd0
+
250fd0
+    <para>As an example:</para>
250fd0
+
250fd0
+
<programlisting>
250fd0
+eapol_test -ctest.conf -a127.0.0.1 -p1812 -ssecret -r1
250fd0
+</programlisting>
250fd0
+
250fd0
+    <para>tries to complete EAP authentication based on the network
250fd0
+    configuration from test.conf against the RADIUS server running
250fd0
+    on the local host. A re-authentication is triggered to test fast
250fd0
+    re-authentication. The configuration file uses the same format for
250fd0
+    network blocks as wpa_supplicant.</para>
250fd0
+
250fd0
+  </refsect1>
250fd0
+  <refsect1>
250fd0
+    <title>Command Arguments</title>
250fd0
+    <variablelist>
250fd0
+      <varlistentry>
250fd0
+	<term>-c configuration file path</term>
250fd0
+
250fd0
+	<listitem><para>A configuration to use.  The configuration should
250fd0
+	use the same format for network blocks as wpa_supplicant.
250fd0
+	</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-a AS address</term>
250fd0
+
250fd0
+	<listitem><para>IP address of the authentication server.  The
250fd0
+	default is '127.0.0.1'.</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-A client address</term>
250fd0
+
250fd0
+	<listitem><para>IP address of the client.  The default is to
250fd0
+	select an address automatically.</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-p AS port</term>
250fd0
+
250fd0
+        <listitem><para>UDP port of the authentication server. The
250fd0
+        default is '1812'.</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-s AS secret</term>
250fd0
+
250fd0
+	<listitem><para>Shared secret with the authentication server.
250fd0
+	The default is 'radius'.</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-r count</term>
250fd0
+
250fd0
+	<listitem><para>Number of reauthentications.</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-t timeout</term>
250fd0
+
250fd0
+	<listitem><para>Timeout in seconds. The default is 30.</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-C info</term>
250fd0
+
250fd0
+	<listitem><para>RADIUS Connect-Info.  The default is
250fd0
+	'CONNECT 11Mbps 802.11b'.</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-M mac address</term>
250fd0
+
250fd0
+	<listitem><para>Client MAC address (Calling-Station-Id).  The
250fd0
+	default is '02:00:00:00:00:01'.</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-o file</term>
250fd0
+
250fd0
+	<listitem><para>Location to write out server certificate.
250fd0
+	</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-N attr spec</term>
250fd0
+
250fd0
+	<listitem><para>Send arbitrary attribute specific by
250fd0
+	attr_id:syntax:value, or attr_id alone.  attr_id should be the numeric
250fd0
+	ID of the attribute, and syntax should be one of 's' (string),
250fd0
+	'd' (integer), or 'x' (octet string). The value is the attribute value
250fd0
+	to send.  When attr_id is given alone, NULL is used as the attribute
250fd0
+	value.  Multiple attributes can be specified by using the option
250fd0
+	several times.</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-n</term>
250fd0
+
250fd0
+	<listitem><para>Indicates that no MPPE keys are expected.
250fd0
+	</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-W</term>
250fd0
+
250fd0
+	<listitem><para>Wait for a control interface monitor before starting.
250fd0
+	</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-S</term>
250fd0
+
250fd0
+	<listitem><para>Save configuration after authentication.
250fd0
+	</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+    </variablelist>
250fd0
+  </refsect1>
250fd0
+  <refsect1>
250fd0
+    <title>See Also</title>
250fd0
+    <para>
250fd0
+      <citerefentry>
250fd0
+	<refentrytitle>wpa_supplicant</refentrytitle>
250fd0
+	<manvolnum>8</manvolnum>
250fd0
+      </citerefentry>
250fd0
+    </para>
250fd0
+  </refsect1>
250fd0
+  <refsect1>
250fd0
+    <title>Legal</title>
250fd0
+    <para>wpa_supplicant is copyright (c) 2003-2012,
250fd0
+    Jouni Malinen <email>j@w1.fi</email> and
250fd0
+    contributors.
250fd0
+    All Rights Reserved.</para>
250fd0
+
250fd0
+    <para>This program is licensed under the BSD license (the one with
250fd0
+    advertisement clause removed).</para>
250fd0
+  </refsect1>
250fd0
+</refentry>
250fd0
diff -up wpa_supplicant-2.0/wpa_supplicant/doc/docbook/Makefile.man-page wpa_supplicant-2.0/wpa_supplicant/doc/docbook/Makefile
250fd0
--- wpa_supplicant-2.0/wpa_supplicant/doc/docbook/Makefile.man-page	2013-01-12 09:42:53.000000000 -0600
250fd0
+++ wpa_supplicant-2.0/wpa_supplicant/doc/docbook/Makefile	2014-01-20 16:40:02.342869164 -0600
250fd0
@@ -1,4 +1,4 @@
250fd0
-all: man html pdf
250fd0
+all: man
250fd0
 
250fd0
 FILES += wpa_background
250fd0
 FILES += wpa_cli
250fd0
@@ -7,6 +7,7 @@ FILES += wpa_passphrase
250fd0
 FILES += wpa_priv
250fd0
 FILES += wpa_supplicant.conf
250fd0
 FILES += wpa_supplicant
250fd0
+FILES += eapol_test
250fd0
 
250fd0
 man:
250fd0
 	for i in $(FILES); do docbook2man $$i.sgml; done
250fd0
@@ -20,7 +21,7 @@ pdf:
250fd0
 
250fd0
 
250fd0
 clean:
250fd0
-	rm -f wpa_background.8 wpa_cli.8 wpa_gui.8 wpa_passphrase.8 wpa_priv.8 wpa_supplicant.8
250fd0
+	rm -f wpa_background.8 wpa_cli.8 wpa_gui.8 wpa_passphrase.8 wpa_priv.8 wpa_supplicant.8 eapol_test.8
250fd0
 	rm -f wpa_supplicant.conf.5
250fd0
 	rm -f manpage.links manpage.refs
250fd0
 	rm -f $(FILES:%=%.pdf)
250fd0
diff -up wpa_supplicant-2.0/wpa_supplicant/doc/docbook/wpa_cli.sgml.man-page wpa_supplicant-2.0/wpa_supplicant/doc/docbook/wpa_cli.sgml
250fd0
--- wpa_supplicant-2.0/wpa_supplicant/doc/docbook/wpa_cli.sgml.man-page	2013-01-12 09:42:53.000000000 -0600
250fd0
+++ wpa_supplicant-2.0/wpa_supplicant/doc/docbook/wpa_cli.sgml	2014-01-20 16:40:02.339869202 -0600
250fd0
@@ -15,10 +15,12 @@
250fd0
     <cmdsynopsis>
250fd0
       <command>wpa_cli</command>
250fd0
       <arg>-p <replaceable>path to ctrl sockets</replaceable></arg>
250fd0
+      <arg>-g <replaceable>path to global ctrl_interface socket</replaceable></arg>
250fd0
       <arg>-i <replaceable>ifname</replaceable></arg>
250fd0
       <arg>-hvB</arg>
250fd0
       <arg>-a <replaceable>action file</replaceable></arg>
250fd0
       <arg>-P <replaceable>pid file</replaceable></arg>
250fd0
+      <arg>-G <replaceable>ping interval</replaceable></arg>
250fd0
       <arg><replaceable>command ...</replaceable></arg>
250fd0
     </cmdsynopsis>
250fd0
   </refsynopsisdiv>
250fd0
@@ -111,6 +113,14 @@ CTRL-REQ-OTP-2:Challenge 1235663 needed
250fd0
       </varlistentry>
250fd0
 
250fd0
       <varlistentry>
250fd0
+	<term>-g control socket path</term>
250fd0
+
250fd0
+	<listitem><para>Connect to the global control socket at the
250fd0
+	indicated path rather than an interface-specific control
250fd0
+	socket.</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
 	<term>-i ifname</term>
250fd0
 
250fd0
         <listitem><para>Specify the interface that is being
250fd0
@@ -161,6 +171,13 @@ CTRL-REQ-OTP-2:Challenge 1235663 needed
250fd0
       </varlistentry>
250fd0
 
250fd0
       <varlistentry>
250fd0
+	<term>-G ping interval</term>
250fd0
+
250fd0
+	<listitem><para>Set the interval (in seconds) at which
250fd0
+	wpa_cli pings the supplicant.</para></listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
 	<term>command</term>
250fd0
 
250fd0
 	<listitem><para>Run a command.  The available commands are
250fd0
diff -up wpa_supplicant-2.0/wpa_supplicant/doc/docbook/wpa_supplicant.sgml.man-page wpa_supplicant-2.0/wpa_supplicant/doc/docbook/wpa_supplicant.sgml
250fd0
--- wpa_supplicant-2.0/wpa_supplicant/doc/docbook/wpa_supplicant.sgml.man-page	2013-01-12 09:42:53.000000000 -0600
250fd0
+++ wpa_supplicant-2.0/wpa_supplicant/doc/docbook/wpa_supplicant.sgml	2014-01-20 16:40:02.339869202 -0600
250fd0
@@ -12,7 +12,7 @@
250fd0
   <refsynopsisdiv>
250fd0
     <cmdsynopsis>
250fd0
       <command>wpa_supplicant</command>
250fd0
-      <arg>-BddfhKLqqtuvW</arg>
250fd0
+      <arg>-BddfhKLqqsTtuvW</arg>
250fd0
       <arg>-i<replaceable>ifname</replaceable></arg>
250fd0
       <arg>-c<replaceable>config file</replaceable></arg>
250fd0
       <arg>-D<replaceable>driver</replaceable></arg>
250fd0
@@ -344,9 +344,20 @@
250fd0
       </varlistentry>
250fd0
 
250fd0
       <varlistentry>
250fd0
+	<term>-e entropy file</term>
250fd0
+	<listitem>
250fd0
+	  <para>File for <command>wpa_supplicant</command> to use to
250fd0
+	  maintain its internal entropy store in over restarts.</para>
250fd0
+	</listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
 	<term>-f output file</term>
250fd0
 	<listitem>
250fd0
-	  <para>Log output to specified file instead of stdout.</para>
250fd0
+	  <para>Log output to specified file instead of stdout. (This
250fd0
+	  is only available if <command>wpa_supplicant</command> was
250fd0
+	  built with the <literal>CONFIG_DEBUG_FILE</literal>
250fd0
+	  option.)</para>
250fd0
 	</listitem>
250fd0
       </varlistentry>
250fd0
 
250fd0
@@ -387,6 +398,22 @@
250fd0
       </varlistentry>
250fd0
 
250fd0
       <varlistentry>
250fd0
+	<term>-o override driver</term>
250fd0
+	<listitem>
250fd0
+	  <para>Override the driver parameter for new
250fd0
+	  interfaces.</para>
250fd0
+	</listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-O override ctrl_interface</term>
250fd0
+	<listitem>
250fd0
+	  <para>Override the ctrl_interface parameter for new
250fd0
+	  interfaces.</para>
250fd0
+	</listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
 	<term>-p</term>
250fd0
 	<listitem>
250fd0
 	  <para>Driver parameters. (Per interface)</para>
250fd0
@@ -409,10 +436,40 @@
250fd0
       </varlistentry>
250fd0
 
250fd0
       <varlistentry>
250fd0
+	<term>-s</term>
250fd0
+	<listitem>
250fd0
+	  <para>Log output to syslog instead of stdout. (This is only
250fd0
+	  available if <command>wpa_supplicant</command> was built
250fd0
+	  with the <literal>CONFIG_DEBUG_SYSLOG</literal>
250fd0
+	  option.)</para>
250fd0
+	</listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-T</term>
250fd0
+	<listitem>
250fd0
+	  <para>Log output to Linux tracing in addition to any other
250fd0
+	  destinations. (This is only available
250fd0
+	  if <command>wpa_supplicant</command> was built with
250fd0
+	  the <literal>CONFIG_DEBUG_LINUX_TRACING</literal>
250fd0
+	  option.)</para>
250fd0
+	</listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
+	<term>-t</term>
250fd0
+	<listitem>
250fd0
+	  <para>Include timestamp in debug messages.</para>
250fd0
+	</listitem>
250fd0
+      </varlistentry>
250fd0
+
250fd0
+      <varlistentry>
250fd0
 	<term>-u</term>
250fd0
 	<listitem>
250fd0
-	  <para>Enabled DBus control interface. If enabled, interface
250fd0
-	  definitions may be omitted.</para>
250fd0
+	  <para>Enable DBus control interface. If enabled, interface
250fd0
+	  definitions may be omitted. (This is only available
250fd0
+	  if <command>wpa_supplicant</command> was built with
250fd0
+	  the <literal>CONFIG_DBUS</literal> option.)</para>
250fd0
 	</listitem>
250fd0
       </varlistentry>
250fd0
 
250fd0
diff -up wpa_supplicant-2.0/wpa_supplicant/main.c.man-page wpa_supplicant-2.0/wpa_supplicant/main.c
250fd0
--- wpa_supplicant-2.0/wpa_supplicant/main.c.man-page	2013-01-12 09:42:53.000000000 -0600
250fd0
+++ wpa_supplicant-2.0/wpa_supplicant/main.c	2014-01-20 16:40:02.340869189 -0600
250fd0
@@ -23,11 +23,11 @@ static void usage(void)
250fd0
 	int i;
250fd0
 	printf("%s\n\n%s\n"
250fd0
 	       "usage:\n"
250fd0
-	       "  wpa_supplicant [-BddhKLqqstuvW] [-P<pid file>] "
250fd0
+	       "  wpa_supplicant [-BddhKLqqtvW] [-P<pid file>] "
250fd0
 	       "[-g<global ctrl>] \\\n"
250fd0
 	       "        -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] "
250fd0
 	       "[-p<driver_param>] \\\n"
250fd0
-	       "        [-b<br_ifname>] [-f<debug file>] [-e<entropy file>] "
250fd0
+	       "        [-b<br_ifname>] [-e<entropy file>] "
250fd0
 	       "\\\n"
250fd0
 	       "        [-o<override driver>] [-O<override ctrl>] \\\n"
250fd0
 	       "        [-N -i<ifname> -c<conf> [-C<ctrl>] "