Documentation ¶
Overview ¶
+groupName=maps
Index ¶
- Variables
- func OpenPolicyMaps() (*PolicyMap4, *PolicyMap6, error)
- func OpenVRFMaps() (*VRFMap4, *VRFMap6, error)
- type PolicyKey
- type PolicyKey4
- type PolicyKey6
- type PolicyMap4
- type PolicyMap6
- type PolicyValue
- type SIDKey
- type SIDMap
- type SIDValue
- type SRv6PolicyIterateCallback
- type SRv6SIDIterateCallback
- type SRv6VRFIterateCallback
- type VRFKey
- type VRFKey4
- type VRFKey6
- type VRFMap4
- type VRFMap6
- type VRFValue
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func OpenPolicyMaps ¶
func OpenPolicyMaps() (*PolicyMap4, *PolicyMap6, error)
OpenPolicyMaps opens the SRv6 policy maps on bpffs
func OpenVRFMaps ¶
OpenVRFMaps opens the SRv6 VRF maps on bpffs
Types ¶
type PolicyKey4 ¶
type PolicyKey4 struct { // PrefixLen is full 32 bits of VRF ID + DestCIDR's mask bits PrefixLen uint32 `align:"lpm"` VRFID uint32 `align:"vrf_id"` DestCIDR types.IPv4 `align:"dst_cidr"` }
PolicyKey4 is a key for the PolicyMap4. Implements bpf.MapKey.
func (*PolicyKey4) New ¶ added in v1.16.0
func (k *PolicyKey4) New() bpf.MapKey
func (*PolicyKey4) String ¶ added in v1.16.0
func (k *PolicyKey4) String() string
type PolicyKey6 ¶
type PolicyKey6 struct { // PrefixLen is full 32 bits of VRF ID + DestCIDR's mask bits PrefixLen uint32 `align:"lpm"` VRFID uint32 `align:"vrf_id"` DestCIDR types.IPv6 `align:"dst_cidr"` }
PolicyKey6 is a key for the PolicyMap6. Implements bpf.MapKey.
func (*PolicyKey6) New ¶ added in v1.16.0
func (k *PolicyKey6) New() bpf.MapKey
func (*PolicyKey6) String ¶ added in v1.16.0
func (k *PolicyKey6) String() string
type PolicyMap4 ¶ added in v1.16.0
type PolicyMap4 srv6PolicyMap
Define different types for IPv4 and IPv6 maps for DI
func (*PolicyMap4) IterateWithCallback ¶ added in v1.16.0
func (m *PolicyMap4) IterateWithCallback(cb SRv6PolicyIterateCallback) error
IterateWithCallback4 iterates through the IPv4 keys/values of an egress policy map, passing each key/value pair to the cb callback.
type PolicyMap6 ¶ added in v1.16.0
type PolicyMap6 srv6PolicyMap
func (*PolicyMap6) IterateWithCallback ¶ added in v1.16.0
func (m *PolicyMap6) IterateWithCallback(cb SRv6PolicyIterateCallback) error
IterateWithCallback iterates through the IPv6 keys/values of an egress policy map, passing each key/value pair to the cb callback.
type PolicyValue ¶
PolicyValue is a value for the PolicyMap4/6. Implements bpf.MapValue.
func (*PolicyValue) New ¶ added in v1.16.0
func (k *PolicyValue) New() bpf.MapValue
func (*PolicyValue) String ¶
func (v *PolicyValue) String() string
type SIDMap ¶ added in v1.16.0
SIDMap is the internal representation of an SRv6 SID map.
func (*SIDMap) IterateWithCallback ¶ added in v1.16.0
func (m *SIDMap) IterateWithCallback(cb SRv6SIDIterateCallback) error
IterateWithCallback iterates through all the keys/values of an SRv6 SID map, passing each key/value pair to the cb callback.
type SIDValue ¶
type SIDValue struct {
VRFID uint32
}
SIDValue is a value for the SIDMap. Implements bpf.MapValue.
type SRv6PolicyIterateCallback ¶
type SRv6PolicyIterateCallback func(*PolicyKey, *PolicyValue)
SRv6PolicyIterateCallback represents the signature of the callback function expected by the IterateWithCallback method, which in turn is used to iterate all the keys/values of an SRv6 policy map.
type SRv6SIDIterateCallback ¶
SRv6SIDIterateCallback represents the signature of the callback function expected by the IterateWithCallback method, which in turn is used to iterate all the keys/values of an SRv6 SID map.
type SRv6VRFIterateCallback ¶
SRv6VRFIterateCallback represents the signature of the callback function expected by the IterateWithCallback method, which in turn is used to iterate all the keys/values of policy maps.
type VRFKey4 ¶
type VRFKey4 struct { // PrefixLen is full 32 bits of VRF ID + DestCIDR's mask bits PrefixLen uint32 `align:"lpm"` SourceIP types.IPv4 `align:"src_ip"` DestCIDR types.IPv4 `align:"dst_cidr"` }
VRFKey4 is a key for the VRFMap4. Implements bpf.MapKey.
type VRFKey6 ¶
type VRFKey6 struct { // PrefixLen is full 32 bits of VRF ID + DestCIDR's mask bits PrefixLen uint32 `align:"lpm"` SourceIP types.IPv6 `align:"src_ip"` DestCIDR types.IPv6 `align:"dst_cidr"` }
VRFKey6 is a key for the VRFMap6. Implements bpf.MapKey.
type VRFMap4 ¶ added in v1.16.0
type VRFMap4 srv6VRFMap
Define different types for IPv4 and IPv6 maps for DI
func (*VRFMap4) IterateWithCallback ¶ added in v1.16.0
func (m *VRFMap4) IterateWithCallback(cb SRv6VRFIterateCallback) error
IterateWithCallback iterates through the IPv4 keys/values of a VRF mapping map, passing each key/value pair to the cb callback.
type VRFMap6 ¶ added in v1.16.0
type VRFMap6 srv6VRFMap
func (*VRFMap6) IterateWithCallback ¶ added in v1.16.0
func (m *VRFMap6) IterateWithCallback(cb SRv6VRFIterateCallback) error
IterateWithCallback iterates through the IPv6 keys/values of a VRF mapping map, passing each key/value pair to the cb callback.