Update Match and Action sub-classes for SDN-IP.
- Added ModifyDstMacAction class to modify destination MAC address on the packet
- Added PacketMatchBuilder class to instantiate PacketMatch class
- Updated PacketMatch class to be able to handle IP prefix, src/dst TCP port and ether type
- Added simple unit tests
- This task is a part of ONOS-1879
Change-Id: Ib26f117076dceac3f58b4911fbb936752e719a4a
diff --git a/src/main/java/net/onrc/onos/core/matchaction/action/ModifyDstMacAction.java b/src/main/java/net/onrc/onos/core/matchaction/action/ModifyDstMacAction.java
new file mode 100644
index 0000000..856b951
--- /dev/null
+++ b/src/main/java/net/onrc/onos/core/matchaction/action/ModifyDstMacAction.java
@@ -0,0 +1,32 @@
+package net.onrc.onos.core.matchaction.action;
+
+import net.floodlightcontroller.util.MACAddress;
+
+/**
+ * An action object to modify destination MAC address.
+ * <p>
+ * This class does not have a switch ID. The switch ID is handled by
+ * MatchAction, IFlow or Intent class.
+ */
+public class ModifyDstMacAction implements Action {
+ private final MACAddress dstMac;
+
+ /**
+ * Constructor.
+ *
+ * @param dstMac destination MAC address after the modification
+ */
+ public ModifyDstMacAction(MACAddress dstMac) {
+ this.dstMac = dstMac;
+ }
+
+ /**
+ * Gets the destination MAC address.
+ *
+ * @return the destination MAC address
+ */
+ public MACAddress getDstMac() {
+ return dstMac;
+ }
+
+}