Documentation ¶
Index ¶
- Variables
- func CreatePacket(src, dst net.IP, srcPort, dstPort int, payload []byte) gopacket.Packet
- func CreatePacketWithSeq(src, dst net.IP, srcPort, dstPort int, payload []byte, seq uint32) gopacket.Packet
- func CreateTCPSYN(src, dst net.IP, srcPort, dstPort int, seq uint32) gopacket.Packet
- func CreateTCPSYNAndACK(src, dst net.IP, srcPort, dstPort int, seq uint32) gopacket.Packet
- func CreateUDPPacket(src, dst net.IP, srcPort, dstPort int, payload []byte) gopacket.Packet
- type NetworkTrafficObserver
- type NetworkTrafficParser
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TODO: packet capture timeouts are tuned using the packet capture tests on a // particular developer's machine. We should implement some autotuning logic // based on specific machine that the broker is running on. // https://app.clubhouse.io/akita-software/story/521 PktCaptureWaitFlag = flag.Duration("packet_capture_wait_duration", 30*time.Millisecond, "Amount of time to wait after API calls complete before stopping packet capture. This has a direct impact on our API test throughput.") )
Functions ¶
func CreatePacket ¶
func CreatePacketWithSeq ¶
func CreateTCPSYN ¶
func CreateTCPSYNAndACK ¶
Types ¶
type NetworkTrafficObserver ¶ added in v0.13.0
NetworkTrafficObserver is the callback function type for observing packets as they come in to a NetworkTrafficParser.
type NetworkTrafficParser ¶
type NetworkTrafficParser struct {
// contains filtered or unexported fields
}
func NewNetworkTrafficParser ¶
func NewNetworkTrafficParser() *NetworkTrafficParser
func (*NetworkTrafficParser) InstallObserver ¶ added in v0.13.0
func (p *NetworkTrafficParser) InstallObserver(observer NetworkTrafficObserver)
Replace the current per-packet callback. Should be called before starting ParseFromInterface.
func (*NetworkTrafficParser) ParseFromInterface ¶
func (p *NetworkTrafficParser) ParseFromInterface(interfaceName, bpfFilter string, signalClose <-chan struct{}, fs ...akinet.TCPParserFactory) (<-chan akinet.ParsedNetworkTraffic, error)
Parses network traffic from an interface. This function will attempt to parse the traffic with the highest level of protocol details as possible. For instance, it will try to piece together HTTP request and response pairs. The order of parsers matters: earlier parsers will get tried first. Once a parser has been accepted, no other parser will be used.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.