Class Data

Classes Layer2, Layer3 and Transport are all implemented as subclasses of class Data (that's why they all have data as an instance variable).

Instance Variables
data String containing a TCP or UDP header's bytes

Class Methods
timedata.time -> aTimeval
data's packet arrival time as a ruby Time
seconds data.seconds -> anInteger
data's packet arrival time in Unix seconds (double)
ts_sec
data.ts_sec -> aTimeval
data's packet arrival time in Unix seconds (integer)
erf_time data.erf_time -> anInteger
data's packet arrival time as a DAG ERF time
(64-bit integer)
wire_len data.wire_len -> anInteger
Original size of data's packet on the wire
capture_len data.capture_len-> anInteger
Number of bytes captured for data's packet. May be less than wire_len
linktype
data.linktype-> anInteger
data packet's link type. See Layer2 on Layers page for linktype values
sizedata.size -> anInteger
Number of bytes in data. May have been trucated by a short SNAPLEN when the trace was captured
kind data.kind -> aString
data object's 'kind,' i.e. what sort of object it's derived from.  For debugging: returns a string, values: 'packet', 'string', ...
type
data.type -> aString
Name of data object's class.  For debugging: returns a string, values: 'Internet', 'IP6', 'TCP', ...

Class Set  Method
data= Packet.data = aString
Overwrites the data bytes in a Data object with bytes from a String.  String may not be longer than the original data from the packet.

Nevil Brownlee
Thu, 20 Nov 08 (CST)