-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://svn.php.net/repository/pear/packages/Net_Wifi/trunk@239235 c90b9560-bf6c-de11-be94-00142212c4b1
- Loading branch information
Showing
2 changed files
with
28 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,25 @@ | ||
<?php | ||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ | ||
/** | ||
* A class for scanning wireless networks and identifying | ||
* local wireless network interfaces. | ||
* | ||
* PHP versions 4 and 5 | ||
* | ||
* LICENSE: This source file is subject to version 3.0 of the PHP license | ||
* that is available through the world-wide-web at the following URI: | ||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of | ||
* the PHP License and are unable to obtain it through the web, please | ||
* send a note to [email protected] so we can mail you a copy immediately. | ||
* | ||
* @author Christian Weiske <[email protected]> | ||
* @category Networking | ||
* @package Net_Wifi | ||
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 | ||
* @version CVS: $Id$ | ||
*/ | ||
|
||
require_once 'Net/Wifi/Cell.php'; | ||
require_once 'Net/Wifi/Config.php'; | ||
//required for System::which() functionality | ||
require_once 'System.php'; | ||
|
||
/** | ||
* This class uses tools like iwconfig and iwlist to scan | ||
* for wireless networks | ||
* A class for scanning wireless networks and identifying | ||
* local wireless network interfaces. | ||
* | ||
* @author Christian Weiske <[email protected]> | ||
* @category Networking | ||
* @package Net_Wifi | ||
* @author Christian Weiske <[email protected]> | ||
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 | ||
* @version CVS: $Id$ | ||
* @link http://pear.php.net/package/Net_Wifi | ||
*/ | ||
class Net_Wifi | ||
{ | ||
/** | ||
* Various locations of programs | ||
* @var array | ||
* Various locations of programs | ||
* @var array | ||
*/ | ||
var $arFileLocation = array( | ||
'iwconfig' => '/usr/sbin/iwconfig', | ||
|
@@ -45,7 +30,7 @@ class Net_Wifi | |
|
||
|
||
/** | ||
* Constructor which tries to guess the paths of the tools | ||
* Constructor which tries to guess the paths of the tools | ||
*/ | ||
function Net_Wifi() | ||
{ | ||
|
@@ -68,11 +53,13 @@ function Net_Wifi() | |
|
||
|
||
/** | ||
* Returns an object with the current state of the interface (connected/not connected, AP,...). | ||
* Returns an object with the current state of the interface | ||
* (connected/not connected, AP,...). | ||
* | ||
* @access public | ||
* @param string The interface to check | ||
* @return Net_Wifi_Config The state information | ||
* @param string $strInterface The interface to check | ||
* | ||
* @return Net_Wifi_Config The state information | ||
* @access public | ||
*/ | ||
function getCurrentConfig($strInterface) | ||
{ | ||
|
@@ -87,11 +74,11 @@ function getCurrentConfig($strInterface) | |
|
||
|
||
/** | ||
* Parses the iwconfig output to collect the current config information. | ||
* Parses the iwconfig output to collect the current config information. | ||
* | ||
* @access protected | ||
* @param string The iwconfig output to parse | ||
* @return Net_Wifi_Config The current config object | ||
* @access protected | ||
* @param string $strAll The iwconfig output to parse | ||
* @return Net_Wifi_Config The current config object | ||
*/ | ||
function parseCurrentConfig($strAll) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
<?php | ||
|
||
/** | ||
* Cell information from a wifi scan. | ||
* Cell information from a wifi scan. | ||
* | ||
* @author Christian Weiske <[email protected]> | ||
* @category Networking | ||
* @package Net_Wifi | ||
* @author Christian Weiske <[email protected]> | ||
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 | ||
* @version CVS: $Id$ | ||
* @link http://pear.php.net/package/Net_Wifi | ||
*/ | ||
class Net_Wifi_Cell | ||
{ | ||
|