aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.api
diff options
context:
space:
mode:
authorAloys Augustin <aloys.augustin@polytechnique.org>2017-02-17 14:55:29 +0100
committerChris Luke <chris_luke@comcast.com>2017-05-15 14:38:53 +0000
commitee551988bcce08ad7a15f71fb9d2239b4239ab08 (patch)
tree8797431de4e72ff3b8f1143ead920d164ef3f2a8 /src/vnet/interface.api
parent08b1648194e0076220c52aebe27ee1eb5615fd6a (diff)
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 <aloys.augustin@polytechnique.org> Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vnet/interface.api')
-rw-r--r--src/vnet/interface.api35
1 files changed, 28 insertions, 7 deletions
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