ptable

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	SrcIP, DstIP     net.IP
	SrcPort, DstPort int

	sync.Mutex // this mutex guards Conn only
	Conn       net.Conn
}

type Family

type Family int
const (
	TCP Family = iota
	UDP
)

type T

type T [nfamilies * nports]*Entry

WARNING: not concurrency-safe. Write from one thread only.

func (*T) Del

func (t *T) Del(f Family, port int)

func (*T) Get

func (t *T) Get(f Family, port int) (e *Entry)

func (*T) Set

func (t *T) Set(f Family, port int, e *Entry)

Jump to

Keyboard shortcuts

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