Refactored the forwarding module to use the new packet API.
It now uses PacketService for both receiving packet-ins and sending
packet-outs, so there is now no dependency on FloodlightProvider or
FlowPusher.
Fixed a bug where the packet module wasn't sending packet-outs correctly.
Change-Id: If738797cdcebabfed975875daf4b40df99226585
diff --git a/src/main/java/net/onrc/onos/core/packetservice/SinglePacketOutNotification.java b/src/main/java/net/onrc/onos/core/packetservice/SinglePacketOutNotification.java
index e6260e0..cd604ea 100644
--- a/src/main/java/net/onrc/onos/core/packetservice/SinglePacketOutNotification.java
+++ b/src/main/java/net/onrc/onos/core/packetservice/SinglePacketOutNotification.java
@@ -1,5 +1,7 @@
package net.onrc.onos.core.packetservice;
+import net.onrc.onos.core.topology.NetworkGraph;
+
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
@@ -14,6 +16,12 @@
private final long outSwitch;
private final short outPort;
+ protected SinglePacketOutNotification() {
+ address = 0;
+ outSwitch = 0;
+ outPort = 0;
+ }
+
/**
* Class constructor.
*
@@ -60,10 +68,11 @@
}
@Override
- public Multimap<Long, Short> calculateOutPorts(Multimap<Long, Short> localSwitches) {
+ public Multimap<Long, Short> calculateOutPorts(
+ Multimap<Long, Short> localPorts, NetworkGraph networkGraph) {
Multimap<Long, Short> outPorts = HashMultimap.create();
- if (localSwitches.containsEntry(outSwitch, outPort)) {
+ if (localPorts.containsEntry(outSwitch, outPort)) {
outPorts.put(outSwitch, outPort);
}