From 84e4ffeaf1c0988752d755faf8b5934f0a0df873 Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 17 Feb 2016 15:10:04 +0100 Subject: Added MTU information to sw_interface_dump Change-Id: Ie69837fd6903b715cb7b840b67c869a9b12c84a7 Signed-off-by: Pavel --- vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java | 4 +++- vpp-japi/japi/vppjni.c | 5 +++-- vpp-japi/japi/vppjni.h | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'vpp-japi') diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java b/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java index b2edae04..742dd25a 100644 --- a/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java +++ b/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java @@ -38,11 +38,12 @@ public final class vppInterfaceDetails { public final int vtrPushDot1q; public final int vtrTag1; public final int vtrTag2; + public final int linkMtu; 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) + byte subInnerVlanIdAny, int vtrOp, int vtrPushDot1q, int vtrTag1, int vtrTag2, int linkMtu) { this.ifIndex = ifIndex; this.interfaceName = interfaceName; @@ -65,5 +66,6 @@ public final class vppInterfaceDetails { this.vtrPushDot1q = vtrPushDot1q; this.vtrTag1 = vtrTag1; this.vtrTag2 = vtrTag2; + this.linkMtu = linkMtu; } } diff --git a/vpp-japi/japi/vppjni.c b/vpp-japi/japi/vppjni.c index f7c297fc..54846bcb 100644 --- a/vpp-japi/japi/vppjni.c +++ b/vpp-japi/japi/vppjni.c @@ -76,7 +76,7 @@ BIND_JAPI_BYTE_FIELD(vppBridgeDomainInterfaceDetails, splitHorizonGroup); BIND_JAPI_STRING_FIELD(vppBridgeDomainInterfaceDetails, interfaceName); BIND_JAPI_CLASS(vppInterfaceCounters, "(JJJJJJJJJJJJJJJJJJJJJJ)V"); -BIND_JAPI_CLASS(vppInterfaceDetails, "(ILjava/lang/String;I[BBBBBIBBIIBBBBIIII)V"); +BIND_JAPI_CLASS(vppInterfaceDetails, "(ILjava/lang/String;I[BBBBBIBBIIBBBBIIIII)V"); BIND_JAPI_CLASS(vppIPv4Address, "(IB)V"); BIND_JAPI_CLASS(vppIPv6Address, "([BB)V"); BIND_JAPI_CLASS(vppL2Fib, "([BZLjava/lang/String;ZZ)V"); @@ -694,6 +694,7 @@ static jobjectArray sw_if_dump_get_interfaces (JNIEnv * env) jint vtrPushDot1q = sw_if_details->vtr_push_dot1q; jint vtrTag1 = sw_if_details->vtr_tag1; jint vtrTag2 = sw_if_details->vtr_tag2; + jint linkMtu = sw_if_details->link_mtu; jbyte adminUpDown = sw_if_details->admin_up_down; jbyte linkUpDown = sw_if_details->link_up_down; @@ -712,7 +713,7 @@ static jobjectArray sw_if_dump_get_interfaces (JNIEnv * env) linkDuplex, linkSpeed, subId, subDot1ad, subNumberOfTags, subOuterVlanId, subInnerVlanId, subExactMatch, subDefault, subOuterVlanIdAny, - subInnerVlanIdAny, vtrOp, vtrPushDot1q, vtrTag1, vtrTag2); + subInnerVlanIdAny, vtrOp, vtrPushDot1q, vtrTag1, vtrTag2, linkMtu); (*env)->SetObjectArrayElement(env, ifArray, i, ifObj); } diff --git a/vpp-japi/japi/vppjni.h b/vpp-japi/japi/vppjni.h index 847bbe92..bd0683ae 100644 --- a/vpp-japi/japi/vppjni.h +++ b/vpp-japi/japi/vppjni.h @@ -40,6 +40,7 @@ typedef struct { u8 link_up_down; u8 link_duplex; u8 link_speed; + u16 link_mtu; u32 sub_id; u8 sub_dot1ad; u8 sub_number_of_tags; -- cgit 1.2.3-korg