ipmasq

package
v1.14.0-snapshot.6 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

View Source
const (
	MapNameIPv4    = "cilium_ipmasq_v4"
	MaxEntriesIPv4 = 16384
	MapNameIPv6    = "cilium_ipmasq_v6"
	MaxEntriesIPv6 = 16384
)

Variables

This section is empty.

Functions

func IPMasq4Map

func IPMasq4Map() *bpf.Map

func IPMasq6Map

func IPMasq6Map() *bpf.Map

Types

type IPMasqBPFMap

type IPMasqBPFMap struct{}

func (*IPMasqBPFMap) Delete

func (*IPMasqBPFMap) Delete(cidr net.IPNet) error

func (*IPMasqBPFMap) Dump

func (*IPMasqBPFMap) Dump() ([]net.IPNet, error)

Dump dumps the contents of the ip-masq-agent maps for IPv4 and/or IPv6, as required based on configuration options.

func (*IPMasqBPFMap) DumpForProtocols

func (*IPMasqBPFMap) DumpForProtocols(ipv4Needed, ipv6Needed bool) ([]net.IPNet, error)

DumpForProtocols dumps the contents of the ip-masq-agent maps for IPv4 and/or IPv6, as requested by the caller. Given that the package does not expose the maps directly, it's necessary to specify which protocol we need when ipMasq4Map/ipMasq6Map, or config options, have not been set, as is the case when calling from the CLI, for example.

func (*IPMasqBPFMap) Update

func (*IPMasqBPFMap) Update(cidr net.IPNet) error

type Key4

type Key4 struct {
	PrefixLen uint32
	Address   types.IPv4
}

func (*Key4) New

func (k *Key4) New() bpf.MapKey

func (*Key4) String

func (k *Key4) String() string

type Key6

type Key6 struct {
	PrefixLen uint32
	Address   types.IPv6
}

func (*Key6) New

func (k *Key6) New() bpf.MapKey

func (*Key6) String

func (k *Key6) String() string

type Value

type Value struct {
	Pad uint8 // not used
}

func (*Value) New

func (v *Value) New() bpf.MapValue

func (*Value) String

func (v *Value) String() string

Jump to

Keyboard shortcuts

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