Class McastHandler


  • public class McastHandler
    extends Object
    Handles Multicast related events.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Map<org.onosproject.net.DeviceId,​List<McastFilteringObjStoreKey>> getMcastFilters()
      Returns the mcast filtering obj.
      Map<org.onlab.packet.IpAddress,​org.onosproject.cluster.NodeId> getMcastLeaders​(org.onlab.packet.IpAddress mcastIp)
      Return the leaders of the mcast groups.
      Map<McastRoleStoreKey,​McastRole> getMcastRoles​(org.onlab.packet.IpAddress mcastIp, org.onosproject.net.ConnectPoint sourcecp)
      Returns the associated roles to the mcast groups.
      com.google.common.collect.Multimap<org.onosproject.net.ConnectPoint,​List<org.onosproject.net.ConnectPoint>> getMcastTrees​(org.onlab.packet.IpAddress mcastIp, org.onosproject.net.ConnectPoint sourcecp)
      Returns the associated trees to the mcast group.
      Map<McastStoreKey,​Integer> getNextIds​(org.onlab.packet.IpAddress mcastIp)
      Returns the associated next ids to the mcast groups or to the single group if mcastIp is present.
      void init()
      Read initial multicast configuration from mcast store.
      void processDeviceDown​(org.onosproject.net.DeviceId deviceDown)
      Process the DEVICE_DOWN event.
      void processLinkDown​(org.onosproject.net.Link linkDown)
      Processes the LINK_DOWN event.
      void processMcastEvent​(org.onosproject.mcast.api.McastEvent event)
      Processes the SOURCE_ADDED, SOURCE_UPDATED, SINK_ADDED, SINK_REMOVED, ROUTE_ADDED and ROUTE_REMOVED events.
      void processPortUpdate​(org.onosproject.net.Device affectedDevice, org.onosproject.net.Port affectedPort)
      Processes the PORT_UPDATED event.
      void removeNextId​(int nextId)
      Removes given next ID from mcast next id store.
      void terminate()
      Clean up when deactivating the application.
      void updateFilterToDevice​(org.onosproject.net.DeviceId deviceId, org.onosproject.net.PortNumber portNum, org.onlab.packet.VlanId vlanId, boolean install)
      Updates filtering objective for given device and port.
    • Constructor Detail

      • McastHandler

        public McastHandler​(SegmentRoutingManager srManager)
        Constructs the McastEventHandler.
        Parameters:
        srManager - Segment Routing manager
    • Method Detail

      • init

        public void init()
        Read initial multicast configuration from mcast store.
      • terminate

        public void terminate()
        Clean up when deactivating the application.
      • processMcastEvent

        public void processMcastEvent​(org.onosproject.mcast.api.McastEvent event)
        Processes the SOURCE_ADDED, SOURCE_UPDATED, SINK_ADDED, SINK_REMOVED, ROUTE_ADDED and ROUTE_REMOVED events.
        Parameters:
        event - the multicast event to be processed
      • processPortUpdate

        public void processPortUpdate​(org.onosproject.net.Device affectedDevice,
                                      org.onosproject.net.Port affectedPort)
        Processes the PORT_UPDATED event.
        Parameters:
        affectedDevice - Affected device
        affectedPort - Affected port
      • processLinkDown

        public void processLinkDown​(org.onosproject.net.Link linkDown)
        Processes the LINK_DOWN event.
        Parameters:
        linkDown - Link that is going down
      • processDeviceDown

        public void processDeviceDown​(org.onosproject.net.DeviceId deviceDown)
        Process the DEVICE_DOWN event.
        Parameters:
        deviceDown - device going down
      • updateFilterToDevice

        public void updateFilterToDevice​(org.onosproject.net.DeviceId deviceId,
                                         org.onosproject.net.PortNumber portNum,
                                         org.onlab.packet.VlanId vlanId,
                                         boolean install)
        Updates filtering objective for given device and port. It is called in general when the mcast config has been changed.
        Parameters:
        deviceId - device ID
        portNum - ingress port number
        vlanId - assigned VLAN ID
        install - true to add, false to remove
      • getNextIds

        public Map<McastStoreKey,​Integer> getNextIds​(org.onlab.packet.IpAddress mcastIp)
        Returns the associated next ids to the mcast groups or to the single group if mcastIp is present.
        Parameters:
        mcastIp - the group ip
        Returns:
        the mapping mcastIp-device to next id
      • removeNextId

        public void removeNextId​(int nextId)
        Removes given next ID from mcast next id store.
        Parameters:
        nextId - next id
      • getMcastRoles

        public Map<McastRoleStoreKey,​McastRole> getMcastRoles​(org.onlab.packet.IpAddress mcastIp,
                                                                    org.onosproject.net.ConnectPoint sourcecp)
        Returns the associated roles to the mcast groups.
        Parameters:
        mcastIp - the group ip
        sourcecp - the source connect point
        Returns:
        the mapping mcastIp-device to mcast role
      • getMcastTrees

        public com.google.common.collect.Multimap<org.onosproject.net.ConnectPoint,​List<org.onosproject.net.ConnectPoint>> getMcastTrees​(org.onlab.packet.IpAddress mcastIp,
                                                                                                                                               org.onosproject.net.ConnectPoint sourcecp)
        Returns the associated trees to the mcast group.
        Parameters:
        mcastIp - the group ip
        sourcecp - the source connect point
        Returns:
        the mapping egress point to mcast path
      • getMcastLeaders

        public Map<org.onlab.packet.IpAddress,​org.onosproject.cluster.NodeId> getMcastLeaders​(org.onlab.packet.IpAddress mcastIp)
        Return the leaders of the mcast groups.
        Parameters:
        mcastIp - the group ip
        Returns:
        the mapping group-node
      • getMcastFilters

        public Map<org.onosproject.net.DeviceId,​List<McastFilteringObjStoreKey>> getMcastFilters()
        Returns the mcast filtering obj.
        Returns:
        the mapping group-node