FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
stats.api
Go to the documentation of this file.
1 /*
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:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
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.
14  */
15 
16 /** \file
17 
18  This file defines the stats API
19 */
20 
21 option version = "1.0.1";
22 
23 import "vnet/interface.api";
24 import "vnet/bier/bier.api";
25 
27  rpc want_stats
28  returns want_stats_reply;
29  rpc want_interface_simple_stats
30  returns want_interface_simple_stats_reply
32  rpc want_per_interface_simple_stats
33  returns want_per_interface_simple_stats_reply
35  rpc want_interface_combined_stats
36  returns want_interface_combined_stats_reply
38  rpc want_per_interface_combined_stats
39  returns want_per_interface_combined_stats_reply
41  rpc want_ip4_fib_stats
42  returns want_ip4_fib_stats_reply
44  rpc want_ip6_fib_stats
45  returns want_ip6_fib_stats_reply
47  rpc want_ip4_mfib_stats
48  returns want_ip4_mfib_stats_reply
50  rpc want_ip6_mfib_stats
51  returns want_ip6_mfib_stats_reply
53  rpc want_ip4_nbr_stats
54  returns want_ip4_nbr_stats_reply
56  rpc want_ip6_nbr_stats
57  returns want_ip6_nbr_stats_reply
59  rpc want_udp_encap_stats
60  returns want_udp_encap_stats_reply
62  rpc want_bier_neighbor_stats
63  returns want_bier_neighbor_stats_reply
65 };
66 
67 /** \brief Want Stats, enable/disable ALL stats updates
68  @param client_index - opaque cookie to identify the sender
69  @param context - sender context, to match reply w/ request
70  @param enable_disable - 1 = enable stats, 0 = disable
71  @param pid - pid of process requesting stats updates
72 */
73 autoreply define want_stats
74 {
79 };
80 
81 /** \brief Want Interface Simple Stats, register for detailed interface stats
82  @param client_index - opaque cookie to identify the sender
83  @param context - sender context, to match reply w/ request
84  @param enable_disable - 1 = enable stats, 0 = disable
85  @param pid - pid of process requesting stats updates
86 
87  Please consider using want_per_interface_simple_stats with sw_if_index=~0
88 */
89 autoreply define want_interface_simple_stats
90 {
95 };
96 
97 /** \brief Want Per Interface simple Stats, register for continuous stats
98  @param client_index - opaque cookie to identify the sender
99  @param context - sender context, to match reply w/ request
100  @param enable_disable - 1 = enable stats, 0 = disable
101  @param pid - pid of process requesting stats updates
102  @param num - number of sw_if_indexes
103  @param sw_ifs - array of sw_if_index
104 */
105 autoreply define want_per_interface_simple_stats
106 {
112  u32 sw_ifs[num];
113 
114 };
115 
116 /** \brief Want Interface Combined Stats, register for continuous stats
117  @param client_index - opaque cookie to identify the sender
118  @param context - sender context, to match reply w/ request
119  @param enable_disable - 1 = enable stats, 0 = disable
120  @param pid - pid of process requesting stats updates
121 
122  Please consider using want_per_interface_combined_stats with sw_if_index=~0
123 
124 */
125 autoreply define want_interface_combined_stats
126 {
131 };
132 
133 /** \brief Want Per Interface Combined Stats, register for continuous stats
134  @param client_index - opaque cookie to identify the sender
135  @param context - sender context, to match reply w/ request
136  @param enable_disable - 1 = enable stats, 0 = disable
137  @param pid - pid of process requesting stats updates
138  @param num - number of sw_if_indexes
139  @param sw_ifs - array of sw_if_index
140 */
141 autoreply define want_per_interface_combined_stats
142 {
148  u32 sw_ifs[num];
149 
150 };
151 
152 /** \brief Want IP4 FIB Stats, register for continuous stats
153  @param client_index - opaque cookie to identify the sender
154  @param context - sender context, to match reply w/ request
155  @param enable_disable - 1 = enable stats, 0 = disable
156  @param pid - pid of process requesting stats updates
157 */
158 autoreply define want_ip4_fib_stats
159 {
164 };
165 
166 /** \brief Want IP6 FIB Stats, register for continuous stats
167  @param client_index - opaque cookie to identify the sender
168  @param context - sender context, to match reply w/ request
169  @param enable_disable - 1 = enable stats, 0 = disable
170  @param pid - pid of process requesting stats updates
171 */
172 autoreply define want_ip6_fib_stats
173 {
178 };
179 
180 /** \brief Want IP4 muilticast FIB Stats, register for continuous stats
181  @param client_index - opaque cookie to identify the sender
182  @param context - sender context, to match reply w/ request
183  @param enable_disable - 1 = enable stats, 0 = disable
184  @param pid - pid of process requesting stats updates
185 */
186 autoreply define want_ip4_mfib_stats
187 {
192 };
193 
194 /** \brief Want IP6 multicast FIB Stats, register for continuous stats
195  @param client_index - opaque cookie to identify the sender
196  @param context - sender context, to match reply w/ request
197  @param enable_disable - 1 = enable stats, 0 = disable
198  @param pid - pid of process requesting stats updates
199 */
200 autoreply define want_ip6_mfib_stats
201 {
206 };
207 
208 /** \brief Want IP4 NBR Stats, register for continuous stats
209  @param client_index - opaque cookie to identify the sender
210  @param context - sender context, to match reply w/ request
211  @param enable_disable - 1 = enable stats, 0 = disable
212  @param pid - pid of process requesting stats updates
213 */
214 autoreply define want_ip4_nbr_stats
215 {
220 };
221 
222 /** \brief Want IP6 NBR Stats, register for continuous stats
223  @param client_index - opaque cookie to identify the sender
224  @param context - sender context, to match reply w/ request
225  @param enable_disable - 1 = enable stats, 0 = disable
226  @param pid - pid of process requesting stats updates
227 */
228 autoreply define want_ip6_nbr_stats
229 {
234 };
235 
236 typeonly manual_print manual_endian define ip4_fib_counter
237 {
242 };
243 
244 manual_print manual_endian define vnet_ip4_fib_counters
245 {
249 };
250 
251 typeonly manual_print manual_endian define ip4_mfib_counter
252 {
253  u8 source[4];
254  u8 group[4];
258 };
259 
260 manual_print manual_endian define vnet_ip4_mfib_counters
261 {
265 };
266 
267 typeonly manual_print manual_endian define ip4_nbr_counter
268 {
273 };
274 
275 /**
276  * @brief Per-neighbour (i.e. per-adjacency) coutners
277  * @param count The size of the array of counters
278  * @param sw_if_index The interface the adjacency is on
279  * @param begin Flag to indicate this is the first set of stats for this
280  * interface. If this flag is not set the it is a continuation of
281  * stats for this interface
282  * @param c counters
283  */
284 manual_print manual_endian define vnet_ip4_nbr_counters
285 {
290 };
291 
292 typeonly manual_print manual_endian define ip6_fib_counter
293 {
298 };
299 
300 manual_print manual_endian define vnet_ip6_fib_counters
301 {
305 };
306 
307 typeonly manual_print manual_endian define ip6_mfib_counter
308 {
309  u8 source[16];
310  u8 group[16];
314 };
315 
316 manual_print manual_endian define vnet_ip6_mfib_counters
317 {
321 };
322 
323 typeonly manual_print manual_endian define ip6_nbr_counter
324 {
329 };
330 
331 manual_print manual_endian define vnet_ip6_nbr_counters
332 {
337 };
338 
339 /** \brief Simple stats counters structure
340  @param vnet_counter_type- such as ip4, ip6, punts, etc
341  @param first_sw_if_index - first sw index in block of index, counts
342  @param count - number of counters, equal to the number of interfaces in
343  this stats block
344  @param data - contiguous block of u64 counters
345 
346  vnet_counter_type defined in enums - plural - in vnet/interface.h
347 */
348 manual_print manual_endian define vnet_interface_simple_counters
349 {
353  u64 data[count];
354 };
355 
356 /** \brief Combined stats counters structure
357  @param vnet_counter_type- such as ip4, ip6, punts, etc
358  @param first_sw_if_index - first sw index in block of index, counts
359  @param count - number of counters, equal to the number of interfaces in
360  this stats block
361  @param data - contiguous block of vlib_counter_t structures
362 
363  vnet_counter_type defined in enums - plural - in vnet/interface.h
364 */
365 manual_print manual_endian define vnet_interface_combined_counters
366 {
371 };
372 
373 /** \brief Simple per interface stats counters structure
374  @param count - number of elements in message
375  @param timestamp - u32 vlib timestamp for control plane
376  @param data[count] - vl_api_vnet_simple_counter_t
377 
378 */
379 manual_print manual_endian define vnet_per_interface_simple_counters
380 {
384 };
385 
386 /** \brief Combined stats counters structure per interface
387  @param count - number of elements in message
388  @param timestamp - u32 vlib timestamp for control plane
389  @param data[count] - vl_api_vnet_combined_counter_t
390 */
391 manual_print manual_endian define vnet_per_interface_combined_counters
392 {
396 };
397 
398 /** \brief Request for a single block of summary stats
399  @param client_index - opaque cookie to identify the sender
400  @param context - sender context, to match reply w/ request
401 */
402 define vnet_get_summary_stats
403 {
406 };
407 
408 /** \brief Reply for vnet_get_summary_stats request
409  @param context - sender context, to match reply w/ request
410  @param retval - return code for request
411  @param total_pkts -
412  @param total_bytes -
413  @param vector_rate -
414 */
415 define vnet_get_summary_stats_reply
416 {
419  u64 total_pkts[2];
420  u64 total_bytes[2];
422 };
423 
424 /** \brief Get delay between polling statistics
425  @param client_index - opaque cookie to identify the sender
426  @param context - sender context, to match reply w/ request
427 */
428 define stats_get_poller_delay
429 {
432 };
433 
434 /** \brief Get delay between polling statistics reply
435  @param context - sender context, to match reply w/ request
436  @param retval - return code for request
437  @param delay - poller delay
438 */
439 define stats_get_poller_delay_reply
440 {
444 };
445 
446 /** \brief Want UDP encap Stats, register for continuous stats
447  @param client_index - opaque cookie to identify the sender
448  @param context - sender context, to match reply w/ request
449  @param enable - 1 = enable stats, 0 = disable
450  @param pid - pid of process requesting stats updates
451 */
452 autoreply define want_udp_encap_stats
453 {
458 };
459 
460 /** \brief Stat for one UDP encap object
461  @param id - The ID of the object, same as passed for the create
462  @param packets - number of packets sent
463  @param bytes - number of bytes sent
464 */
465 typeonly manual_print manual_endian define udp_encap_counter
466 {
470 };
471 
472 manual_print manual_endian define vnet_udp_encap_counters
473 {
477 };
478 
479 /** \brief Want BIER neighbor Stats, register for continuous stats
480  @param client_index - opaque cookie to identify the sender
481  @param context - sender context, to match reply w/ request
482  @param enable - 1 = enable stats, 0 = disable
483  @param pid - pid of process requesting stats updates
484 */
485 autoreply define want_bier_neighbor_stats
486 {
491 };
492 
493 /** \brief Stat for one BIER neighbor object
494  @param tbl_id - The BIER Table ID the neighbour belongs to.
495  @param path - The path describing the negihbor (this is the data
496  given during a BIER route add)
497  @param packets - number of packets sent
498  @param bytes - number of bytes sent
499 */
500 typeonly manual_print manual_endian define bier_neighbor_counter
501 {
506 };
507 
508 manual_print manual_endian define vnet_bier_neighbor_counters
509 {
513 };
514 
515 /*
516  * Local Variables:
517  * eval: (c-set-style "gnu")
518  * End:
519  */
typedef address
Definition: ip_types.api:34
rpc want_per_interface_combined_stats returns want_per_interface_combined_stats_reply events vnet_per_interface_combined_counters
Definition: stats.api:40
rpc want_ip4_nbr_stats returns want_ip4_nbr_stats_reply events vnet_ip4_nbr_counters
Definition: stats.api:55
unsigned long u64
Definition: types.h:89
vl_api_bier_table_id_t tbl_id
Definition: stats.api:502
unsigned char u8
Definition: types.h:56
double f64
Definition: types.h:142
rpc want_per_interface_simple_stats returns want_per_interface_simple_stats_reply events vnet_per_interface_simple_counters
Definition: stats.api:34
unsigned int u32
Definition: types.h:88
rpc want_ip4_mfib_stats returns want_ip4_mfib_stats_reply events vnet_ip4_mfib_counters
Definition: stats.api:49
rpc want_ip4_fib_stats returns want_ip4_fib_stats_reply events vnet_ip4_fib_counters
Definition: stats.api:43
Stat for one UDP encap object.
Definition: stats.api:465
Stat for one BIER neighbor object.
Definition: stats.api:500
rpc want_ip6_nbr_stats returns want_ip6_nbr_stats_reply events vnet_ip6_nbr_counters
Definition: stats.api:58
BIER Table Indentifier.
Definition: bier.api:29
rpc want_ip6_mfib_stats returns want_ip6_mfib_stats_reply events vnet_ip6_mfib_counters
Definition: stats.api:52
svmdb_client_t * c
option version
Definition: stats.api:21
signed int i32
Definition: types.h:81
FIB path.
Definition: fib_types.api:47
Combined interface counter data type for vnet_interface_combined_counters.
Definition: interface.api:271
size_t count
Definition: vapi.c:42
service
Definition: stats.api:26
rpc want_interface_simple_stats returns want_interface_simple_stats_reply events vnet_interface_simple_counters
Definition: stats.api:31
rpc want_interface_combined_stats returns want_interface_combined_stats_reply events vnet_interface_combined_counters
Definition: stats.api:37
vl_api_fib_path_t path
Definition: stats.api:503
rpc want_udp_encap_stats returns want_udp_encap_stats_reply events vnet_udp_encap_counters
Definition: stats.api:61
Simple interface counter data type for vnet_interface_simple_counters.
Definition: interface.api:305
rpc want_ip6_fib_stats returns want_ip6_fib_stats_reply events vnet_ip6_fib_counters
Definition: stats.api:46
rpc want_bier_neighbor_stats returns want_bier_neighbor_stats_reply events vnet_bier_neighbor_counters
Definition: stats.api:64