Class: Y2Network::WirelessScanner
- Inherits:
-
Object
- Object
- Y2Network::WirelessScanner
- Includes:
- Yast::Logger
- Defined in:
- src/lib/y2network/wireless_scanner.rb
Overview
Scans for wireless cells (access points and ad-hoc cells)
It uses the iwlist
command line utility to get the cells information.
Defined Under Namespace
Classes: AuthMode
Instance Attribute Summary collapse
-
#iface_name ⇒ String
readonly
Name of the interface to scan for devices.
Instance Method Summary collapse
-
#cells ⇒ Array<WirelessNetwork>
Returns the wireless cells.
-
#initialize(iface_name) ⇒ WirelessScanner
constructor
Constructor.
Constructor Details
#initialize(iface_name) ⇒ WirelessScanner
Constructor
64 65 66 |
# File 'src/lib/y2network/wireless_scanner.rb', line 64 def initialize(iface_name) @iface_name = iface_name end |
Instance Attribute Details
#iface_name ⇒ String (readonly)
Returns Name of the interface to scan for devices.
59 60 61 |
# File 'src/lib/y2network/wireless_scanner.rb', line 59 def iface_name @iface_name end |
Instance Method Details
#cells ⇒ Array<WirelessNetwork>
Returns the wireless cells
72 73 74 75 76 77 78 79 |
# File 'src/lib/y2network/wireless_scanner.rb', line 72 def cells raw_cells_from_iwlist(fetch_iwlist).map do |cell| cell_from_raw_data(cell) end rescue Cheetah::ExecutionFailed => e log.error "Could not fetch the list of wireless cells: #{e.inspect}" [] end |