dpi

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: BSD-3-Clause, GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package dpi implements an interface for application layer classification via bindings to nDPI and libprotoident

Index

Constants

This section is empty.

Variables

View Source
var (
	// NDPIVersion is the version of nDPI library linked against
	NDPIVersion = "unknown"

	// LibprotoidentVersion is the version of libprotoident library linked against
	LibprotoidentVersion = "unknown"

	// GoDPIVersion is the version of go-dpi wrapper used
	GoDPIVersion = "v1.2.0"
)

These variables can be set at build time using ldflags Example: -ldflags "-X github.com/dreadl0ck/netcap/dpi.NDPIVersion=4.14.0"

Functions

func Destroy

func Destroy()

Destroy tears down godpi and frees the memory allocated for cgo returned errors are logged to stdout.

func GetProtocols

func GetProtocols(packet gopacket.Packet) map[string]ClassificationResult

GetProtocols returns a map of all the identified protocol names to a result datastructure packets are identified with libprotoident, nDPI and a few custom heuristics from godpi.

func GetVersionInfo added in v0.7.3

func GetVersionInfo() string

GetVersionInfo returns a formatted string with DPI library versions

func HasDPISupport added in v0.7.3

func HasDPISupport() bool

HasDPISupport returns true when DPI support is compiled in

func Init

func Init()

Init initializes the deep packet inspection engines.

func IsEnabled

func IsEnabled() bool

IsEnabled will return true if goDPI has been initialized

func NewProto

func NewProto(res *ClassificationResult) *types.Protocol

NewProto initializes a new protocol.

Types

This section is empty.

Jump to

Keyboard shortcuts

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