filter

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package filter provides the implementation of packet filter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOutgoingService

func AddOutgoingService(ctx *component.Context, f *Filter)

Types

type Filter

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

func New

func New(s *stack.Stack) *Filter

func (*Filter) RemovedNIC

func (f *Filter) RemovedNIC(id tcpip.NICID)

type TCPDestinationPortMatcher

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

TCPDestinationPortMatcher matches TCP packets and ports.

func NewTCPDestinationPortMatcher

func NewTCPDestinationPortMatcher(start, end uint16) *TCPDestinationPortMatcher

func (*TCPDestinationPortMatcher) Match

func (m *TCPDestinationPortMatcher) Match(_ stack.Hook, pkt *stack.PacketBuffer, _, _ string) (matches bool, hotdrop bool)

Match implements stack.Matcher.

func (*TCPDestinationPortMatcher) Name

Name implements stack.Matcher.

type TCPSourcePortMatcher

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

TCPSourcePortMatcher matches TCP packets and ports.

func NewTCPSourcePortMatcher

func NewTCPSourcePortMatcher(start, end uint16) *TCPSourcePortMatcher

func (*TCPSourcePortMatcher) Match

func (m *TCPSourcePortMatcher) Match(_ stack.Hook, pkt *stack.PacketBuffer, _, _ string) (matches bool, hotdrop bool)

Match implements stack.Matcher.

func (*TCPSourcePortMatcher) Name

func (*TCPSourcePortMatcher) Name() string

Name implements stack.Matcher.

type UDPDestinationPortMatcher

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

UDPDestinationPortMatcher matches UDP packets and ports.

func NewUDPDestinationPortMatcher

func NewUDPDestinationPortMatcher(start, end uint16) *UDPDestinationPortMatcher

func (*UDPDestinationPortMatcher) Match

func (m *UDPDestinationPortMatcher) Match(_ stack.Hook, pkt *stack.PacketBuffer, _, _ string) (matches bool, hotdrop bool)

Match implements stack.Matcher.

func (*UDPDestinationPortMatcher) Name

Name implements stack.Matcher.

type UDPSourcePortMatcher

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

UDPSourcePortMatcher matches UDP packets and ports.

func NewUDPSourcePortMatcher

func NewUDPSourcePortMatcher(start, end uint16) *UDPSourcePortMatcher

func (*UDPSourcePortMatcher) Match

func (m *UDPSourcePortMatcher) Match(_ stack.Hook, pkt *stack.PacketBuffer, _, _ string) (matches bool, hotdrop bool)

Match implements stack.Matcher.

func (*UDPSourcePortMatcher) Name

func (*UDPSourcePortMatcher) Name() string

Name implements stack.Matcher.

Jump to

Keyboard shortcuts

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