Documentation ¶
Overview ¶
Package tuple defines keys used for connection tuples in multiple BPF maps. +groupName=maps
Index ¶
- Constants
- type TupleKey
- type TupleKey4
- func (in *TupleKey4) DeepCopy() *TupleKey4
- func (in *TupleKey4) DeepCopyInto(out *TupleKey4)
- func (in *TupleKey4) DeepCopyMapKey() bpf.MapKey
- func (k TupleKey4) Dump(buffer *bytes.Buffer, reverse bool) bool
- func (k *TupleKey4) GetFlags() uint8
- func (k *TupleKey4) GetKeyPtr() unsafe.Pointer
- func (k *TupleKey4) NewValue() bpf.MapValue
- func (k *TupleKey4) String() string
- func (k *TupleKey4) ToHost() TupleKey
- func (k *TupleKey4) ToNetwork() TupleKey
- type TupleKey4Global
- func (in *TupleKey4Global) DeepCopy() *TupleKey4Global
- func (in *TupleKey4Global) DeepCopyInto(out *TupleKey4Global)
- func (in *TupleKey4Global) DeepCopyMapKey() bpf.MapKey
- func (k TupleKey4Global) Dump(buffer *bytes.Buffer, reverse bool) bool
- func (k *TupleKey4Global) GetFlags() uint8
- func (k *TupleKey4Global) String() string
- func (k *TupleKey4Global) ToHost() TupleKey
- func (k *TupleKey4Global) ToNetwork() TupleKey
- type TupleKey6
- func (in *TupleKey6) DeepCopy() *TupleKey6
- func (in *TupleKey6) DeepCopyInto(out *TupleKey6)
- func (in *TupleKey6) DeepCopyMapKey() bpf.MapKey
- func (k TupleKey6) Dump(buffer *bytes.Buffer, reverse bool) bool
- func (k *TupleKey6) GetFlags() uint8
- func (k *TupleKey6) GetKeyPtr() unsafe.Pointer
- func (k *TupleKey6) NewValue() bpf.MapValue
- func (k *TupleKey6) String() string
- func (k *TupleKey6) ToHost() TupleKey
- func (k *TupleKey6) ToNetwork() TupleKey
- type TupleKey6Global
- func (in *TupleKey6Global) DeepCopy() *TupleKey6Global
- func (in *TupleKey6Global) DeepCopyInto(out *TupleKey6Global)
- func (in *TupleKey6Global) DeepCopyMapKey() bpf.MapKey
- func (k TupleKey6Global) Dump(buffer *bytes.Buffer, reverse bool) bool
- func (k *TupleKey6Global) GetFlags() uint8
- func (k *TupleKey6Global) String() string
- func (k *TupleKey6Global) ToHost() TupleKey
- func (k *TupleKey6Global) ToNetwork() TupleKey
- type TupleValStub
Constants ¶
const ( TUPLE_F_OUT = 0 TUPLE_F_IN = 1 TUPLE_F_RELATED = 2 TUPLE_F_SERVICE = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TupleKey ¶
type TupleKey interface { bpf.MapKey // ToNetwork converts fields to network byte order. ToNetwork() TupleKey // ToHost converts fields to host byte order. ToHost() TupleKey // Dumps contents of key to buffer. Returns true if successful. Dump(buffer *bytes.Buffer, reverse bool) bool // Returns flags containing the direction of the tuple key. GetFlags() uint8 }
TupleKey is the interface describing keys to the conntrack and NAT maps.
type TupleKey4 ¶
type TupleKey4 struct { DestAddr types.IPv4 `align:"daddr"` SourceAddr types.IPv4 `align:"saddr"` DestPort uint16 `align:"dport"` SourcePort uint16 `align:"sport"` NextHeader u8proto.U8proto `align:"nexthdr"` Flags uint8 `align:"flags"` }
TupleKey4 represents the key for IPv4 entries in the local BPF conntrack map. Address field names are correct for return traffic, i.e., they are reversed compared to the original direction traffic. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey
func (*TupleKey4) DeepCopy ¶ added in v1.5.1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TupleKey4.
func (*TupleKey4) DeepCopyInto ¶ added in v1.5.1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TupleKey4) DeepCopyMapKey ¶ added in v1.5.1
DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
func (TupleKey4) Dump ¶
Dump writes the contents of key to buffer and returns true if the value for next header in the key is nonzero.
type TupleKey4Global ¶
type TupleKey4Global struct {
TupleKey4
}
TupleKey4Global represents the key for IPv4 entries in the global BPF conntrack map. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey
func (*TupleKey4Global) DeepCopy ¶ added in v1.5.1
func (in *TupleKey4Global) DeepCopy() *TupleKey4Global
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TupleKey4Global.
func (*TupleKey4Global) DeepCopyInto ¶ added in v1.5.1
func (in *TupleKey4Global) DeepCopyInto(out *TupleKey4Global)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TupleKey4Global) DeepCopyMapKey ¶ added in v1.5.1
func (in *TupleKey4Global) DeepCopyMapKey() bpf.MapKey
DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
func (TupleKey4Global) Dump ¶
func (k TupleKey4Global) Dump(buffer *bytes.Buffer, reverse bool) bool
Dump writes the contents of key to buffer and returns true if the value for next header in the key is nonzero.
func (*TupleKey4Global) GetFlags ¶
func (k *TupleKey4Global) GetFlags() uint8
GetFlags returns the tuple's flags.
func (*TupleKey4Global) String ¶
func (k *TupleKey4Global) String() string
String returns the tuple's string representation, doh.
func (*TupleKey4Global) ToHost ¶
func (k *TupleKey4Global) ToHost() TupleKey
ToHost converts ports to host byte order.
This is necessary to prevent callers from implicitly converting the TupleKey4Global type here into a local key type in the nested TupleKey4 field.
func (*TupleKey4Global) ToNetwork ¶
func (k *TupleKey4Global) ToNetwork() TupleKey
ToNetwork converts ports to network byte order.
This is necessary to prevent callers from implicitly converting the TupleKey4Global type here into a local key type in the nested TupleKey4 field.
type TupleKey6 ¶
type TupleKey6 struct { DestAddr types.IPv6 `align:"daddr"` SourceAddr types.IPv6 `align:"saddr"` DestPort uint16 `align:"dport"` SourcePort uint16 `align:"sport"` NextHeader u8proto.U8proto `align:"nexthdr"` Flags uint8 `align:"flags"` }
TupleKey6 represents the key for IPv6 entries in the local BPF conntrack map. Address field names are correct for return traffic, i.e., they are reversed compared to the original direction traffic. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey
func (*TupleKey6) DeepCopy ¶ added in v1.5.1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TupleKey6.
func (*TupleKey6) DeepCopyInto ¶ added in v1.5.1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TupleKey6) DeepCopyMapKey ¶ added in v1.5.1
DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
func (TupleKey6) Dump ¶
Dump writes the contents of key to buffer and returns true if the value for next header in the key is nonzero.
type TupleKey6Global ¶
type TupleKey6Global struct {
TupleKey6
}
TupleKey6Global represents the key for IPv6 entries in the global BPF conntrack map. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey
func (*TupleKey6Global) DeepCopy ¶ added in v1.5.1
func (in *TupleKey6Global) DeepCopy() *TupleKey6Global
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TupleKey6Global.
func (*TupleKey6Global) DeepCopyInto ¶ added in v1.5.1
func (in *TupleKey6Global) DeepCopyInto(out *TupleKey6Global)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TupleKey6Global) DeepCopyMapKey ¶ added in v1.5.1
func (in *TupleKey6Global) DeepCopyMapKey() bpf.MapKey
DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
func (TupleKey6Global) Dump ¶
func (k TupleKey6Global) Dump(buffer *bytes.Buffer, reverse bool) bool
Dump writes the contents of key to buffer and returns true if the value for next header in the key is nonzero.
func (*TupleKey6Global) GetFlags ¶
func (k *TupleKey6Global) GetFlags() uint8
GetFlags returns the tuple's flags.
func (*TupleKey6Global) String ¶
func (k *TupleKey6Global) String() string
String returns the tuple's string representation, doh.
func (*TupleKey6Global) ToHost ¶
func (k *TupleKey6Global) ToHost() TupleKey
ToHost converts ports to host byte order.
This is necessary to prevent callers from implicitly converting the TupleKey6Global type here into a local key type in the nested TupleKey6 field.
func (*TupleKey6Global) ToNetwork ¶
func (k *TupleKey6Global) ToNetwork() TupleKey
ToNetwork converts ports to network byte order.
This is necessary to prevent callers from implicitly converting the TupleKey6Global type here into a local key type in the nested TupleKey6 field.
type TupleValStub ¶ added in v1.5.0
type TupleValStub struct {
// contains filtered or unexported fields
}
TupleValStub is a dummy, unused. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue
func (*TupleValStub) DeepCopy ¶ added in v1.5.1
func (in *TupleValStub) DeepCopy() *TupleValStub
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TupleValStub.
func (*TupleValStub) DeepCopyInto ¶ added in v1.5.1
func (in *TupleValStub) DeepCopyInto(out *TupleValStub)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TupleValStub) DeepCopyMapValue ¶ added in v1.5.1
func (in *TupleValStub) DeepCopyMapValue() bpf.MapValue
DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.
func (*TupleValStub) GetValuePtr ¶ added in v1.5.0
func (t *TupleValStub) GetValuePtr() unsafe.Pointer
GetValuePtr returns the unsafe.Pointer for s.
func (*TupleValStub) String ¶ added in v1.5.0
func (t *TupleValStub) String() string
String stub method.