Net
[ class tree: Net ] [ index: Net ] [ all elements ]

Class: Net_Wifi

Source Location: /Net_Wifi-0.2.0/Net/Wifi.php

Class Overview


This class uses tools like iwconfig and iwlist to scan for wireless networks


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 33]
This class uses tools like iwconfig and iwlist to scan for wireless networks


[ Top ]


Class Variables

$arFileLocation = array(
        'iwconfig'           => '/usr/sbin/iwconfig',
        'iwlist'             => '/usr/sbin/iwlist',
        '/proc/net/wireless' => '/proc/net/wireless'
    )

[line 39]

Various locations of programs

Type:   array


[ Top ]



Method Detail

Net_Wifi (Constructor)   [line 50]

Net_Wifi Net_Wifi( )

Constructor which tries to guess the paths of the tools

[ Top ]

connectToAccessPoint   [line 414]

boolean connectToAccessPoint( string $strInterface, string $strMac)

Tells the driver to use the access point with the given MAC address only.

You can use "off" to enable automatic mode again without changing the current AP, or "any" resp. "auto" to force the card to re-associate with the currently best AP

EXPERIMENTAL! WILL CHANGE IN FUTURE VERSIONS

  • Return: True if setting was ok, false if not
  • Access: public

Parameters:

string   $strInterface   —  The interface to use
string   $strMac   —  The mac address of the access point

[ Top ]

getCurrentConfig   [line 77]

Net_Wifi_Config getCurrentConfig( string $strInterface)

Returns an object with the current state of the interface (connected/not connected, AP,...).
  • Return: The state information
  • Access: public

Parameters:

string   $strInterface   —  The interface to check

[ Top ]

getPathIwconfig   [line 460]

string getPathIwconfig( )

Returns the set path to iwconfig.
  • Return: The path to iwconfig
  • Access: public

[ Top ]

getPathIwlist   [line 484]

string getPathIwlist( )

Returns the set path to iwlist.
  • Return: The path to iwlist
  • Access: public

[ Top ]

getPathProcWireless   [line 436]

string getPathProcWireless( )

Returns the set path to /proc/wireless.
  • Return: The path to "/proc/net/wireless"
  • Access: public

[ Top ]

getSupportedInterfaces   [line 164]

array getSupportedInterfaces( )

Returns an array with the names/device files of all supported wireless lan devices.
  • Return: Array with wireless interfaces as values
  • Access: public

[ Top ]

isConnected   [line 149]

boolean isConnected( string $strInterface)

Checks if a network interface is connected to an access point.
  • Return: If the interface is connected
  • Access: public

Parameters:

string   $strInterface   —  The network interface to check

[ Top ]

parseCurrentConfig   [line 96]

Net_Wifi_Config parseCurrentConfig( string $strAll)

Parses the iwconfig output to collect the current config information.
  • Return: The current config object
  • Access: protected

Parameters:

string   $strAll   —  The iwconfig output to parse

[ Top ]

parseScan   [line 223]

array parseScan( array $arLines)

Parses the output of iwlist and returns the recognized cells.
  • Return: Array with cell information objects
  • Access: protected

Parameters:

array   $arLines   —  Lines of the iwlist output as an array

[ Top ]

scan   [line 206]

array scan( string $strInterface)

Scans for access points / ad hoc cells and returns them.
  • Return: Array with cell information objects (Net_Wifi_Cell)
  • Access: public

Parameters:

string   $strInterface   —  The interface to use

[ Top ]

setPathIwconfig   [line 472]

void setPathIwconfig( string $strPathIwconfig)

Returns the set path to iwconfig.
  • Access: public

Parameters:

string   $strPathIwconfig   —  The new ifwconfig path

[ Top ]

setPathIwlist   [line 496]

void setPathIwlist( string $strPathIwlist)

Returns the set path to iwlist.
  • Access: public

Parameters:

string   $strPathIwlist   —  The new iwlist path

[ Top ]

setPathProcWireless   [line 448]

void setPathProcWireless( string $strProcWireless)

Returns the set path to /proc/net/wireless.
  • Access: public

Parameters:

string   $strProcWireless   —  The new /proc/net/wireless path

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:48:01 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.