cilium: github.com/cilium/cilium/pkg/maps/lbmap Index | Files

package lbmap

import "github.com/cilium/cilium/pkg/maps/lbmap"

+groupName=maps

Index

Package Files

affinity.go doc.go ipv4.go ipv6.go lbmap.go lbmap_mock.go types.go zz_generated.deepcopy.go

Constants

const (
    AffinityMatchMapName = "cilium_lb_affinity_match"
    Affinity4MapName     = "cilium_lb4_affinity"
    Affinity6MapName     = "cilium_lb6_affinity"
)
const (
    // SockRevNat4MapName is the BPF map name.
    SockRevNat4MapName = "cilium_lb4_reverse_sk"

    // SockRevNat4MapSize is the maximum number of entries in the BPF map.
    SockRevNat4MapSize = 256 * 1024
)
const (
    // SockRevNat6MapName is the BPF map name.
    SockRevNat6MapName = "cilium_lb6_reverse_sk"

    // SockRevNat6MapSize is the maximum number of entries in the BPF map.
    SockRevNat6MapSize = 256 * 1024
)
const (
    // Maximum number of entries in each hashtable
    MaxEntries = 65536
)
const SizeofSockRevNat6Key = int(unsafe.Sizeof(SockRevNat6Key{}))

SizeofSockRevNat6Key is the size of type SockRevNat6Key.

const SizeofSockRevNat6Value = int(unsafe.Sizeof(SockRevNat6Value{}))

SizeofSockRevNat6Value is the size of type SockRevNat6Value.

Variables

var (
    AffinityMatchMap = bpf.NewMap(
        AffinityMatchMapName,
        bpf.MapTypeHash,
        &AffinityMatchKey{},
        int(unsafe.Sizeof(AffinityMatchKey{})),
        &AffinityMatchValue{},
        int(unsafe.Sizeof(AffinityMatchValue{})),
        MaxEntries,
        0, 0,
        func(key []byte, value []byte, mapKey bpf.MapKey, mapValue bpf.MapValue) (bpf.MapKey, bpf.MapValue, error) {
            aKey, aVal := mapKey.(*AffinityMatchKey), mapValue.(*AffinityMatchValue)

            if _, _, err := bpf.ConvertKeyValue(key, value, aKey, aVal); err != nil {
                return nil, nil, err
            }

            return aKey.ToNetwork(), aVal, nil
        }).WithCache()
    Affinity4Map = bpf.NewMap(
        Affinity4MapName,
        bpf.MapTypeLRUHash,
        &Affinity4Key{},
        int(unsafe.Sizeof(Affinity4Key{})),
        &AffinityValue{},
        int(unsafe.Sizeof(AffinityValue{})),
        MaxEntries,
        0,
        0,
        bpf.ConvertKeyValue,
    )
    Affinity6Map = bpf.NewMap(
        Affinity6MapName,
        bpf.MapTypeLRUHash,
        &Affinity6Key{},
        int(unsafe.Sizeof(Affinity6Key{})),
        &AffinityValue{},
        int(unsafe.Sizeof(AffinityValue{})),
        MaxEntries,
        0,
        0,
        bpf.ConvertKeyValue,
    )
)
var (
    Service4MapV2 = bpf.NewMap("cilium_lb4_services_v2",
        bpf.MapTypeHash,
        &Service4Key{},
        int(unsafe.Sizeof(Service4Key{})),
        &Service4Value{},
        int(unsafe.Sizeof(Service4Value{})),
        MaxEntries,
        0, 0,
        func(key []byte, value []byte, mapKey bpf.MapKey, mapValue bpf.MapValue) (bpf.MapKey, bpf.MapValue, error) {
            svcKey, svcVal := mapKey.(*Service4Key), mapValue.(*Service4Value)

            if _, _, err := bpf.ConvertKeyValue(key, value, svcKey, svcVal); err != nil {
                return nil, nil, err
            }

            return svcKey.ToNetwork(), svcVal.ToNetwork(), nil
        }).WithCache()
    Backend4Map = bpf.NewMap("cilium_lb4_backends",
        bpf.MapTypeHash,
        &Backend4Key{},
        int(unsafe.Sizeof(Backend4Key{})),
        &Backend4Value{},
        int(unsafe.Sizeof(Backend4Value{})),
        MaxEntries,
        0, 0,
        func(key []byte, value []byte, mapKey bpf.MapKey, mapValue bpf.MapValue) (bpf.MapKey, bpf.MapValue, error) {
            backendVal := mapValue.(*Backend4Value)

            if _, _, err := bpf.ConvertKeyValue(key, value, mapKey, backendVal); err != nil {
                return nil, nil, err
            }

            return mapKey, backendVal.ToNetwork(), nil
        }).WithCache()
    RevNat4Map = bpf.NewMap("cilium_lb4_reverse_nat",
        bpf.MapTypeHash,
        &RevNat4Key{},
        int(unsafe.Sizeof(RevNat4Key{})),
        &RevNat4Value{},
        int(unsafe.Sizeof(RevNat4Value{})),
        MaxEntries,
        0, 0,
        func(key []byte, value []byte, mapKey bpf.MapKey, mapValue bpf.MapValue) (bpf.MapKey, bpf.MapValue, error) {
            revKey, revNat := mapKey.(*RevNat4Key), mapValue.(*RevNat4Value)

            if _, _, err := bpf.ConvertKeyValue(key, value, revKey, revNat); err != nil {
                return nil, nil, err
            }

            return revKey.ToNetwork(), revNat.ToNetwork(), nil
        }).WithCache()
)
var (
    Service6MapV2 = bpf.NewMap("cilium_lb6_services_v2",
        bpf.MapTypeHash,
        &Service6Key{},
        int(unsafe.Sizeof(Service6Key{})),
        &Service6Value{},
        int(unsafe.Sizeof(Service6Value{})),
        MaxEntries,
        0, 0,
        func(key []byte, value []byte, mapKey bpf.MapKey, mapValue bpf.MapValue) (bpf.MapKey, bpf.MapValue, error) {
            svcKey, svcVal := mapKey.(*Service6Key), mapValue.(*Service6Value)

            if _, _, err := bpf.ConvertKeyValue(key, value, svcKey, svcVal); err != nil {
                return nil, nil, err
            }

            return svcKey.ToNetwork(), svcVal.ToNetwork(), nil
        }).WithCache()
    Backend6Map = bpf.NewMap("cilium_lb6_backends",
        bpf.MapTypeHash,
        &Backend6Key{},
        int(unsafe.Sizeof(Backend6Key{})),
        &Backend6Value{},
        int(unsafe.Sizeof(Backend6Value{})),
        MaxEntries,
        0, 0,
        func(key []byte, value []byte, mapKey bpf.MapKey, mapValue bpf.MapValue) (bpf.MapKey, bpf.MapValue, error) {
            backendVal := mapValue.(*Backend6Value)

            if _, _, err := bpf.ConvertKeyValue(key, value, mapKey, backendVal); err != nil {
                return nil, nil, err
            }

            return mapKey, backendVal.ToNetwork(), nil
        }).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,
        func(key []byte, value []byte, mapKey bpf.MapKey, mapValue bpf.MapValue) (bpf.MapKey, bpf.MapValue, error) {
            revKey, revNat := mapKey.(*RevNat6Key), mapValue.(*RevNat6Value)

            if _, _, err := bpf.ConvertKeyValue(key, value, revKey, revNat); err != nil {
                return nil, nil, err
            }

            return revKey.ToNetwork(), revNat.ToNetwork(), nil
        }).WithCache()
)
var (
    // MaxSockRevNat4MapEntries is the maximum number of entries in the BPF map.
    // It is set by InitMapInfo(), but unit tests use the initial value below.
    MaxSockRevNat4MapEntries = SockRevNat4MapSize
)
var (
    // MaxSockRevNat6MapEntries is the maximum number of entries in the BPF map.
    // It is set by InitMapInfo(), but unit tests use the initial value below.
    MaxSockRevNat6MapEntries = SockRevNat6MapSize
)

func CreateSockRevNat4Map Uses

func CreateSockRevNat4Map() error

CreateSockRevNat4Map creates the reverse NAT sock map.

func CreateSockRevNat6Map Uses

func CreateSockRevNat6Map() error

CreateSockRevNat6Map creates the reverse NAT sock map.

func InitMapInfo Uses

func InitMapInfo(maxSockRevNatEntries int)

InitMapInfo updates the map info defaults for sock rev nat {4,6} maps.

type Affinity4Key Uses

type Affinity4Key struct {
    ClientID    uint64 `align:"client_id"`
    RevNATID    uint16 `align:"rev_nat_id"`
    NetNSCookie uint8  `align:"netns_cookie"`
    Pad1        uint8  `align:"pad1"`
    Pad2        uint32 `align:"pad2"`
}

Affinity4Key is the Go representation of lb4_affinity_key +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey

func (*Affinity4Key) DeepCopy Uses

func (in *Affinity4Key) DeepCopy() *Affinity4Key

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Affinity4Key.

func (*Affinity4Key) DeepCopyInto Uses

func (in *Affinity4Key) DeepCopyInto(out *Affinity4Key)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Affinity4Key) DeepCopyMapKey Uses

func (in *Affinity4Key) DeepCopyMapKey() bpf.MapKey

DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.

func (*Affinity4Key) GetKeyPtr Uses

func (k *Affinity4Key) GetKeyPtr() unsafe.Pointer

GetKeyPtr returns the unsafe pointer to the BPF key

func (Affinity4Key) NewValue Uses

func (k Affinity4Key) NewValue() bpf.MapValue

NewValue returns a new empty instance of the structure representing the BPF map value.

func (*Affinity4Key) String Uses

func (k *Affinity4Key) String() string

String converts the key into a human readable string format.

type Affinity6Key Uses

type Affinity6Key struct {
    ClientID    types.IPv6 `align:"client_id"`
    RevNATID    uint16     `align:"rev_nat_id"`
    NetNSCookie uint8      `align:"netns_cookie"`
    Pad1        uint8      `align:"pad1"`
    Pad2        uint32     `align:"pad2"`
}

Affinity6Key is the Go representation of lb6_affinity_key +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey

func (*Affinity6Key) DeepCopy Uses

func (in *Affinity6Key) DeepCopy() *Affinity6Key

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Affinity6Key.

func (*Affinity6Key) DeepCopyInto Uses

func (in *Affinity6Key) DeepCopyInto(out *Affinity6Key)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Affinity6Key) DeepCopyMapKey Uses

func (in *Affinity6Key) DeepCopyMapKey() bpf.MapKey

DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.

func (*Affinity6Key) GetKeyPtr Uses

func (k *Affinity6Key) GetKeyPtr() unsafe.Pointer

GetKeyPtr returns the unsafe pointer to the BPF key

func (Affinity6Key) NewValue Uses

func (k Affinity6Key) NewValue() bpf.MapValue

NewValue returns a new empty instance of the structure representing the BPF map value.

func (*Affinity6Key) String Uses

func (k *Affinity6Key) String() string

String converts the key into a human readable string format.

type AffinityMatchKey Uses

type AffinityMatchKey struct {
    BackendID uint32 `align:"backend_id"`
    RevNATID  uint16 `align:"rev_nat_id"`
    Pad       uint16 `align:"pad"`
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey

func NewAffinityMatchKey Uses

func NewAffinityMatchKey(revNATID uint16, backendID uint32) *AffinityMatchKey

NewAffinityMatchKey creates the AffinityMatch key

func (*AffinityMatchKey) DeepCopy Uses

func (in *AffinityMatchKey) DeepCopy() *AffinityMatchKey

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AffinityMatchKey.

func (*AffinityMatchKey) DeepCopyInto Uses

func (in *AffinityMatchKey) DeepCopyInto(out *AffinityMatchKey)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AffinityMatchKey) DeepCopyMapKey Uses

func (in *AffinityMatchKey) DeepCopyMapKey() bpf.MapKey

DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.

func (*AffinityMatchKey) GetKeyPtr Uses

func (k *AffinityMatchKey) GetKeyPtr() unsafe.Pointer

GetKeyPtr returns the unsafe pointer to the BPF key

func (*AffinityMatchKey) NewValue Uses

func (k *AffinityMatchKey) NewValue() bpf.MapValue

NewValue returns a new empty instance of the structure representing the BPF map value

func (*AffinityMatchKey) String Uses

func (k *AffinityMatchKey) String() string

String converts the key into a human readable string format

func (*AffinityMatchKey) ToNetwork Uses

func (k *AffinityMatchKey) ToNetwork() *AffinityMatchKey

ToNetwork returns the key in the network byte order

type AffinityMatchValue Uses

type AffinityMatchValue struct {
    Pad uint8 `align:"pad"`
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue

func (*AffinityMatchValue) DeepCopy Uses

func (in *AffinityMatchValue) DeepCopy() *AffinityMatchValue

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AffinityMatchValue.

func (*AffinityMatchValue) DeepCopyInto Uses

func (in *AffinityMatchValue) DeepCopyInto(out *AffinityMatchValue)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AffinityMatchValue) DeepCopyMapValue Uses

func (in *AffinityMatchValue) DeepCopyMapValue() bpf.MapValue

DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.

func (*AffinityMatchValue) GetValuePtr Uses

func (v *AffinityMatchValue) GetValuePtr() unsafe.Pointer

GetValuePtr returns the unsafe pointer to the BPF value

func (*AffinityMatchValue) String Uses

func (v *AffinityMatchValue) String() string

String converts the value into a human readable string format

type AffinityValue Uses

type AffinityValue struct {
    LastUsed  uint64 `align:"last_used"`
    BackendID uint32 `align:"backend_id"`
    Pad       uint32 `align:"pad"`
}

AffinityValue is the Go representing of lb_affinity_value +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue

func (*AffinityValue) DeepCopy Uses

func (in *AffinityValue) DeepCopy() *AffinityValue

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AffinityValue.

func (*AffinityValue) DeepCopyInto Uses

func (in *AffinityValue) DeepCopyInto(out *AffinityValue)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AffinityValue) DeepCopyMapValue Uses

func (in *AffinityValue) DeepCopyMapValue() bpf.MapValue

DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.

func (*AffinityValue) GetValuePtr Uses

func (v *AffinityValue) GetValuePtr() unsafe.Pointer

GetValuePtr returns the unsafe pointer to the BPF value

func (*AffinityValue) String Uses

func (v *AffinityValue) String() string

String converts the value into a human readable string format.

type Backend Uses

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 Uses

type Backend4 struct {
    Key   *Backend4Key
    Value *Backend4Value
}

func NewBackend4 Uses

func NewBackend4(id loadbalancer.BackendID, ip net.IP, port uint16, proto u8proto.U8proto) (*Backend4, error)

func (*Backend4) GetKey Uses

func (b *Backend4) GetKey() BackendKey

func (*Backend4) GetValue Uses

func (b *Backend4) GetValue() BackendValue

func (*Backend4) Map Uses

func (b *Backend4) Map() *bpf.Map

type Backend4Key Uses

type Backend4Key struct {
    ID loadbalancer.BackendID
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey

func NewBackend4Key Uses

func NewBackend4Key(id loadbalancer.BackendID) *Backend4Key

func (*Backend4Key) DeepCopy Uses

func (in *Backend4Key) DeepCopy() *Backend4Key

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backend4Key.

func (*Backend4Key) DeepCopyInto Uses

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 Uses

func (in *Backend4Key) DeepCopyMapKey() bpf.MapKey

DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.

func (*Backend4Key) GetID Uses

func (k *Backend4Key) GetID() loadbalancer.BackendID

func (*Backend4Key) GetKeyPtr Uses

func (k *Backend4Key) GetKeyPtr() unsafe.Pointer

func (*Backend4Key) Map Uses

func (k *Backend4Key) Map() *bpf.Map

func (*Backend4Key) NewValue Uses

func (k *Backend4Key) NewValue() bpf.MapValue

func (*Backend4Key) SetID Uses

func (k *Backend4Key) SetID(id loadbalancer.BackendID)

func (*Backend4Key) String Uses

func (k *Backend4Key) String() string

type Backend4Value Uses

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 Uses

func NewBackend4Value(ip net.IP, port uint16, proto u8proto.U8proto) (*Backend4Value, error)

func (*Backend4Value) DeepCopy Uses

func (in *Backend4Value) DeepCopy() *Backend4Value

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backend4Value.

func (*Backend4Value) DeepCopyInto Uses

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 Uses

func (in *Backend4Value) DeepCopyMapValue() bpf.MapValue

DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.

func (*Backend4Value) GetAddress Uses

func (b *Backend4Value) GetAddress() net.IP

func (*Backend4Value) GetPort Uses

func (b *Backend4Value) GetPort() uint16

func (*Backend4Value) GetValuePtr Uses

func (v *Backend4Value) GetValuePtr() unsafe.Pointer

func (*Backend4Value) String Uses

func (v *Backend4Value) String() string

func (*Backend4Value) ToNetwork Uses

func (v *Backend4Value) ToNetwork() BackendValue

type Backend6 Uses

type Backend6 struct {
    Key   *Backend6Key
    Value *Backend6Value
}

func NewBackend6 Uses

func NewBackend6(id loadbalancer.BackendID, ip net.IP, port uint16, proto u8proto.U8proto) (*Backend6, error)

func (*Backend6) GetKey Uses

func (b *Backend6) GetKey() BackendKey

func (*Backend6) GetValue Uses

func (b *Backend6) GetValue() BackendValue

func (*Backend6) Map Uses

func (b *Backend6) Map() *bpf.Map

type Backend6Key Uses

type Backend6Key struct {
    ID loadbalancer.BackendID
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey

func NewBackend6Key Uses

func NewBackend6Key(id loadbalancer.BackendID) *Backend6Key

func (*Backend6Key) DeepCopy Uses

func (in *Backend6Key) DeepCopy() *Backend6Key

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backend6Key.

func (*Backend6Key) DeepCopyInto Uses

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 Uses

func (in *Backend6Key) DeepCopyMapKey() bpf.MapKey

DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.

func (*Backend6Key) GetID Uses

func (k *Backend6Key) GetID() loadbalancer.BackendID

func (*Backend6Key) GetKeyPtr Uses

func (k *Backend6Key) GetKeyPtr() unsafe.Pointer

func (*Backend6Key) Map Uses

func (k *Backend6Key) Map() *bpf.Map

func (*Backend6Key) NewValue Uses

func (k *Backend6Key) NewValue() bpf.MapValue

func (*Backend6Key) SetID Uses

func (k *Backend6Key) SetID(id loadbalancer.BackendID)

func (*Backend6Key) String Uses

func (k *Backend6Key) String() string

type Backend6Value Uses

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 Uses

func NewBackend6Value(ip net.IP, port uint16, proto u8proto.U8proto) (*Backend6Value, error)

func (*Backend6Value) DeepCopy Uses

func (in *Backend6Value) DeepCopy() *Backend6Value

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backend6Value.

func (*Backend6Value) DeepCopyInto Uses

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 Uses

func (in *Backend6Value) DeepCopyMapValue() bpf.MapValue

DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.

func (*Backend6Value) GetAddress Uses

func (b *Backend6Value) GetAddress() net.IP

func (*Backend6Value) GetPort Uses

func (b *Backend6Value) GetPort() uint16

func (*Backend6Value) GetValuePtr Uses

func (v *Backend6Value) GetValuePtr() unsafe.Pointer

func (*Backend6Value) String Uses

func (v *Backend6Value) String() string

func (*Backend6Value) ToNetwork Uses

func (v *Backend6Value) ToNetwork() BackendValue

type BackendIDByServiceIDSet Uses

type BackendIDByServiceIDSet map[uint16]map[uint16]struct{} // svc ID => backend ID

BackendIDByServiceIDSet is the type of a set for checking whether a backend belongs to a given service

type BackendKey Uses

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 Uses

type BackendValue interface {
    bpf.MapValue

    // Get backend address
    GetAddress() net.IP

    // Get backend port
    GetPort() uint16

    // Convert fields to network byte order.
    ToNetwork() BackendValue
}

BackendValue is the interface describing protocol independent backend value.

type LBBPFMap Uses

type LBBPFMap struct{}

LBBPFMap is an implementation of the LBMap interface.

func (*LBBPFMap) AddAffinityMatch Uses

func (*LBBPFMap) AddAffinityMatch(revNATID uint16, backendID uint16) error

AddAffinityMatch adds the given affinity match to the BPF map.

func (*LBBPFMap) AddBackend Uses

func (*LBBPFMap) AddBackend(id uint16, ip net.IP, port uint16, ipv6 bool) error

AddBackend adds a backend into a BPF map.

func (*LBBPFMap) DeleteAffinityMatch Uses

func (*LBBPFMap) DeleteAffinityMatch(revNATID uint16, backendID uint16) error

DeleteAffinityMatch removes the affinity match for the given svc and backend ID tuple from the BPF map

func (*LBBPFMap) DeleteBackendByID Uses

func (*LBBPFMap) DeleteBackendByID(id uint16, ipv6 bool) error

DeleteBackendByID removes a backend identified with the given ID from a BPF map.

func (*LBBPFMap) DeleteService Uses

func (*LBBPFMap) DeleteService(svc loadbalancer.L3n4AddrID, backendCount int) error

DeleteService removes given service from a BPF map.

func (*LBBPFMap) DumpAffinityMatches Uses

func (*LBBPFMap) DumpAffinityMatches() (BackendIDByServiceIDSet, error)

DumpAffinityMatches returns the affinity match map represented as a nested map which first key is svc ID and the second - backend ID.

func (*LBBPFMap) DumpBackendMaps Uses

func (*LBBPFMap) DumpBackendMaps() ([]*loadbalancer.Backend, error)

DumpBackendMaps dumps the backend entries from the BPF maps.

func (*LBBPFMap) DumpServiceMaps Uses

func (*LBBPFMap) DumpServiceMaps() ([]*loadbalancer.SVC, []error)

DumpServiceMaps dumps the services from the BPF maps.

func (*LBBPFMap) UpsertService Uses

func (*LBBPFMap) UpsertService(
    svcID uint16, svcIP net.IP, svcPort uint16,
    backendIDs []uint16, prevBackendCount int,
    ipv6 bool, svcType loadbalancer.SVCType, svcLocal bool,
    svcScope uint8, sessionAffinity bool,
    sessionAffinityTimeoutSec uint32) 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 Uses

type LBMockMap struct {
    BackendByID   map[uint16]*lb.Backend
    ServiceByID   map[uint16]*lb.SVC
    AffinityMatch BackendIDByServiceIDSet
}

func NewLBMockMap Uses

func NewLBMockMap() *LBMockMap

func (*LBMockMap) AddAffinityMatch Uses

func (m *LBMockMap) AddAffinityMatch(revNATID uint16, backendID uint16) error

func (*LBMockMap) AddBackend Uses

func (m *LBMockMap) AddBackend(id uint16, ip net.IP, port uint16, ipv6 bool) error

func (*LBMockMap) DeleteAffinityMatch Uses

func (m *LBMockMap) DeleteAffinityMatch(revNATID uint16, backendID uint16) error

func (*LBMockMap) DeleteBackendByID Uses

func (m *LBMockMap) DeleteBackendByID(id uint16, ipv6 bool) error

func (*LBMockMap) DeleteService Uses

func (m *LBMockMap) DeleteService(addr lb.L3n4AddrID, backendCount int) error

func (*LBMockMap) DumpAffinityMatches Uses

func (m *LBMockMap) DumpAffinityMatches() (BackendIDByServiceIDSet, error)

func (*LBMockMap) DumpBackendMaps Uses

func (m *LBMockMap) DumpBackendMaps() ([]*lb.Backend, error)

func (*LBMockMap) DumpServiceMaps Uses

func (m *LBMockMap) DumpServiceMaps() ([]*lb.SVC, []error)

func (*LBMockMap) UpsertService Uses

func (m *LBMockMap) UpsertService(id uint16, ip net.IP, port uint16,
    backendIDs []uint16, prevCount int, ipv6 bool, svcType lb.SVCType, svcLocal bool,
    svcScope uint8, sessionAffinity bool, sessionAffinityTimeoutSec uint32) error

type RevNat4Key Uses

type RevNat4Key struct {
    Key uint16
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey

func NewRevNat4Key Uses

func NewRevNat4Key(value uint16) *RevNat4Key

func (*RevNat4Key) DeepCopy Uses

func (in *RevNat4Key) DeepCopy() *RevNat4Key

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevNat4Key.

func (*RevNat4Key) DeepCopyInto Uses

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 Uses

func (in *RevNat4Key) DeepCopyMapKey() bpf.MapKey

DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.

func (*RevNat4Key) GetKey Uses

func (k *RevNat4Key) GetKey() uint16

func (*RevNat4Key) GetKeyPtr Uses

func (k *RevNat4Key) GetKeyPtr() unsafe.Pointer

func (*RevNat4Key) Map Uses

func (k *RevNat4Key) Map() *bpf.Map

func (*RevNat4Key) NewValue Uses

func (k *RevNat4Key) NewValue() bpf.MapValue

func (*RevNat4Key) String Uses

func (k *RevNat4Key) String() string

func (*RevNat4Key) ToNetwork Uses

func (k *RevNat4Key) ToNetwork() RevNatKey

ToNetwork converts RevNat4Key to network byte order.

type RevNat4Value Uses

type RevNat4Value struct {
    Address types.IPv4 `align:"address"`
    Port    uint16     `align:"port"`
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue

func (*RevNat4Value) DeepCopy Uses

func (in *RevNat4Value) DeepCopy() *RevNat4Value

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevNat4Value.

func (*RevNat4Value) DeepCopyInto Uses

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 Uses

func (in *RevNat4Value) DeepCopyMapValue() bpf.MapValue

DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.

func (*RevNat4Value) GetValuePtr Uses

func (v *RevNat4Value) GetValuePtr() unsafe.Pointer

func (*RevNat4Value) String Uses

func (v *RevNat4Value) String() string

func (*RevNat4Value) ToNetwork Uses

func (v *RevNat4Value) ToNetwork() RevNatValue

ToNetwork converts RevNat4Value to network byte order.

type RevNat6Key Uses

type RevNat6Key struct {
    Key uint16
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey

func NewRevNat6Key Uses

func NewRevNat6Key(value uint16) *RevNat6Key

func (*RevNat6Key) DeepCopy Uses

func (in *RevNat6Key) DeepCopy() *RevNat6Key

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevNat6Key.

func (*RevNat6Key) DeepCopyInto Uses

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 Uses

func (in *RevNat6Key) DeepCopyMapKey() bpf.MapKey

DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.

func (*RevNat6Key) GetKey Uses

func (v *RevNat6Key) GetKey() uint16

func (*RevNat6Key) GetKeyPtr Uses

func (v *RevNat6Key) GetKeyPtr() unsafe.Pointer

func (*RevNat6Key) Map Uses

func (v *RevNat6Key) Map() *bpf.Map

func (*RevNat6Key) NewValue Uses

func (v *RevNat6Key) NewValue() bpf.MapValue

func (*RevNat6Key) String Uses

func (v *RevNat6Key) String() string

func (*RevNat6Key) ToNetwork Uses

func (v *RevNat6Key) ToNetwork() RevNatKey

ToNetwork converts RevNat6Key to network byte order.

type RevNat6Value Uses

type RevNat6Value struct {
    Address types.IPv6 `align:"address"`
    Port    uint16     `align:"port"`
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue

func (*RevNat6Value) DeepCopy Uses

func (in *RevNat6Value) DeepCopy() *RevNat6Value

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevNat6Value.

func (*RevNat6Value) DeepCopyInto Uses

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 Uses

func (in *RevNat6Value) DeepCopyMapValue() bpf.MapValue

DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.

func (*RevNat6Value) GetValuePtr Uses

func (v *RevNat6Value) GetValuePtr() unsafe.Pointer

func (*RevNat6Value) String Uses

func (v *RevNat6Value) String() string

func (*RevNat6Value) ToNetwork Uses

func (v *RevNat6Value) ToNetwork() RevNatValue

ToNetwork converts RevNat6Value to network byte order.

type RevNatKey Uses

type RevNatKey interface {
    bpf.MapKey

    // Returns the BPF map matching the key type
    Map() *bpf.Map

    // ToNetwork converts fields to network byte order.
    ToNetwork() RevNatKey

    // Returns the key value
    GetKey() uint16
}

type RevNatValue Uses

type RevNatValue interface {
    bpf.MapValue

    // ToNetwork converts fields to network byte order.
    ToNetwork() RevNatValue
}

type Service4Key Uses

type Service4Key struct {
    Address     types.IPv4 `align:"address"`
    Port        uint16     `align:"dport"`
    BackendSlot uint16     `align:"backend_slot"`
    Proto       uint8      `align:"proto"`
    Scope       uint8      `align:"scope"`
    Pad         pad2uint8  `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 Uses

func NewService4Key(ip net.IP, port uint16, proto u8proto.U8proto, scope uint8, slot uint16) *Service4Key

func (*Service4Key) DeepCopy Uses

func (in *Service4Key) DeepCopy() *Service4Key

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service4Key.

func (*Service4Key) DeepCopyInto Uses

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 Uses

func (in *Service4Key) DeepCopyMapKey() bpf.MapKey

DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.

func (*Service4Key) GetAddress Uses

func (k *Service4Key) GetAddress() net.IP

func (*Service4Key) GetBackendSlot Uses

func (k *Service4Key) GetBackendSlot() int

func (*Service4Key) GetKeyPtr Uses

func (k *Service4Key) GetKeyPtr() unsafe.Pointer

func (*Service4Key) GetPort Uses

func (k *Service4Key) GetPort() uint16

func (*Service4Key) GetScope Uses

func (k *Service4Key) GetScope() uint8

func (*Service4Key) IsIPv6 Uses

func (k *Service4Key) IsIPv6() bool

func (*Service4Key) IsSurrogate Uses

func (k *Service4Key) IsSurrogate() bool

func (*Service4Key) Map Uses

func (k *Service4Key) Map() *bpf.Map

func (*Service4Key) MapDelete Uses

func (k *Service4Key) MapDelete() error

func (*Service4Key) NewValue Uses

func (k *Service4Key) NewValue() bpf.MapValue

func (*Service4Key) RevNatValue Uses

func (k *Service4Key) RevNatValue() RevNatValue

func (*Service4Key) SetBackendSlot Uses

func (k *Service4Key) SetBackendSlot(slot int)

func (*Service4Key) SetScope Uses

func (k *Service4Key) SetScope(scope uint8)

func (*Service4Key) String Uses

func (k *Service4Key) String() string

func (*Service4Key) ToNetwork Uses

func (k *Service4Key) ToNetwork() ServiceKey

type Service4Value Uses

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 (*Service4Value) DeepCopy Uses

func (in *Service4Value) DeepCopy() *Service4Value

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service4Value.

func (*Service4Value) DeepCopyInto Uses

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 Uses

func (in *Service4Value) DeepCopyMapValue() bpf.MapValue

DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.

func (*Service4Value) GetBackendID Uses

func (s *Service4Value) GetBackendID() loadbalancer.BackendID

func (*Service4Value) GetCount Uses

func (s *Service4Value) GetCount() int

func (*Service4Value) GetFlags Uses

func (s *Service4Value) GetFlags() uint8

func (*Service4Value) GetRevNat Uses

func (s *Service4Value) GetRevNat() int

func (*Service4Value) GetValuePtr Uses

func (s *Service4Value) GetValuePtr() unsafe.Pointer

func (*Service4Value) RevNatKey Uses

func (s *Service4Value) RevNatKey() RevNatKey

func (*Service4Value) SetBackendID Uses

func (s *Service4Value) SetBackendID(id loadbalancer.BackendID)

func (*Service4Value) SetCount Uses

func (s *Service4Value) SetCount(count int)

func (*Service4Value) SetFlags Uses

func (s *Service4Value) SetFlags(flags uint8)

func (*Service4Value) SetRevNat Uses

func (s *Service4Value) SetRevNat(id int)

func (*Service4Value) SetSessionAffinityTimeoutSec Uses

func (s *Service4Value) SetSessionAffinityTimeoutSec(t uint32)

func (*Service4Value) String Uses

func (s *Service4Value) String() string

func (*Service4Value) ToNetwork Uses

func (s *Service4Value) ToNetwork() ServiceValue

type Service6Key Uses

type Service6Key struct {
    Address     types.IPv6 `align:"address"`
    Port        uint16     `align:"dport"`
    BackendSlot uint16     `align:"backend_slot"`
    Proto       uint8      `align:"proto"`
    Scope       uint8      `align:"scope"`
    Pad         pad2uint8  `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 Uses

func NewService6Key(ip net.IP, port uint16, proto u8proto.U8proto, scope uint8, slot uint16) *Service6Key

func (*Service6Key) DeepCopy Uses

func (in *Service6Key) DeepCopy() *Service6Key

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service6Key.

func (*Service6Key) DeepCopyInto Uses

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 Uses

func (in *Service6Key) DeepCopyMapKey() bpf.MapKey

DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.

func (*Service6Key) GetAddress Uses

func (k *Service6Key) GetAddress() net.IP

func (*Service6Key) GetBackendSlot Uses

func (k *Service6Key) GetBackendSlot() int

func (*Service6Key) GetKeyPtr Uses

func (k *Service6Key) GetKeyPtr() unsafe.Pointer

func (*Service6Key) GetPort Uses

func (k *Service6Key) GetPort() uint16

func (*Service6Key) GetScope Uses

func (k *Service6Key) GetScope() uint8

func (*Service6Key) IsIPv6 Uses

func (k *Service6Key) IsIPv6() bool

func (*Service6Key) IsSurrogate Uses

func (k *Service6Key) IsSurrogate() bool

func (*Service6Key) Map Uses

func (k *Service6Key) Map() *bpf.Map

func (*Service6Key) MapDelete Uses

func (k *Service6Key) MapDelete() error

func (*Service6Key) NewValue Uses

func (k *Service6Key) NewValue() bpf.MapValue

func (*Service6Key) RevNatValue Uses

func (k *Service6Key) RevNatValue() RevNatValue

func (*Service6Key) SetBackendSlot Uses

func (k *Service6Key) SetBackendSlot(slot int)

func (*Service6Key) SetScope Uses

func (k *Service6Key) SetScope(scope uint8)

func (*Service6Key) String Uses

func (k *Service6Key) String() string

func (*Service6Key) ToNetwork Uses

func (k *Service6Key) ToNetwork() ServiceKey

type Service6Value Uses

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 (*Service6Value) DeepCopy Uses

func (in *Service6Value) DeepCopy() *Service6Value

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service6Value.

func (*Service6Value) DeepCopyInto Uses

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 Uses

func (in *Service6Value) DeepCopyMapValue() bpf.MapValue

DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.

func (*Service6Value) GetBackendID Uses

func (s *Service6Value) GetBackendID() loadbalancer.BackendID

func (*Service6Value) GetCount Uses

func (s *Service6Value) GetCount() int

func (*Service6Value) GetFlags Uses

func (s *Service6Value) GetFlags() uint8

func (*Service6Value) GetRevNat Uses

func (s *Service6Value) GetRevNat() int

func (*Service6Value) GetValuePtr Uses

func (s *Service6Value) GetValuePtr() unsafe.Pointer

func (*Service6Value) RevNatKey Uses

func (s *Service6Value) RevNatKey() RevNatKey

func (*Service6Value) SetBackendID Uses

func (s *Service6Value) SetBackendID(id loadbalancer.BackendID)

func (*Service6Value) SetCount Uses

func (s *Service6Value) SetCount(count int)

func (*Service6Value) SetFlags Uses

func (s *Service6Value) SetFlags(flags uint8)

func (*Service6Value) SetRevNat Uses

func (s *Service6Value) SetRevNat(id int)

func (*Service6Value) SetSessionAffinityTimeoutSec Uses

func (s *Service6Value) SetSessionAffinityTimeoutSec(t uint32)

func (*Service6Value) String Uses

func (s *Service6Value) String() string

func (*Service6Value) ToNetwork Uses

func (s *Service6Value) ToNetwork() ServiceValue

type ServiceKey Uses

type ServiceKey interface {
    bpf.MapKey

    // Return true if the key is of type IPv6
    IsIPv6() bool

    // IsSurrogate returns true on zero-address
    IsSurrogate() bool

    // Return the BPF map matching the key type
    Map() *bpf.Map

    // Set backend slot for the key
    SetBackendSlot(slot int)

    // Get backend slot of the key
    GetBackendSlot() int

    // Set lookup scope for the key
    SetScope(scope uint8)

    // Get lookup scope for the key
    GetScope() uint8

    // 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
}

ServiceKey is the interface describing protocol independent key for services map v2.

type ServiceValue Uses

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 timeout for sessionAffinity=clientIP
    SetSessionAffinityTimeoutSec(t uint32)

    // 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
}

ServiceValue is the interface describing protocol independent value for services map v2.

type SockRevNat4Key Uses

type SockRevNat4Key struct {
    // contains filtered or unexported fields
}

SockRevNat4Key is the tuple with address, port and cookie used as key in the reverse NAT sock map. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey

func (*SockRevNat4Key) DeepCopy Uses

func (in *SockRevNat4Key) DeepCopy() *SockRevNat4Key

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SockRevNat4Key.

func (*SockRevNat4Key) DeepCopyInto Uses

func (in *SockRevNat4Key) DeepCopyInto(out *SockRevNat4Key)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SockRevNat4Key) DeepCopyMapKey Uses

func (in *SockRevNat4Key) DeepCopyMapKey() bpf.MapKey

DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.

func (*SockRevNat4Key) GetKeyPtr Uses

func (k *SockRevNat4Key) GetKeyPtr() unsafe.Pointer

GetKeyPtr returns the unsafe pointer to the BPF key

func (SockRevNat4Key) NewValue Uses

func (k SockRevNat4Key) NewValue() bpf.MapValue

NewValue returns a new empty instance of the structure representing the BPF map value.

func (*SockRevNat4Key) String Uses

func (k *SockRevNat4Key) String() string

String converts the key into a human readable string format.

type SockRevNat4Value Uses

type SockRevNat4Value struct {
    // contains filtered or unexported fields
}

SockRevNat4Value is an entry in the reverse NAT sock map. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue

func (*SockRevNat4Value) DeepCopy Uses

func (in *SockRevNat4Value) DeepCopy() *SockRevNat4Value

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SockRevNat4Value.

func (*SockRevNat4Value) DeepCopyInto Uses

func (in *SockRevNat4Value) DeepCopyInto(out *SockRevNat4Value)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SockRevNat4Value) DeepCopyMapValue Uses

func (in *SockRevNat4Value) DeepCopyMapValue() bpf.MapValue

DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.

func (*SockRevNat4Value) GetValuePtr Uses

func (v *SockRevNat4Value) GetValuePtr() unsafe.Pointer

GetValuePtr returns the unsafe pointer to the BPF value

func (*SockRevNat4Value) String Uses

func (v *SockRevNat4Value) String() string

String converts the value into a human readable string format.

type SockRevNat6Key Uses

type SockRevNat6Key struct {
    // contains filtered or unexported fields
}

SockRevNat6Key is the tuple with address, port and cookie used as key in the reverse NAT sock map. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey

func (*SockRevNat6Key) DeepCopy Uses

func (in *SockRevNat6Key) DeepCopy() *SockRevNat6Key

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SockRevNat6Key.

func (*SockRevNat6Key) DeepCopyInto Uses

func (in *SockRevNat6Key) DeepCopyInto(out *SockRevNat6Key)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SockRevNat6Key) DeepCopyMapKey Uses

func (in *SockRevNat6Key) DeepCopyMapKey() bpf.MapKey

DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.

func (*SockRevNat6Key) GetKeyPtr Uses

func (k *SockRevNat6Key) GetKeyPtr() unsafe.Pointer

GetKeyPtr returns the unsafe pointer to the BPF key

func (SockRevNat6Key) NewValue Uses

func (k SockRevNat6Key) NewValue() bpf.MapValue

NewValue returns a new empty instance of the structure representing the BPF map value.

func (*SockRevNat6Key) String Uses

func (k *SockRevNat6Key) String() string

String converts the key into a human readable string format.

type SockRevNat6Value Uses

type SockRevNat6Value struct {
    // contains filtered or unexported fields
}

SockRevNat6Value is an entry in the reverse NAT sock map. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue

func (*SockRevNat6Value) DeepCopy Uses

func (in *SockRevNat6Value) DeepCopy() *SockRevNat6Value

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SockRevNat6Value.

func (*SockRevNat6Value) DeepCopyInto Uses

func (in *SockRevNat6Value) DeepCopyInto(out *SockRevNat6Value)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SockRevNat6Value) DeepCopyMapValue Uses

func (in *SockRevNat6Value) DeepCopyMapValue() bpf.MapValue

DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.

func (*SockRevNat6Value) GetValuePtr Uses

func (v *SockRevNat6Value) GetValuePtr() unsafe.Pointer

GetValuePtr returns the unsafe pointer to the BPF value

func (*SockRevNat6Value) String Uses

func (v *SockRevNat6Value) String() string

String converts the value into a human readable string format.

Package lbmap imports 13 packages (graph) and is imported by 35 packages. Updated 2020-08-07. Refresh now. Tools for package owners.