class Pio::OpenFlow10::Match::MatchIpAddress

IP address

Public Instance Methods

==(other) click to toggle source
# File lib/pio/open_flow10/match.rb, line 101
def ==(other)
  get == other
end
get() click to toggle source
# File lib/pio/open_flow10/match.rb, line 95
def get
  ipaddr = octets.map { |each| format('%d', each) }.join('.')
  prefixlen = 32 - eval_parameter(:bitcount)
  IPv4Address.new(ipaddr + "/#{prefixlen}")
end
set(value) click to toggle source
# File lib/pio/open_flow10/match.rb, line 91
def set(value)
  self.octets = IPv4Address.new(value).to_a
end