Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) WriteHeader ¶
WriteHeader writes a global header block to the pcap file.
The global header block contains metadata about the capture, such as the timestamp format and the maximum packet length.
See https://wiki.wireshark.org/Development/LibpcapFileFormat for more information about the pcap file format.
func (*Writer) WritePacket ¶
WritePacket writes a packet to the pcap file.
The packet is written as a packet header plus the packet data. The timestamp is written as the number of seconds since the epoch, and the packet data is written as a sequence of bytes of the length specified in the packet header.
See https://wiki.wireshark.org/Development/LibpcapFileFormat for more information about the pcap file format.