Method: VirtualBox::Net.host_nics

Defined in:
lib/virtual_box/net.rb

.host_nicsArray<Hash<Symbol, Object>>

Information about the NICs attached to the computer.

Returns:

  • (Array<Hash<Symbol, Object>>)

    an array with one hash per NIC; hashes have the following keys:

    :name

    the NIC device’s name (use when setting a Nic’s net_name)

    :ip

    the IP address (compare against 0.0.0.0 to see if it’s live)

    :mask

    the network mask used to figure out broadcasting

    :mac

    the NICs MAC address (format: “AB0123456789”)



184
185
186
# File 'lib/virtual_box/net.rb', line 184

def self.host_nics
  @host_nics ||= host_nics!
end