Documentation
¶
Overview ¶
+groupName=maps
Index ¶
- Constants
- Variables
- type Backend
- type Backend4
- type Backend4Key
- func (in *Backend4Key) DeepCopy() *Backend4Key
- func (in *Backend4Key) DeepCopyInto(out *Backend4Key)
- func (in *Backend4Key) DeepCopyMapKey() bpf.MapKey
- func (k *Backend4Key) GetID() loadbalancer.BackendID
- func (k *Backend4Key) GetKeyPtr() unsafe.Pointer
- func (k *Backend4Key) Map() *bpf.Map
- func (k *Backend4Key) NewValue() bpf.MapValue
- func (k *Backend4Key) SetID(id loadbalancer.BackendID)
- func (k *Backend4Key) String() string
- type Backend4Value
- func (in *Backend4Value) DeepCopy() *Backend4Value
- func (in *Backend4Value) DeepCopyInto(out *Backend4Value)
- func (in *Backend4Value) DeepCopyMapValue() bpf.MapValue
- func (b *Backend4Value) GetAddress() net.IP
- func (b *Backend4Value) GetPort() uint16
- func (v *Backend4Value) GetValuePtr() unsafe.Pointer
- func (v *Backend4Value) String() string
- func (v *Backend4Value) ToHost() BackendValue
- func (v *Backend4Value) ToNetwork() BackendValue
- type Backend6
- type Backend6Key
- func (in *Backend6Key) DeepCopy() *Backend6Key
- func (in *Backend6Key) DeepCopyInto(out *Backend6Key)
- func (in *Backend6Key) DeepCopyMapKey() bpf.MapKey
- func (k *Backend6Key) GetID() loadbalancer.BackendID
- func (k *Backend6Key) GetKeyPtr() unsafe.Pointer
- func (k *Backend6Key) Map() *bpf.Map
- func (k *Backend6Key) NewValue() bpf.MapValue
- func (k *Backend6Key) SetID(id loadbalancer.BackendID)
- func (k *Backend6Key) String() string
- type Backend6Value
- func (in *Backend6Value) DeepCopy() *Backend6Value
- func (in *Backend6Value) DeepCopyInto(out *Backend6Value)
- func (in *Backend6Value) DeepCopyMapValue() bpf.MapValue
- func (b *Backend6Value) GetAddress() net.IP
- func (b *Backend6Value) GetPort() uint16
- func (v *Backend6Value) GetValuePtr() unsafe.Pointer
- func (v *Backend6Value) String() string
- func (v *Backend6Value) ToHost() BackendValue
- func (v *Backend6Value) ToNetwork() BackendValue
- type BackendKey
- type BackendValue
- type LBBPFMap
- func (*LBBPFMap) AddBackend(id uint16, ip net.IP, port uint16, ipv6 bool) error
- func (*LBBPFMap) DeleteBackendByID(id uint16, ipv6 bool) error
- func (*LBBPFMap) DeleteService(svc loadbalancer.L3n4AddrID, backendCount int) error
- func (*LBBPFMap) DumpBackendMaps() ([]*loadbalancer.Backend, error)
- func (*LBBPFMap) DumpServiceMaps() ([]*loadbalancer.SVC, []error)
- func (*LBBPFMap) UpsertService(svcID uint16, svcIP net.IP, svcPort uint16, backendIDs []uint16, ...) error
- type LBMockMap
- func (m *LBMockMap) AddBackend(id uint16, ip net.IP, port uint16, ipv6 bool) error
- func (m *LBMockMap) DeleteBackendByID(id uint16, ipv6 bool) error
- func (m *LBMockMap) DeleteService(addr lb.L3n4AddrID, backendCount int) error
- func (m *LBMockMap) DumpBackendMaps() ([]*lb.Backend, error)
- func (m *LBMockMap) DumpServiceMaps() ([]*lb.SVC, []error)
- func (m *LBMockMap) UpsertService(id uint16, ip net.IP, port uint16, backendIDs []uint16, prevCount int, ...) error
- type RevNat4Key
- func (in *RevNat4Key) DeepCopy() *RevNat4Key
- func (in *RevNat4Key) DeepCopyInto(out *RevNat4Key)
- func (in *RevNat4Key) DeepCopyMapKey() bpf.MapKey
- func (k *RevNat4Key) GetKey() uint16
- func (k *RevNat4Key) GetKeyPtr() unsafe.Pointer
- func (k *RevNat4Key) Map() *bpf.Map
- func (k *RevNat4Key) NewValue() bpf.MapValue
- func (k *RevNat4Key) String() string
- func (k *RevNat4Key) ToHost() RevNatKey
- func (k *RevNat4Key) ToNetwork() RevNatKey
- type RevNat4Value
- func (in *RevNat4Value) DeepCopy() *RevNat4Value
- func (in *RevNat4Value) DeepCopyInto(out *RevNat4Value)
- func (in *RevNat4Value) DeepCopyMapValue() bpf.MapValue
- func (v *RevNat4Value) GetValuePtr() unsafe.Pointer
- func (v *RevNat4Value) String() string
- func (k *RevNat4Value) ToHost() RevNatValue
- func (v *RevNat4Value) ToNetwork() RevNatValue
- type RevNat6Key
- func (in *RevNat6Key) DeepCopy() *RevNat6Key
- func (in *RevNat6Key) DeepCopyInto(out *RevNat6Key)
- func (in *RevNat6Key) DeepCopyMapKey() bpf.MapKey
- func (v *RevNat6Key) GetKey() uint16
- func (v *RevNat6Key) GetKeyPtr() unsafe.Pointer
- func (v *RevNat6Key) Map() *bpf.Map
- func (v *RevNat6Key) NewValue() bpf.MapValue
- func (v *RevNat6Key) String() string
- func (v *RevNat6Key) ToHost() RevNatKey
- func (v *RevNat6Key) ToNetwork() RevNatKey
- type RevNat6Value
- func (in *RevNat6Value) DeepCopy() *RevNat6Value
- func (in *RevNat6Value) DeepCopyInto(out *RevNat6Value)
- func (in *RevNat6Value) DeepCopyMapValue() bpf.MapValue
- func (v *RevNat6Value) GetValuePtr() unsafe.Pointer
- func (v *RevNat6Value) String() string
- func (v *RevNat6Value) ToHost() RevNatValue
- func (v *RevNat6Value) ToNetwork() RevNatValue
- type RevNatKey
- type RevNatValue
- type Service4Key
- func (in *Service4Key) DeepCopy() *Service4Key
- func (in *Service4Key) DeepCopyInto(out *Service4Key)
- func (in *Service4Key) DeepCopyMapKey() bpf.MapKey
- func (k *Service4Key) GetAddress() net.IP
- func (k *Service4Key) GetKeyPtr() unsafe.Pointer
- func (k *Service4Key) GetPort() uint16
- func (k *Service4Key) GetSlave() int
- func (k *Service4Key) IsIPv6() bool
- func (k *Service4Key) Map() *bpf.Map
- func (k *Service4Key) MapDelete() error
- func (k *Service4Key) NewValue() bpf.MapValue
- func (k *Service4Key) RevNatValue() RevNatValue
- func (k *Service4Key) SetSlave(slave int)
- func (k *Service4Key) String() string
- func (k *Service4Key) ToHost() ServiceKey
- func (k *Service4Key) ToNetwork() ServiceKey
- type Service4Value
- func (in *Service4Value) DeepCopy() *Service4Value
- func (in *Service4Value) DeepCopyInto(out *Service4Value)
- func (in *Service4Value) DeepCopyMapValue() bpf.MapValue
- func (s *Service4Value) GetBackendID() loadbalancer.BackendID
- func (s *Service4Value) GetCount() int
- func (s *Service4Value) GetFlags() uint8
- func (s *Service4Value) GetRevNat() int
- func (s *Service4Value) GetValuePtr() unsafe.Pointer
- func (s *Service4Value) RevNatKey() RevNatKey
- func (s *Service4Value) SetBackendID(id loadbalancer.BackendID)
- func (s *Service4Value) SetCount(count int)
- func (s *Service4Value) SetFlags(flags uint8)
- func (s *Service4Value) SetRevNat(id int)
- func (s *Service4Value) String() string
- func (s *Service4Value) ToHost() ServiceValue
- func (s *Service4Value) ToNetwork() ServiceValue
- type Service6Key
- func (in *Service6Key) DeepCopy() *Service6Key
- func (in *Service6Key) DeepCopyInto(out *Service6Key)
- func (in *Service6Key) DeepCopyMapKey() bpf.MapKey
- func (k *Service6Key) GetAddress() net.IP
- func (k *Service6Key) GetKeyPtr() unsafe.Pointer
- func (k *Service6Key) GetPort() uint16
- func (k *Service6Key) GetSlave() int
- func (k *Service6Key) IsIPv6() bool
- func (k *Service6Key) Map() *bpf.Map
- func (k *Service6Key) MapDelete() error
- func (k *Service6Key) NewValue() bpf.MapValue
- func (k *Service6Key) RevNatValue() RevNatValue
- func (k *Service6Key) SetSlave(slave int)
- func (k *Service6Key) String() string
- func (k *Service6Key) ToHost() ServiceKey
- func (k *Service6Key) ToNetwork() ServiceKey
- type Service6Value
- func (in *Service6Value) DeepCopy() *Service6Value
- func (in *Service6Value) DeepCopyInto(out *Service6Value)
- func (in *Service6Value) DeepCopyMapValue() bpf.MapValue
- func (s *Service6Value) GetBackendID() loadbalancer.BackendID
- func (s *Service6Value) GetCount() int
- func (s *Service6Value) GetFlags() uint8
- func (s *Service6Value) GetRevNat() int
- func (s *Service6Value) GetValuePtr() unsafe.Pointer
- func (s *Service6Value) RevNatKey() RevNatKey
- func (s *Service6Value) SetBackendID(id loadbalancer.BackendID)
- func (s *Service6Value) SetCount(count int)
- func (s *Service6Value) SetFlags(flags uint8)
- func (s *Service6Value) SetRevNat(id int)
- func (s *Service6Value) String() string
- func (s *Service6Value) ToHost() ServiceValue
- func (s *Service6Value) ToNetwork() ServiceValue
- type ServiceKey
- type ServiceValue
Constants ¶
const (
// Maximum number of entries in each hashtable
MaxEntries = 65536
)
Variables ¶
var ( Service4MapV2 = bpf.NewMap("cilium_lb4_services_v2", bpf.MapTypeHash, &Service4Key{}, int(unsafe.Sizeof(Service4Key{})), &Service4Value{}, int(unsafe.Sizeof(Service4Value{})), MaxEntries, 0, 0, bpf.ConvertKeyValue, ).WithCache() Backend4Map = bpf.NewMap("cilium_lb4_backends", bpf.MapTypeHash, &Backend4Key{}, int(unsafe.Sizeof(Backend4Key{})), &Backend4Value{}, int(unsafe.Sizeof(Backend4Value{})), MaxEntries, 0, 0, bpf.ConvertKeyValue, ).WithCache() RevNat4Map = bpf.NewMap("cilium_lb4_reverse_nat", bpf.MapTypeHash, &RevNat4Key{}, int(unsafe.Sizeof(RevNat4Key{})), &RevNat4Value{}, int(unsafe.Sizeof(RevNat4Value{})), MaxEntries, 0, 0, bpf.ConvertKeyValue, ).WithCache() )
var ( Service6MapV2 = bpf.NewMap("cilium_lb6_services_v2", bpf.MapTypeHash, &Service6Key{}, int(unsafe.Sizeof(Service6Key{})), &Service6Value{}, int(unsafe.Sizeof(Service6Value{})), MaxEntries, 0, 0, bpf.ConvertKeyValue, ).WithCache() Backend6Map = bpf.NewMap("cilium_lb6_backends", bpf.MapTypeHash, &Backend6Key{}, int(unsafe.Sizeof(Backend6Key{})), &Backend6Value{}, int(unsafe.Sizeof(Backend6Value{})), MaxEntries, 0, 0, bpf.ConvertKeyValue, ).WithCache() // RevNat6Map represents the BPF map for reverse NAT in IPv6 load balancer RevNat6Map = bpf.NewMap("cilium_lb6_reverse_nat", bpf.MapTypeHash, &RevNat6Key{}, int(unsafe.Sizeof(RevNat6Key{})), &RevNat6Value{}, int(unsafe.Sizeof(RevNat6Value{})), MaxEntries, 0, 0, bpf.ConvertKeyValue, ).WithCache() )
Functions ¶
This section is empty.
Types ¶
type Backend ¶ added in v0.15.7
type Backend interface {
// Return the BPF map matching the type
Map() *bpf.Map
// Get key of the backend entry
GetKey() BackendKey
// Get value of the backend entry
GetValue() BackendValue
}
Backend is the interface describing protocol independent backend used by services v2.
type Backend4 ¶ added in v0.15.7
type Backend4 struct {
Key *Backend4Key
Value *Backend4Value
}
func NewBackend4 ¶ added in v1.5.0
func (*Backend4) GetKey ¶ added in v0.15.7
func (b *Backend4) GetKey() BackendKey
func (*Backend4) GetValue ¶ added in v0.15.7
func (b *Backend4) GetValue() BackendValue
type Backend4Key ¶ added in v0.15.7
type Backend4Key struct {
ID loadbalancer.BackendID
}
+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey
func NewBackend4Key ¶ added in v1.5.0
func NewBackend4Key(id loadbalancer.BackendID) *Backend4Key
func (*Backend4Key) DeepCopy ¶ added in v1.5.1
func (in *Backend4Key) DeepCopy() *Backend4Key
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backend4Key.
func (*Backend4Key) DeepCopyInto ¶ added in v1.5.1
func (in *Backend4Key) DeepCopyInto(out *Backend4Key)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Backend4Key) DeepCopyMapKey ¶ added in v1.5.1
func (in *Backend4Key) DeepCopyMapKey() bpf.MapKey
DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
func (*Backend4Key) GetID ¶ added in v0.15.7
func (k *Backend4Key) GetID() loadbalancer.BackendID
func (*Backend4Key) GetKeyPtr ¶ added in v1.5.0
func (k *Backend4Key) GetKeyPtr() unsafe.Pointer
func (*Backend4Key) Map ¶ added in v0.15.7
func (k *Backend4Key) Map() *bpf.Map
func (*Backend4Key) NewValue ¶ added in v1.5.0
func (k *Backend4Key) NewValue() bpf.MapValue
func (*Backend4Key) SetID ¶ added in v0.15.7
func (k *Backend4Key) SetID(id loadbalancer.BackendID)
func (*Backend4Key) String ¶ added in v0.15.7
func (k *Backend4Key) String() string
type Backend4Value ¶ added in v0.15.7
type Backend4Value struct {
Address types.IPv4 `align:"address"`
Port uint16 `align:"port"`
Proto u8proto.U8proto `align:"proto"`
Pad uint8 `align:"pad"`
}
Backend4Value must match 'struct lb4_backend' in "bpf/lib/common.h". +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue
func NewBackend4Value ¶ added in v0.15.7
func (*Backend4Value) DeepCopy ¶ added in v1.5.1
func (in *Backend4Value) DeepCopy() *Backend4Value
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backend4Value.
func (*Backend4Value) DeepCopyInto ¶ added in v1.5.1
func (in *Backend4Value) DeepCopyInto(out *Backend4Value)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Backend4Value) DeepCopyMapValue ¶ added in v1.5.1
func (in *Backend4Value) DeepCopyMapValue() bpf.MapValue
DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.
func (*Backend4Value) GetAddress ¶ added in v0.15.7
func (b *Backend4Value) GetAddress() net.IP
func (*Backend4Value) GetPort ¶ added in v0.15.7
func (b *Backend4Value) GetPort() uint16
func (*Backend4Value) GetValuePtr ¶ added in v1.5.0
func (v *Backend4Value) GetValuePtr() unsafe.Pointer
func (*Backend4Value) String ¶ added in v0.15.7
func (v *Backend4Value) String() string
func (*Backend4Value) ToHost ¶ added in v0.15.7
func (v *Backend4Value) ToHost() BackendValue
ToHost converts Backend4Value to host byte order.
func (*Backend4Value) ToNetwork ¶ added in v0.15.7
func (v *Backend4Value) ToNetwork() BackendValue
type Backend6 ¶ added in v0.15.7
type Backend6 struct {
Key *Backend6Key
Value *Backend6Value
}
func NewBackend6 ¶ added in v1.5.0
func (*Backend6) GetKey ¶ added in v0.15.7
func (b *Backend6) GetKey() BackendKey
func (*Backend6) GetValue ¶ added in v0.15.7
func (b *Backend6) GetValue() BackendValue
type Backend6Key ¶ added in v0.15.7
type Backend6Key struct {
ID loadbalancer.BackendID
}
+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey
func NewBackend6Key ¶ added in v1.5.0
func NewBackend6Key(id loadbalancer.BackendID) *Backend6Key
func (*Backend6Key) DeepCopy ¶ added in v1.5.1
func (in *Backend6Key) DeepCopy() *Backend6Key
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backend6Key.
func (*Backend6Key) DeepCopyInto ¶ added in v1.5.1
func (in *Backend6Key) DeepCopyInto(out *Backend6Key)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Backend6Key) DeepCopyMapKey ¶ added in v1.5.1
func (in *Backend6Key) DeepCopyMapKey() bpf.MapKey
DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
func (*Backend6Key) GetID ¶ added in v0.15.7
func (k *Backend6Key) GetID() loadbalancer.BackendID
func (*Backend6Key) GetKeyPtr ¶ added in v1.5.0
func (k *Backend6Key) GetKeyPtr() unsafe.Pointer
func (*Backend6Key) Map ¶ added in v0.15.7
func (k *Backend6Key) Map() *bpf.Map
func (*Backend6Key) NewValue ¶ added in v1.5.0
func (k *Backend6Key) NewValue() bpf.MapValue
func (*Backend6Key) SetID ¶ added in v0.15.7
func (k *Backend6Key) SetID(id loadbalancer.BackendID)
func (*Backend6Key) String ¶ added in v0.15.7
func (k *Backend6Key) String() string
type Backend6Value ¶ added in v0.15.7
type Backend6Value struct {
Address types.IPv6 `align:"address"`
Port uint16 `align:"port"`
Proto u8proto.U8proto `align:"proto"`
Pad uint8 `align:"pad"`
}
Backend6Value must match 'struct lb6_backend' in "bpf/lib/common.h". +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue
func NewBackend6Value ¶ added in v0.15.7
func (*Backend6Value) DeepCopy ¶ added in v1.5.1
func (in *Backend6Value) DeepCopy() *Backend6Value
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backend6Value.
func (*Backend6Value) DeepCopyInto ¶ added in v1.5.1
func (in *Backend6Value) DeepCopyInto(out *Backend6Value)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Backend6Value) DeepCopyMapValue ¶ added in v1.5.1
func (in *Backend6Value) DeepCopyMapValue() bpf.MapValue
DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.
func (*Backend6Value) GetAddress ¶ added in v0.15.7
func (b *Backend6Value) GetAddress() net.IP
func (*Backend6Value) GetPort ¶ added in v0.15.7
func (b *Backend6Value) GetPort() uint16
func (*Backend6Value) GetValuePtr ¶ added in v1.5.0
func (v *Backend6Value) GetValuePtr() unsafe.Pointer
func (*Backend6Value) String ¶ added in v0.15.7
func (v *Backend6Value) String() string
func (*Backend6Value) ToHost ¶ added in v0.15.7
func (v *Backend6Value) ToHost() BackendValue
ToHost converts Backend6Value to host byte order.
func (*Backend6Value) ToNetwork ¶ added in v0.15.7
func (v *Backend6Value) ToNetwork() BackendValue
type BackendKey ¶ added in v0.15.7
type BackendKey interface {
bpf.MapKey
// Return the BPF map matching the type
Map() *bpf.Map
// Set backend identifier
SetID(loadbalancer.BackendID)
// Get backend identifier
GetID() loadbalancer.BackendID
}
BackendKey is the interface describing protocol independent backend key.
type BackendValue ¶ added in v0.15.7
type BackendValue interface {
bpf.MapValue
// Get backend address
GetAddress() net.IP
// Get backend port
GetPort() uint16
// Convert fields to network byte order.
ToNetwork() BackendValue
// ToHost converts fields to host byte order.
ToHost() BackendValue
}
BackendValue is the interface describing protocol independent backend value.
type LBBPFMap ¶ added in v0.15.7
type LBBPFMap struct{}
LBBPFMap is an implementation of the LBMap interface.
func (*LBBPFMap) AddBackend ¶ added in v0.15.7
AddBackend adds a backend into a BPF map.
func (*LBBPFMap) DeleteBackendByID ¶ added in v0.15.7
DeleteBackendByID removes a backend identified with the given ID from a BPF map.
func (*LBBPFMap) DeleteService ¶ added in v0.15.7
func (*LBBPFMap) DeleteService(svc loadbalancer.L3n4AddrID, backendCount int) error
DeleteService removes given service from a BPF map.
func (*LBBPFMap) DumpBackendMaps ¶ added in v0.15.7
func (*LBBPFMap) DumpBackendMaps() ([]*loadbalancer.Backend, error)
DumpBackendMaps dumps the backend entries from the BPF maps.
func (*LBBPFMap) DumpServiceMaps ¶ added in v0.15.7
func (*LBBPFMap) DumpServiceMaps() ([]*loadbalancer.SVC, []error)
DumpServiceMaps dumps the services from the BPF maps.
func (*LBBPFMap) UpsertService ¶ added in v0.15.7
func (*LBBPFMap) UpsertService( svcID uint16, svcIP net.IP, svcPort uint16, backendIDs []uint16, prevBackendCount int, ipv6 bool, svcType loadbalancer.SVCType, svcLocal bool) error
UpsertService inserts or updates the given service in a BPF map.
The corresponding backend entries (identified with the given backendIDs) have to exist before calling the function.
The given prevBackendCount denotes a previous service backend entries count, so that the function can remove obsolete ones.
type LBMockMap ¶ added in v1.7.0
func NewLBMockMap ¶ added in v1.7.0
func NewLBMockMap() *LBMockMap
func (*LBMockMap) AddBackend ¶ added in v1.7.0
func (*LBMockMap) DeleteBackendByID ¶ added in v1.7.0
func (*LBMockMap) DeleteService ¶ added in v1.7.0
func (m *LBMockMap) DeleteService(addr lb.L3n4AddrID, backendCount int) error
func (*LBMockMap) DumpBackendMaps ¶ added in v1.7.0
func (*LBMockMap) DumpServiceMaps ¶ added in v1.7.0
type RevNat4Key ¶
type RevNat4Key struct {
Key uint16
}
+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey
func NewRevNat4Key ¶
func NewRevNat4Key(value uint16) *RevNat4Key
func (*RevNat4Key) DeepCopy ¶ added in v1.5.1
func (in *RevNat4Key) DeepCopy() *RevNat4Key
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevNat4Key.
func (*RevNat4Key) DeepCopyInto ¶ added in v1.5.1
func (in *RevNat4Key) DeepCopyInto(out *RevNat4Key)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RevNat4Key) DeepCopyMapKey ¶ added in v1.5.1
func (in *RevNat4Key) DeepCopyMapKey() bpf.MapKey
DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
func (*RevNat4Key) GetKey ¶
func (k *RevNat4Key) GetKey() uint16
func (*RevNat4Key) GetKeyPtr ¶
func (k *RevNat4Key) GetKeyPtr() unsafe.Pointer
func (*RevNat4Key) Map ¶
func (k *RevNat4Key) Map() *bpf.Map
func (*RevNat4Key) NewValue ¶
func (k *RevNat4Key) NewValue() bpf.MapValue
func (*RevNat4Key) String ¶
func (k *RevNat4Key) String() string
func (*RevNat4Key) ToHost ¶ added in v0.15.7
func (k *RevNat4Key) ToHost() RevNatKey
ToHost converts RevNat4Key to host byte order.
func (*RevNat4Key) ToNetwork ¶ added in v0.10.0
func (k *RevNat4Key) ToNetwork() RevNatKey
ToNetwork converts RevNat4Key to network byte order.
type RevNat4Value ¶
+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue
func NewRevNat4Value ¶
func NewRevNat4Value(ip net.IP, port uint16) *RevNat4Value
func (*RevNat4Value) DeepCopy ¶ added in v1.5.1
func (in *RevNat4Value) DeepCopy() *RevNat4Value
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevNat4Value.
func (*RevNat4Value) DeepCopyInto ¶ added in v1.5.1
func (in *RevNat4Value) DeepCopyInto(out *RevNat4Value)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RevNat4Value) DeepCopyMapValue ¶ added in v1.5.1
func (in *RevNat4Value) DeepCopyMapValue() bpf.MapValue
DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.
func (*RevNat4Value) GetValuePtr ¶
func (v *RevNat4Value) GetValuePtr() unsafe.Pointer
func (*RevNat4Value) String ¶
func (v *RevNat4Value) String() string
func (*RevNat4Value) ToHost ¶ added in v0.15.7
func (k *RevNat4Value) ToHost() RevNatValue
ToHost converts RevNat4Value to host byte order.
func (*RevNat4Value) ToNetwork ¶ added in v0.10.0
func (v *RevNat4Value) ToNetwork() RevNatValue
ToNetwork converts RevNat4Value to network byte order.
type RevNat6Key ¶
type RevNat6Key struct {
Key uint16
}
+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey
func NewRevNat6Key ¶
func NewRevNat6Key(value uint16) *RevNat6Key
func (*RevNat6Key) DeepCopy ¶ added in v1.5.1
func (in *RevNat6Key) DeepCopy() *RevNat6Key
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevNat6Key.
func (*RevNat6Key) DeepCopyInto ¶ added in v1.5.1
func (in *RevNat6Key) DeepCopyInto(out *RevNat6Key)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RevNat6Key) DeepCopyMapKey ¶ added in v1.5.1
func (in *RevNat6Key) DeepCopyMapKey() bpf.MapKey
DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
func (*RevNat6Key) GetKey ¶
func (v *RevNat6Key) GetKey() uint16
func (*RevNat6Key) GetKeyPtr ¶
func (v *RevNat6Key) GetKeyPtr() unsafe.Pointer
func (*RevNat6Key) Map ¶
func (v *RevNat6Key) Map() *bpf.Map
func (*RevNat6Key) NewValue ¶
func (v *RevNat6Key) NewValue() bpf.MapValue
func (*RevNat6Key) String ¶
func (v *RevNat6Key) String() string
func (*RevNat6Key) ToHost ¶ added in v0.15.7
func (v *RevNat6Key) ToHost() RevNatKey
ToNetwork converts RevNat6Key to host byte order.
func (*RevNat6Key) ToNetwork ¶ added in v0.10.0
func (v *RevNat6Key) ToNetwork() RevNatKey
ToNetwork converts RevNat6Key to network byte order.
type RevNat6Value ¶
+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue
func NewRevNat6Value ¶
func NewRevNat6Value(ip net.IP, port uint16) *RevNat6Value
func (*RevNat6Value) DeepCopy ¶ added in v1.5.1
func (in *RevNat6Value) DeepCopy() *RevNat6Value
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevNat6Value.
func (*RevNat6Value) DeepCopyInto ¶ added in v1.5.1
func (in *RevNat6Value) DeepCopyInto(out *RevNat6Value)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RevNat6Value) DeepCopyMapValue ¶ added in v1.5.1
func (in *RevNat6Value) DeepCopyMapValue() bpf.MapValue
DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.
func (*RevNat6Value) GetValuePtr ¶
func (v *RevNat6Value) GetValuePtr() unsafe.Pointer
func (*RevNat6Value) String ¶
func (v *RevNat6Value) String() string
func (*RevNat6Value) ToHost ¶ added in v0.15.7
func (v *RevNat6Value) ToHost() RevNatValue
ToNetwork converts RevNat6Value to Host byte order.
func (*RevNat6Value) ToNetwork ¶ added in v0.10.0
func (v *RevNat6Value) ToNetwork() RevNatValue
ToNetwork converts RevNat6Value to network byte order.
type RevNatValue ¶
type RevNatValue interface {
bpf.MapValue
// ToNetwork converts fields to network byte order.
ToNetwork() RevNatValue
// ToHost converts fields to host byte order.
ToHost() RevNatValue
}
type Service4Key ¶
type Service4Key struct {
Address types.IPv4 `align:"address"`
Port uint16 `align:"dport"`
Slave uint16 `align:"slave"`
Proto uint8 `align:"proto"`
Pad pad3uint8 `align:"pad"`
}
Service4Key must match 'struct lb4_key_v2' in "bpf/lib/common.h". +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey
func NewService4Key ¶
func (*Service4Key) DeepCopy ¶ added in v1.5.1
func (in *Service4Key) DeepCopy() *Service4Key
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service4Key.
func (*Service4Key) DeepCopyInto ¶ added in v1.5.1
func (in *Service4Key) DeepCopyInto(out *Service4Key)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Service4Key) DeepCopyMapKey ¶ added in v1.5.1
func (in *Service4Key) DeepCopyMapKey() bpf.MapKey
DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
func (*Service4Key) GetAddress ¶ added in v0.15.7
func (k *Service4Key) GetAddress() net.IP
func (*Service4Key) GetKeyPtr ¶
func (k *Service4Key) GetKeyPtr() unsafe.Pointer
func (*Service4Key) GetPort ¶
func (k *Service4Key) GetPort() uint16
func (*Service4Key) GetSlave ¶ added in v1.7.0
func (k *Service4Key) GetSlave() int
func (*Service4Key) IsIPv6 ¶
func (k *Service4Key) IsIPv6() bool
func (*Service4Key) Map ¶
func (k *Service4Key) Map() *bpf.Map
func (*Service4Key) MapDelete ¶
func (k *Service4Key) MapDelete() error
func (*Service4Key) NewValue ¶
func (k *Service4Key) NewValue() bpf.MapValue
func (*Service4Key) RevNatValue ¶
func (k *Service4Key) RevNatValue() RevNatValue
func (*Service4Key) SetSlave ¶ added in v1.7.0
func (k *Service4Key) SetSlave(slave int)
func (*Service4Key) String ¶
func (k *Service4Key) String() string
func (*Service4Key) ToHost ¶ added in v0.10.0
func (k *Service4Key) ToHost() ServiceKey
ToHost converts Service4Key to host byte order.
func (*Service4Key) ToNetwork ¶ added in v0.10.0
func (k *Service4Key) ToNetwork() ServiceKey
type Service4Value ¶
type Service4Value struct {
BackendID uint32 `align:"backend_id"`
Count uint16 `align:"count"`
RevNat uint16 `align:"rev_nat_index"`
Flags uint8
Pad pad3uint8 `align:"pad"`
}
Service4Value must match 'struct lb4_service_v2' in "bpf/lib/common.h". +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue
func NewService4Value ¶
func NewService4Value(count uint16, backendID loadbalancer.BackendID, revNat uint16) *Service4Value
func (*Service4Value) DeepCopy ¶ added in v1.5.1
func (in *Service4Value) DeepCopy() *Service4Value
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service4Value.
func (*Service4Value) DeepCopyInto ¶ added in v1.5.1
func (in *Service4Value) DeepCopyInto(out *Service4Value)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Service4Value) DeepCopyMapValue ¶ added in v1.5.1
func (in *Service4Value) DeepCopyMapValue() bpf.MapValue
DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.
func (*Service4Value) GetBackendID ¶ added in v0.15.7
func (s *Service4Value) GetBackendID() loadbalancer.BackendID
func (*Service4Value) GetCount ¶
func (s *Service4Value) GetCount() int
func (*Service4Value) GetFlags ¶ added in v0.15.7
func (s *Service4Value) GetFlags() uint8
func (*Service4Value) GetRevNat ¶ added in v0.15.7
func (s *Service4Value) GetRevNat() int
func (*Service4Value) GetValuePtr ¶
func (s *Service4Value) GetValuePtr() unsafe.Pointer
func (*Service4Value) RevNatKey ¶
func (s *Service4Value) RevNatKey() RevNatKey
func (*Service4Value) SetBackendID ¶ added in v0.15.7
func (s *Service4Value) SetBackendID(id loadbalancer.BackendID)
func (*Service4Value) SetCount ¶
func (s *Service4Value) SetCount(count int)
func (*Service4Value) SetFlags ¶ added in v0.15.7
func (s *Service4Value) SetFlags(flags uint8)
func (*Service4Value) SetRevNat ¶
func (s *Service4Value) SetRevNat(id int)
func (*Service4Value) String ¶
func (s *Service4Value) String() string
func (*Service4Value) ToHost ¶ added in v0.10.0
func (s *Service4Value) ToHost() ServiceValue
ToHost converts Service4Value to host byte order.
func (*Service4Value) ToNetwork ¶ added in v0.10.0
func (s *Service4Value) ToNetwork() ServiceValue
type Service6Key ¶
type Service6Key struct {
Address types.IPv6 `align:"address"`
Port uint16 `align:"dport"`
Slave uint16 `align:"slave"`
Proto uint8 `align:"proto"`
Pad pad3uint8 `align:"pad"`
}
Service6Key must match 'struct lb6_key_v2' in "bpf/lib/common.h". +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey
func NewService6Key ¶
func (*Service6Key) DeepCopy ¶ added in v1.5.1
func (in *Service6Key) DeepCopy() *Service6Key
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service6Key.
func (*Service6Key) DeepCopyInto ¶ added in v1.5.1
func (in *Service6Key) DeepCopyInto(out *Service6Key)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Service6Key) DeepCopyMapKey ¶ added in v1.5.1
func (in *Service6Key) DeepCopyMapKey() bpf.MapKey
DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
func (*Service6Key) GetAddress ¶ added in v0.15.7
func (k *Service6Key) GetAddress() net.IP
func (*Service6Key) GetKeyPtr ¶
func (k *Service6Key) GetKeyPtr() unsafe.Pointer
func (*Service6Key) GetPort ¶
func (k *Service6Key) GetPort() uint16
func (*Service6Key) GetSlave ¶ added in v1.7.0
func (k *Service6Key) GetSlave() int
func (*Service6Key) IsIPv6 ¶
func (k *Service6Key) IsIPv6() bool
func (*Service6Key) Map ¶
func (k *Service6Key) Map() *bpf.Map
func (*Service6Key) MapDelete ¶ added in v0.15.7
func (k *Service6Key) MapDelete() error
func (*Service6Key) NewValue ¶
func (k *Service6Key) NewValue() bpf.MapValue
func (*Service6Key) RevNatValue ¶
func (k *Service6Key) RevNatValue() RevNatValue
func (*Service6Key) SetSlave ¶ added in v1.7.0
func (k *Service6Key) SetSlave(slave int)
func (*Service6Key) String ¶
func (k *Service6Key) String() string
func (*Service6Key) ToHost ¶ added in v0.10.0
func (k *Service6Key) ToHost() ServiceKey
ToHost converts Service6Key to host byte order.
func (*Service6Key) ToNetwork ¶ added in v0.10.0
func (k *Service6Key) ToNetwork() ServiceKey
type Service6Value ¶
type Service6Value struct {
BackendID uint32 `align:"backend_id"`
Count uint16 `align:"count"`
RevNat uint16 `align:"rev_nat_index"`
Flags uint8
Pad pad3uint8 `align:"pad"`
}
Service6Value must match 'struct lb6_service_v2' in "bpf/lib/common.h". +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue
func NewService6Value ¶
func NewService6Value(count uint16, backendID loadbalancer.BackendID, revNat uint16) *Service6Value
func (*Service6Value) DeepCopy ¶ added in v1.5.1
func (in *Service6Value) DeepCopy() *Service6Value
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service6Value.
func (*Service6Value) DeepCopyInto ¶ added in v1.5.1
func (in *Service6Value) DeepCopyInto(out *Service6Value)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Service6Value) DeepCopyMapValue ¶ added in v1.5.1
func (in *Service6Value) DeepCopyMapValue() bpf.MapValue
DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.
func (*Service6Value) GetBackendID ¶ added in v0.15.7
func (s *Service6Value) GetBackendID() loadbalancer.BackendID
func (*Service6Value) GetCount ¶
func (s *Service6Value) GetCount() int
func (*Service6Value) GetFlags ¶ added in v0.15.7
func (s *Service6Value) GetFlags() uint8
func (*Service6Value) GetRevNat ¶ added in v0.15.7
func (s *Service6Value) GetRevNat() int
func (*Service6Value) GetValuePtr ¶
func (s *Service6Value) GetValuePtr() unsafe.Pointer
func (*Service6Value) RevNatKey ¶
func (s *Service6Value) RevNatKey() RevNatKey
func (*Service6Value) SetBackendID ¶ added in v0.15.7
func (s *Service6Value) SetBackendID(id loadbalancer.BackendID)
func (*Service6Value) SetCount ¶
func (s *Service6Value) SetCount(count int)
func (*Service6Value) SetFlags ¶ added in v0.15.7
func (s *Service6Value) SetFlags(flags uint8)
func (*Service6Value) SetRevNat ¶
func (s *Service6Value) SetRevNat(id int)
func (*Service6Value) String ¶
func (s *Service6Value) String() string
func (*Service6Value) ToHost ¶ added in v0.10.0
func (s *Service6Value) ToHost() ServiceValue
ToHost converts Service6Value to host byte order.
func (*Service6Value) ToNetwork ¶ added in v0.10.0
func (s *Service6Value) ToNetwork() ServiceValue
type ServiceKey ¶
type ServiceKey interface {
bpf.MapKey
// Return true if the key is of type IPv6
IsIPv6() bool
// Return the BPF map matching the key type
Map() *bpf.Map
// Set slave slot for the key
SetSlave(slave int)
// Get slave slot of the key
GetSlave() int
// Get frontend IP address
GetAddress() net.IP
// Get frontend port
GetPort() uint16
// Returns a RevNatValue matching a ServiceKey
RevNatValue() RevNatValue
// Delete entry identified with the key from the matching map
MapDelete() error
// ToNetwork converts fields to network byte order.
ToNetwork() ServiceKey
// ToHost converts fields to host byte order.
ToHost() ServiceKey
}
ServiceKey is the interface describing protocol independent key for services map v2.
type ServiceValue ¶
type ServiceValue interface {
bpf.MapValue
// Set the number of backends
SetCount(int)
// Get the number of backends
GetCount() int
// Set reverse NAT identifier
SetRevNat(int)
// Get reverse NAT identifier
GetRevNat() int
// Set flags
SetFlags(uint8)
// Get flags
GetFlags() uint8
// Set backend identifier
SetBackendID(id loadbalancer.BackendID)
// Get backend identifier
GetBackendID() loadbalancer.BackendID
// Returns a RevNatKey matching a ServiceValue
RevNatKey() RevNatKey
// Convert fields to network byte order.
ToNetwork() ServiceValue
// ToHost converts fields to host byte order.
ToHost() ServiceValue
}
ServiceValue is the interface describing protocol independent value for services map v2.