Documentation ¶
Overview ¶
+groupName=maps
Index ¶
Constants ¶
const ( // Pinned outer map name which signals the existence of a multicast group // in the control plane. GroupOuter4MapName = "cilium_mcast_group_outer_v4_map" // Defines total number of multicast groups on a single node. MaxGroups = 1024 // Defines total number of subscribers per multicast group on a single node. MaxSubscribers = 1024 )
const (
// Multicast is the name of the flag to enable synthetic multicast.
Multicast = "multicast-enabled"
)
Variables ¶
var Cell = cell.Module( "multicastmaps", "Multicast Maps provides interfaces to the multicast data-path maps", cell.Provide(NewGroupV4Map), cell.Config(Config{}), )
Functions ¶
This section is empty.
Types ¶
type GroupV4Key ¶
type GroupV4Key struct {
Group [4]byte
}
GroupV4Key is the key for a GroupV4OuterMap It is a IPv4 multicast group address in big endian format.
func NewGroupV4KeyFromNetIPAddr ¶
func NewGroupV4KeyFromNetIPAddr(ip netip.Addr) (out GroupV4Key, err error)
func (GroupV4Key) ToNetIPAddr ¶
func (k GroupV4Key) ToNetIPAddr() (netip.Addr, bool)
type GroupV4Map ¶
type GroupV4Map interface { Lookup(multicastAddr netip.Addr) (SubscriberV4Map, error) Insert(multicastAddr netip.Addr) error Delete(multicastAddr netip.Addr) error List() ([]netip.Addr, error) }
GroupV4Map provides an interface between the control and data plane, enabling the creation, deletion, and querying of IPv4 multicast groups and subscribers.
type GroupV4OuterMap ¶
GroupV4OuterMap outer map keyed by GroupV4Key multicast group addresses.
func NewGroupV4OuterMap ¶
func NewGroupV4OuterMap(name string) *GroupV4OuterMap
func OpenGroupV4OuterMap ¶
func OpenGroupV4OuterMap(name string) (*GroupV4OuterMap, error)
func (GroupV4OuterMap) Lookup ¶
func (m GroupV4OuterMap) Lookup(group netip.Addr) (SubscriberV4Map, error)
type GroupV4Val ¶
type GroupV4Val struct {
FD uint32
}
GroupV4Val is the value of a GroupV4OuterMap. It is a file descriptor for an inner SubscriberV4InnerMap.
type ParamsIn ¶
ParamsIn are parameters provided by the Hive and is the argument for NewGroupV4Map constructor
type ParamsOut ¶
ParamsOut are the parameters provided to the Hive and is the return argument for NewGroupV4Map
func NewGroupV4Map ¶
NewGroupV4Map creates a new GroupV4Map and provides it to the hive dependency injection graph.
Other subsystems can depend on the "multicast.GroupV4Map" type to obtain a handle to the datapath interface.
type SubscriberFlags ¶
type SubscriberFlags uint32
SubscriberFlags are a set of flags used to further define a SubscriberV4
const ( // Flag used to define a subscriber as remote. // If present SubscriberV4Val.Ifindex must represent an egress interface // towards the remote host. SubscriberRemote SubscriberFlags = (1 << 0) )
type SubscriberV4 ¶
type SubscriberV4 struct { // Source address of subscriber in big endian format SAddr netip.Addr // Interface ID of subscriber, may be a tunnel interface if subscriber // is remote. Ifindex uint32 // Specifies if the subscriber is remote or local IsRemote bool }
SubscriberV4 is a multicast subscriber
type SubscriberV4InnerMap ¶
SubscriberV4InnerMap is the inner map of a GroupV4OuterMap outer map.
This map inventories all subscribers, both local and remote, for a given multicast group.
func (SubscriberV4InnerMap) Insert ¶
func (m SubscriberV4InnerMap) Insert(s *SubscriberV4) error
func (SubscriberV4InnerMap) List ¶
func (m SubscriberV4InnerMap) List() ([]*SubscriberV4, error)
func (SubscriberV4InnerMap) Lookup ¶
func (m SubscriberV4InnerMap) Lookup(Src netip.Addr) (*SubscriberV4, error)
type SubscriberV4Key ¶
type SubscriberV4Key struct {
SAddr [4]byte
}
SubscriberV4Key is the IPv4 source address of the multicast subscriber in big endian format.
func NewSubscriberV4KeyFromNetIPAddr ¶
func NewSubscriberV4KeyFromNetIPAddr(ip netip.Addr) (out SubscriberV4Key, err error)
func (SubscriberV4Key) ToNetIPAddr ¶
func (k SubscriberV4Key) ToNetIPAddr() (netip.Addr, bool)
type SubscriberV4Map ¶
type SubscriberV4Map interface { Insert(*SubscriberV4) error Lookup(Src netip.Addr) (*SubscriberV4, error) Delete(Src netip.Addr) error List() ([]*SubscriberV4, error) }
SubscriberV4Map provides an interface between the control and data plane, enabling the creation, deletion, and querying of IPv4 multicast subscribers within a multicast group.
type SubscriberV4Val ¶
type SubscriberV4Val struct { // Source address of subscriber in big endian format SourceAddr [4]byte `align:"saddr"` // Interface ID of subscriber, may be a tunnel interface if subscriber // is remote. Ifindex uint32 `align:"ifindex"` // reserved Pad1 uint16 `align:"pad1"` // reserved Pad2 uint8 `align:"pad2"` // SubscriberFlags flag bits which further a subscriber's // characteristics. Flags uint8 `align:"flags"` }
SubscriberV4Val is a discrete subscriber value of a multicast group map.
func (*SubscriberV4Val) ToSubsciberV4 ¶
func (v *SubscriberV4Val) ToSubsciberV4() (*SubscriberV4, error)