Packet API changes.
* Renamed 'broadcastPacket' methods to 'broadcastPacketOutEdge'
* Changed parameter order in the 'sendPacket' methods to remain consistent
with the 'broadcastPacketOutEdge' methods, i.e. have the Ethernet packet
as the first parameter
* Added unimplemented notes and exceptions for currently unimplemented methods
Change-Id: I99b14fd8bd34a9a830b301d4a5b6c51e071c0488
diff --git a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
index a7b7fbc..4e0fd47 100644
--- a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
+++ b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
@@ -206,7 +206,7 @@
log.trace("Sending broadcast packet to other ONOS instances");
}
- packetService.broadcastPacket(eth,
+ packetService.broadcastPacketOutEdge(eth,
new SwitchPort(sw.getDpid(), inPort.getNumber().shortValue()));
}
@@ -339,8 +339,8 @@
} else {
log.debug("Sending packet out from sw {}, outport{}", sw, existingFlow.firstOutPort);
- packetService.sendPacket(new SwitchPort(
- sw.getDpid(), existingFlow.firstOutPort), eth);
+ packetService.sendPacket(eth, new SwitchPort(
+ sw.getDpid(), existingFlow.firstOutPort));
}
} else {
// Flow path has not yet been installed to switches so save the
@@ -458,8 +458,8 @@
for (PacketToPush packet : packets) {
log.debug("Start packetToPush to sw {}, outPort {}, path {}", packet.dpid, existingFlow.firstOutPort, path);
- packetService.sendPacket(new SwitchPort(
- packet.dpid, existingFlow.firstOutPort), packet.eth);
+ packetService.sendPacket(packet.eth, new SwitchPort(
+ packet.dpid, existingFlow.firstOutPort));
}
}
diff --git a/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java b/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java
index f026745..25d4646 100644
--- a/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java
+++ b/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java
@@ -464,7 +464,7 @@
}
// We don't know the device so broadcast the request out
- packetService.broadcastPacket(eth,
+ packetService.broadcastPacketOutEdge(eth,
new SwitchPort(dpid, inPort));
} else {
// Even if the device exists in our database, we do not reply to
@@ -489,7 +489,7 @@
" - broadcasting", macAddress);
}
- packetService.broadcastPacket(eth,
+ packetService.broadcastPacketOutEdge(eth,
new SwitchPort(dpid, inPort));
} else {
for (net.onrc.onos.core.topology.Port portObject : outPorts) {
@@ -509,7 +509,7 @@
}
packetService.sendPacket(
- new SwitchPort(outSwitch, outPort), eth);
+ eth, new SwitchPort(outSwitch, outPort));
}
}
}
@@ -574,7 +574,7 @@
// sendArpRequestToSwitches(ipAddress, eth.serialize());
packetService.sendPacket(
- new SwitchPort(intf.getDpid(), intf.getPort()), eth);
+ eth, new SwitchPort(intf.getDpid(), intf.getPort()));
}
//Please leave it for now because this code is needed for SDN-IP. It will be removed soon.
@@ -665,7 +665,7 @@
eth.setVlanID(vlan).setPriorityCode((byte) 0);
}
- packetService.sendPacket(new SwitchPort(dpid, port), eth);
+ packetService.sendPacket(eth, new SwitchPort(dpid, port));
}
private String inetAddressToString(byte[] bytes) {