interfaces

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capture

type Capture interface {
	Read() chan gopacket.Packet
}

type Dumper

type Dumper interface {
	Dump(ctx context.Context, record *model.Record) error
	Close()
}

type Repository added in v0.2.0

type Repository interface {
	// SaveAddrName saves a mapping from IP address to domain name (from DNS)
	SaveAddrName(ctx context.Context, addr net.IP, name string) error
	// SaveHWAddrName saves a mapping from MAC address to hostname (from mDNS/LLMNR/NBNS/DHCP)
	SaveHWAddrName(ctx context.Context, hwAddr net.HardwareAddr, name string) error

	// LookupByAddr returns names associated with an IP address
	LookupByAddr(ctx context.Context, addr net.IP) ([]string, error)
	// LookupByHWAddr returns names associated with a MAC address
	LookupByHWAddr(ctx context.Context, hwAddr net.HardwareAddr) ([]string, error)
}

Jump to

Keyboard shortcuts

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