search for: _numeric_range

Displaying 1 result from an estimated 1 matches for "_numeric_range".

2009 Nov 03
0
[PATCH server] suggest ip address for nics/bondings on edit host/vm network forms
...end end + + # get the range of valid addresses for this network address + def range + # exclude the gateway and broadcast addresses + # associated w/ this ip address + sgatewayi = IPAddr.new(gateway).to_i + sbcasti = IPAddr.new(broadcast).to_i + + addresses = [] + _numeric_range.each { |i| # this can be a big performance hit + # depending on your network / mask + unless i == sgatewayi || i == sbcasti + addresses.push IPAddr.new(i, Socket::AF_INET).to_s + end + } + + addresses + end + + # get first available ad...