Interface OpenFlowAgent


  • public interface OpenFlowAgent
    Responsible for keeping track of the current set of switches connected to the system. As well as whether they are in Master role or not.
    • Method Detail

      • addConnectedSwitch

        boolean addConnectedSwitch​(Dpid dpid,
                                   OpenFlowSwitch sw)
        Add a switch that has just connected to the system.
        Parameters:
        dpid - the dpid to add
        sw - the actual switch object.
        Returns:
        true if added, false otherwise.
      • validActivation

        boolean validActivation​(Dpid dpid)
        Checks if the activation for this switch is valid.
        Parameters:
        dpid - the dpid to check
        Returns:
        true if valid, false otherwise
      • addActivatedMasterSwitch

        boolean addActivatedMasterSwitch​(Dpid dpid,
                                         OpenFlowSwitch sw)
        Called when a switch is activated, with this controller's role as MASTER.
        Parameters:
        dpid - the dpid to add.
        sw - the actual switch
        Returns:
        true if added, false otherwise.
      • addActivatedEqualSwitch

        boolean addActivatedEqualSwitch​(Dpid dpid,
                                        OpenFlowSwitch sw)
        Called when a switch is activated, with this controller's role as EQUAL.
        Parameters:
        dpid - the dpid to add.
        sw - the actual switch
        Returns:
        true if added, false otherwise.
      • transitionToMasterSwitch

        void transitionToMasterSwitch​(Dpid dpid)
        Called when this controller's role for a switch transitions from equal to master. For 1.0 switches, we internally refer to the role 'slave' as 'equal' - so this transition is equivalent to 'addActivatedMasterSwitch'.
        Parameters:
        dpid - the dpid to transition.
      • transitionToEqualSwitch

        void transitionToEqualSwitch​(Dpid dpid)
        Called when this controller's role for a switch transitions to equal. For 1.0 switches, we internally refer to the role 'slave' as 'equal'.
        Parameters:
        dpid - the dpid to transition.
      • removeConnectedSwitch

        void removeConnectedSwitch​(Dpid dpid)
        Clear all state in controller switch maps for a switch that has disconnected from the local controller. Also release control for that switch from the global repository. Notify switch listeners.
        Parameters:
        dpid - the dpid to remove.
      • processDownstreamMessage

        void processDownstreamMessage​(Dpid dpid,
                                      java.util.List<org.projectfloodlight.openflow.protocol.OFMessage> m)
        Notify OpenFlow message listeners on all outgoing message event.
        Parameters:
        dpid - the dpid the message sent to
        m - the collection of messages to sent out
      • processMessage

        void processMessage​(Dpid dpid,
                            org.projectfloodlight.openflow.protocol.OFMessage m)
        Process a message coming from a switch.
        Parameters:
        dpid - the dpid the message came on.
        m - the message to process
      • returnRoleReply

        void returnRoleReply​(Dpid dpid,
                             RoleState requested,
                             RoleState response)
        Notifies the controller that role assertion has failed.
        Parameters:
        dpid - the switch that failed role assertion
        requested - the role controller requested
        response - role reply from the switch
      • addClassifierListener

        void addClassifierListener​(OpenFlowClassifierListener listener)
        Add OpenFlow classifier listener.
        Parameters:
        listener - the OpenFlow classifier listener
      • removeClassifierListener

        void removeClassifierListener​(OpenFlowClassifierListener listener)
        Remove OpenFlow classifier listener.
        Parameters:
        listener - the OpenFlow classifier listener