sniff

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package sniff provides functionality to interact with networking interfaces.

Functionality which ties directly to the

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectInterfaces

func DetectInterfaces() ([]string, error)

DetectInterfaces provides list of network interface handles. Returned names can be bound to for intercepting traffic.

func InterfaceListener

func InterfaceListener(ctx context.Context, stream chan HTTPXPacket, iface, bpfFilter string, snaplen int, logger *log.Logger)

InterfaceListener establishes a libpcap listener and BPF matching for capturing and reconstructing packets.

Types

type HTTPXPacket

type HTTPXPacket struct {
	TS       time.Time
	Protocol string
	Host     string
	Path     string
	Method   string
	Port     string
	Net      string
}

HTTPXPacket provides information to categorize HTTP requests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL