Add support for ARP_TPA, ARP_THA Set Field Instructions
Signed-off-by: souvikdas95 <souvikdas95@yahoo.co.in>
Change-Id: I9fe44d8ece8dd268bff4ec4befc31a8ea24ac9aa
diff --git a/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java b/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java
index d1fc61f..621c007 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java
@@ -321,6 +321,28 @@
}
/**
+ * Creates a L3 ARP IP src modification.
+ *
+ * @param addr the ip address to modify to
+ * @return a L3 modification
+ */
+ public static L3ModificationInstruction modArpTpa(IpAddress addr) {
+ checkNotNull(addr, "Dst l3 ARP IP address cannot be null");
+ return new ModArpIPInstruction(L3SubType.ARP_TPA, addr);
+ }
+
+ /**
+ * Creates a l3 ARP Ether src modification.
+ *
+ * @param addr the mac address to modify to
+ * @return a l3 modification
+ */
+ public static L3ModificationInstruction modArpTha(MacAddress addr) {
+ checkNotNull(addr, "Dst l3 ARP address cannot be null");
+ return new ModArpEthInstruction(L3SubType.ARP_THA, addr);
+ }
+
+ /**
* Creates a l3 ARP operation modification.
*
* @param op the ARP operation to modify to