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/DefaultTrafficTreatment.java b/core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficTreatment.java
index a584e17..ab7c230 100644
--- a/core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficTreatment.java
+++ b/core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficTreatment.java
@@ -22,7 +22,7 @@
import org.onlab.onos.net.PortNumber;
import org.onlab.onos.net.flow.instructions.Instruction;
import org.onlab.onos.net.flow.instructions.Instructions;
-import org.onlab.packet.IpPrefix;
+import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
@@ -181,12 +181,12 @@
}
@Override
- public Builder setIpSrc(IpPrefix addr) {
+ public Builder setIpSrc(IpAddress addr) {
return add(Instructions.modL3Src(addr));
}
@Override
- public Builder setIpDst(IpPrefix addr) {
+ public Builder setIpDst(IpAddress addr) {
return add(Instructions.modL3Dst(addr));
}