Filament::Capture::PacketHeader
Inherits Struct < Value < Object
Each packet in a PCAP file is preceded by this header. It gives us the timestamp and the lengths (both captured and original).
The distinction between incl_len and orig_len is important: if the snap length was smaller than the packet, incl_len < orig_len and we only have a prefix of the packet data.
Constructors
Instance methods
Number of bytes of packet data actually captured and saved in the file. May be less than orig_len if snapping occurred.
Original length of the packet as it appeared on the wire. This is the "real" packet size before any truncation.
Constructs a Crystal Time object from the packet timestamp.
For nanosecond-resolution files, you should pass nano: true
so we interpret ts_usec correctly.
Timestamp sub-second component. Microseconds for standard PCAP, nanoseconds for nanosecond-resolution PCAP files.