summaryrefslogtreecommitdiffstats
path: root/vpp-japi/japi/org/openvpp
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-japi/japi/org/openvpp')
-rw-r--r--vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java5
-rw-r--r--vpp-japi/japi/org/openvpp/vppjapi/vppConn.java13
-rw-r--r--vpp-japi/japi/org/openvpp/vppjapi/vppIPv4Address.java26
-rw-r--r--vpp-japi/japi/org/openvpp/vppjapi/vppIPv6Address.java26
-rw-r--r--vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java68
-rw-r--r--vpp-japi/japi/org/openvpp/vppjapi/vppVxlanTunnelDetails.java33
6 files changed, 167 insertions, 4 deletions
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java b/vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java
index 38c7c4e744b..5c35897c6a7 100644
--- a/vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java
@@ -17,11 +17,14 @@ package org.openvpp.vppjapi;
import org.openvpp.vppjapi.vppApi;
public abstract class vppApiCallbacks extends vppApi {
- public abstract void interfaceDetails(
+/* Disabled!
+ *
+ * public abstract void interfaceDetails(
int ifIndex, String interfaceName, int supIfIndex, byte[] physAddr,
byte adminUp, byte linkUp, byte linkDuplex, byte linkSpeed,
int subId, byte subDot1ad, byte subNumberOfTags, int subOuterVlanId, int subInnerVlanId,
byte subExactMatch, byte subDefault, byte subOuterVlanIdAny, byte subInnerVlanIdAny,
int vtrOp, int vtrPushDot1q, int vtrTag1, int vtrTag2);
+ */
}
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppConn.java b/vpp-japi/japi/org/openvpp/vppjapi/vppConn.java
index 12a3f179695..cd957808683 100644
--- a/vpp-japi/japi/org/openvpp/vppjapi/vppConn.java
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppConn.java
@@ -25,9 +25,12 @@ import java.nio.file.attribute.PosixFilePermissions;
import java.util.Set;
import org.openvpp.vppjapi.vppVersion;
+import org.openvpp.vppjapi.vppInterfaceDetails;
import org.openvpp.vppjapi.vppInterfaceCounters;
import org.openvpp.vppjapi.vppBridgeDomainDetails;
-import org.openvpp.vppjapi.vppL2Fib;
+import org.openvpp.vppjapi.vppIPv4Address;
+import org.openvpp.vppjapi.vppIPv6Address;
+import org.openvpp.vppjapi.vppVxlanTunnelDetails;
public class vppConn {
private static final String LIBNAME = "libvppjni.so.0.0.0";
@@ -43,7 +46,6 @@ public class vppConn {
private static void loadStream(final InputStream is) throws IOException {
final Set<PosixFilePermission> perms = PosixFilePermissions.fromString("rwxr-x---");
final Path p = Files.createTempFile(LIBNAME, null, PosixFilePermissions.asFileAttribute(perms));
-
try {
Files.copy(is, p, StandardCopyOption.REPLACE_EXISTING);
@@ -77,7 +79,7 @@ public class vppConn {
public native int swIfIndexFromName (String interfaceName);
public native String interfaceNameFromSwIfIndex (int swIfIndex);
public native void clearInterfaceTable ();
- public native int swInterfaceDump (byte nameFilterValid, byte [] nameFilter);
+ public native vppInterfaceDetails[] swInterfaceDump (byte nameFilterValid, byte [] nameFilter);
public native int bridgeDomainIdFromName(String bridgeDomain);
public native int findOrAddBridgeDomainId(String bridgeDomain);
public native vppVersion getVppVersion();
@@ -86,4 +88,9 @@ public class vppConn {
public native vppBridgeDomainDetails getBridgeDomainDetails(int bdId);
public native vppL2Fib[] l2FibTableDump(int bdId);
public native int bridgeDomainIdFromInterfaceName(String interfaceName);
+ public native vppIPv4Address[] ipv4AddressDump(String interfaceName);
+ public native vppIPv6Address[] ipv6AddressDump(String interfaceName);
+ public native vppVxlanTunnelDetails[] vxlanTunnelDump(int swIfIndex);
+ public native int setInterfaceDescription (String ifName, String ifDesc);
+ public native String getInterfaceDescription (String ifName);
}
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppIPv4Address.java b/vpp-japi/japi/org/openvpp/vppjapi/vppIPv4Address.java
new file mode 100644
index 00000000000..cd60e711be0
--- /dev/null
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppIPv4Address.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2015 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openvpp.vppjapi;
+
+public class vppIPv4Address {
+ public int ip;
+ public byte prefixLength;
+
+ public vppIPv4Address(int _ip, byte _prefixLength) {
+ ip = _ip;
+ prefixLength = _prefixLength;
+ }
+}
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppIPv6Address.java b/vpp-japi/japi/org/openvpp/vppjapi/vppIPv6Address.java
new file mode 100644
index 00000000000..efaa89c2ad5
--- /dev/null
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppIPv6Address.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2015 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openvpp.vppjapi;
+
+public class vppIPv6Address {
+ public byte[] ip;
+ public byte prefixLength;
+
+ public vppIPv6Address(byte[] _ip, byte _prefixLength) {
+ ip = _ip;
+ prefixLength = _prefixLength;
+ }
+}
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java b/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java
new file mode 100644
index 00000000000..8bc94d20bbf
--- /dev/null
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2015 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openvpp.vppjapi;
+
+public class vppInterfaceDetails {
+ public int ifIndex;
+ public String interfaceName;
+ public int supIfIndex;
+ public byte[] physAddr;
+ public byte adminUp;
+ public byte linkUp;
+ public byte linkDuplex;
+ public byte linkSpeed;
+ public int subId;
+ public byte subDot1ad;
+ public byte subNumberOfTags;
+ public int subOuterVlanId;
+ public int subInnerVlanId;
+ public byte subExactMatch;
+ public byte subDefault;
+ public byte subOuterVlanIdAny;
+ public byte subInnerVlanIdAny;
+ public int vtrOp;
+ public int vtrPushDot1q;
+ public int vtrTag1;
+ public int vtrTag2;
+
+ public vppInterfaceDetails(int ifIndex, String interfaceName, int supIfIndex, byte[] physAddr, byte adminUp,
+ byte linkUp, byte linkDuplex, byte linkSpeed, int subId, byte subDot1ad, byte subNumberOfTags,
+ int subOuterVlanId, int subInnerVlanId, byte subExactMatch, byte subDefault, byte subOuterVlanIdAny,
+ byte subInnerVlanIdAny, int vtrOp, int vtrPushDot1q, int vtrTag1, int vtrTag2)
+ {
+ this.ifIndex = ifIndex;
+ this.interfaceName = interfaceName;
+ this.supIfIndex = supIfIndex;
+ this.physAddr = physAddr;
+ this.adminUp = adminUp;
+ this.linkUp = linkUp;
+ this.linkDuplex = linkDuplex;
+ this.linkSpeed = linkSpeed;
+ this.subId = subId;
+ this.subDot1ad = subDot1ad;
+ this.subNumberOfTags = subNumberOfTags;
+ this.subOuterVlanId = subOuterVlanId;
+ this.subInnerVlanId = subInnerVlanId;
+ this.subExactMatch = subExactMatch;
+ this.subDefault = subDefault;
+ this.subOuterVlanIdAny = subOuterVlanIdAny;
+ this.subInnerVlanIdAny = subInnerVlanIdAny;
+ this.vtrOp = vtrOp;
+ this.vtrPushDot1q = vtrPushDot1q;
+ this.vtrTag1 = vtrTag1;
+ this.vtrTag2 = vtrTag2;
+ }
+}
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppVxlanTunnelDetails.java b/vpp-japi/japi/org/openvpp/vppjapi/vppVxlanTunnelDetails.java
new file mode 100644
index 00000000000..a90e9336331
--- /dev/null
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppVxlanTunnelDetails.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2015 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openvpp.vppjapi;
+
+public class vppVxlanTunnelDetails {
+ public int srcAddress;
+ public int dstAddress;
+ public int encapVrfId;
+ public int vni;
+ public int decap_next_index;
+
+ public vppVxlanTunnelDetails(int _srcAddress, int _dstAddress,
+ int _encapVrfId, int _vni, int _decap_next_index) {
+ srcAddress = _srcAddress;
+ dstAddress = _dstAddress;
+ encapVrfId = _encapVrfId;
+ vni = _vni;
+ decap_next_index = _decap_next_index;
+ }
+}