Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExportElement ¶
type ExportElement struct { SrcIP string `json:"srcIp"` DstIP string `json:"dstIp"` SrcPort float64 `json:"srcPort"` DstPort float64 `json:"dstPort"` CreateDate string `json:"create_date"` ProtocolType float64 `json:"protocol_type"` ProtocolText string `json:"protocol_text"` PayloadType float64 `json:"payload_type"` PayloadText string `json:"payload_text"` Message string `json:"msg_color"` TimeSeconds float64 `json:"timeSeconds"` TimeUseconds float64 `json:"timeUSeconds"` CaptureID float64 `json:"capture_id"` }
type Writer ¶
Writer wraps an underlying o.Writer to write packet data in PCAP format. See http://wiki.wireshark.org/Development/LibpcapFileFormat for information on the file format.
For those that care, we currently write v2.4 files with nanosecond or microsecond timestamp resolution and little-endian encoding.
func NewWriterNanos ¶
func (*Writer) WriteDataPcapBuffer ¶
WriteDataToBuffer writes a file header out to the writer. This must be called exactly once per output.
func (*Writer) WriteDataToBuffer ¶
WriteDataToBuffer writes a file header out to the writer. This must be called exactly once per output.
func (*Writer) WritePcapHeader ¶
WriteFileHeader writes a file header out to the writer. This must be called exactly once per output.
func (*Writer) WritePcapPacket ¶
func (w *Writer) WritePcapPacket(ci gopacket.CaptureInfo, data []byte) error
WritePacket writes the given packet data out to the file.