ipmasq

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPMasqAgent

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

IPMasqAgent represents a state of the ip-masq-agent

func NewIPMasqAgent

func NewIPMasqAgent(configPath string) (*IPMasqAgent, error)

func (*IPMasqAgent) Start

func (a *IPMasqAgent) Start()

Start starts the ip-masq-agent goroutine which tracks the config file and updates the BPF map accordingly.

func (*IPMasqAgent) Stop

func (a *IPMasqAgent) Stop()

Stop stops the ip-masq-agent goroutine and the watcher.

func (*IPMasqAgent) Update

func (a *IPMasqAgent) Update() error

Update updates the ipmasq BPF map entries with ones from the config file.

type IPMasqMap

type IPMasqMap interface {
	Update(cidr net.IPNet) error
	Delete(cidr net.IPNet) error
	Dump() ([]net.IPNet, error)
}

IPMasqMap is an interface describing methods for manipulating an ipmasq map

type Ipnet

type Ipnet net.IPNet

ipnet is a wrapper type for net.IPNet to enable de-serialization of CIDRs

func (*Ipnet) UnmarshalJSON

func (c *Ipnet) UnmarshalJSON(json []byte) error

Jump to

Keyboard shortcuts

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