Documentation ¶
Overview ¶
nolint: unused // a lot of this code is unused for Windows since the multicast feature is not implemented yet
Index ¶
- Constants
- type Controller
- func (c *Controller) CollectIGMPReportNPStats() (igmpANNPStats, igmpACNPStats map[apitypes.UID]map[string]*types.RuleMetric)
- func (c *Controller) GetAllPodsStats() map[*interfacestore.InterfaceConfig]*PodTrafficStats
- func (c *Controller) GetGroupPods() map[string][]v1beta2.PodReference
- func (c *Controller) GetPodStats(podName string, podNamespace string) *PodTrafficStats
- func (c *Controller) Initialize() error
- func (c *Controller) Run(stopCh <-chan struct{})
- type GroupMemberStatus
- type IGMPSnooper
- type MRouteClient
- type PodTrafficStats
- type RouteInterface
- type Socket
- func (s *Socket) AddMrouteEntry(src net.IP, group net.IP, iif uint16, oifVIFs []uint16) (err error)
- func (s *Socket) AllocateVIFs(interfaceNames []string, startVIF uint16) ([]uint16, error)
- func (s *Socket) DelMrouteEntry(src net.IP, group net.IP, iif uint16) (err error)
- func (s *Socket) FlushMRoute()
- func (s *Socket) GetFD() int
- func (s *Socket) MulticastInterfaceJoinMgroup(mgroup net.IP, ifaceIP net.IP, ifaceName string) error
- func (s *Socket) MulticastInterfaceLeaveMgroup(mgroup net.IP, ifaceIP net.IP, ifaceName string) error
Constants ¶
View Source
const ( GroupNameIndexName = "groupName" MulticastFlag = "multicast" MulticastRecvBufferSize = 128 )
View Source
const ( IGMPMsgNocache = multicastsyscall.IGMPMSG_NOCACHE MaxVIFs = multicastsyscall.MAXVIFS SizeofIgmpmsg = multicastsyscall.SizeofIgmpmsg )
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], ovsBridgeClient ovsconfig.OVSBridgeClient, podUpdateSubscriber channel.Subscriber, igmpQueryInterval time.Duration, igmpQueryVersions []uint8, validator types.McastNetworkPolicyController, isEncap bool, informerFactory informers.SharedInformerFactory, ipv4Enabled bool, ipv6Enabled 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 (*Socket) AddMrouteEntry ¶
func (*Socket) AllocateVIFs ¶
func (*Socket) DelMrouteEntry ¶
func (*Socket) FlushMRoute ¶
func (s *Socket) FlushMRoute()
func (*Socket) MulticastInterfaceJoinMgroup ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.