Documentation

Index

Constants

View Source
const (
	MapName    = "cilium_cidr_"
	MaxEntries = 16384
)
View Source
const (
	LPM_MAP_VALUE_SIZE = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CIDRMap

type CIDRMap struct {
	Fd        int
	AddrSize  int // max prefix length in bytes, 4 for IPv4, 16 for IPv6
	Prefixlen uint32

	// PrefixIsDynamic determines whether it's valid for entries to have
	// a prefix length that is not equal to the Prefixlen above
	PrefixIsDynamic bool
	// contains filtered or unexported fields
}

    CIDRMap refers to an LPM trie map at 'path'.

    func OpenMapElems

    func OpenMapElems(path string, prefixlen int, prefixdyn bool, maxelem uint32) (*CIDRMap, bool, error)

      OpenMapElems is the same as OpenMap only with defined maxelem as argument.

      func (*CIDRMap) CIDRDump

      func (cm *CIDRMap) CIDRDump(to []string) []string

        CIDRDump walks map 'cm' and dumps all CIDR entries

        func (*CIDRMap) CIDRExists

        func (cm *CIDRMap) CIDRExists(cidr net.IPNet) bool

          CIDRExists returns true if 'cidr' exists in map 'cm'

          func (*CIDRMap) CIDRNext

          func (cm *CIDRMap) CIDRNext(cidr *net.IPNet) *net.IPNet

            CIDRNext returns next CIDR entry in map 'cm'

            func (*CIDRMap) Close

            func (cm *CIDRMap) Close() error

              Close closes the FD of the given CIDRMap

              func (*CIDRMap) DeleteCIDR

              func (cm *CIDRMap) DeleteCIDR(cidr net.IPNet) error

                DeleteCIDR deletes an entry from 'cm' with key 'cidr'.

                func (*CIDRMap) InsertCIDR

                func (cm *CIDRMap) InsertCIDR(cidr net.IPNet) error

                  InsertCIDR inserts an entry to 'cm' with key 'cidr'. Value is currently not used.

                  func (*CIDRMap) String

                  func (cm *CIDRMap) String() string

                    String returns the path of the map.

                    Source Files