Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupOnRedirectClose(p uint16)
- func Delete(key ProxyMapKey) error
- func Flush() int
- func GC() int
- type Proxy4Key
- func (in *Proxy4Key) DeepCopy() *Proxy4Key
- func (in *Proxy4Key) DeepCopyInto(out *Proxy4Key)
- func (in *Proxy4Key) DeepCopyMapKey() bpf.MapKey
- func (k *Proxy4Key) GetKeyPtr() unsafe.Pointer
- func (k *Proxy4Key) HostPort() string
- func (k Proxy4Key) NewValue() bpf.MapValue
- func (k *Proxy4Key) String() string
- func (k *Proxy4Key) ToNetwork() *Proxy4Key
- type Proxy4Value
- func (in *Proxy4Value) DeepCopy() *Proxy4Value
- func (in *Proxy4Value) DeepCopyInto(out *Proxy4Value)
- func (in *Proxy4Value) DeepCopyMapValue() bpf.MapValue
- func (v *Proxy4Value) GetSourceIdentity() uint32
- func (v *Proxy4Value) GetValuePtr() unsafe.Pointer
- func (v *Proxy4Value) HostPort() string
- func (v *Proxy4Value) String() string
- func (v *Proxy4Value) ToNetwork() *Proxy4Value
- type Proxy6Key
- func (in *Proxy6Key) DeepCopy() *Proxy6Key
- func (in *Proxy6Key) DeepCopyInto(out *Proxy6Key)
- func (in *Proxy6Key) DeepCopyMapKey() bpf.MapKey
- func (k *Proxy6Key) GetKeyPtr() unsafe.Pointer
- func (k *Proxy6Key) HostPort() string
- func (k Proxy6Key) NewValue() bpf.MapValue
- func (k *Proxy6Key) String() string
- func (k *Proxy6Key) ToNetwork() *Proxy6Key
- type Proxy6Value
- func (in *Proxy6Value) DeepCopy() *Proxy6Value
- func (in *Proxy6Value) DeepCopyInto(out *Proxy6Value)
- func (in *Proxy6Value) DeepCopyMapValue() bpf.MapValue
- func (v *Proxy6Value) GetSourceIdentity() uint32
- func (v *Proxy6Value) GetValuePtr() unsafe.Pointer
- func (v *Proxy6Value) HostPort() string
- func (v *Proxy6Value) String() string
- func (v *Proxy6Value) ToNetwork() *Proxy6Value
- type ProxyMapKey
- type ProxyMapValue
Constants ¶
const (
MaxEntries = 524288
)
Variables ¶
var ( // Proxy4Map represents the BPF map for IPv4 proxy Proxy4Map = bpf.NewMap(Proxy4MapName, bpf.MapTypeHash, &Proxy4Key{}, int(unsafe.Sizeof(Proxy4Key{})), &Proxy4Value{}, int(unsafe.Sizeof(Proxy4Value{})), MaxEntries, 0, 0, func(key []byte, value []byte, mapKey bpf.MapKey, mapValue bpf.MapValue) (bpf.MapKey, bpf.MapValue, error) { proxyKey, proxyValue := mapKey.(*Proxy4Key), mapValue.(*Proxy4Value) if _, _, err := bpf.ConvertKeyValue(key, value, proxyKey, proxyValue); err != nil { return nil, nil, err } return proxyKey.ToNetwork(), proxyValue.ToNetwork(), nil }).WithNonPersistent() )
var (
Proxy4MapName = "cilium_proxy4"
)
var ( // Proxy6Map represents the BPF map for IPv6 proxy Proxy6Map = bpf.NewMap(Proxy6MapName, bpf.MapTypeHash, &Proxy6Key{}, int(unsafe.Sizeof(Proxy6Key{})), &Proxy6Value{}, int(unsafe.Sizeof(Proxy6Value{})), MaxEntries, 0, 0, func(key []byte, value []byte, mapKey bpf.MapKey, mapValue bpf.MapValue) (bpf.MapKey, bpf.MapValue, error) { proxyKey, proxyValue := mapKey.(*Proxy6Key), mapValue.(*Proxy6Value) if _, _, err := bpf.ConvertKeyValue(key, value, proxyKey, proxyValue); err != nil { return nil, nil, err } return proxyKey.ToNetwork(), proxyValue.ToNetwork(), nil }).WithNonPersistent() )
var Proxy6MapName = "cilium_proxy6"
Functions ¶
func CleanupOnRedirectClose ¶
func CleanupOnRedirectClose(p uint16)
CleanupOnRedirectClose cleans up the proxymap after a redirect has been closed. It will remove all proxymap entries to the proxy port.
Types ¶
type Proxy4Key ¶
type Proxy4Key struct { SAddr types.IPv4 `align:"saddr"` DPort uint16 `align:"dport"` SPort uint16 `align:"sport"` Nexthdr uint8 `align:"nexthdr"` Pad uint8 `align:"pad"` }
Proxy4Key +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey
func (*Proxy4Key) DeepCopy ¶ added in v1.5.1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Proxy4Key.
func (*Proxy4Key) DeepCopyInto ¶ added in v1.5.1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Proxy4Key) DeepCopyMapKey ¶ added in v1.5.1
DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
type Proxy4Value ¶
type Proxy4Value struct { OrigDAddr types.IPv4 `align:"orig_daddr"` OrigDPort uint16 `align:"orig_dport"` Pad uint16 `align:"pad"` SourceIdentity uint32 `align:"identity"` Lifetime uint32 `align:"lifetime"` }
Proxy4Value +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue
func (*Proxy4Value) DeepCopy ¶ added in v1.5.1
func (in *Proxy4Value) DeepCopy() *Proxy4Value
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Proxy4Value.
func (*Proxy4Value) DeepCopyInto ¶ added in v1.5.1
func (in *Proxy4Value) DeepCopyInto(out *Proxy4Value)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Proxy4Value) DeepCopyMapValue ¶ added in v1.5.1
func (in *Proxy4Value) DeepCopyMapValue() bpf.MapValue
DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.
func (*Proxy4Value) GetSourceIdentity ¶
func (v *Proxy4Value) GetSourceIdentity() uint32
GetSourceIdentity returns the source identity
func (*Proxy4Value) GetValuePtr ¶
func (v *Proxy4Value) GetValuePtr() unsafe.Pointer
func (*Proxy4Value) HostPort ¶
func (v *Proxy4Value) HostPort() string
func (*Proxy4Value) String ¶
func (v *Proxy4Value) String() string
func (*Proxy4Value) ToNetwork ¶
func (v *Proxy4Value) ToNetwork() *Proxy4Value
ToNetwork converts Proxy4Value to network byte order.
type Proxy6Key ¶
type Proxy6Key struct { SAddr types.IPv6 `align:"saddr"` DPort uint16 `align:"dport"` SPort uint16 `align:"sport"` Nexthdr uint8 `align:"nexthdr"` Pad uint8 `align:"pad"` }
Proxy6Key +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey
func (*Proxy6Key) DeepCopy ¶ added in v1.5.1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Proxy6Key.
func (*Proxy6Key) DeepCopyInto ¶ added in v1.5.1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Proxy6Key) DeepCopyMapKey ¶ added in v1.5.1
DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
type Proxy6Value ¶
type Proxy6Value struct { OrigDAddr types.IPv6 `align:"orig_daddr"` OrigDPort uint16 `align:"orig_dport"` Pad uint16 `align:"pad"` SourceIdentity uint32 `align:"identity"` Lifetime uint32 `align:"lifetime"` }
Proxy6Value +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue
func (*Proxy6Value) DeepCopy ¶ added in v1.5.1
func (in *Proxy6Value) DeepCopy() *Proxy6Value
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Proxy6Value.
func (*Proxy6Value) DeepCopyInto ¶ added in v1.5.1
func (in *Proxy6Value) DeepCopyInto(out *Proxy6Value)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Proxy6Value) DeepCopyMapValue ¶ added in v1.5.1
func (in *Proxy6Value) DeepCopyMapValue() bpf.MapValue
DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.
func (*Proxy6Value) GetSourceIdentity ¶
func (v *Proxy6Value) GetSourceIdentity() uint32
GetSourceIdentity returns the source identity
func (*Proxy6Value) GetValuePtr ¶
func (v *Proxy6Value) GetValuePtr() unsafe.Pointer
func (*Proxy6Value) HostPort ¶
func (v *Proxy6Value) HostPort() string
func (*Proxy6Value) String ¶
func (v *Proxy6Value) String() string
func (*Proxy6Value) ToNetwork ¶
func (v *Proxy6Value) ToNetwork() *Proxy6Value
ToNetwork converts Proxy6Value to network byte order.
type ProxyMapKey ¶
type ProxyMapKey interface{}
ProxyMapKey is the generic type for Proxy6Key or Proxy4Key
type ProxyMapValue ¶
func Lookup ¶
func Lookup(key ProxyMapKey) (ProxyMapValue, error)
Lookup looks up an entry in the proxymap