class Scriptroute::TimedPacket

TimedPacket is a time, packet tuple, with a tsc value thrown in in case its useful

Attributes

packet[RW]

@return [IP]

time[RW]

@return [Float,nil]

tsc[RW]

@return [Fixnum,nil] The output of rdtsc can be a more

useful value in calculating rtt when NTP's adjustments
via skew cause trouble.

Public Class Methods

new(time, tsc, packet) click to toggle source

@param time [Float,nil] Seconds since the epoch, or nil if we didn’t see the packet leave due to pcap (happens) @param tsc [Fixnum,nil] Value of the cycle counter (rdtsc) or nil if not supported @param packet [IP] The packet received.

# File lib/scriptroute.rb, line 114
def initialize(time, tsc, packet)
  raise ArgumentError, "no packet" unless packet
  raise ArgumentError, "packet of the wrong class" unless packet.is_a?(IP)
  @time = time
  @tsc = tsc
  @packet = packet
end