class IP6Addr
Public Instance Methods
get()
click to toggle source
# File lib/logstash/codecs/netflow/util.rb, line 34 def get IPAddr.new_ntoh((0..7).map { |i| (self.storage >> (112 - 16 * i)) & 0xffff }.pack('n8')).to_s end
set(val)
click to toggle source
# File lib/logstash/codecs/netflow/util.rb, line 26 def set(val) ip = IPAddr.new(val) if ! ip.ipv6? raise ArgumentError, "invalid IPv6 address `#{val}'" end self.storage = ip.to_i end