Class Facter::Util::IP::Windows
In: lib/facter/util/ip/windows.rb
Parent: Object

Methods

Classes and Modules

Class Facter::Util::IP::Windows::Bindings4
Class Facter::Util::IP::Windows::Bindings6

Constants

WMI_IP_INFO_QUERY = 'SELECT Description, ServiceName, IPAddress, IPConnectionMetric, InterfaceIndex, Index, IPSubnet, MACAddress, MTU, SettingID FROM Win32_NetworkAdapterConfiguration WHERE IPConnectionMetric IS NOT NULL AND IPEnabled = TRUE'   The WMI query used to return ip information

@return [String]

@api private

WINDOWS_LABEL_WMI_MAP = { :ipaddress => 'IPAddress', :ipaddress6 => 'IPAddress', :macaddress => 'MACAddress', :netmask => 'IPSubnet'   Mapping fact names to WMI properties of the Win32_NetworkAdapterConfiguration

@api private

Public Class methods

Windows doesn‘t display netmask in hex.

@return [Boolean] false by default

@api private

Gets a list of active IPv4 network adapter configurations sorted by the lowest IP connection metric. If two configurations have the same metric, then the IPv4 specific binding order as specified in the registry will be used.

@return [Array<WIN32OLE>]

@api private

Gets a list of active IPv6 network adapter configurations sorted by the lowest IP connection metric. If two configurations have the same metric, then the IPv6 specific binding order as specified in the registry will be used.

@return [Array<WIN32OLE>]

@api private

Gets a list of active network adapter configurations sorted by the lowest IP connection metric. If two configurations have the same metric, then the adapter binding order as specified in the registry will be used. Note the order may different for IPv4 vs IPv6 addresses.

@see support.microsoft.com/kb/894564 @return [Array<WIN32OLE>]

@api private

Retrieves a list of unique interfaces names.

@return [Array<String>]

@api private

Returns an array of partial Win32_NetworkAdapterConfiguration objects.

@return [Array<WIN32OLE>] objects

@api private

Determines if the value passed in is a valid ipv4 address.

@param [String] ip_address the IPv4 address to validate @return [Boolean]

@api private

Determines if the value passed in is a valid ipv6 address.

@param [String] ip_address the IPv6 address to validate @return [Boolean]

@api private

Get the value of an interface and label. For example, you may want to find the MTU for eth0.

@param [String] interface the name of the interface returned by the {interfaces} method. @param [String] label the type of value to return, e.g. ipaddress @return [String] the value, or nil if not defined

@api private

[Validate]