cvs: peardoc /en/package networking.xml /en/package/networking net-wifi.xml /en/package/networking/net-wifi localinfo.xml scanning.xml setup.xml
| From: | Christian Weiske | Date: | Sun, 29 Oct 2006 21:24:36 +0000 |
| Subject: | cvs: peardoc /en/package networking.xml /en/package/networking net-wifi.xml /en/package/networking/net-wifi localinfo.xml scanning.xml setup.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-8667@lists.php.net to get a copy of this message | ||
cweiske Sun Oct 29 21:24:36 2006 UTC
Added files:
/peardoc/en/package/networking net-wifi.xml
/peardoc/en/package/networking/net-wifi localinfo.xml scanning.xml
setup.xml
Modified files:
/peardoc/en/package networking.xml
Log:
Net_Wifi docs
http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking.xml?r1=1.18&r2=1.19&diff_format=u
Index: peardoc/en/package/networking.xml
diff -u peardoc/en/package/networking.xml:1.18 peardoc/en/package/networking.xml:1.19
--- peardoc/en/package/networking.xml:1.18 Sat Jun 10 01:12:23 2006
+++ peardoc/en/package/networking.xml Sun Oct 29 21:24:36 2006
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.18 $ -->
+<!-- $Revision: 1.19 $ -->
<chapter id="package.networking">
<title>Networking</title>
@@ -29,6 +29,7 @@
&package.networking.net-socket;
&package.networking.net-traceroute;
&package.networking.net-whois;
+ &package.networking.net-wifi;
</chapter>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-wifi.xml?view=markup&rev=1.1
Index: peardoc/en/package/networking/net-wifi.xml
+++ peardoc/en/package/networking/net-wifi.xml
<?xml version="1.0" encoding="utf-8" ?>
<!-- $Revision: 1.1 $ -->
<sect1 id="package.networking.net-wifi">
<title>Net_Wifi</title>
<para>
Scans for wireless networks
</para>
&package.networking.net-wifi.setup;
&package.networking.net-wifi.localinfo;
&package.networking.net-wifi.scanning;
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-wifi/localinfo.xml?view=markup&rev=1.1
Index: peardoc/en/package/networking/net-wifi/localinfo.xml
+++ peardoc/en/package/networking/net-wifi/localinfo.xml
<?xml version="1.0" encoding="utf-8" ?>
<!-- $Revision: 1.1 $ -->
<refentry id="package.networking.net-wifi.localinfo">
<refnamediv>
<refname>Local info</refname>
<refpurpose>Current interface configuration</refpurpose>
</refnamediv>
<refsect1>
<title>Getting local interface configuration</title>
<para>
At first, you can get a list of network interfaces on your
computer via <function>getSupportedInterfaces</function>.
It returns an array of strings that are the names of
the network interfaces, e.g. "eth1" or "wlan0".
</para>
<para>
The full information about the state of a network interface
can be retrieved with <function>getCurrentConfig</function>.
It returns a <classname>Net_Wifi_Config</classname> object.
To just check if an interface is connected, use the
<function>isConnected</function> method also takes the
interface name as only parameter.
</para>
<para>
A <classname>Net_Wifi_Config</classname> looks like this:
<screen>
<![CDATA[
Net_Wifi_Config {
activated => bool(true)
associated => bool(true)
ap => string(17) "00:03:C9:44:34:2C"
ssid => string(4) "free"
mode => string(7) "managed"
nick => NULL
rate => string(2) "54"
power => string(2) "20"
protocol => string(12) "IEEE 802.11g"
rssi => string(3) "-37"
}
]]>
</screen>
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-wifi/scanning.xml?view=markup&rev=1.1
Index: peardoc/en/package/networking/net-wifi/scanning.xml
+++ peardoc/en/package/networking/net-wifi/scanning.xml
<?xml version="1.0" encoding="utf-8" ?>
<!-- $Revision: 1.1 $ -->
<refentry id="package.networking.net-wifi.scanning">
<refnamediv>
<refname>Scanning</refname>
<refpurpose>Finding wireless networks</refpurpose>
</refnamediv>
<refsect1>
<title>Finding wireless networks</title>
<para>
To scan for available wireless networks in your environment,
use the <function>scan</function> method. It takes the network
interface name as only parameter and returns an array of
<classname>Net_Wifi_Cell</classname> objects.
</para>
<para>
You get an array of local wireless interfaces via the
<function>getSupportedInterfaces</function> method.
</para>
<para>
A cell object looks like this:
<screen>
<![CDATA[
Net_Wifi_Cell {
cell => string(2) "01"
mac => string(17) "00:03:C9:44:34:2C"
ssid => string(8) "<hidden>"
mode => string(6) "master"
channel => int(1)
encryption=> bool(false)
frequency => NULL
protocol => string(13) "IEEE 802.11bg"
rate => float(54)
rates => array(12) {
0 => float(1)
1 => float(2)
2 => float(5.5)
3 => float(6)
}
rssi => string(3) "-39"
beacon => int(336)
quality => string(6) "90/100"
}
]]>
</screen>
</para>
<para>
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-wifi/setup.xml?view=markup&rev=1.1
Index: peardoc/en/package/networking/net-wifi/setup.xml
+++ peardoc/en/package/networking/net-wifi/setup.xml
<?xml version="1.0" encoding="utf-8" ?>
<!-- $Revision: 1.1 $ -->
<refentry id="package.networking.net-wifi.setup">
<refnamediv>
<refname>Setup</refname>
<refpurpose>Making it work</refpurpose>
</refnamediv>
<refsect1>
<title>Setup - Making it work</title>
<para>
<classname>Net_Wifi</classname> uses the command line
tools <filename>iwconfig</filename> and <filename>iwlist</filename>
to gather information about local wireless network interfaces,
and to give information about wireless networks reachable by
your computer.
</para>
<para>
To work with the class, you need to make sure that both programs
are found. By default, <filename>/sbin/</filename> and
<filename>/usr/sbin/</filename> are looked up to find them when
the class is instantiated.
If that fails, the system's <filename>which</filename> tool
is used to determine the location.
</para>
<para>
You can retrieve and set their locations with
<function>getPathIwconfig</function> and
<function>setPathIwconfig</function>, as well
as
<function>getPathIwlist</function> and
<function>setPathIwlist</function>.
</para>
</refsect1>
</refentry>