Refactor the IpPrefix API and implementation:
* Now IpPrefix uses IpAddress to represent the subnet address
* The IpPrefix subnet address is masked-out by the prefix length.
E.g., IpPrefix("1.2.3.4/24") is now stored as IpPrefix("1.2.3.0/24")
* Removed IpPrefix methods that are not used or don't apply anymore
* Replaced usage of IpPrefix with IpAddress where appropriate
diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instructions.java b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instructions.java
index 3b1d433..0bdff77 100644
--- a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instructions.java
+++ b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instructions.java
@@ -27,7 +27,7 @@
import org.onlab.onos.net.flow.instructions.L2ModificationInstruction.ModEtherInstruction;
import org.onlab.onos.net.flow.instructions.L3ModificationInstruction.L3SubType;
import org.onlab.onos.net.flow.instructions.L3ModificationInstruction.ModIPInstruction;
-import org.onlab.packet.IpPrefix;
+import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
@@ -115,7 +115,7 @@
* @param addr the ip address to modify to.
* @return a L3 modification
*/
- public static L3ModificationInstruction modL3Src(IpPrefix addr) {
+ public static L3ModificationInstruction modL3Src(IpAddress addr) {
checkNotNull(addr, "Src l3 address cannot be null");
return new ModIPInstruction(L3SubType.IP_SRC, addr);
}
@@ -125,7 +125,7 @@
* @param addr the ip address to modify to.
* @return a L3 modification
*/
- public static L3ModificationInstruction modL3Dst(IpPrefix addr) {
+ public static L3ModificationInstruction modL3Dst(IpAddress addr) {
checkNotNull(addr, "Dst l3 address cannot be null");
return new ModIPInstruction(L3SubType.IP_DST, addr);
}