summaryrefslogtreecommitdiffstats
path: root/l3/utils/src/main
diff options
context:
space:
mode:
authorMichal Cmarada <mcmarada@cisco.com>2019-02-06 09:41:39 +0100
committerMichal Cmarada <mcmarada@cisco.com>2019-02-06 09:41:39 +0100
commit3751ef96ae1427cc8d5ecb9cbba705e837bb63ca (patch)
tree08c01465ea307e9eebcdf1e12990ebdb66961228 /l3/utils/src/main
parentacf5a8a052e2f7f7c2b03c023df3dd489688cb00 (diff)
fix after changes in VPP API
- fixes for mac adress - fixes for ipaddress - fixes refactoring in ipsec Change-Id: Idc3e3557b72a5f1ac5b32b9738d90ca23ed6ed9e Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'l3/utils/src/main')
-rw-r--r--l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/write/IpWriter.java22
1 files changed, 5 insertions, 17 deletions
diff --git a/l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/write/IpWriter.java b/l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/write/IpWriter.java
index d3b328cd3..00e34d3cc 100644
--- a/l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/write/IpWriter.java
+++ b/l3/utils/src/main/java/io/fd/hc2vpp/l3/utils/ip/write/IpWriter.java
@@ -29,6 +29,8 @@ import io.fd.vpp.jvpp.core.dto.IpNeighborAddDel;
import io.fd.vpp.jvpp.core.dto.SwInterfaceAddDelAddress;
import io.fd.vpp.jvpp.core.dto.SwInterfaceAddDelAddressReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import io.fd.vpp.jvpp.core.types.IpNeighbor;
+import io.fd.vpp.jvpp.core.types.IpNeighborFlags;
import java.util.concurrent.CompletionStage;
import java.util.function.Supplier;
import javax.annotation.Nonnegative;
@@ -142,25 +144,11 @@ public interface IpWriter extends ByteDataTranslator, AddressTranslator, JvppRep
getReplyForWrite(api.ipNeighborAddDel(requestSupplier.get()).toCompletableFuture(), id);
}
- default IpNeighborAddDel preBindIpv4Request(final boolean add) {
- IpNeighborAddDel request = staticPreBindRequest(add);
- request.isIpv6 = 0;
-
- return request;
- }
-
- default IpNeighborAddDel preBindIpv6Request(final boolean add) {
- IpNeighborAddDel request = staticPreBindRequest(add);
- request.isIpv6 = 1;
-
- return request;
- }
-
- static IpNeighborAddDel staticPreBindRequest(final boolean add) {
+ default IpNeighborAddDel preBindRequest(final boolean add) {
IpNeighborAddDel request = new IpNeighborAddDel();
-
+ request.neighbor = new IpNeighbor();
request.isAdd = ByteDataTranslator.INSTANCE.booleanToByte(add);
- request.isStatic = 1;
+ request.neighbor.flags = IpNeighborFlags.IP_API_NEIGHBOR_FLAG_STATIC;
return request;
}
}