firewall

package
v0.0.0-...-9ec06b4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FWRule

type FWRule struct {
	Id          uint32
	Prefix      netip.Prefix
	FromSrcPort uint32
	ToSrcPort   uint32
	FromDstPort uint32
	ToDstPort   uint32
	Protocol    protocols.TransportProtocol
	Count       uint64
}

type FwManager

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

func NewManager

func NewManager(logger *slog.Logger, p *ebpf.Program, ruleMap, dropCounter, advRuleMatcher, advRuleMap *ebpf.Map) *FwManager

func (*FwManager) Delete

func (f *FwManager) Delete(id uint32) error

func (*FwManager) Get

func (f *FwManager) Get() ([]FWRule, error)

func (*FwManager) Set

func (f *FwManager) Set(rule *FWRule) (uint32, error)

Jump to

Keyboard shortcuts

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