Documentation
¶
Index ¶
- Constants
- func CreateQDisc(ifName string) error
- func DetachClassifier(ifindex, handle, pref int, ingress bool) error
- func DetachXDP(ifName string, mode uint) error
- func GetXDPProgramID(ifName string) (int, error)
- func NumPossibleCPUs() (int, error)
- func ObjGet(path string) (int, error)
- func ObjPin(fd int, path string) error
- func QueryClassifier(ifindex, handle, pref int, ingress bool) (int, error)
- func RemoveQDisc(ifName string) error
- type CTCleanupGlobalData
- type CTLBGlobalData
- type GlobalData
- type Link
- type Map
- func (m *Map) IsJumpMap() bool
- func (m *Map) IsMapInternal() bool
- func (m *Map) KeySize() int
- func (m *Map) MaxEntries() int
- func (m *Map) Name() string
- func (m *Map) NextMap() (*Map, error)
- func (m *Map) SetPinPath(path string) error
- func (m *Map) SetSize(size int) error
- func (m *Map) Type() int
- func (m *Map) ValueSize() int
- type Obj
- func (o *Obj) AttachCGroup(cgroup, progName string) (*Link, error)
- func (o *Obj) AttachClassifier(secName, ifName string, ingress bool, prio int) (int, int, int, error)
- func (o *Obj) AttachXDP(ifName, progName string, oldID int, mode uint) (int, error)
- func (o *Obj) Close() error
- func (o *Obj) FirstMap() (*Map, error)
- func (o *Obj) Load() error
- func (o *Obj) Pin(path string) error
- func (o *Obj) PinMaps(path string) error
- func (o *Obj) PinPrograms(path string) error
- func (o *Obj) ProgramFD(secname string) (int, error)
- func (o *Obj) Unpin(path string) error
- func (o *Obj) UnpinPrograms(path string) error
- func (o *Obj) UpdateJumpMap(mapName, progName string, mapIndex int) error
- type QdiskHook
- type TcGlobalData
- type XDPGlobalData
Constants ¶
View Source
const ( // Set when IPv6 is enabled to configure bpf dataplane accordingly GlobalsRPFOptionEnabled uint32 = C.CALI_GLOBALS_RPF_OPTION_ENABLED GlobalsRPFOptionStrict uint32 = C.CALI_GLOBALS_RPF_OPTION_STRICT GlobalsNoDSRCidrs uint32 = C.CALI_GLOBALS_NO_DSR_CIDRS GlobalsLoUDPOnly uint32 = C.CALI_GLOBALS_LO_UDP_ONLY GlobalsRedirectPeer uint32 = C.CALI_GLOBALS_REDIRECT_PEER GlobalsFlowLogsEnabled uint32 = C.CALI_GLOBALS_FLOWLOGS_ENABLED )
Variables ¶
This section is empty.
Functions ¶
func CreateQDisc ¶
func DetachClassifier ¶
func GetXDPProgramID ¶
func NumPossibleCPUs ¶
func RemoveQDisc ¶
Types ¶
type CTCleanupGlobalData ¶
type CTCleanupGlobalData struct { CreationGracePeriod time.Duration TCPSynSent time.Duration TCPEstablished time.Duration TCPFinsSeen time.Duration TCPResetSeen time.Duration UDPTimeout time.Duration GenericTimeout time.Duration ICMPTimeout time.Duration }
func (*CTCleanupGlobalData) Set ¶
func (c *CTCleanupGlobalData) Set(m *Map) error
type CTLBGlobalData ¶
func (*CTLBGlobalData) Set ¶
func (c *CTLBGlobalData) Set(m *Map) error
type GlobalData ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func (*Map) IsMapInternal ¶
func (*Map) MaxEntries ¶
func (*Map) NextMap ¶
NextMap returns the successive maps given the first map. Returns nil, no error at the end of the list.
func (*Map) SetPinPath ¶
type Obj ¶
type Obj struct {
// contains filtered or unexported fields
}
func OpenObject ¶
func (*Obj) AttachClassifier ¶
func (o *Obj) AttachClassifier(secName, ifName string, ingress bool, prio int) (int, int, int, error)
AttachClassifier return the program id and pref and handle of the qdisc
func (*Obj) FirstMap ¶
FirstMap returns first bpf map of the object. Returns error if the map is nil.
func (*Obj) PinPrograms ¶
func (*Obj) UnpinPrograms ¶
type TcGlobalData ¶
type TcGlobalData struct { IfaceName string HostIPv4 [16]byte IntfIPv4 [16]byte ExtToSvcMark uint32 Tmtu uint16 VxlanPort uint16 PSNatStart uint16 PSNatLen uint16 HostTunnelIPv4 [16]byte Flags uint32 WgPort uint16 Wg6Port uint16 Profiling uint16 NatIn uint32 NatOut uint32 LogFilterJmp uint32 Jumps [40]uint32 HostIPv6 [16]byte IntfIPv6 [16]byte HostTunnelIPv6 [16]byte JumpsV6 [40]uint32 }
func (*TcGlobalData) Set ¶
func (t *TcGlobalData) Set(m *Map) error
type XDPGlobalData ¶
func (*XDPGlobalData) Set ¶
func (x *XDPGlobalData) Set(m *Map) error
Click to show internal directories.
Click to hide internal directories.