worldcidrsmap

package
v1.14.7 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

+groupName=maps

Index

Constants

View Source
const (
	MapMaxEntries = 1 << 14
	MapName4      = "cilium_world_cidrs4"
)

Variables

View Source
var (
	WorldCIDRsMap *worldCIDRsMap
)

Functions

func InitWorldCIDRsMap

func InitWorldCIDRsMap() error

InitWorldCIDRsMap initializes the world CIDRs map.

func OpenWorldCIDRsMap

func OpenWorldCIDRsMap() error

OpenWorldCIDRsMap initializes the world CIDRs map.

Types

type WorldCIDRKey4

type WorldCIDRKey4 struct {
	// PrefixLen is full 32 bits of mask bits
	PrefixLen uint32
	IP        types.IPv4
}

WorldCIDRKey4 is the key of a world CIDRs map.

func NewWorldCIDRKey4

func NewWorldCIDRKey4(cidr *net.IPNet) WorldCIDRKey4

func (*WorldCIDRKey4) GetCIDR

func (k *WorldCIDRKey4) GetCIDR() *net.IPNet

func (*WorldCIDRKey4) Matches

func (k *WorldCIDRKey4) Matches(cidr *net.IPNet) bool

Matches returns true if the cidr parameter matches the world CIDR key.

type WorldCIDRVal

type WorldCIDRVal struct {
	Exists uint8
}

WorldCIDRVal is the value of world CIDRs maps.

func NewWorldCIDRVal

func NewWorldCIDRVal() WorldCIDRVal

type WorldCIDRsIterateCallback

type WorldCIDRsIterateCallback func(*WorldCIDRKey4, *WorldCIDRVal)

WorldCIDRsIterateCallback represents the signature of the callback function expected by the IterateWithCallback method, which in turn is used to iterate all the keys/values of a world CIDR map.

Jump to

Keyboard shortcuts

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