lookup

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetFile

type NetFile struct {
	Cmd string   // command associated with Pid
	Pid int      // pid of the owner
	Src net.Addr // source address
	Dst net.Addr // destination address
}

NetFile represents a network file.

func OpenNetFiles

func OpenNetFiles(s string) ([]NetFile, error)

OpenNetFiles compiles a regular expression out of "s". Some manipulation may be performed on "s" before it is compiled, depending on the hosting operating system: on macOS for example, if "s" ends with ".app", it will be trated as the root path to an application, otherwise "s" will be compiled untouched. It then uses “lsof” (or its platform dependent equivalent) tool to find the list of open files, filtering out the list by taking only the lines that match against the regular expression built.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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