Documentation ¶
Index ¶
- Constants
- Variables
- func AffinityMap() maps.Map
- func AffinityMapMemIter(m AffinityMapMem) func(k, v []byte)
- func AffinityMapMemV6Iter(m AffinityMapMemV6) func(k, v []byte)
- func AffinityMapV6() maps.Map
- func AllNATsMsgMap() maps.Map
- func AllNATsMsgMapV6() maps.Map
- func BackendMap() maps.MapWithExistsCheck
- func BackendMapMemIter(m BackendMapMem) func(k, v []byte)
- func BackendMapMemV6Iter(m BackendMapMemV6) func(k, v []byte)
- func BackendMapV6() maps.MapWithExistsCheck
- func FrontendMap() maps.MapWithExistsCheck
- func FrontendMapV6() maps.MapWithExistsCheck
- func InstallConnectTimeLoadBalancer(ipv4Enabled, ipv6Enabled bool, cgroupv2 string, logLevel string, ...) error
- func MapMemIter(m MapMem) func(k, v []byte)
- func MapMemV6Iter(m MapMemV6) func(k, v []byte)
- func ProgFileName(logLevel string, ipver string) string
- func RemoveConnectTimeLoadBalancer(cgroupv2 string) error
- func SendRecvMsgMap() maps.Map
- func SendRecvMsgMapMemIter(m SendRecvMsgMapMem) func(k, v []byte)
- func SendRecvMsgMapMemV6Iter(m SendRecvMsgMapMemV6) func(k, v []byte)
- func SendRecvMsgMapV6() maps.Map
- func SetMapSizes(fsize, bsize, asize int)
- type AffinityKey
- type AffinityKeyInterface
- type AffinityKeyV6
- type AffinityMapMem
- type AffinityMapMemV6
- type AffinityValue
- type AffinityValueInterface
- type AffinityValueV6
- type BackendKey
- type BackendKeyV6
- type BackendMapMem
- type BackendMapMemV6
- type BackendValue
- type BackendValueInterface
- type BackendValueV6
- type FrontEndAffinityKey
- type FrontEndAffinityKeyInterface
- type FrontEndAffinityKeyV6
- type FrontendKey
- func (k FrontendKey) Addr() net.IP
- func (k FrontendKey) AffinityKeyCopy() FrontEndAffinityKeyInterface
- func (k FrontendKey) Affinitykey() []byte
- func (k FrontendKey) AsBytes() []byte
- func (k FrontendKey) Port() uint16
- func (k FrontendKey) PrefixLen() uint32
- func (k FrontendKey) Proto() uint8
- func (k FrontendKey) SrcCIDR() ip.CIDR
- func (k FrontendKey) SrcPrefixLen() uint32
- func (k FrontendKey) String() string
- type FrontendKeyComparable
- type FrontendKeyInterface
- func FrontendKeyFromBytes(b []byte) FrontendKeyInterface
- func FrontendKeyV6FromBytes(b []byte) FrontendKeyInterface
- func NewNATKeyIntf(addr net.IP, port uint16, protocol uint8) FrontendKeyInterface
- func NewNATKeySrcIntf(addr net.IP, port uint16, protocol uint8, cidr ip.CIDR) FrontendKeyInterface
- func NewNATKeyV6Intf(addr net.IP, port uint16, protocol uint8) FrontendKeyInterface
- func NewNATKeyV6SrcIntf(addr net.IP, port uint16, protocol uint8, cidr ip.CIDR) FrontendKeyInterface
- type FrontendKeyV6
- func (k FrontendKeyV6) Addr() net.IP
- func (k FrontendKeyV6) AffinityKeyCopy() FrontEndAffinityKeyInterface
- func (k FrontendKeyV6) Affinitykey() []byte
- func (k FrontendKeyV6) AsBytes() []byte
- func (k FrontendKeyV6) Port() uint16
- func (k FrontendKeyV6) PrefixLen() uint32
- func (k FrontendKeyV6) Proto() uint8
- func (k FrontendKeyV6) SrcCIDR() ip.CIDR
- func (k FrontendKeyV6) SrcPrefixLen() uint32
- func (k FrontendKeyV6) String() string
- type FrontendValue
- func (v FrontendValue) AffinityTimeout() time.Duration
- func (v FrontendValue) AsBytes() []byte
- func (v FrontendValue) Count() uint32
- func (v FrontendValue) Flags() uint32
- func (v FrontendValue) FlagsAsString() string
- func (v FrontendValue) ID() uint32
- func (v FrontendValue) LocalCount() uint32
- func (v FrontendValue) String() string
- type FrontendValueV6
- type MapMem
- type MapMemV6
- type SendRecvMsgKey
- type SendRecvMsgKeyV6
- type SendRecvMsgMapMem
- type SendRecvMsgMapMemV6
- type SendRecvMsgValue
- type SendRecvMsgValueV6
Constants ¶
const ( ProgIndexCTLBConnectV6 = iota ProgIndexCTLBSendV6 ProgIndexCTLBRecvV6 )
const ( NATFlgExternalLocal = 0x1 NATFlgInternalLocal = 0x2 NATFlgExclude = 0x4 )
const BlackHoleCount uint32 = 0xffffffff
const ZeroCIDRPrefixLen = 56
(sizeof(addr) + sizeof(port) + sizeof(proto)) in bits
const ZeroCIDRV6PrefixLen = (16 + 2 + 1) * 8
(sizeof(addr) + sizeof(port) + sizeof(proto)) in bits
Variables ¶
var AffinityMapParameters = maps.MapParameters{
Type: "lru_hash",
KeySize: affinityKeySize,
ValueSize: affinityValueSize,
MaxEntries: 64 * 1024,
Name: "cali_v4_nat_aff",
}
AffinityMapParameters describe the AffinityMap
var AffinityMapV6Parameters = maps.MapParameters{
Type: "lru_hash",
KeySize: affinityKeyV6Size,
ValueSize: affinityValueV6Size,
MaxEntries: 64 * 1024,
Name: "cali_v6_nat_aff",
}
AffinityMapParameters describe the AffinityMap
var BackendMapParameters = maps.MapParameters{ Type: "hash", KeySize: backendKeySize, ValueSize: backendValueSize, MaxEntries: 256 * 1024, Name: "cali_v4_nat_be", Flags: unix.BPF_F_NO_PREALLOC, }
var BackendMapV6Parameters = maps.MapParameters{ Type: "hash", KeySize: backendKeyV6Size, ValueSize: backendValueV6Size, MaxEntries: 256 * 1024, Name: "cali_v6_nat_be", Flags: unix.BPF_F_NO_PREALLOC, }
var CTNATsMapParameters = maps.MapParameters{
Type: "lru_hash",
KeySize: ctNATsMsgKeySize,
ValueSize: sendRecvMsgValueSize,
MaxEntries: 10000,
Name: "cali_v4_ct_nats",
}
var CTNATsMapV6Parameters = maps.MapParameters{
Type: "lru_hash",
KeySize: ctNATsMsgKeyV6Size,
ValueSize: sendRecvMsgValueV6Size,
MaxEntries: 10000,
Name: "cali_v6_ct_nats",
}
var FrontendMapParameters = maps.MapParameters{ Type: "lpm_trie", KeySize: frontendKeySize, ValueSize: frontendValueSize, MaxEntries: 64 * 1024, Name: "cali_v4_nat_fe", Flags: unix.BPF_F_NO_PREALLOC, Version: 3, }
var FrontendMapV6Parameters = maps.MapParameters{ Type: "lpm_trie", KeySize: frontendKeyV6Size, ValueSize: frontendValueV6Size, MaxEntries: 64 * 1024, Name: "cali_v6_nat_fe", Flags: unix.BPF_F_NO_PREALLOC, Version: 3, }
var ProgramsMapParameters = maps.MapParameters{
Type: "prog_array",
KeySize: 4,
ValueSize: 4,
MaxEntries: 3,
Name: "cali_ctlb_progs",
}
var SendRecvMsgMapParameters = maps.MapParameters{
Type: "lru_hash",
KeySize: sendRecvMsgKeySize,
ValueSize: sendRecvMsgValueSize,
MaxEntries: 510000,
Name: "cali_v4_srmsg",
}
SendRecvMsgMapParameters define SendRecvMsgMap
var SendRecvMsgMapV6Parameters = maps.MapParameters{
Type: "lru_hash",
KeySize: sendRecvMsgKeyV6Size,
ValueSize: sendRecvMsgValueV6Size,
MaxEntries: 510000,
Name: "cali_v6_srmsg",
}
SendRecvMsgMapParameters define SendRecvMsgMap
var ZeroCIDR = ip.MustParseCIDROrIP("0.0.0.0/0").(ip.V4CIDR)
var ZeroCIDRV6 = ip.MustParseCIDROrIP("::/0").(ip.V6CIDR)
Functions ¶
func AffinityMapMemIter ¶
func AffinityMapMemIter(m AffinityMapMem) func(k, v []byte)
AffinityMapMemIter returns maps.MapIter that loads the provided AffinityMapMem
func AffinityMapMemV6Iter ¶
func AffinityMapMemV6Iter(m AffinityMapMemV6) func(k, v []byte)
AffinityMapMemIter returns maps.MapIter that loads the provided AffinityMapMem
func AffinityMapV6 ¶
AffinityMap returns an instance of an affinity map
func AllNATsMsgMap ¶
func AllNATsMsgMapV6 ¶
func BackendMap ¶
func BackendMap() maps.MapWithExistsCheck
func BackendMapMemIter ¶
func BackendMapMemIter(m BackendMapMem) func(k, v []byte)
BackendMapMemIter returns maps.MapIter that loads the provided NATBackendMapMem
func BackendMapMemV6Iter ¶
func BackendMapMemV6Iter(m BackendMapMemV6) func(k, v []byte)
BackendMapMemIter returns maps.MapIter that loads the provided NATBackendMapMem
func BackendMapV6 ¶
func BackendMapV6() maps.MapWithExistsCheck
func FrontendMap ¶
func FrontendMap() maps.MapWithExistsCheck
func FrontendMapV6 ¶
func FrontendMapV6() maps.MapWithExistsCheck
func MapMemIter ¶
MapMemIter returns maps.MapIter that loads the provided NATMapMem
func MapMemV6Iter ¶
MapMemIter returns maps.MapIter that loads the provided NATMapMem
func ProgFileName ¶
func SendRecvMsgMap ¶
SendRecvMsgMap tracks reverse translations for sendmsg/recvmsg of unconnected UDP
func SendRecvMsgMapMemIter ¶
func SendRecvMsgMapMemIter(m SendRecvMsgMapMem) func(k, v []byte)
SendRecvMsgMapMemIter returns maps.MapIter that loads the provided SendRecvMsgMapMem
func SendRecvMsgMapMemV6Iter ¶
func SendRecvMsgMapMemV6Iter(m SendRecvMsgMapMemV6) func(k, v []byte)
SendRecvMsgMapMemIter returns maps.MapIter that loads the provided SendRecvMsgMapMem
func SendRecvMsgMapV6 ¶
SendRecvMsgMap tracks reverse translations for sendmsg/recvmsg of unconnected UDP
func SetMapSizes ¶
func SetMapSizes(fsize, bsize, asize int)
Types ¶
type AffinityKey ¶
type AffinityKey [affinityKeySize]byte
AffinityKey is a key into the affinity table that consist of FrontendKey and the client's IP
func AffinityKeyFromBytes ¶
func AffinityKeyFromBytes(b []byte) AffinityKey
func NewAffinityKey ¶
func NewAffinityKey(clientIP net.IP, fEndKey FrontendKey) AffinityKey
NewAffinityKey create a new AffinityKey from a clientIP and FrontendKey
func (AffinityKey) AsBytes ¶
func (k AffinityKey) AsBytes() []byte
AsBytes returns the key as []byte
func (AffinityKey) ClientIP ¶
func (k AffinityKey) ClientIP() net.IP
ClientIP returns the ClientIP part of the key
func (AffinityKey) FrontendAffinityKey ¶
func (k AffinityKey) FrontendAffinityKey() FrontEndAffinityKeyInterface
FrontendKey returns the FrontendKey part of the key
func (AffinityKey) String ¶
func (k AffinityKey) String() string
type AffinityKeyInterface ¶
type AffinityKeyInterface interface { ClientIP() net.IP FrontendAffinityKey() FrontEndAffinityKeyInterface String() string AsBytes() []byte }
func AffinityKeyIntfFromBytes ¶
func AffinityKeyIntfFromBytes(b []byte) AffinityKeyInterface
func AffinityKeyV6IntfFromBytes ¶
func AffinityKeyV6IntfFromBytes(b []byte) AffinityKeyInterface
type AffinityKeyV6 ¶
type AffinityKeyV6 [affinityKeyV6Size]byte
AffinityKeyV6 is a key into the affinity table that consist of FrontendKeyV6 and the client's IP
func AffinityKeyV6FromBytes ¶
func AffinityKeyV6FromBytes(b []byte) AffinityKeyV6
func NewAffinityKeyV6 ¶
func NewAffinityKeyV6(clientIP net.IP, fEndKey FrontendKeyV6) AffinityKeyV6
NewAffinityKey create a new AffinityKeyV6 from a clientIP and FrontendKeyV6
func (AffinityKeyV6) AsBytes ¶
func (k AffinityKeyV6) AsBytes() []byte
AsBytes returns the key as []byte
func (AffinityKeyV6) ClientIP ¶
func (k AffinityKeyV6) ClientIP() net.IP
ClientIP returns the ClientIP part of the key
func (AffinityKeyV6) FrontendAffinityKey ¶
func (k AffinityKeyV6) FrontendAffinityKey() FrontEndAffinityKeyInterface
FrontendKeyV6 returns the FrontendKeyV6 part of the key
func (AffinityKeyV6) String ¶
func (k AffinityKeyV6) String() string
type AffinityMapMem ¶
type AffinityMapMem map[AffinityKey]AffinityValue
AffinityMapMem represents affinity map in memory
func LoadAffinityMap ¶
func LoadAffinityMap(m maps.Map) (AffinityMapMem, error)
LoadAffinityMap loads affinity map into memory
type AffinityMapMemV6 ¶
type AffinityMapMemV6 map[AffinityKeyV6]AffinityValueV6
AffinityMapMem represents affinity map in memory
func LoadAffinityMapV6 ¶
func LoadAffinityMapV6(m maps.Map) (AffinityMapMemV6, error)
LoadAffinityMap loads affinity map into memory
type AffinityValue ¶
type AffinityValue [affinityValueSize]byte
AffinityValue represents a backend picked by the affinity and the timestamp of its creating
func AffinityValueFromBytes ¶
func AffinityValueFromBytes(b []byte) AffinityValue
func NewAffinityValue ¶
func NewAffinityValue(ts uint64, backend BackendValue) AffinityValue
NewAffinityValue creates a value from a timestamp and a backend
func (AffinityValue) AsBytes ¶
func (v AffinityValue) AsBytes() []byte
AsBytes returns the value as []byte
func (AffinityValue) Backend ¶
func (v AffinityValue) Backend() BackendValueInterface
Backend returns the backend the affinity ties the frontend + client to.
func (AffinityValue) String ¶
func (v AffinityValue) String() string
func (AffinityValue) Timestamp ¶
func (v AffinityValue) Timestamp() time.Duration
Timestamp returns the timestamp of the entry. It is generated by bpf_ktime_get_ns which returns the time since the system boot in nanoseconds - it is the monotonic clock reading, which is compatible with time operations in time package.
type AffinityValueInterface ¶
type AffinityValueInterface interface { Timestamp() time.Duration Backend() BackendValueInterface }
func AffinityValueIntfFromBytes ¶
func AffinityValueIntfFromBytes(b []byte) AffinityValueInterface
func AffinityValueV6IntfFromBytes ¶
func AffinityValueV6IntfFromBytes(b []byte) AffinityValueInterface
type AffinityValueV6 ¶
type AffinityValueV6 [affinityValueV6Size]byte
AffinityValueV6 represents a backend picked by the affinity and the timestamp of its creating
func AffinityValueV6FromBytes ¶
func AffinityValueV6FromBytes(b []byte) AffinityValueV6
func NewAffinityValueV6 ¶
func NewAffinityValueV6(ts uint64, backend BackendValueV6) AffinityValueV6
NewAffinityValue creates a value from a timestamp and a backend
func (AffinityValueV6) AsBytes ¶
func (v AffinityValueV6) AsBytes() []byte
AsBytes returns the value as []byte
func (AffinityValueV6) Backend ¶
func (v AffinityValueV6) Backend() BackendValueInterface
Backend returns the backend the affinity ties the frontend + client to.
func (AffinityValueV6) String ¶
func (v AffinityValueV6) String() string
func (AffinityValueV6) Timestamp ¶
func (v AffinityValueV6) Timestamp() time.Duration
Timestamp returns the timestamp of the entry. It is generated by bpf_ktime_get_ns which returns the time since the system boot in nanoseconds - it is the monotonic clock reading, which is compatible with time operations in time package.
type BackendKey ¶
type BackendKey [backendKeySize]byte
func BackendKeyFromBytes ¶
func BackendKeyFromBytes(b []byte) BackendKey
func NewNATBackendKey ¶
func NewNATBackendKey(id, ordinal uint32) BackendKey
func (BackendKey) AsBytes ¶
func (k BackendKey) AsBytes() []byte
func (BackendKey) Count ¶
func (v BackendKey) Count() uint32
func (BackendKey) ID ¶
func (v BackendKey) ID() uint32
func (BackendKey) String ¶
func (v BackendKey) String() string
type BackendKeyV6 ¶
type BackendKeyV6 = BackendKey
func BackendKeyV6FromBytes ¶
func BackendKeyV6FromBytes(b []byte) BackendKeyV6
func NewNATBackendKeyV6 ¶
func NewNATBackendKeyV6(id, ordinal uint32) BackendKeyV6
type BackendMapMem ¶
type BackendMapMem map[BackendKey]BackendValue
BackendMapMem represents a NATBackend loaded into memory
func LoadBackendMap ¶
func LoadBackendMap(m maps.Map) (BackendMapMem, error)
LoadBackendMap loads the NATBackend map into a go map or returns an error
func (BackendMapMem) Equal ¶
func (m BackendMapMem) Equal(cmp BackendMapMem) bool
Equal compares keys and values of the NATBackendMapMem
type BackendMapMemV6 ¶
type BackendMapMemV6 map[BackendKeyV6]BackendValueV6
BackendMapMemV6 represents a NATBackend loaded into memory
func LoadBackendMapV6 ¶
func LoadBackendMapV6(m maps.Map) (BackendMapMemV6, error)
LoadBackendMap loads the NATBackend map into a go map or returns an error
func (BackendMapMemV6) Equal ¶
func (m BackendMapMemV6) Equal(cmp BackendMapMemV6) bool
Equal compares keys and values of the NATBackendMapMem
type BackendValue ¶
type BackendValue [backendValueSize]byte
func NewNATBackendValue ¶
func NewNATBackendValue(addr net.IP, port uint16) BackendValue
func (BackendValue) Addr ¶
func (k BackendValue) Addr() net.IP
func (BackendValue) AsBytes ¶
func (k BackendValue) AsBytes() []byte
func (BackendValue) Port ¶
func (k BackendValue) Port() uint16
func (BackendValue) String ¶
func (k BackendValue) String() string
type BackendValueInterface ¶
type BackendValueInterface interface { Addr() net.IP Port() uint16 String() string AsBytes() []byte }
func BackendValueFromBytes ¶
func BackendValueFromBytes(b []byte) BackendValueInterface
func BackendValueV6FromBytes ¶
func BackendValueV6FromBytes(b []byte) BackendValueInterface
func NewNATBackendValueIntf ¶
func NewNATBackendValueIntf(addr net.IP, port uint16) BackendValueInterface
func NewNATBackendValueV6Intf ¶
func NewNATBackendValueV6Intf(addr net.IP, port uint16) BackendValueInterface
type BackendValueV6 ¶
type BackendValueV6 [backendValueV6Size]byte
func NewNATBackendValueV6 ¶
func NewNATBackendValueV6(addr net.IP, port uint16) BackendValueV6
func (BackendValueV6) Addr ¶
func (k BackendValueV6) Addr() net.IP
func (BackendValueV6) AsBytes ¶
func (k BackendValueV6) AsBytes() []byte
func (BackendValueV6) Port ¶
func (k BackendValueV6) Port() uint16
func (BackendValueV6) String ¶
func (k BackendValueV6) String() string
type FrontEndAffinityKey ¶
type FrontEndAffinityKey [frontendAffKeySize]byte
func (FrontEndAffinityKey) Addr ¶
func (k FrontEndAffinityKey) Addr() net.IP
func (FrontEndAffinityKey) AsBytes ¶
func (k FrontEndAffinityKey) AsBytes() []byte
func (FrontEndAffinityKey) Port ¶
func (k FrontEndAffinityKey) Port() uint16
func (FrontEndAffinityKey) Proto ¶
func (k FrontEndAffinityKey) Proto() uint8
func (FrontEndAffinityKey) String ¶
func (k FrontEndAffinityKey) String() string
type FrontEndAffinityKeyV6 ¶
type FrontEndAffinityKeyV6 [frontendAffKeyV6Size]byte
func (FrontEndAffinityKeyV6) Addr ¶
func (k FrontEndAffinityKeyV6) Addr() net.IP
func (FrontEndAffinityKeyV6) AsBytes ¶
func (k FrontEndAffinityKeyV6) AsBytes() []byte
func (FrontEndAffinityKeyV6) Port ¶
func (k FrontEndAffinityKeyV6) Port() uint16
func (FrontEndAffinityKeyV6) Proto ¶
func (k FrontEndAffinityKeyV6) Proto() uint8
func (FrontEndAffinityKeyV6) String ¶
func (k FrontEndAffinityKeyV6) String() string
type FrontendKey ¶
type FrontendKey [frontendKeySize]byte
func NewNATKeySrc ¶
func (FrontendKey) Addr ¶
func (k FrontendKey) Addr() net.IP
func (FrontendKey) AffinityKeyCopy ¶
func (k FrontendKey) AffinityKeyCopy() FrontEndAffinityKeyInterface
func (FrontendKey) Affinitykey ¶
func (k FrontendKey) Affinitykey() []byte
func (FrontendKey) AsBytes ¶
func (k FrontendKey) AsBytes() []byte
func (FrontendKey) Port ¶
func (k FrontendKey) Port() uint16
func (FrontendKey) PrefixLen ¶
func (k FrontendKey) PrefixLen() uint32
func (FrontendKey) Proto ¶
func (k FrontendKey) Proto() uint8
func (FrontendKey) SrcCIDR ¶
func (k FrontendKey) SrcCIDR() ip.CIDR
func (FrontendKey) SrcPrefixLen ¶
func (k FrontendKey) SrcPrefixLen() uint32
This function returns the Prefix length of the source CIDR
func (FrontendKey) String ¶
func (k FrontendKey) String() string
type FrontendKeyComparable ¶
type FrontendKeyComparable interface { comparable FrontendKeyInterface }
type FrontendKeyInterface ¶
type FrontendKeyInterface interface { Proto() uint8 Addr() net.IP Port() uint16 SrcPrefixLen() uint32 SrcCIDR() ip.CIDR AffinityKeyCopy() FrontEndAffinityKeyInterface String() string AsBytes() []byte }
func FrontendKeyFromBytes ¶
func FrontendKeyFromBytes(b []byte) FrontendKeyInterface
func FrontendKeyV6FromBytes ¶
func FrontendKeyV6FromBytes(b []byte) FrontendKeyInterface
func NewNATKeyIntf ¶
func NewNATKeyIntf(addr net.IP, port uint16, protocol uint8) FrontendKeyInterface
func NewNATKeySrcIntf ¶
func NewNATKeyV6Intf ¶
func NewNATKeyV6Intf(addr net.IP, port uint16, protocol uint8) FrontendKeyInterface
func NewNATKeyV6SrcIntf ¶
type FrontendKeyV6 ¶
type FrontendKeyV6 [frontendKeyV6Size]byte
func NewNATKeyV6 ¶
func NewNATKeyV6(addr net.IP, port uint16, protocol uint8) FrontendKeyV6
func NewNATKeyV6Src ¶
func (FrontendKeyV6) Addr ¶
func (k FrontendKeyV6) Addr() net.IP
func (FrontendKeyV6) AffinityKeyCopy ¶
func (k FrontendKeyV6) AffinityKeyCopy() FrontEndAffinityKeyInterface
func (FrontendKeyV6) Affinitykey ¶
func (k FrontendKeyV6) Affinitykey() []byte
func (FrontendKeyV6) AsBytes ¶
func (k FrontendKeyV6) AsBytes() []byte
func (FrontendKeyV6) Port ¶
func (k FrontendKeyV6) Port() uint16
func (FrontendKeyV6) PrefixLen ¶
func (k FrontendKeyV6) PrefixLen() uint32
func (FrontendKeyV6) Proto ¶
func (k FrontendKeyV6) Proto() uint8
func (FrontendKeyV6) SrcCIDR ¶
func (k FrontendKeyV6) SrcCIDR() ip.CIDR
func (FrontendKeyV6) SrcPrefixLen ¶
func (k FrontendKeyV6) SrcPrefixLen() uint32
This function returns the Prefix length of the source CIDR
func (FrontendKeyV6) String ¶
func (k FrontendKeyV6) String() string
type FrontendValue ¶
type FrontendValue [frontendValueSize]byte
func FrontendValueFromBytes ¶
func FrontendValueFromBytes(b []byte) FrontendValue
func NewNATValue ¶
func NewNATValue(id uint32, count, local, affinityTimeo uint32) FrontendValue
func NewNATValueWithFlags ¶
func NewNATValueWithFlags(id uint32, count, local, affinityTimeo, flags uint32) FrontendValue
func (FrontendValue) AffinityTimeout ¶
func (v FrontendValue) AffinityTimeout() time.Duration
func (FrontendValue) AsBytes ¶
func (v FrontendValue) AsBytes() []byte
func (FrontendValue) Count ¶
func (v FrontendValue) Count() uint32
func (FrontendValue) Flags ¶
func (v FrontendValue) Flags() uint32
func (FrontendValue) FlagsAsString ¶
func (v FrontendValue) FlagsAsString() string
func (FrontendValue) ID ¶
func (v FrontendValue) ID() uint32
func (FrontendValue) LocalCount ¶
func (v FrontendValue) LocalCount() uint32
func (FrontendValue) String ¶
func (v FrontendValue) String() string
type FrontendValueV6 ¶
type FrontendValueV6 = FrontendValue
func FrontendValueV6FromBytes ¶
func FrontendValueV6FromBytes(b []byte) FrontendValueV6
func NewNATValueV6 ¶
func NewNATValueV6(id uint32, count, local, affinityTimeo uint32) FrontendValueV6
func NewNATValueV6WithFlags ¶
func NewNATValueV6WithFlags(id uint32, count, local, affinityTimeo, flags uint32) FrontendValueV6
type MapMem ¶
type MapMem map[FrontendKey]FrontendValue
NATMapMem represents FrontendMap loaded into memory
func LoadFrontendMap ¶
LoadFrontendMap loads the NAT map into a go map or returns an error
type MapMemV6 ¶
type MapMemV6 map[FrontendKeyV6]FrontendValueV6
NATMapMem represents FrontendMap loaded into memory
func LoadFrontendMapV6 ¶
LoadFrontendMap loads the NAT map into a go map or returns an error
type SendRecvMsgKey ¶
type SendRecvMsgKey [sendRecvMsgKeySize]byte
SendRecvMsgKey is the key for SendRecvMsgMap
func (SendRecvMsgKey) Cookie ¶
func (k SendRecvMsgKey) Cookie() uint64
Cookie returns the socket cookie part of the key that can be used to match the socket.
func (SendRecvMsgKey) IP ¶
func (k SendRecvMsgKey) IP() net.IP
IP returns the IP address part of the key
func (SendRecvMsgKey) Port ¶
func (k SendRecvMsgKey) Port() uint16
Port returns port converted to 16-bit host endianness
func (SendRecvMsgKey) String ¶
func (k SendRecvMsgKey) String() string
type SendRecvMsgKeyV6 ¶
type SendRecvMsgKeyV6 [sendRecvMsgKeyV6Size]byte
SendRecvMsgKeyV6 is the key for SendRecvMsgMap
func (SendRecvMsgKeyV6) Cookie ¶
func (k SendRecvMsgKeyV6) Cookie() uint64
Cookie returns the socket cookie part of the key that can be used to match the socket.
func (SendRecvMsgKeyV6) IP ¶
func (k SendRecvMsgKeyV6) IP() net.IP
IP returns the IP address part of the key
func (SendRecvMsgKeyV6) Port ¶
func (k SendRecvMsgKeyV6) Port() uint16
Port returns port converted to 16-bit host endianness
func (SendRecvMsgKeyV6) String ¶
func (k SendRecvMsgKeyV6) String() string
type SendRecvMsgMapMem ¶
type SendRecvMsgMapMem map[SendRecvMsgKey]SendRecvMsgValue
SendRecvMsgMapMem represents affinity map in memory
func LoadSendRecvMsgMap ¶
func LoadSendRecvMsgMap(m maps.Map) (SendRecvMsgMapMem, error)
LoadSendRecvMsgMap loads affinity map into memory
type SendRecvMsgMapMemV6 ¶
type SendRecvMsgMapMemV6 map[SendRecvMsgKeyV6]SendRecvMsgValueV6
SendRecvMsgMapMem represents affinity map in memory
func LoadSendRecvMsgMapV6 ¶
func LoadSendRecvMsgMapV6(m maps.Map) (SendRecvMsgMapMemV6, error)
LoadSendRecvMsgMap loads affinity map into memory
type SendRecvMsgValue ¶
type SendRecvMsgValue [sendRecvMsgValueSize]byte
SendRecvMsgValue is the value of SendRecvMsgMap
func (SendRecvMsgValue) IP ¶
func (v SendRecvMsgValue) IP() net.IP
IP returns the IP address part of the key
func (SendRecvMsgValue) Port ¶
func (v SendRecvMsgValue) Port() uint16
Port returns port converted to 16-bit host endianness
func (SendRecvMsgValue) String ¶
func (v SendRecvMsgValue) String() string
type SendRecvMsgValueV6 ¶
type SendRecvMsgValueV6 [sendRecvMsgValueV6Size]byte
SendRecvMsgValueV6 is the value of SendRecvMsgMap
func (SendRecvMsgValueV6) IP ¶
func (v SendRecvMsgValueV6) IP() net.IP
IP returns the IP address part of the key
func (SendRecvMsgValueV6) Port ¶
func (v SendRecvMsgValueV6) Port() uint16
Port returns port converted to 16-bit host endianness
func (SendRecvMsgValueV6) String ¶
func (v SendRecvMsgValueV6) String() string