filter

package
v0.0.0-...-2b8e069 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFilterFromAcls

func NewFilterFromAcls(acls []string) func([]byte) error

func True

func True([]byte) error

Types

type PortFilter

type PortFilter struct {
	AllowedDstTCPPorts portMap
	AllowedSrcTCPPorts portMap
	AllowedSrcUDPPorts portMap
	AllowedDstUDPPorts portMap
	AllowedICMPType    icmpTypeMap
	DenyDstTCPPorts    portMap
	DenySrcTCPPorts    portMap
	DenySrcUDPPorts    portMap
	DenyDstUDPPorts    portMap
	DenyICMPType       icmpTypeMap
	DenyICMP           bool
	DenyAll            bool
	AllowAll           bool
}

func NewPortFilter

func NewPortFilter() *PortFilter

func (*PortFilter) AddACL

func (f *PortFilter) AddACL(acl string)

func (*PortFilter) AddAllowedDstTcpPorts

func (f *PortFilter) AddAllowedDstTcpPorts(ports []uint16)

func (*PortFilter) AddAllowedDstUdpPorts

func (f *PortFilter) AddAllowedDstUdpPorts(ports []uint16)

func (*PortFilter) AddAllowedICMPType

func (f *PortFilter) AddAllowedICMPType(types []byte)

func (*PortFilter) AddAllowedSrcTcpPorts

func (f *PortFilter) AddAllowedSrcTcpPorts(ports []uint16)

func (*PortFilter) AddAllowedSrcUdpPorts

func (f *PortFilter) AddAllowedSrcUdpPorts(ports []uint16)

func (*PortFilter) AddDenyDstTcpPorts

func (f *PortFilter) AddDenyDstTcpPorts(ports []uint16)

func (*PortFilter) AddDenyDstUdpPorts

func (f *PortFilter) AddDenyDstUdpPorts(ports []uint16)

func (*PortFilter) AddDenyICMPType

func (f *PortFilter) AddDenyICMPType(types []byte)

func (*PortFilter) AddDenySrcTcpPorts

func (f *PortFilter) AddDenySrcTcpPorts(ports []uint16)

func (*PortFilter) AddDenySrcUdpPorts

func (f *PortFilter) AddDenySrcUdpPorts(ports []uint16)

func (*PortFilter) Pass

func (f *PortFilter) Pass(p []byte) error

Jump to

Keyboard shortcuts

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