filter

package
v0.0.0-...-8e6527b Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBestInterfaceEx

func GetBestInterfaceEx(addr *windows.RawSockaddr) (int, error)

GetBestInterfaceEx is ...

func GetExtendedTcpTable

func GetExtendedTcpTable(order uint32, ulAf uint32, tableClass uint32, buf []byte) ([]byte, error)

GetExtendedTcpTable is ...

func GetExtendedUdpTable

func GetExtendedUdpTable(order uint32, ulAf uint32, tableClass uint32, buf []byte) ([]byte, error)

GetExtendedUdpTable is ...

func GetInterfaceIndex

func GetInterfaceIndex(s string) (int, error)

GetInterfaceIndex is ...

func QueryFullProcessImageName

func QueryFullProcessImageName(process windows.Handle, flags uint32, b []uint16) (string, error)

QueryFullProcessImageName is ...

func QueryNameByPID

func QueryNameByPID(id uint32, b []uint16) (string, error)

QueryNameByPID is ...

Types

type AppFilter

type AppFilter struct {
	// RWMutex is ...
	sync.RWMutex
	// PIDs is ...
	PIDs map[uint32]struct{}
	// Apps is ...
	Apps map[string]struct{}
	// contains filtered or unexported fields
}

AppFilter is ...

func NewAppFilter

func NewAppFilter() *AppFilter

NewAppFilter is ...

func (*AppFilter) Add

func (f *AppFilter) Add(s string)

Add is ...

func (*AppFilter) Lookup

func (f *AppFilter) Lookup(id uint32) bool

Lookup is ...

func (*AppFilter) SetPIDs

func (f *AppFilter) SetPIDs(ids []uint32)

SetPIDs is ...

func (*AppFilter) UnsafeAdd

func (f *AppFilter) UnsafeAdd(s string)

UnsafeAdd is ...

type IPFilter

type IPFilter struct {
	// RWMutex is ...
	sync.RWMutex
	// Tree is ...
	Tree *iptree.Tree
	// Rules is ...
	Rules map[string]bool
	// Final is ...
	Final bool
	// contains filtered or unexported fields
}

IPFilter is ...

func NewIPFilter

func NewIPFilter() *IPFilter

NewIPFilter is ...

func (*IPFilter) Add

func (f *IPFilter) Add(s string) error

Add is ...

func (*IPFilter) Close

func (f *IPFilter) Close() error

Close is ...

func (*IPFilter) IgnorePrivate

func (f *IPFilter) IgnorePrivate()

IgnorePrivate is ... ingore private address

func (*IPFilter) Lookup

func (f *IPFilter) Lookup(ip net.IP) bool

Lookup is ...

func (*IPFilter) SetGeoIP

func (f *IPFilter) SetGeoIP(s string, proxy, bypass []string, final bool) (err error)

SetGeoIP is ...

func (*IPFilter) UnsafeAdd

func (f *IPFilter) UnsafeAdd(s string) error

UnsafeAdd is ...

type TCP6Row

type TCP6Row struct {
	LocalAddr     [4]uint32
	LocalScopeId  uint32
	LocalPort     uint32
	RemoteAddr    [4]uint32
	RemoteScopeId uint32
	RemotePort    uint32
	State         uint32
	OwningPid     uint32
}

TCP6Row is ...

func GetTCP6Table

func GetTCP6Table(buf []byte) ([]TCP6Row, error)

GetTCP6Table is ...

type TCP6Table

type TCP6Table struct {
	Len   uint32
	Table [1]TCP6Row
}

TCP6Table is ...

type TCPRow

type TCPRow struct {
	State      uint32
	LocalAddr  uint32
	LocalPort  uint32
	RemoteAddr uint32
	RemotePort uint32
	OwningPid  uint32
}

TCPRow is ...

func GetTCPTable

func GetTCPTable(buf []byte) ([]TCPRow, error)

GetTCPTable is ...

type TCPTable

type TCPTable struct {
	Len   uint32
	Table [1]TCPRow
}

TCPTable is ...

type UDP6Row

type UDP6Row struct {
	LocalAddr    [4]uint32
	LocalScopeId uint32
	LocalPort    uint32
	OwningPid    uint32
}

UDP6Row is ...

func GetUDP6Table

func GetUDP6Table(buf []byte) ([]UDP6Row, error)

GetUDP6Table is ...

type UDP6Table

type UDP6Table struct {
	Len   uint32
	Table [1]UDP6Row
}

UDP6Table is ...

type UDPRow

type UDPRow struct {
	LocalAddr uint32
	LocalPort uint32
	OwningPid uint32
}

UDPRow is ...

func GetUDPTable

func GetUDPTable(buf []byte) ([]UDPRow, error)

GetUDPTable is ...

type UDPTable

type UDPTable struct {
	Len   uint32
	Table [1]UDPRow
}

UDPTable is ...

Directories

Path Synopsis
Package iptree implements radix tree data structure for IPv4 and IPv6 networks.
Package iptree implements radix tree data structure for IPv4 and IPv6 networks.

Jump to

Keyboard shortcuts

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