Documentation ¶
Index ¶
- Constants
- Variables
- func EnsureExists(m maps.Map, ifindex int, hook hook.Hook) error
- func Flush(m maps.Map, ifindex int, hook hook.Hook) error
- func Map() maps.Map
- func PolicyMap() maps.Map
- func PolicyMapMemIter(m PolicyMapMem) func(k, v []byte)
- func Read(m maps.Map, ifindex int, hook hook.Hook) ([]uint64, error)
- type DescList
- type Description
- type Key
- type PolicyMapMem
Constants ¶
View Source
const ( TotalPackets = iota AcceptedByFailsafe AcceptedByPolicy AcceptedByAnotherProgram DroppedByPolicy DroppedShortPacket DroppedFailedCSUM DroppedIPOptions DroppedIPMalformed DroppedFailedEncap DroppedFailedDecap DroppedUnauthSource DroppedUnknownRoute DroppedBlackholeRoute SourceCollisionHit SourceCollisionResolutionFailed ConntrackCreateFailed )
The following values are used as index to counters map, and should be kept in sync with constants defined in bpf-gpl/reasons.h.
View Source
const (
MaxCounterNumber int = 17
)
View Source
const PolicyMapKeySize = 8
View Source
const PolicyMapValueSize = 8
Variables ¶
View Source
var MapParameters = maps.MapParameters{ Type: "percpu_hash", KeySize: counterMapKeySize, ValueSize: counterMapValueSize * MaxCounterNumber, MaxEntries: 20000, Name: "cali_counters", Version: 3, }
View Source
var PolicyMapParameters = maps.MapParameters{ Type: "percpu_hash", KeySize: PolicyMapKeySize, ValueSize: PolicyMapValueSize, MaxEntries: 10000, Name: "cali_rule_ctrs", Version: 2, }
Functions ¶
func PolicyMapMemIter ¶
func PolicyMapMemIter(m PolicyMapMem) func(k, v []byte)
PolicyMapMemIter returns maps.MapIter that loads the provided PolicyMapMem
Types ¶
type Description ¶
type PolicyMapMem ¶
func LoadPolicyMap ¶
func LoadPolicyMap(m maps.Map) (PolicyMapMem, error)
Click to show internal directories.
Click to hide internal directories.