| 137 | |
| 138 | ==== (6/15): ==== |
| 139 | After much tweaking and code-tracing with log.debug outputs, a (seemingly) working proxy was implemented. |
| 140 | |
| 141 | * FVController: implements its own bare-bones versions of: |
| 142 | * updateSwitch: track list of active switches |
| 143 | * add/removeOFMessageListener |
| 144 | * add/removeOFSwitchListener |
| 145 | * getSwitches: return immutable list of active switches |
| 146 | * handleOutgoingMessage |
| 147 | * injectOfMessage |
| 148 | * handleMessage |
| 149 | * init: initialize class variables |
| 150 | |
| 151 | * OFSwitchImpl: |
| 152 | *modified write() functions that call either FVController or Controller's handleOutgoingMessage() depending on OFType: |
| 153 | {{{ |
| 154 | switch (m.getType()) { |
| 155 | case PACKET_OUT: |
| 156 | case FLOW_MOD: |
| 157 | case PORT_MOD: |
| 158 | this.floodlightProxy.handleOutgoingMessage(this, m, bc); |
| 159 | break; |
| 160 | default: |
| 161 | this.floodlightProvider.handleOutgoingMessage(this, m, bc); |
| 162 | } |
| 163 | }}} |
| 164 | * a setFloodlightProxy setter function |
| 165 | * Controller: add functions to set the floodlightProxy in OFSwitchImpl |
| 166 | * !FloodlightProvider: fetch and set Controller's FVProxy in init() |
| 167 | {{{ |
| 168 | controller.setFVProxy( |
| 169 | context.getServiceImpl(IFloodlightProxy.class)); |
| 170 | }}} |