Add ODL honeycomb VPP agent extensions to vppjapi jni java library.
Change-Id: I084ffcf36fbac55c2862035d10b028e35e1e648d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java b/vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java
index 38c7c4e..5c35897 100644
--- a/vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java
@@ -17,11 +17,14 @@
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 12a3f17..cd95780 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.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 @@
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 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 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 0000000..cd60e71
--- /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 0000000..efaa89c
--- /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 0000000..8bc94d2
--- /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 0000000..a90e933
--- /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;
+ }
+}