Documentation ¶
Index ¶
Constants ¶
View Source
const (
MaxEntries = 524288
)
Variables ¶
View Source
var ( // Proxy4Map represents the BPF map for IPv4 proxy Proxy4Map = bpf.NewMap(Proxy4MapName, bpf.MapTypeHash, int(unsafe.Sizeof(Proxy4Key{})), int(unsafe.Sizeof(Proxy4Value{})), MaxEntries, 0, 0, func(key []byte, value []byte) (bpf.MapKey, bpf.MapValue, error) { k, v := Proxy4Key{}, Proxy4Value{} if err := bpf.ConvertKeyValue(key, value, &k, &v); err != nil { return nil, nil, err } return k.ToNetwork(), v.ToNetwork(), nil }).WithNonPersistent() )
View Source
var (
Proxy4MapName = "cilium_proxy4"
)
View Source
var ( // Proxy6Map represents the BPF map for IPv6 proxy Proxy6Map = bpf.NewMap(Proxy6MapName, bpf.MapTypeHash, int(unsafe.Sizeof(Proxy6Key{})), int(unsafe.Sizeof(Proxy6Value{})), MaxEntries, 0, 0, func(key []byte, value []byte) (bpf.MapKey, bpf.MapValue, error) { k, v := Proxy6Key{}, Proxy6Value{} if err := bpf.ConvertKeyValue(key, value, &k, &v); err != nil { return nil, nil, err } return k.ToNetwork(), v.ToNetwork(), nil }).WithNonPersistent() )
View Source
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"` }
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"` }
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"` }
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"` }
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
Click to show internal directories.
Click to hide internal directories.