Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var All = []Hook{Ingress, Egress, XDP}
View Source
var ProgramsMapParameters = maps.MapParameters{
Type: "prog_array",
KeySize: 4,
ValueSize: 4,
MaxEntries: maxPrograms,
Name: "cali_progs",
Version: 3,
}
Functions ¶
func NewProgramsMap ¶
func NewXDPProgramsMap ¶
Types ¶
type AttachType ¶
type AttachType struct { Hook Hook Family int Type tcdefs.EndpointType LogLevel string FIB bool ToHostDrop bool DSR bool }
func ListAttachTypes ¶
func ListAttachTypes() []AttachType
func (AttachType) DefaultPolicy ¶
func (at AttachType) DefaultPolicy() DefPolicy
func (AttachType) ObjectFile ¶
func (at AttachType) ObjectFile() string
type Hook ¶
type Hook int
Hook is the hook to which a BPF program should be attached. This is relative to the host namespace so workload PolDirnIngress policy is attached to the HookEgress.
func StringToHook ¶
type Layout ¶
Layout maps sub-programs of an object to their location in the ProgramsMap
func MergeLayouts ¶
type ProgramsMap ¶
func (*ProgramsMap) Count ¶
func (pm *ProgramsMap) Count() int
Count returns how many slots are allocated.
func (*ProgramsMap) LoadObj ¶
func (pm *ProgramsMap) LoadObj(at AttachType) (Layout, error)
func (*ProgramsMap) Programs ¶
func (pm *ProgramsMap) Programs() map[AttachType]Layout
func (*ProgramsMap) ResetCount ¶
func (pm *ProgramsMap) ResetCount()
ResetCount for unittesting only.
type SubProg ¶
type SubProg int
const ( SubProgTCMain SubProg = iota SubProgTCPolicy SubProgTCAllowed SubProgTCIcmp SubProgTCDrop SubProgTCHostCtConflict SubProgIcmpInnerNat SubProgNewFlow SubProgTCMainDebug SubProgXDPMain = SubProgTCMain SubProgXDPPolicy = SubProgTCPolicy SubProgXDPAllowed = SubProgTCAllowed SubProgXDPDrop = SubProgTCDrop )
Click to show internal directories.
Click to hide internal directories.