class Spcap::Packet

Attributes

caplen[R]
len[R]
raw_data[R]
time[R]

Public Class Methods

new(time,data,len,datalink) click to toggle source
# File lib/spcap/packet.rb, line 5
def initialize(time,data,len,datalink)
  @time = time
  @raw_data = data
  @caplen = data.length
  @len = len
  @datalink = datalink
end

Public Instance Methods

ip?() click to toggle source
# File lib/spcap/packet.rb, line 15
def ip? ; self.kind_of?(IPPacket) ; end
length() click to toggle source
# File lib/spcap/packet.rb, line 14
def length ; @len; end
size() click to toggle source
# File lib/spcap/packet.rb, line 13
def size ; @len; end
tcp?() click to toggle source
# File lib/spcap/packet.rb, line 16
def tcp? ; self.kind_of?(TCPPacket) ; end
time_i() click to toggle source
# File lib/spcap/packet.rb, line 18
def time_i ; self.time.to_i ; end
udp?() click to toggle source
# File lib/spcap/packet.rb, line 17
def udp? ; self.kind_of?(UDPPacket) ; end