class By2::Models::Iphdr
Public Class Methods
ip_dst(ip)
click to toggle source
# File lib/by2/models/iphdr.rb, line 19 def self.ip_dst(ip) where("iphdr.ip_dst = ?", int32(ip)) end
ip_src(ip)
click to toggle source
# File lib/by2/models/iphdr.rb, line 15 def self.ip_src(ip) where("iphdr.ip_src = ?", int32(ip)) end
ip_src_or_dst(ip)
click to toggle source
# File lib/by2/models/iphdr.rb, line 11 def self.ip_src_or_dst(ip) where("iphdr.ip_dst = ? or iphdr.ip_src = ?", int32(ip), int32(ip)) end
Private Class Methods
int32(ip)
click to toggle source
# File lib/by2/models/iphdr.rb, line 33 def self.int32(ip) Utils.ip_to_int32(ip) end
Public Instance Methods
ipaddr_dst()
click to toggle source
# File lib/by2/models/iphdr.rb, line 27 def ipaddr_dst Utils.int32_to_ip(self.ip_dst) end
ipaddr_src()
click to toggle source
# File lib/by2/models/iphdr.rb, line 23 def ipaddr_src Utils.int32_to_ip(self.ip_src) end