Class: Facter::Util::Linux::SocketParser

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/util/linux/socket_parser.rb

Class Method Summary collapse

Class Method Details

.retrieve_interfaces(logger) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/facter/util/linux/socket_parser.rb', line 8

def retrieve_interfaces(logger)
  require 'socket'
  @interfaces = {}
  @log = logger
  Socket.getifaddrs.each do |ifaddr|
    populate_interface_info(ifaddr)
  end

  @interfaces
end