prefilter

package
v0.0.0-...-c34bea4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 10 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

This section is empty.

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