prefilter

package
v1.5.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package prefilter provides a means of configuring XDP pre-filters for DDoS-mitigation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProbePreFilter

func ProbePreFilter(device, mode string) error

ProbePreFilter checks whether XDP mode is supported on given device

Types

type PreFilter

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

PreFilter holds global info on related CIDR maps participating in prefilter

func NewPreFilter

func NewPreFilter() (*PreFilter, error)

NewPreFilter returns prefilter handle

func (*PreFilter) Delete

func (p *PreFilter) Delete(revision int64, cidrs []net.IPNet) error

Delete deletes slice of CIDRs (doh!) for the latest revision

func (*PreFilter) Dump

func (p *PreFilter) Dump(to []string) ([]string, int64)

Dump dumps revision and CIDRs as string slice of all participating maps

func (*PreFilter) Insert

func (p *PreFilter) Insert(revision int64, cidrs []net.IPNet) error

Insert inserts slice of CIDRs (doh!) for the latest revision

func (*PreFilter) WriteConfig

func (p *PreFilter) WriteConfig(fw io.Writer)

WriteConfig dumps the configuration for the corresponding header file

Jump to

Keyboard shortcuts

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