BitOhenry

[ONOS-3464] Add arp_spa operation to provider of openflow

Change-Id: Iffb0d12bd53b292ef370fd12c0e9d693a215f5cb
......@@ -712,6 +712,10 @@ public class FlowEntryBuilder {
mac = MacAddress.valueOf(match.get(MatchField.ARP_SHA).getLong());
builder.matchArpSha(mac);
break;
case ARP_SPA:
ip = Ip4Address.valueOf(match.get(MatchField.ARP_SPA).getInt());
builder.matchArpSpa(ip);
break;
case ARP_THA:
mac = MacAddress.valueOf(match.get(MatchField.ARP_THA).getLong());
builder.matchArpTha(mac);
......@@ -721,7 +725,6 @@ public class FlowEntryBuilder {
builder.matchArpTpa(ip);
break;
case ARP_OP:
case ARP_SPA:
case MPLS_TC:
default:
log.warn("Match type {} not yet implemented.", field.id);
......
......@@ -424,6 +424,11 @@ public abstract class FlowModBuilder {
mBuilder.setExact(MatchField.ARP_SHA,
MacAddress.of(arpHaCriterion.mac().toLong()));
break;
case ARP_SPA:
arpPaCriterion = (ArpPaCriterion) c;
mBuilder.setExact(MatchField.ARP_SPA,
IPv4Address.of(arpPaCriterion.ip().toInt()));
break;
case ARP_THA:
arpHaCriterion = (ArpHaCriterion) c;
mBuilder.setExact(MatchField.ARP_THA,
......@@ -435,7 +440,6 @@ public abstract class FlowModBuilder {
IPv4Address.of(arpPaCriterion.ip().toInt()));
break;
case ARP_OP:
case ARP_SPA:
case MPLS_TC:
case PBB_ISID:
default:
......