multicast

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

nolint: unused // a lot of this code is unused for Windows since the multicast feature is not implemented yet

Index

Constants

View Source
const (
	GroupNameIndexName      = "groupName"
	MulticastFlag           = "multicast"
	MulticastRecvBufferSize = 128
)
View Source
const (
	IGMPProtocolNumber = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewMulticastController

func NewMulticastController(ofClient openflow.Client,
	v4GroupAllocator openflow.GroupAllocator,
	nodeConfig *config.NodeConfig,
	ifaceStore interfacestore.InterfaceStore,
	multicastSocket RouteInterface,
	multicastInterfaces sets.Set[string],
	podUpdateSubscriber channel.Subscriber,
	igmpQueryInterval time.Duration,
	igmpQueryVersions []uint8,
	validator types.McastNetworkPolicyController,
	isEncap bool,
	nodeInformer coreinformers.NodeInformer,
	enableFlexibleIPAM bool) *Controller

func (*Controller) CollectIGMPReportNPStats added in v1.7.0

func (c *Controller) CollectIGMPReportNPStats() (igmpANNPStats, igmpACNPStats map[apitypes.UID]map[string]*types.RuleMetric)

func (*Controller) GetAllPodsStats added in v1.7.0

func (c *Controller) GetAllPodsStats() map[*interfacestore.InterfaceConfig]*PodTrafficStats

func (*Controller) GetGroupPods added in v1.7.0

func (c *Controller) GetGroupPods() map[string][]v1beta2.PodReference

func (*Controller) GetPodStats added in v1.7.0

func (c *Controller) GetPodStats(podName string, podNamespace string) *PodTrafficStats

func (*Controller) Initialize

func (c *Controller) Initialize() error

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{})

type GroupMemberStatus

type GroupMemberStatus struct {
	// contains filtered or unexported fields
}

type IGMPSnooper

type IGMPSnooper struct {
	// contains filtered or unexported fields
}

func (*IGMPSnooper) HandlePacketIn

func (s *IGMPSnooper) HandlePacketIn(pktIn *ofctrl.PacketIn) error

type MRouteClient

type MRouteClient struct {
	// contains filtered or unexported fields
}

MRouteClient configures static multicast route.

func (*MRouteClient) Initialize

func (c *MRouteClient) Initialize() error

type PodTrafficStats added in v1.7.0

type PodTrafficStats struct {
	Inbound, Outbound uint64
}

PodTrafficStats encodes the inbound and outbound multicast statistics of each Pod.

type RouteInterface

type RouteInterface interface {
	// MulticastInterfaceJoinMgroup enables interface with name ifaceName and IP ifaceIP
	// joins multicast group IP mgroup.
	MulticastInterfaceJoinMgroup(mgroup net.IP, ifaceIP net.IP, ifaceName string) error
	// MulticastInterfaceLeaveMgroup enables interface with name ifaceName and IP ifaceIP
	// leaves multicast group IP mgroup.
	MulticastInterfaceLeaveMgroup(mgroup net.IP, ifaceIP net.IP, ifaceName string) error
	// AddMrouteEntry adds multicast route with specified source(src), multicast group IP(group),
	// inbound multicast interface(iif) and outbound multicast interfaces(oifs).
	AddMrouteEntry(src net.IP, group net.IP, iif uint16, oifs []uint16) (err error)
	// DelMrouteEntry deletes multicast route with specified source(src), multicast group IP(group),
	// inbound multicast interface(iif).
	DelMrouteEntry(src net.IP, group net.IP, iif uint16) (err error)
	// FlushMRoute flushes static multicast routing entries.
	FlushMRoute()
	// GetFD returns socket file descriptor.
	GetFD() int
	// AllocateVIFs allocate VIFs to interfaces, starting from startVIF.
	AllocateVIFs(interfaceNames []string, startVIF uint16) ([]uint16, error)
}

type Socket

type Socket struct {
	// contains filtered or unexported fields
}

func CreateMulticastSocket

func CreateMulticastSocket() (*Socket, error)

func (*Socket) AddMrouteEntry

func (s *Socket) AddMrouteEntry(src net.IP, group net.IP, iif uint16, oifVIFs []uint16) (err error)

func (*Socket) AllocateVIFs

func (s *Socket) AllocateVIFs(interfaceNames []string, startVIF uint16) ([]uint16, error)

func (*Socket) DelMrouteEntry

func (s *Socket) DelMrouteEntry(src net.IP, group net.IP, iif uint16) (err error)

func (*Socket) FlushMRoute

func (s *Socket) FlushMRoute()

func (*Socket) GetFD

func (s *Socket) GetFD() int

func (*Socket) MulticastInterfaceJoinMgroup

func (s *Socket) MulticastInterfaceJoinMgroup(mgroup net.IP, ifaceIP net.IP, ifaceName string) error

func (*Socket) MulticastInterfaceLeaveMgroup

func (s *Socket) MulticastInterfaceLeaveMgroup(mgroup net.IP, ifaceIP net.IP, ifaceName string) error

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL