networking

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenCurl

func GenCurl(context *table.QueryContext) (table.TableRows, error)

func GenNetstat

func GenNetstat(context *table.QueryContext) (table.TableRows, error)

func GenNetstatWithDiag

func GenNetstatWithDiag(context *table.QueryContext) (table.TableRows, error)

func GenPing added in v1.3.1

func GenPing(context *table.QueryContext) (table.TableRows, error)

func GetLinuxKernelMajorVersion

func GetLinuxKernelMajorVersion() (int, error)

GetLinuxKernelMajorVersion 获取linux内核版本主版本号

func GetLinuxKernelVersion

func GetLinuxKernelVersion() (string, error)

GetLinuxKernelVersion 获取linux内核版本

func GetProcessInodeMapper

func GetProcessInodeMapper(max int) (map[uint32]int, error)

Types

type Network

type Network struct {
	Proto      string `json:"proto"`
	LocalIP    string `json:"localIP"`
	LocalPort  string `json:"localPort"`
	RemoteIP   string `json:"remoteIP"`
	RemotePort string `json:"remotePort"`
	Status     string `json:"status"`
	Pid        int32  `json:"pid"`
	Family     uint8  `json:"family"`
	Inode      uint32 `json:"inode"`
}

func GetNetworkInfoWithInetDiagReq

func GetNetworkInfoWithInetDiagReq(inodeMapper map[uint32]int) ([]Network, error)

GetNetworkInfoWithInetDiagReq 基于InetDiagReq的获取网络信息 在linux内核2.x.x可用, UDP协议数据需要通过解析/proc/net/udp来实现

func GetNetworkInfoWithInetDiagReqV2

func GetNetworkInfoWithInetDiagReqV2(inodeMapper map[uint32]int) ([]Network, error)

GetNetworkInfoWithInetDiagReqV2 基于InetDiagReqV2的获取网络信息 仅在linux内核 > 3.x.x可用

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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