summaryrefslogtreecommitdiffstats
path: root/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4')
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizer.java16
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java9
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java16
3 files changed, 22 insertions, 19 deletions
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizer.java
index f8edcfb15..d5988fa9c 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizer.java
@@ -61,11 +61,11 @@ public class Ipv4NeighbourCustomizer extends FutureJVppCustomizer
LOG.debug("Processing request for Neighbour {} write", id);
addDelNeighbour(id, () -> {
- IpNeighborAddDel request = preBindIpv4Request(true);
+ IpNeighborAddDel request = preBindRequest(true);
- request.dstAddress = ipv4AddressNoZoneToArray(data.getIp());
- request.macAddress = parseMac(data.getLinkLayerAddress().getValue());
- request.swIfIndex = interfaceContext
+ request.neighbor.macAddress = parseMacAddress(data.getLinkLayerAddress().getValue());
+ request.neighbor.ipAddress = ipv4AddressNoZoneToAddress(data.getIp());
+ request.neighbor.swIfIndex = interfaceContext
.getIndex(id.firstKeyOf(Interface.class).getName(), writeContext.getMappingContext());
return request;
}, getFutureJVpp());
@@ -80,11 +80,11 @@ public class Ipv4NeighbourCustomizer extends FutureJVppCustomizer
LOG.debug("Processing request for Neighbour {} delete", id);
addDelNeighbour(id, () -> {
- IpNeighborAddDel request = preBindIpv4Request(false);
+ IpNeighborAddDel request = preBindRequest(false);
- request.dstAddress = ipv4AddressNoZoneToArray(data.getIp());
- request.macAddress = parseMac(data.getLinkLayerAddress().getValue());
- request.swIfIndex = interfaceContext
+ request.neighbor.macAddress = parseMacAddress(data.getLinkLayerAddress().getValue());
+ request.neighbor.ipAddress = ipv4AddressNoZoneToAddress(data.getIp());
+ request.neighbor.swIfIndex = interfaceContext
.getIndex(id.firstKeyOf(Interface.class).getName(), writeContext.getMappingContext());
return request;
}, getFutureJVpp());
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java
index 79d0e55e5..461de46c3 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java
@@ -25,6 +25,7 @@ import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.core.dto.ProxyArpAddDel;
import io.fd.vpp.jvpp.core.dto.ProxyArpAddDelReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import io.fd.vpp.jvpp.core.types.Ip4Address;
import io.fd.vpp.jvpp.core.types.ProxyArp;
import java.util.concurrent.Future;
import javax.annotation.Nonnull;
@@ -88,9 +89,11 @@ public class ProxyRangeCustomizer extends FutureJVppCustomizer
final ProxyArpAddDel proxyArpAddDel = new ProxyArpAddDel();
proxyArpAddDel.isAdd = isAdd;
proxyArpAddDel.proxy = new ProxyArp();
- proxyArpAddDel.proxy.lowAddress = Ipv4Translator.INSTANCE.ipv4AddressNoZoneToArray(lAddr);
- proxyArpAddDel.proxy.hiAddress = Ipv4Translator.INSTANCE.ipv4AddressNoZoneToArray(hAddr);
- proxyArpAddDel.proxy.vrfId = vrfId;
+ proxyArpAddDel.proxy.low = new Ip4Address();
+ proxyArpAddDel.proxy.low.ip4Address = Ipv4Translator.INSTANCE.ipv4AddressNoZoneToArray(lAddr);
+ proxyArpAddDel.proxy.hi = new Ip4Address();
+ proxyArpAddDel.proxy.hi.ip4Address = Ipv4Translator.INSTANCE.ipv4AddressNoZoneToArray(hAddr);
+ proxyArpAddDel.proxy.tableId = vrfId;
return proxyArpAddDel;
}
}
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java
index 61685af9c..89d6dbf51 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java
@@ -55,11 +55,11 @@ public class SubInterfaceIpv4NeighbourCustomizer extends FutureJVppCustomizer
LOG.debug("Processing request for Neighbour {} write", id);
addDelNeighbour(id, () -> {
- IpNeighborAddDel request = preBindIpv4Request(true);
+ IpNeighborAddDel request = preBindRequest(true);
- request.dstAddress = ipv4AddressNoZoneToArray(data.getIp());
- request.macAddress = parseMac(data.getLinkLayerAddress().getValue());
- request.swIfIndex = subInterfaceIndex(id, interfaceContext, writeContext.getMappingContext());
+ request.neighbor.macAddress = parseMacAddress(data.getLinkLayerAddress().getValue());
+ request.neighbor.ipAddress = ipv4AddressNoZoneToAddress(data.getIp());
+ request.neighbor.swIfIndex = subInterfaceIndex(id, interfaceContext, writeContext.getMappingContext());
// we don't have support for sub-interface routing, so not setting vrf
return request;
@@ -75,11 +75,11 @@ public class SubInterfaceIpv4NeighbourCustomizer extends FutureJVppCustomizer
LOG.debug("Processing request for Neighbour {} delete", id);
addDelNeighbour(id, () -> {
- IpNeighborAddDel request = preBindIpv4Request(false);
+ IpNeighborAddDel request = preBindRequest(false);
- request.dstAddress = ipv4AddressNoZoneToArray(data.getIp());
- request.macAddress = parseMac(data.getLinkLayerAddress().getValue());
- request.swIfIndex = subInterfaceIndex(id, interfaceContext, writeContext.getMappingContext());
+ request.neighbor.macAddress = parseMacAddress(data.getLinkLayerAddress().getValue());
+ request.neighbor.ipAddress = ipv4AddressNoZoneToAddress(data.getIp());
+ request.neighbor.swIfIndex = subInterfaceIndex(id, interfaceContext, writeContext.getMappingContext());
//TODO HONEYCOMB-182 if it is necessary for future use ,make adjustments to be able to set vrfid
//request.vrfId