2 * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
18 This file defines the stats API
21 option version = "1.0.0";
23 import "vnet/interface.api";
27 returns want_stats_reply;
28 rpc want_interface_simple_stats
29 returns want_interface_simple_stats_reply
30 events vnet_interface_simple_counters;
31 rpc want_per_interface_simple_stats
32 returns want_per_interface_simple_stats_reply
33 events vnet_per_interface_simple_counters;
34 rpc want_interface_combined_stats
35 returns want_interface_combined_stats_reply
36 events vnet_interface_combined_counters;
37 rpc want_per_interface_combined_stats
38 returns want_per_interface_combined_stats_reply
39 events vnet_per_interface_combined_counters;
40 rpc want_ip4_fib_stats
41 returns want_ip4_fib_stats_reply
42 events vnet_ip4_fib_counters;
43 rpc want_ip6_fib_stats
44 returns want_ip6_fib_stats_reply
45 events vnet_ip6_fib_counters;
46 rpc want_ip4_mfib_stats
47 returns want_ip4_mfib_stats_reply
48 events vnet_ip4_mfib_counters;
49 rpc want_ip6_mfib_stats
50 returns want_ip6_mfib_stats_reply
51 events vnet_ip6_mfib_counters;
52 rpc want_ip4_nbr_stats
53 returns want_ip4_nbr_stats_reply
54 events vnet_ip4_nbr_counters;
55 rpc want_ip6_nbr_stats
56 returns want_ip6_nbr_stats_reply
57 events vnet_ip6_nbr_counters;
58 rpc want_udp_encap_stats
59 returns want_udp_encap_stats_reply
60 events vnet_udp_encap_counters;
63 /** \brief Want Stats, enable/disable ALL stats updates
64 @param client_index - opaque cookie to identify the sender
65 @param context - sender context, to match reply w/ request
66 @param enable_disable - 1 = enable stats, 0 = disable
67 @param pid - pid of process requesting stats updates
69 autoreply define want_stats
77 /** \brief Want Interface Simple Stats, register for detailed interface stats
78 @param client_index - opaque cookie to identify the sender
79 @param context - sender context, to match reply w/ request
80 @param enable_disable - 1 = enable stats, 0 = disable
81 @param pid - pid of process requesting stats updates
83 Please consider using want_per_interface_simple_stats with sw_if_index=~0
85 autoreply define want_interface_simple_stats
93 /** \brief Want Per Interface simple Stats, register for continuous stats
94 @param client_index - opaque cookie to identify the sender
95 @param context - sender context, to match reply w/ request
96 @param enable_disable - 1 = enable stats, 0 = disable
97 @param pid - pid of process requesting stats updates
98 @param num - number of sw_if_indexes
99 @param sw_ifs - array of sw_if_index
101 autoreply define want_per_interface_simple_stats
112 /** \brief Want Interface Combined Stats, register for continuous stats
113 @param client_index - opaque cookie to identify the sender
114 @param context - sender context, to match reply w/ request
115 @param enable_disable - 1 = enable stats, 0 = disable
116 @param pid - pid of process requesting stats updates
118 Please consider using want_per_interface_combined_stats with sw_if_index=~0
121 autoreply define want_interface_combined_stats
129 /** \brief Want Per Interface Combined Stats, register for continuous stats
130 @param client_index - opaque cookie to identify the sender
131 @param context - sender context, to match reply w/ request
132 @param enable_disable - 1 = enable stats, 0 = disable
133 @param pid - pid of process requesting stats updates
134 @param num - number of sw_if_indexes
135 @param sw_ifs - array of sw_if_index
137 autoreply define want_per_interface_combined_stats
148 /** \brief Want IP4 FIB Stats, register for continuous stats
149 @param client_index - opaque cookie to identify the sender
150 @param context - sender context, to match reply w/ request
151 @param enable_disable - 1 = enable stats, 0 = disable
152 @param pid - pid of process requesting stats updates
154 autoreply define want_ip4_fib_stats
162 /** \brief Want IP6 FIB Stats, register for continuous stats
163 @param client_index - opaque cookie to identify the sender
164 @param context - sender context, to match reply w/ request
165 @param enable_disable - 1 = enable stats, 0 = disable
166 @param pid - pid of process requesting stats updates
168 autoreply define want_ip6_fib_stats
176 /** \brief Want IP4 muilticast FIB Stats, register for continuous stats
177 @param client_index - opaque cookie to identify the sender
178 @param context - sender context, to match reply w/ request
179 @param enable_disable - 1 = enable stats, 0 = disable
180 @param pid - pid of process requesting stats updates
182 autoreply define want_ip4_mfib_stats
190 /** \brief Want IP6 multicast FIB Stats, register for continuous stats
191 @param client_index - opaque cookie to identify the sender
192 @param context - sender context, to match reply w/ request
193 @param enable_disable - 1 = enable stats, 0 = disable
194 @param pid - pid of process requesting stats updates
196 autoreply define want_ip6_mfib_stats
204 /** \brief Want IP4 NBR Stats, register for continuous stats
205 @param client_index - opaque cookie to identify the sender
206 @param context - sender context, to match reply w/ request
207 @param enable_disable - 1 = enable stats, 0 = disable
208 @param pid - pid of process requesting stats updates
210 autoreply define want_ip4_nbr_stats
218 /** \brief Want IP6 NBR Stats, register for continuous stats
219 @param client_index - opaque cookie to identify the sender
220 @param context - sender context, to match reply w/ request
221 @param enable_disable - 1 = enable stats, 0 = disable
222 @param pid - pid of process requesting stats updates
224 autoreply define want_ip6_nbr_stats
232 typeonly manual_print manual_endian define ip4_fib_counter
240 manual_print manual_endian define vnet_ip4_fib_counters
244 vl_api_ip4_fib_counter_t c[count];
247 typeonly manual_print manual_endian define ip4_mfib_counter
256 manual_print manual_endian define vnet_ip4_mfib_counters
260 vl_api_ip4_mfib_counter_t c[count];
263 typeonly manual_print manual_endian define ip4_nbr_counter
272 * @brief Per-neighbour (i.e. per-adjacency) coutners
273 * @param count The size of the array of counters
274 * @param sw_if_index The interface the adjacency is on
275 * @param begin Flag to indicate this is the first set of stats for this
276 * interface. If this flag is not set the it is a continuation of
277 * stats for this interface
280 manual_print manual_endian define vnet_ip4_nbr_counters
285 vl_api_ip4_nbr_counter_t c[count];
288 typeonly manual_print manual_endian define ip6_fib_counter
296 manual_print manual_endian define vnet_ip6_fib_counters
300 vl_api_ip6_fib_counter_t c[count];
303 typeonly manual_print manual_endian define ip6_mfib_counter
312 manual_print manual_endian define vnet_ip6_mfib_counters
316 vl_api_ip6_mfib_counter_t c[count];
319 typeonly manual_print manual_endian define ip6_nbr_counter
327 manual_print manual_endian define vnet_ip6_nbr_counters
332 vl_api_ip6_nbr_counter_t c[count];
335 /** \brief Simple stats counters structure
336 @param vnet_counter_type- such as ip4, ip6, punts, etc
337 @param first_sw_if_index - first sw index in block of index, counts
338 @param count - number of counters, equal to the number of interfaces in
340 @param data - contiguous block of u64 counters
342 vnet_counter_type defined in enums - plural - in vnet/interface.h
344 manual_print manual_endian define vnet_interface_simple_counters
346 u8 vnet_counter_type;
347 u32 first_sw_if_index;
352 /** \brief Combined stats counters structure
353 @param vnet_counter_type- such as ip4, ip6, punts, etc
354 @param first_sw_if_index - first sw index in block of index, counts
355 @param count - number of counters, equal to the number of interfaces in
357 @param data - contiguous block of vlib_counter_t structures
359 vnet_counter_type defined in enums - plural - in vnet/interface.h
361 manual_print manual_endian define vnet_interface_combined_counters
363 u8 vnet_counter_type;
364 u32 first_sw_if_index;
366 vl_api_vlib_counter_t data[count];
369 /** \brief Simple per interface stats counters structure
370 @param count - number of elements in message
371 @param timestamp - u32 vlib timestamp for control plane
372 @param data[count] - vl_api_vnet_simple_counter_t
375 manual_print manual_endian define vnet_per_interface_simple_counters
379 vl_api_vnet_simple_counter_t data[count];
382 /** \brief Combined stats counters structure per interface
383 @param count - number of elements in message
384 @param timestamp - u32 vlib timestamp for control plane
385 @param data[count] - vl_api_vnet_combined_counter_t
387 manual_print manual_endian define vnet_per_interface_combined_counters
391 vl_api_vnet_combined_counter_t data[count];
394 /** \brief Request for a single block of summary stats
395 @param client_index - opaque cookie to identify the sender
396 @param context - sender context, to match reply w/ request
398 define vnet_get_summary_stats
404 /** \brief Reply for vnet_get_summary_stats request
405 @param context - sender context, to match reply w/ request
406 @param retval - return code for request
411 define vnet_get_summary_stats_reply
420 /** \brief Get delay between polling statistics
421 @param client_index - opaque cookie to identify the sender
422 @param context - sender context, to match reply w/ request
424 define stats_get_poller_delay
430 /** \brief Get delay between polling statistics reply
431 @param context - sender context, to match reply w/ request
432 @param retval - return code for request
433 @param delay - poller delay
435 define stats_get_poller_delay_reply
442 /** \brief Want UDP encap Stats, register for continuous stats
443 @param client_index - opaque cookie to identify the sender
444 @param context - sender context, to match reply w/ request
445 @param enable - 1 = enable stats, 0 = disable
446 @param pid - pid of process requesting stats updates
448 autoreply define want_udp_encap_stats
456 /** \brief Stat for one UDP encap object
457 @param id - The ID of the object, same as passed for the create
458 @param packets - number of packets sent
459 @param bytes - number of bytes sent
461 typeonly manual_print manual_endian define udp_encap_counter
468 manual_print manual_endian define vnet_udp_encap_counters
472 vl_api_udp_encap_counter_t c[count];
477 * eval: (c-set-style "gnu")