utils

package
v0.0.0-...-307866b Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: GPL-3.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TCP contains the standard location to read open TCP IPv4 connections.
	TCP = "net/tcp"
	// TCP6 contains the standard location to read open TCP IPv6 connections.
	TCP6 = "net/tcp6"
	// UDP contains the standard location to read open UDP IPv4 connections.
	UDP = "net/udp"
	// UDP6 contains the standard location to read open UDP IPv6 connections.
	UDP6 = "net/udp6"
)
View Source
var ProcRoot = "/proc"

ProcRoot should point to the root of the proc file system

Functions

func FindUsersForLocalPort

func FindUsersForLocalPort(
	packet gopacket.Packet,
	ip string,
	localPort int,
	foundService string,
	usersPrefix string,
	usersCounts *map[string]map[string]int,
) error

This pin-points the connection using the nf_conntrack data (NATed connections)

Types

type ProcessDir

type ProcessDir struct {
	Protocol string
	Pid      int
}

type ServiceCounts

type ServiceCounts map[string]int

type UserCounts

type UserCounts map[string]*ServiceCounts

type Void

type Void struct{}

Jump to

Keyboard shortcuts

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