Documentation ¶
Overview ¶
package tcpreaderwrapper wraps a gopacket tcpassembly.tcpreader.ReaderStream and holds recent resassemblies to fetch timing information
Package tcpreaderwrapper wraps a gopacket tcpassembly.tcpreader.ReaderStream
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReaderStreamWrapper ¶
type ReaderStreamWrapper struct { tcpreader.ReaderStream Reassemblies []ReassemblyInfo }
func NewReaderStreamWrapper ¶
func NewReaderStreamWrapper() ReaderStreamWrapper
NewReaderStream returns a new ReaderStreamWrapper object.
func (*ReaderStreamWrapper) Reassembled ¶
func (r *ReaderStreamWrapper) Reassembled(reassembly []tcpassembly.Reassembly)
Reassembled implements tcpassembly.Stream's Reassembled function.
type ReassemblyInfo ¶
type ReassemblyInfo struct { // Bytes is number of bytes in the next reassembled part of the associated // Stream. NumBytes int // Skip is set to non-zero if bytes were skipped between this and the // last Reassembly. If this is the first packet in a connection and we // didn't see the start, we have no idea how many bytes we skipped, so // we set it to -1. Otherwise, it's set to the number of bytes skipped. Skip int // Start is set if this set of bytes has a TCP SYN accompanying it. Start bool // End is set if this set of bytes has a TCP FIN or RST accompanying it. End bool // Seen is the timestamp this set of bytes was pulled off the wire. Seen time.Time }
ReassemblyInfo represents the metadata about a tcpassembly.Reassembly (it does not store the actual bytes) It duplicates the fields from Reassembly but stores number of bytes instead of actual bytes
Click to show internal directories.
Click to hide internal directories.