process

package
v1.19.32-clash.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: GPL-3.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TCP = "tcp"
	UDP = "udp"
)
View Source
const (
	SOCK_DIAG_BY_FAMILY = 20
)

Variables

View Source
var (
	ErrInvalidNetwork     = errors.New("invalid network")
	ErrPlatformNotSupport = errors.New("not support on this platform")
	ErrNotFound           = errors.New("process not found")
)

Functions

func FindConnectionOwner

func FindConnectionOwner(network string, srcIP netip.Addr, srcPort int, dstIP netip.Addr, dstPort int) (uint32, string, error)

func FindPackageName

func FindPackageName(metadata *C.Metadata) (string, error)

func FindProcessName

func FindProcessName(network string, srcIP netip.Addr, srcPort int) (uint32, string, error)

func SetConnectionOwnerResolver

func SetConnectionOwnerResolver(resolver ConnectionOwnerResolver)

Types

type ConnectionOwnerResolver

type ConnectionOwnerResolver func(network string, srcIP netip.Addr, srcPort int, dstIP netip.Addr, dstPort int) (uid uint32, path string, err error)

type FindProcessMode

type FindProcessMode int32
const (
	FindProcessStrict FindProcessMode = iota
	FindProcessAlways
	FindProcessOff
)

func (FindProcessMode) MarshalText

func (m FindProcessMode) MarshalText() ([]byte, error)

MarshalText serialize FindProcessMode

func (*FindProcessMode) Set

func (m *FindProcessMode) Set(value string) error

func (FindProcessMode) String

func (m FindProcessMode) String() string

func (*FindProcessMode) UnmarshalText

func (m *FindProcessMode) UnmarshalText(data []byte) error

UnmarshalText unserialize FindProcessMode

type PackageNameResolver

type PackageNameResolver func(metadata *C.Metadata) (string, error)

PackageNameResolver never change type traits because it's used in CMFA

var DefaultPackageNameResolver PackageNameResolver

DefaultPackageNameResolver never change type traits because it's used in CMFA

Jump to

Keyboard shortcuts

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