network

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

Network Discovery

Currently we have an SS provider for network discover but this shhould probably be replaced with a native Go implementation as this won't work in containers since they are very unlikely to have ss installed.

If we were to build a Go implementation we would work by looking at /proc/net/tcp etc. for the socketys that are liening:

Then cross referencing the inode with the symlinks that are found in /proc/{pid}/fd. We will need to scan this directory anyway in order to gather process info if we were doing a pure go implementation of process gathering. A good example of this that we might be able to work from is: https://github.com/wheelcomplex/lsof

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Supported

func Supported() bool

Supported tells us if Puppet works on the current machine

Types

type Port

type Port struct {
	Number int
	Listen string
	PID    int
}

Port represents the details of a port

func ListeningPorts

func ListeningPorts() []Port

ListeningPorts returns the TCP ports that are listingin on the system

Jump to

Keyboard shortcuts

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