Sha256: ee5761d63ccbccf8ec9d824ac0066c7a9e89ed8bc33dd2a354212d173a4a9d2e

Contents?: true

Size: 314 Bytes

Versions: 10

Compression:

Stored size: 314 Bytes

Contents

module Vagrant
  module Util
    module IPv4Interfaces
      def ipv4_interfaces
        Socket.getifaddrs.select do |ifaddr|
          ifaddr.addr && ifaddr.addr.ipv4?
        end.map do |ifaddr|
          [ifaddr.name, ifaddr.addr.ip_address]
        end
      end

      extend IPv4Interfaces
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
vagrant-unbundled-2.3.6.0 lib/vagrant/util/ipv4_interfaces.rb
tamtam-vagrant-reload-1.2.1 vendor/cache/vagrant-2092df529ae7/lib/vagrant/util/ipv4_interfaces.rb
vagrant-unbundled-2.3.3.0 lib/vagrant/util/ipv4_interfaces.rb
vagrant-unbundled-2.3.2.0 lib/vagrant/util/ipv4_interfaces.rb
vagrant-unbundled-2.2.19.0 lib/vagrant/util/ipv4_interfaces.rb
vagrant-unbundled-2.2.18.0 lib/vagrant/util/ipv4_interfaces.rb
vagrant-unbundled-2.2.16.0 lib/vagrant/util/ipv4_interfaces.rb
vagrant-unbundled-2.2.14.0 lib/vagrant/util/ipv4_interfaces.rb
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/lib/vagrant/util/ipv4_interfaces.rb
vagrant-unbundled-2.2.10.0 lib/vagrant/util/ipv4_interfaces.rb