FD.io VPP  v17.10-9-gd594711
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 
22 /** \brief Want Stats, enable/disable ALL stats updates
23  @param client_index - opaque cookie to identify the sender
24  @param context - sender context, to match reply w/ request
25  @param enable_disable - 1 = enable stats, 0 = disable
26  @param pid - pid of process requesting stats updates
27 */
28 autoreply define want_stats
29 {
34 };
35 
36 /** \brief Want Interface Simple Stats, register for detailed interface stats
37  @param client_index - opaque cookie to identify the sender
38  @param context - sender context, to match reply w/ request
39  @param enable_disable - 1 = enable stats, 0 = disable
40  @param pid - pid of process requesting stats updates
41 
42  Please consider using want_per_interface_simple_stats with sw_if_index=~0
43 */
44 autoreply define want_interface_simple_stats
45 {
50 };
51 
52 /** \brief Want Per Interface simple Stats, register for continuous stats
53  @param client_index - opaque cookie to identify the sender
54  @param context - sender context, to match reply w/ request
55  @param enable_disable - 1 = enable stats, 0 = disable
56  @param pid - pid of process requesting stats updates
57  @param num - number of sw_if_indexes
58  @param sw_ifs - array of sw_if_index
59 */
60 autoreply define want_per_interface_simple_stats
61 {
67  u32 sw_ifs[num];
68 
69 };
70 
71 /** \brief Want Interface Combined Stats, register for continuous stats
72  @param client_index - opaque cookie to identify the sender
73  @param context - sender context, to match reply w/ request
74  @param enable_disable - 1 = enable stats, 0 = disable
75  @param pid - pid of process requesting stats updates
76 
77  Please consider using want_per_interface_combined_stats with sw_if_index=~0
78 
79 */
80 autoreply define want_interface_combined_stats
81 {
86 };
87 
88 /** \brief Want Per Interface Combined Stats, register for continuous stats
89  @param client_index - opaque cookie to identify the sender
90  @param context - sender context, to match reply w/ request
91  @param enable_disable - 1 = enable stats, 0 = disable
92  @param pid - pid of process requesting stats updates
93  @param num - number of sw_if_indexes
94  @param sw_ifs - array of sw_if_index
95 */
96 autoreply define want_per_interface_combined_stats
97 {
103  u32 sw_ifs[num];
104 
105 };
106 
107 /** \brief Want IP4 FIB Stats, register for continuous stats
108  @param client_index - opaque cookie to identify the sender
109  @param context - sender context, to match reply w/ request
110  @param enable_disable - 1 = enable stats, 0 = disable
111  @param pid - pid of process requesting stats updates
112 */
113 autoreply define want_ip4_fib_stats
114 {
119 };
120 
121 /** \brief Want IP6 FIB Stats, register for continuous stats
122  @param client_index - opaque cookie to identify the sender
123  @param context - sender context, to match reply w/ request
124  @param enable_disable - 1 = enable stats, 0 = disable
125  @param pid - pid of process requesting stats updates
126 */
127 autoreply define want_ip6_fib_stats
128 {
133 };
134 
135 /** \brief Want IP4 NBR Stats, register for continuous stats
136  @param client_index - opaque cookie to identify the sender
137  @param context - sender context, to match reply w/ request
138  @param enable_disable - 1 = enable stats, 0 = disable
139  @param pid - pid of process requesting stats updates
140 */
141 autoreply define want_ip4_nbr_stats
142 {
147 };
148 
149 /** \brief Want IP6 NBR Stats, register for continuous stats
150  @param client_index - opaque cookie to identify the sender
151  @param context - sender context, to match reply w/ request
152  @param enable_disable - 1 = enable stats, 0 = disable
153  @param pid - pid of process requesting stats updates
154 */
155 autoreply define want_ip6_nbr_stats
156 {
161 };
162 
163 typeonly manual_print manual_endian define ip4_fib_counter
164 {
169 };
170 
171 manual_print manual_endian define vnet_ip4_fib_counters
172 {
176 };
177 
178 typeonly manual_print manual_endian define ip4_nbr_counter
179 {
184 };
185 
186 /**
187  * @brief Per-neighbour (i.e. per-adjacency) coutners
188  * @param count The size of the array of counters
189  * @param sw_if_index The interface the adjacency is on
190  * @param begin Flag to indicate this is the first set of stats for this
191  * interface. If this flag is not set the it is a continuation of
192  * stats for this interface
193  * @param c counters
194  */
195 manual_print manual_endian define vnet_ip4_nbr_counters
196 {
201 };
202 
203 typeonly manual_print manual_endian define ip6_fib_counter
204 {
205  u64 address[2];
209 };
210 
211 manual_print manual_endian define vnet_ip6_fib_counters
212 {
216 };
217 
218 typeonly manual_print manual_endian define ip6_nbr_counter
219 {
220  u64 address[2];
224 };
225 
226 manual_print manual_endian define vnet_ip6_nbr_counters
227 {
232 };
233 
234 
235 /** \brief Request for a single block of summary stats
236  @param client_index - opaque cookie to identify the sender
237  @param context - sender context, to match reply w/ request
238 */
239 define vnet_get_summary_stats
240 {
243 };
244 
245 /** \brief Reply for vnet_get_summary_stats request
246  @param context - sender context, to match reply w/ request
247  @param retval - return code for request
248  @param total_pkts -
249  @param total_bytes -
250  @param vector_rate -
251 */
252 define vnet_get_summary_stats_reply
253 {
256  u64 total_pkts[2];
257  u64 total_bytes[2];
259 };
260 
261 /*
262  * Local Variables:
263  * eval: (c-set-style "gnu")
264  * End:
265  */
int i32
Definition: types.h:81
unsigned long u64
Definition: types.h:89
svmdb_client_t * c
unsigned int u32
Definition: types.h:88
size_t count
Definition: vapi.c:40
double f64
Definition: types.h:142
unsigned char u8
Definition: types.h:56