nettool

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IPv4MappedToIPv6

func IPv4MappedToIPv6(ipv6Address string) (bool, string)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

A Client can manipulate ss netlink interface.

func New

func New() (*Client, error)

New creates a Client which can issue ss commands.

func NewWithConn

func NewWithConn(conn *netlink.Conn) *Client

NewWithConn creates a Client which can issue ss commands using an existing netlink connection.

func (*Client) CloseConnection

func (c *Client) CloseConnection()

func (*Client) ListTcp4Conns

func (c *Client) ListTcp4Conns() ([]*Tuple, error)

ListTcp4Conns retrieves all tcp connections from kernel.

func (*Client) ListTcp6Conns

func (c *Client) ListTcp6Conns() ([]*Tuple, error)

ListTcp6Conns retrieves all tcp connections from kernel.

type Tuple

type Tuple struct {
	SrcIp     string
	DstIp     string
	ServiceIp string
}

Jump to

Keyboard shortcuts

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