From ee551988bcce08ad7a15f71fb9d2239b4239ab08 Mon Sep 17 00:00:00 2001 From: Aloys Augustin Date: Fri, 17 Feb 2017 14:55:29 +0100 Subject: Fix vnet_interface_counters API definition The api specification had u8 as data type, which caused the python binding to fail. Fixes VPP-642 Change-Id: I9ba97959740d44c8f4a12db9356d0d1bcd709a73 Signed-off-by: Aloys Augustin Signed-off-by: Ole Troan --- src/vnet/interface.api | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) (limited to 'src/vnet/interface.api') diff --git a/src/vnet/interface.api b/src/vnet/interface.api index 9df63f18b37..14ff6d5a522 100644 --- a/src/vnet/interface.api +++ b/src/vnet/interface.api @@ -206,21 +206,42 @@ define sw_interface_get_table_reply u32 vrf_id; }; -/** \brief Stats counters structure +typeonly manual_print manual_endian define vlib_counter +{ + u64 packets; /**< packet counter */ + u64 bytes; /**< byte counter */ +}; + +/** \brief Simple stats counters structure + @param vnet_counter_type- such as ip4, ip6, punts, etc + @param first_sw_if_index - first sw index in block of index, counts + @param count - number of counters, equal to the number of interfaces in + this stats block + @param data - contiguous block of u64 counters +*/ +manual_print manual_endian define vnet_interface_simple_counters +{ + /* enums - plural - in vnet/interface.h */ + u8 vnet_counter_type; + u32 first_sw_if_index; + u32 count; + u64 data[count]; +}; + +/** \brief Combined stats counters structure @param vnet_counter_type- such as ip4, ip6, punts, etc - @param is_combined - rx & tx total (all types) counts @param first_sw_if_index - first sw index in block of index, counts - @param count - number of interfaces this stats block includes counters for - @param data - contiguous block of vlib_counter_t structures + @param count - number of counters, equal to the number of interfaces in + this stats block + @param data - contiguous block of vlib_counter_t structures */ -define vnet_interface_counters +manual_print manual_endian define vnet_interface_combined_counters { /* enums - plural - in vnet/interface.h */ u8 vnet_counter_type; - u8 is_combined; u32 first_sw_if_index; u32 count; - u8 data[count]; + vl_api_vlib_counter_t data[count]; }; /** \brief Set unnumbered interface add / del request -- cgit 1.2.3-korg