summaryrefslogtreecommitdiffstats
path: root/java/jvpp-core
diff options
context:
space:
mode:
authorMichal Cmarada <mcmarada@cisco.com>2019-05-03 18:43:31 +0200
committerMichal Cmarada <mcmarada@cisco.com>2019-05-03 18:43:31 +0200
commit57602dd2c361b9d72e4c4d36f6e41b1742f471b3 (patch)
tree95d3e2a7375aa83a174d4400eba94a4fb595d952 /java/jvpp-core
parent9c6ac1db63e54e753ebdc2aa3fc73c68ef2a2247 (diff)
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 <mcmarada@cisco.com>
Diffstat (limited to 'java/jvpp-core')
-rw-r--r--java/jvpp-core/io/fd/jvpp/core/examples/CallbackApiExample.java3
-rw-r--r--java/jvpp-core/io/fd/jvpp/core/examples/CreateSubInterfaceExample.java3
2 files changed, 6 insertions, 0 deletions
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;