Changes between Version 5 and Version 6 of Internal/OpenFlow/Controllers/MultiCtl/FLInternals


Ignore:
Timestamp:
Sep 7, 2012, 7:25:24 PM (12 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/Controllers/MultiCtl/FLInternals

    v5 v6  
    5959`OFChannelHandler` is the inner class of `Controller` responsible for listening for incoming connections from switches. When a switch establishes a connection, a new instantiation of `OFSwitchImpl` is created for the switch. `OFSwitchImpl` is a representation of an individual switch, comprised of the channel, DPID, and information gleaned from the FEATURE_REPLY, among other bits and pieces. Changes are made to a switch through the manipulation of the `OFSwitchImpl` representing it.   
    6060
    61 Another thing that occurs upon a switch establishing contact (or disappearing) is the dispatch of a switch event. `SwitchUpdate` is the `Controller` inner class responsible for calling a registered `IOFSwitchListener`'s ''addedSwitch()'' or ''removedSwitch()'' methods. This only occurs after the switch state is designated ''READY''.     
     61Another thing that occurs upon a switch establishing contact (or disappearing) is the dispatch of a switch event. `SwitchUpdate` is the `Controller` inner class responsible for calling a registered `IOFSwitchListener`'s ''addedSwitch()'' or ''removedSwitch()'' methods.      
    6262
    6363=== The !OpenFlow Handshake ===
    64 The !OpenFlow handshake can be outlined as below:
     64The switch event is not fired until the switch completes the !OpenFlow handshake. The handshake can be outlined as below:
    6565
    6666 1. Exchange of HELLO messages
    67  2. Controller: send FEATURES_REQUEST
    68  3. switch: send FEATURES_REPLY
    69  4. Controller: send GET_CONFIG_REQUEST
    70  5. Switch: send GET_CONFIG_REPLY
     67 1. Controller: send FEATURES_REQUEST
     68 1. switch: send FEATURES_REPLY
     69 1. Controller: send GET_CONFIG_REQUEST
     70 1. Switch: send GET_CONFIG_REPLY
    7171
    72 Stage 5 is the point where the switch is deemed ''READY'' and listeners are notified of its arrival. The components that execute the handshake are implemented in `Controller` as a collection of methods that are called from ''processOFMessage()''. ''processOFMessage()'' is also responsible for keeping up with the ECHO_REQUEST/REPLY keepalive messages.     
     72Stage 5 is the point where ''checkSwitchReady()'' is called, the switch state is set to ''READY'', and listeners are notified of its arrival. The components that execute the handshake are implemented in `Controller` as a collection of methods that are called from ''processOFMessage()''. ''processOFMessage()'' is also responsible for keeping up with the ECHO_REQUEST/REPLY keepalive messages.     
     73
     74== Handling Messages ==
     75Once the handshake is complete and interested parties aware of it, messages to/from the switch can be dispatched to registered `IOFMessageListeners`. The high-level view of the message processing chain is the following:
     76 
     77 1. `OFChannelHandler` receives the message
     78 1. `Controller` dispatches the message to interested services
     79 1. services process the event accordingly
     80 1. service sends a message to the switch through its `OFSwitchImpl`