From 57602dd2c361b9d72e4c4d36f6e41b1742f471b3 Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Fri, 3 May 2019 18:43:31 +0200 Subject: Fix SwInterfaceDump request After Api change in VPP swIfIndex was added for SwInterfaceDump request. It has to be set to ~0 to dump all interfaces or single index for single interface dump. Change-Id: I1d6236f4ec328659e25c63b355dab8d012782fd5 Signed-off-by: Michal Cmarada --- java/jvpp-core/io/fd/jvpp/core/examples/CallbackApiExample.java | 3 +++ java/jvpp-core/io/fd/jvpp/core/examples/CreateSubInterfaceExample.java | 3 +++ 2 files changed, 6 insertions(+) (limited to 'java') diff --git a/java/jvpp-core/io/fd/jvpp/core/examples/CallbackApiExample.java b/java/jvpp-core/io/fd/jvpp/core/examples/CallbackApiExample.java index 6b2d893..29f3ef8 100644 --- a/java/jvpp-core/io/fd/jvpp/core/examples/CallbackApiExample.java +++ b/java/jvpp-core/io/fd/jvpp/core/examples/CallbackApiExample.java @@ -30,6 +30,7 @@ import io.fd.jvpp.core.dto.ShowVersion; import io.fd.jvpp.core.dto.ShowVersionReply; import io.fd.jvpp.core.dto.SwInterfaceDetails; import io.fd.jvpp.core.dto.SwInterfaceDump; +import io.fd.jvpp.core.types.InterfaceIndex; import java.nio.charset.StandardCharsets; public class CallbackApiExample { @@ -55,6 +56,8 @@ public class CallbackApiExample { System.out.println("Sending SwInterfaceDump request..."); SwInterfaceDump swInterfaceDumpRequest = new SwInterfaceDump(); + swInterfaceDumpRequest.swIfIndex = new InterfaceIndex(); + swInterfaceDumpRequest.swIfIndex.interfaceindex = ~0; swInterfaceDumpRequest.nameFilterValid = 0; swInterfaceDumpRequest.nameFilter = "".getBytes(StandardCharsets.UTF_8); jvpp.send(swInterfaceDumpRequest); diff --git a/java/jvpp-core/io/fd/jvpp/core/examples/CreateSubInterfaceExample.java b/java/jvpp-core/io/fd/jvpp/core/examples/CreateSubInterfaceExample.java index cc07520..dc0abbf 100644 --- a/java/jvpp-core/io/fd/jvpp/core/examples/CreateSubInterfaceExample.java +++ b/java/jvpp-core/io/fd/jvpp/core/examples/CreateSubInterfaceExample.java @@ -26,6 +26,7 @@ import io.fd.jvpp.core.dto.CreateSubifReply; import io.fd.jvpp.core.dto.SwInterfaceDetailsReplyDump; import io.fd.jvpp.core.dto.SwInterfaceDump; import io.fd.jvpp.core.future.FutureJVppCoreFacade; +import io.fd.jvpp.core.types.InterfaceIndex; import java.nio.charset.StandardCharsets; /** @@ -46,6 +47,8 @@ public class CreateSubInterfaceExample { private static SwInterfaceDump createSwInterfaceDumpRequest(final String ifaceName) { SwInterfaceDump request = new SwInterfaceDump(); + request.swIfIndex = new InterfaceIndex(); + request.swIfIndex.interfaceindex = ~0; request.nameFilter = ifaceName.getBytes(StandardCharsets.UTF_8); request.nameFilterValid = 1; return request; -- cgit 1.2.3-korg