blob: 967f56cf9174d12f4f55c035ff46cb3cacb2acda [file] [log] [blame]
Neale Ranns008dbe12018-09-07 09:32:36 -07001/* Hey Emacs use -*- mode: C -*- */
Dave Barachb5e8a772016-12-06 12:04:42 -05002/*
Neale Ranns008dbe12018-09-07 09:32:36 -07003 * Copyright (c) 2018 Cisco and/or its affiliates.
Dave Barachb5e8a772016-12-06 12:04:42 -05004 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/** \file
18
19 This file defines vpp IP control-plane API messages which are generally
Jakub Grajciar58989a32019-10-08 14:05:18 +020020 called through a shared memory interface.
Dave Barachb5e8a772016-12-06 12:04:42 -050021*/
22
Aloys Augustin6e4cfb52021-09-16 20:53:14 +020023option version = "3.2.0";
Neale Ranns097fa662018-05-01 05:17:55 -070024
Jakub Grajciar58989a32019-10-08 14:05:18 +020025import "vnet/interface_types.api";
Neale Ranns31ed7442018-02-23 05:29:09 -080026import "vnet/fib/fib_types.api";
Neale Rannsde5b08f2018-08-29 06:37:18 -070027import "vnet/ethernet/ethernet_types.api";
Neale Ranns097fa662018-05-01 05:17:55 -070028import "vnet/mfib/mfib_types.api";
Ole Troan668605f2019-12-09 16:08:27 +010029import "vnet/interface_types.api";
Dave Barach0d056e52017-09-28 15:11:16 -040030
Neale Ranns097fa662018-05-01 05:17:55 -070031/** \brief An IP table
Neale Ranns28ab9cc2017-08-14 07:18:42 -070032 @param is_ipv6 - V4 or V6 table
33 @param table_id - table ID associated with the route
Paul Vinciguerrac0e94412020-04-28 01:12:04 -040034 This table ID will apply to both the unicast
35 and multicast FIBs
Neale Ranns2297af02017-09-12 09:45:04 -070036 @param name - A client provided name/tag for the table. If this is
37 not set by the client, then VPP will generate something
Paul Vinciguerrac0e94412020-04-28 01:12:04 -040038 meaningful.
Neale Ranns28ab9cc2017-08-14 07:18:42 -070039*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -040040typedef ip_table
Neale Ranns097fa662018-05-01 05:17:55 -070041{
42 u32 table_id;
Ole Troan668605f2019-12-09 16:08:27 +010043 bool is_ip6;
44 string name[64];
Neale Ranns097fa662018-05-01 05:17:55 -070045};
46
47/** \brief Add / del table request
48 A table can be added multiple times, but need be deleted only once.
49 @param client_index - opaque cookie to identify the sender
50 @param context - sender context, to match reply w/ request
51*/
Neale Ranns28ab9cc2017-08-14 07:18:42 -070052autoreply define ip_table_add_del
53{
54 u32 client_index;
55 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +020056 bool is_add [default=true];
Neale Ranns097fa662018-05-01 05:17:55 -070057 vl_api_ip_table_t table;
Neale Ranns28ab9cc2017-08-14 07:18:42 -070058};
59
Aloys Augustin6e4cfb52021-09-16 20:53:14 +020060/** \brief Allocate an unused table
61 A table can be added multiple times.
62 If a large number of tables are in use (millions), this API might
63 fail to find a free ID with very low probability, and will return
64 EAGAIN. A subsequent attempt may be successful.
65 @param client_index - opaque cookie to identify the sender
66 @param context - sender context, to match reply w/ request
67 @param table - if table.table_id == ~0, vpp allocates an unused table_id and
68 proceeds as in ip_table_add_del with is_add = true
69 if table.table_id != ~0, vpp uses the table.table_id and
70 proceeds as in ip_table_add_del with is_add = true
71 table.table_id should never be 0
72*/
73define ip_table_allocate
74{
75 u32 client_index;
76 u32 context;
77
78 vl_api_ip_table_t table;
79};
80
81define ip_table_allocate_reply
82{
83 u32 context;
84 i32 retval;
85
86 vl_api_ip_table_t table;
87};
88
Neale Ranns097fa662018-05-01 05:17:55 -070089/** \brief Dump IP all fib tables
Dave Barachb5e8a772016-12-06 12:04:42 -050090 @param client_index - opaque cookie to identify the sender
Neale Ranns097fa662018-05-01 05:17:55 -070091 @param context - sender context, to match reply w/ request
Dave Barachb5e8a772016-12-06 12:04:42 -050092*/
Neale Ranns097fa662018-05-01 05:17:55 -070093define ip_table_dump
Dave Barachb5e8a772016-12-06 12:04:42 -050094{
95 u32 client_index;
96 u32 context;
97};
98
Neale Ranns9db6ada2019-11-08 12:42:31 +000099/** \brief IP table replace being
100
101 The use-case is that, for some unspecified reason, the control plane
102 has a very different set of entries it wants in the table than VPP
103 currently has. The CP would thus like to 'replace' VPP's current table
104 only by specifying what the new set of entries shall be, i.e. it is not
Paul Vinciguerrac0e94412020-04-28 01:12:04 -0400105 going to delete anything that already exists.
106 the CP declares the start of this procedure with this begin_replace
Neale Ranns9db6ada2019-11-08 12:42:31 +0000107 API Call, and when it has populated all the entries it wants, it calls
Paul Vinciguerrac0e94412020-04-28 01:12:04 -0400108 the below end_replace API. From this point on it is of course free
Neale Ranns9db6ada2019-11-08 12:42:31 +0000109 to add and delete entries as usual.
110 The underlying mechanism by which VPP implements this replace is
111 purposefully left unspecified.
112
113 @param client_index - opaque cookie to identify the sender
114 @param context - sender context, to match reply w/ request
115 @param table - The table to resync
116*/
117autoreply define ip_table_replace_begin
118{
119 u32 client_index;
120 u32 context;
121 vl_api_ip_table_t table;
122};
123
124/** \brief IP table replace end
125
126 see replace start/
127
128 @param client_index - opaque cookie to identify the sender
129 @param context - sender context, to match reply w/ request
130 @param table - The table that has converged
131*/
132autoreply define ip_table_replace_end
133{
134 u32 client_index;
135 u32 context;
136 vl_api_ip_table_t table;
137};
138
139/** \brief IP table flush
140 Flush a table of all routes
141 @param client_index - opaque cookie to identify the sender
142 @param context - sender context, to match reply w/ request
143 @param table - The table to flush
144*/
145autoreply define ip_table_flush
146{
147 u32 client_index;
148 u32 context;
149 vl_api_ip_table_t table;
150};
151
Dave Barachb5e8a772016-12-06 12:04:42 -0500152/** \brief IP FIB table response
Neale Ranns097fa662018-05-01 05:17:55 -0700153 @param context - sender context
154 @param table - description of the table
Dave Barachb5e8a772016-12-06 12:04:42 -0500155*/
Ole Troandf87f802020-11-18 19:17:48 +0100156define ip_table_details
Dave Barachb5e8a772016-12-06 12:04:42 -0500157{
158 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700159 vl_api_ip_table_t table;
Dave Barachb5e8a772016-12-06 12:04:42 -0500160};
161
Neale Ranns097fa662018-05-01 05:17:55 -0700162/** \brief An IP route
163 @param table_id The IP table the route is in
164 @param stats_index The index of the route in the stats segment
165 @param prefix the prefix for the route
166 @param n_paths The number of paths the route has
Neale Ranns976b2592019-12-04 06:11:00 +0000167 @param src The entity adding the route. either 0 for default
168 or a value returned from fib_source_sdd.
Neale Ranns097fa662018-05-01 05:17:55 -0700169 @param paths The paths of the route
Dave Barachb5e8a772016-12-06 12:04:42 -0500170*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400171typedef ip_route
Neale Ranns097fa662018-05-01 05:17:55 -0700172{
173 u32 table_id;
174 u32 stats_index;
175 vl_api_prefix_t prefix;
176 u8 n_paths;
177 vl_api_fib_path_t paths[n_paths];
178};
Neale Ranns976b2592019-12-04 06:11:00 +0000179typedef ip_route_v2
180{
181 u32 table_id;
182 u32 stats_index;
183 vl_api_prefix_t prefix;
184 u8 n_paths;
185 u8 src;
186 vl_api_fib_path_t paths[n_paths];
187};
Neale Ranns097fa662018-05-01 05:17:55 -0700188
189/** \brief Add / del route request
190 @param client_index - opaque cookie to identify the sender
191 @param context - sender context, to match reply w/ request
192 @param is_multipath - Set to 1 if these paths will be added/removed
193 to/from the existing set, or 0 to replace
194 the existing set.
195 is_add=0 & is_multipath=0 implies delete all paths
196 @param is_add - Are the paths being added or removed
197*/
198define ip_route_add_del
Dave Barachb5e8a772016-12-06 12:04:42 -0500199{
200 u32 client_index;
201 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200202 bool is_add [default=true];
Ole Troan668605f2019-12-09 16:08:27 +0100203 bool is_multipath;
Neale Ranns097fa662018-05-01 05:17:55 -0700204 vl_api_ip_route_t route;
Dave Barachb5e8a772016-12-06 12:04:42 -0500205};
Neale Ranns976b2592019-12-04 06:11:00 +0000206define ip_route_add_del_v2
207{
208 option in_progress;
209 u32 client_index;
210 u32 context;
211 bool is_add [default=true];
212 bool is_multipath;
213 vl_api_ip_route_v2_t route;
214};
Neale Ranns097fa662018-05-01 05:17:55 -0700215define ip_route_add_del_reply
Dave Barachb5e8a772016-12-06 12:04:42 -0500216{
217 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700218 i32 retval;
Neale Ranns008dbe12018-09-07 09:32:36 -0700219 u32 stats_index;
Neale Ranns097fa662018-05-01 05:17:55 -0700220};
Neale Ranns976b2592019-12-04 06:11:00 +0000221define ip_route_add_del_v2_reply
222{
223 option in_progress;
224 u32 context;
225 i32 retval;
226 u32 stats_index;
227};
Neale Ranns097fa662018-05-01 05:17:55 -0700228
229/** \brief Dump IP routes from a table
230 @param client_index - opaque cookie to identify the sender
Neale Ranns976b2592019-12-04 06:11:00 +0000231 @param src The entity adding the route. either 0 for default
232 or a value returned from fib_source_sdd.
Neale Ranns097fa662018-05-01 05:17:55 -0700233 @param table - The table from which to dump routes (ony ID an AF are needed)
234*/
235define ip_route_dump
236{
237 u32 client_index;
238 u32 context;
239 vl_api_ip_table_t table;
240};
Neale Ranns976b2592019-12-04 06:11:00 +0000241define ip_route_v2_dump
242{
243 option in_progress;
244 u32 client_index;
245 u32 context;
246 /* vl_api_fib_source_t src; */
247 u8 src;
248 vl_api_ip_table_t table;
249};
Neale Ranns097fa662018-05-01 05:17:55 -0700250
251/** \brief IP FIB table entry response
252 @param route The route entry in the table
253*/
Ole Troandf87f802020-11-18 19:17:48 +0100254define ip_route_details
Neale Ranns097fa662018-05-01 05:17:55 -0700255{
256 u32 context;
257 vl_api_ip_route_t route;
Dave Barachb5e8a772016-12-06 12:04:42 -0500258};
Neale Ranns976b2592019-12-04 06:11:00 +0000259define ip_route_v2_details
260{
261 option in_progress;
262 u32 context;
263 vl_api_ip_route_v2_t route;
264};
Dave Barachb5e8a772016-12-06 12:04:42 -0500265
Christian Hoppsf5d38e02020-05-04 10:28:03 -0400266/** \brief Lookup IP route from a table
267 @param client_index - opaque cookie to identify the sender
268 @param table_id - The IP table to look the route up in
269 @param exact - 0 for normal route lookup, 1 for exact match only
270 @param prefix - The prefix (or host) for route lookup.
271*/
272define ip_route_lookup
273{
274 u32 client_index;
275 u32 context;
276 u32 table_id;
277 u8 exact;
278 vl_api_prefix_t prefix;
279};
Neale Ranns976b2592019-12-04 06:11:00 +0000280define ip_route_lookup_v2
281{
282 option in_progress;
283 u32 client_index;
284 u32 context;
285 u32 table_id;
286 u8 exact;
287 vl_api_prefix_t prefix;
288};
Christian Hoppsf5d38e02020-05-04 10:28:03 -0400289
290/** \brief IP FIB table lookup response
291 @param retval - return code of the lookup
292 @param route - The route entry in the table if found
293*/
294define ip_route_lookup_reply
295{
296 u32 context;
297 i32 retval;
298 vl_api_ip_route_t route;
299};
Neale Ranns976b2592019-12-04 06:11:00 +0000300define ip_route_lookup_v2_reply
301{
302 option in_progress;
303 u32 context;
304 i32 retval;
305 vl_api_ip_route_v2_t route;
306};
Christian Hoppsf5d38e02020-05-04 10:28:03 -0400307
Dave Barachb5e8a772016-12-06 12:04:42 -0500308/** \brief Set the ip flow hash config for a fib request
309 @param client_index - opaque cookie to identify the sender
310 @param context - sender context, to match reply w/ request
311 @param vrf_id - vrf/fib id
312 @param is_ipv6 - if non-zero the fib is ip6, else ip4
313 @param src - if non-zero include src in flow hash
314 @param dst - if non-zero include dst in flow hash
315 @param sport - if non-zero include sport in flow hash
316 @param dport - if non-zero include dport in flow hash
317 @param proto -if non-zero include proto in flow hash
318 @param reverse - if non-zero include reverse in flow hash
Mohsin Kazmi2af0e3a2018-11-20 11:11:12 +0100319 @param symmetric - if non-zero include symmetry in flow hash
Dave Barachb5e8a772016-12-06 12:04:42 -0500320*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400321autoreply define set_ip_flow_hash
Dave Barachb5e8a772016-12-06 12:04:42 -0500322{
Ahmed Abdelsalamf2984bb2020-11-20 18:56:09 +0000323 option deprecated;
Dave Barachb5e8a772016-12-06 12:04:42 -0500324 u32 client_index;
325 u32 context;
326 u32 vrf_id;
Ole Troan668605f2019-12-09 16:08:27 +0100327 bool is_ipv6;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200328 bool src;
329 bool dst;
330 bool sport;
331 bool dport;
332 bool proto;
333 bool reverse;
334 bool symmetric;
Dave Barachb5e8a772016-12-06 12:04:42 -0500335};
336
Ahmed Abdelsalamf2984bb2020-11-20 18:56:09 +0000337/**
338 @brief flow hash settings for an IP table
339 @param src - include src in flow hash
340 @param dst - include dst in flow hash
341 @param sport - include sport in flow hash
342 @param dport - include dport in flow hash
343 @param proto - include proto in flow hash
344 @param reverse - include reverse in flow hash
345 @param symmetric - include symmetry in flow hash
346 @param flowlabel - include flowlabel in flow hash
347*/
348enumflag ip_flow_hash_config
349{
350 IP_API_FLOW_HASH_SRC_IP = 0x01,
351 IP_API_FLOW_HASH_DST_IP = 0x02,
352 IP_API_FLOW_HASH_SRC_PORT = 0x04,
353 IP_API_FLOW_HASH_DST_PORT = 0x08,
354 IP_API_FLOW_HASH_PROTO = 0x10,
355 IP_API_FLOW_HASH_REVERSE = 0x20,
356 IP_API_FLOW_HASH_SYMETRIC = 0x40,
357 IP_API_FLOW_HASH_FLOW_LABEL = 0x80,
358};
359
360autoreply define set_ip_flow_hash_v2
361{
362 u32 client_index;
363 u32 context;
364 u32 table_id;
365 vl_api_address_family_t af;
366 vl_api_ip_flow_hash_config_t flow_hash_config;
367};
368
Takeru Hayasakab23c6f42023-01-17 04:45:58 +0900369/**
370 @brief flow hash settings for an IP table
371 @param src - include src in flow hash
372 @param dst - include dst in flow hash
373 @param sport - include sport in flow hash
374 @param dport - include dport in flow hash
375 @param proto - include proto in flow hash
376 @param reverse - include reverse in flow hash
377 @param symmetric - include symmetry in flow hash
378 @param flowlabel - include flowlabel in flow hash
379 @param gtpv1teid - include gtpv1teid in flow hash
380*/
381enumflag ip_flow_hash_config_v2
382{
383 IP_API_V2_FLOW_HASH_SRC_IP = 0x01,
384 IP_API_V2_FLOW_HASH_DST_IP = 0x02,
385 IP_API_V2_FLOW_HASH_SRC_PORT = 0x04,
386 IP_API_V2_FLOW_HASH_DST_PORT = 0x08,
387 IP_API_V2_FLOW_HASH_PROTO = 0x10,
388 IP_API_V2_FLOW_HASH_REVERSE = 0x20,
389 IP_API_V2_FLOW_HASH_SYMETRIC = 0x40,
390 IP_API_V2_FLOW_HASH_FLOW_LABEL = 0x80,
391 IP_API_V2_FLOW_HASH_GTPV1_TEID = 0x100,
392};
393
394autoreply define set_ip_flow_hash_v3
395{
396 u32 client_index;
397 u32 context;
398 u32 table_id;
399 vl_api_address_family_t af;
400 vl_api_ip_flow_hash_config_v2_t flow_hash_config;
401 option status="in_progress";
402};
403
Neale Ranns3d5f08a2021-01-22 16:12:38 +0000404/** \brief Set the ip flow hash router ID
405 @param client_index - opaque cookie to identify the sender
406 @param context - sender context, to match reply w/ request
407 @param router_id - The ID of the router. Mixed into the hash.
408 Used to prevent polarisation across a network,
409 since each router is assumed to have a different ID
410*/
411autoreply define set_ip_flow_hash_router_id
412{
413 u32 client_index;
414 u32 context;
415 u32 router_id;
416};
417
Dave Barachb5e8a772016-12-06 12:04:42 -0500418/** \brief IPv6 interface enable / disable request
419 @param client_index - opaque cookie to identify the sender
420 @param context - sender context, to match reply w/ request
421 @param sw_if_index - interface used to reach neighbor
422 @param enable - if non-zero enable ip6 on interface, else disable
423*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400424autoreply define sw_interface_ip6_enable_disable
Dave Barachb5e8a772016-12-06 12:04:42 -0500425{
426 u32 client_index;
427 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100428 vl_api_interface_index_t sw_if_index;
429 bool enable; /* set to true if enable */
Dave Barachb5e8a772016-12-06 12:04:42 -0500430};
431
Neale Ranns097fa662018-05-01 05:17:55 -0700432/** \brief Dump IP multicast fib table
433 @param client_index - opaque cookie to identify the sender
434*/
435define ip_mtable_dump
Neale Ranns008dbe12018-09-07 09:32:36 -0700436{
Neale Ranns097fa662018-05-01 05:17:55 -0700437 u32 client_index;
Neale Ranns008dbe12018-09-07 09:32:36 -0700438 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700439};
440define ip_mtable_details
441{
442 u32 client_index;
443 u32 context;
444 vl_api_ip_table_t table;
Neale Ranns008dbe12018-09-07 09:32:36 -0700445};
446
Neale Ranns32e1c012016-11-22 17:07:28 +0000447/** \brief Add / del route request
Ian Wells412ecd32018-10-04 12:31:11 -0700448
449 Adds a route, consisting both of the MFIB entry to match packets
450 (which may already exist) and a path to send those packets down.
451 Routes can be entered repeatedly to add multiple paths. Deletions are
452 per-path.
453
Neale Ranns32e1c012016-11-22 17:07:28 +0000454 @param client_index - opaque cookie to identify the sender
455 @param context - sender context, to match reply w/ request
Ian Wells412ecd32018-10-04 12:31:11 -0700456 @param table_id - fib table /vrf associated with the route
457 @param is_add - true if adding a route; false if deleting one
458 @param is_ipv6 - true iff all the addresses are v6
459 @param entry_flags - see fib_entry_flag_t
460 @param itf_flags - see mfib_entry_flags_t
461 @param next_hop_afi - see dpo_proto_t; the type of destination description
462 @param src_address - the source of the packet
463 @param grp_address - the group the packet is destined to
464 @param nh_address - the nexthop to forward the packet to
465 @param next_hop_sw_if_index - interface to emit packet on
466
467 BIER AFIs use the BIER imposition ID. v4 and v6 AFIs use either the
468 interface or the nexthop address.
469
470 Note that if the route is source-specific (S is supplied, not all 0s),
471 the prefix match is treated as exact (prefixlen /32 or /128).
472
473 FIXME not complete yet
Neale Ranns32e1c012016-11-22 17:07:28 +0000474*/
Neale Ranns097fa662018-05-01 05:17:55 -0700475typedef ip_mroute
476{
477 u32 table_id;
Neale Ranns990f6942020-10-20 07:20:17 +0000478 vl_api_mfib_entry_flags_t entry_flags;
Neale Ranns097fa662018-05-01 05:17:55 -0700479 u32 rpf_id;
480 vl_api_mprefix_t prefix;
481 u8 n_paths;
482 vl_api_mfib_path_t paths[n_paths];
483};
484
Neale Ranns28c142e2018-09-07 09:37:07 -0700485define ip_mroute_add_del
Neale Ranns32e1c012016-11-22 17:07:28 +0000486{
487 u32 client_index;
488 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200489 bool is_add [default=true];
Ole Troan668605f2019-12-09 16:08:27 +0100490 bool is_multipath;
Neale Ranns097fa662018-05-01 05:17:55 -0700491 vl_api_ip_mroute_t route;
Neale Ranns32e1c012016-11-22 17:07:28 +0000492};
Neale Ranns28c142e2018-09-07 09:37:07 -0700493define ip_mroute_add_del_reply
494{
495 u32 context;
496 i32 retval;
497 u32 stats_index;
498};
499
Neale Ranns5a8123b2017-01-26 01:18:23 -0800500/** \brief Dump IP multicast fib table
Neale Ranns097fa662018-05-01 05:17:55 -0700501 @param table - The table from which to dump routes (ony ID an AF are needed)
Neale Ranns5a8123b2017-01-26 01:18:23 -0800502*/
Neale Ranns097fa662018-05-01 05:17:55 -0700503define ip_mroute_dump
Neale Ranns5a8123b2017-01-26 01:18:23 -0800504{
505 u32 client_index;
506 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700507 vl_api_ip_table_t table;
Neale Ranns5a8123b2017-01-26 01:18:23 -0800508};
509
Neale Ranns097fa662018-05-01 05:17:55 -0700510/** \brief IP Multicast Route Details
511 @param route - Details of the route
Neale Ranns5a8123b2017-01-26 01:18:23 -0800512*/
Ole Troandf87f802020-11-18 19:17:48 +0100513define ip_mroute_details
Neale Ranns5a8123b2017-01-26 01:18:23 -0800514{
515 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700516 vl_api_ip_mroute_t route;
Neale Ranns5a8123b2017-01-26 01:18:23 -0800517};
518
Dave Barachb5e8a772016-12-06 12:04:42 -0500519define ip_address_details
520{
Dave Barachb5e8a772016-12-06 12:04:42 -0500521 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100522 vl_api_interface_index_t sw_if_index;
Ole Troan75761b92019-09-11 17:49:08 +0200523 vl_api_address_with_prefix_t prefix;
Dave Barachb5e8a772016-12-06 12:04:42 -0500524};
525
526define ip_address_dump
527{
528 u32 client_index;
529 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100530 vl_api_interface_index_t sw_if_index;
531 bool is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500532};
533
Neale Ranns9e2f9152018-05-18 02:27:10 -0700534/** \brief IP unnumbered configurations
535 @param sw_if_index The interface that has unnumbered configuration
Paul Vinciguerrac0e94412020-04-28 01:12:04 -0400536 @param ip_sw_if_index The IP interface that it is unnumbered to
Neale Ranns9e2f9152018-05-18 02:27:10 -0700537*/
538define ip_unnumbered_details
539{
Neale Ranns9e2f9152018-05-18 02:27:10 -0700540 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100541 vl_api_interface_index_t sw_if_index;
542 vl_api_interface_index_t ip_sw_if_index;
Neale Ranns9e2f9152018-05-18 02:27:10 -0700543};
544
545/** \brief Dump IP unnumbered configurations
546 @param sw_if_index ~0 for all interfaces, else the interface desired
547*/
548define ip_unnumbered_dump
549{
550 u32 client_index;
551 u32 context;
Paul Vinciguerrac0e94412020-04-28 01:12:04 -0400552 vl_api_interface_index_t sw_if_index [default=0xffffffff];
Neale Ranns9e2f9152018-05-18 02:27:10 -0700553};
554
Dave Barachb5e8a772016-12-06 12:04:42 -0500555define ip_details
556{
Dave Barachb5e8a772016-12-06 12:04:42 -0500557 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100558 vl_api_interface_index_t sw_if_index;
559 bool is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500560};
561
562define ip_dump
563{
564 u32 client_index;
565 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100566 bool is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500567};
568
Neale Ranns32e1c012016-11-22 17:07:28 +0000569define mfib_signal_dump
570{
571 u32 client_index;
572 u32 context;
573};
574
575define mfib_signal_details
576{
Neale Ranns32e1c012016-11-22 17:07:28 +0000577 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100578 vl_api_interface_index_t sw_if_index;
Neale Ranns32e1c012016-11-22 17:07:28 +0000579 u32 table_id;
Neale Ranns097fa662018-05-01 05:17:55 -0700580 vl_api_mprefix_t prefix;
Neale Ranns32e1c012016-11-22 17:07:28 +0000581 u16 ip_packet_len;
582 u8 ip_packet_data[256];
583};
Dave Barachb5e8a772016-12-06 12:04:42 -0500584
Neale Rannsd91c1db2017-07-31 02:30:50 -0700585/** \brief IP punt policer
586 @param client_index - opaque cookie to identify the sender
587 @param context - sender context, to match reply w/ request
588 @param is_add - 1 to add neighbor, 0 to delete
589 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
590 @param policer_index - Index of policer to use
591*/
592autoreply define ip_punt_police
593{
594 u32 client_index;
595 u32 context;
596 u32 policer_index;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200597 bool is_add [default=true];
Ole Troan668605f2019-12-09 16:08:27 +0100598 bool is_ip6;
Neale Rannsd91c1db2017-07-31 02:30:50 -0700599};
600
Pavel Kotucek609e1212018-11-27 09:59:44 +0100601/** \brief Punt redirect type
Neale Ranns47527b22018-11-16 00:53:53 -0800602 @param rx_sw_if_index - specify the original RX interface of traffic
603 that should be redirected. ~0 means any interface.
Paul Vinciguerrac0e94412020-04-28 01:12:04 -0400604 @param tx_sw_if_index - the TX interface to which traffic should be
Neale Rannsd91c1db2017-07-31 02:30:50 -0700605 redirected.
Pavel Kotucek609e1212018-11-27 09:59:44 +0100606 @param nh - the next-hop to redirect the traffic to.
607 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
608*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400609typedef punt_redirect
Pavel Kotucek609e1212018-11-27 09:59:44 +0100610{
Ole Troan668605f2019-12-09 16:08:27 +0100611 vl_api_interface_index_t rx_sw_if_index;
612 vl_api_interface_index_t tx_sw_if_index;
Pavel Kotucek609e1212018-11-27 09:59:44 +0100613 vl_api_address_t nh;
614};
615
616/** \brief IP punt redirect
617 @param client_index - opaque cookie to identify the sender
618 @param context - sender context, to match reply w/ request
619 @param punt - punt definition
620 @param is_add - 1 to add neighbor, 0 to delete
Neale Rannsd91c1db2017-07-31 02:30:50 -0700621*/
622autoreply define ip_punt_redirect
623{
Nathan Skrzypczak2a1783f2021-08-10 15:05:29 +0200624 option deprecated;
Ondrej Fabry755e3aa2023-04-13 08:55:28 +0200625
Neale Rannsd91c1db2017-07-31 02:30:50 -0700626 u32 client_index;
627 u32 context;
Pavel Kotucek609e1212018-11-27 09:59:44 +0100628 vl_api_punt_redirect_t punt;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200629 bool is_add [default=true];
Pavel Kotucek609e1212018-11-27 09:59:44 +0100630};
631
632define ip_punt_redirect_dump
633{
Ondrej Fabry755e3aa2023-04-13 08:55:28 +0200634 option deprecated;
635
Pavel Kotucek609e1212018-11-27 09:59:44 +0100636 u32 client_index;
637 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100638 vl_api_interface_index_t sw_if_index;
639 bool is_ipv6;
Pavel Kotucek609e1212018-11-27 09:59:44 +0100640};
641
642define ip_punt_redirect_details
643{
Ondrej Fabry755e3aa2023-04-13 08:55:28 +0200644 option deprecated;
645
Pavel Kotucek609e1212018-11-27 09:59:44 +0100646 u32 context;
647 vl_api_punt_redirect_t punt;
Neale Rannsd91c1db2017-07-31 02:30:50 -0700648};
649
Nathan Skrzypczak2a1783f2021-08-10 15:05:29 +0200650/** \brief Punt redirect type
651 @param rx_sw_if_index - specify the original RX interface of traffic
652 that should be redirected. ~0 means any interface.
653 @param af - Address family (ip4 or ip6)
654 @param paths - the TX paths to which traffic should be redirected.
655*/
656typedef punt_redirect_v2
657{
658 vl_api_interface_index_t rx_sw_if_index [default=0xffffffff];
659 vl_api_address_family_t af;
660 u32 n_paths;
661 vl_api_fib_path_t paths[n_paths];
662};
663
664/** \brief Add IP punt redirect rule
665 @param client_index - opaque cookie to identify the sender
666 @param context - sender context, to match reply w/ request
667 @param punt - punt definition
668 @param is_add - 1 to add punt_redirect rule, 0 to delete
669*/
670autoreply define add_del_ip_punt_redirect_v2
671{
672 u32 client_index;
673 u32 context;
674 bool is_add [default=true];
675 vl_api_punt_redirect_v2_t punt;
676};
677
678define ip_punt_redirect_v2_dump
679{
680 u32 client_index;
681 u32 context;
682 vl_api_interface_index_t sw_if_index;
683 vl_api_address_family_t af;
684};
685
686define ip_punt_redirect_v2_details
687{
688 u32 context;
689 vl_api_punt_redirect_v2_t punt;
690};
691
Florin Coras595992c2017-11-06 17:17:08 -0800692autoreply define ip_container_proxy_add_del
693{
694 u32 client_index;
695 u32 context;
Neale Ranns37029302018-08-10 05:30:06 -0700696 vl_api_prefix_t pfx;
Ole Troan668605f2019-12-09 16:08:27 +0100697 vl_api_interface_index_t sw_if_index;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200698 bool is_add [default=true];
Florin Coras595992c2017-11-06 17:17:08 -0800699};
700
Matus Fabian75b9f452018-10-02 23:27:21 -0700701define ip_container_proxy_dump
702{
703 u32 client_index;
704 u32 context;
705};
706
707define ip_container_proxy_details
708{
709 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100710 vl_api_interface_index_t sw_if_index;
Matus Fabian75b9f452018-10-02 23:27:21 -0700711 vl_api_prefix_t prefix;
712};
713
Neale Rannsb8d44812017-11-10 06:53:54 -0800714/** \brief Configure IP source and L4 port-range check
715 @param client_index - opaque cookie to identify the sender
716 @param context - sender context, to match reply w/ request
717 @param is_ip6 - 1 if source address type is IPv6
718 @param is_add - 1 if add, 0 if delete
Neale Ranns37029302018-08-10 05:30:06 -0700719 @param ip - prefix to match
Neale Rannsb8d44812017-11-10 06:53:54 -0800720 @param number_of_ranges - length of low_port and high_port arrays (must match)
721 @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
722 @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
723 @param vrf_id - fib table/vrf id to associate the source and port-range check with
724 @note To specify a single port set low_port and high_port entry the same
725*/
726autoreply define ip_source_and_port_range_check_add_del
727{
728 u32 client_index;
729 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200730 bool is_add [default=true];
Neale Ranns37029302018-08-10 05:30:06 -0700731 vl_api_prefix_t prefix;
Neale Rannsb8d44812017-11-10 06:53:54 -0800732 u8 number_of_ranges;
733 u16 low_ports[32];
734 u16 high_ports[32];
735 u32 vrf_id;
736};
737
738/** \brief Set interface source and L4 port-range request
739 @param client_index - opaque cookie to identify the sender
740 @param context - sender context, to match reply w/ request
741 @param interface_id - interface index
742 @param tcp_vrf_id - VRF associated with source and TCP port-range check
743 @param udp_vrf_id - VRF associated with source and TCP port-range check
744*/
745autoreply define ip_source_and_port_range_check_interface_add_del
746{
747 u32 client_index;
748 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200749 bool is_add [default=true];
Ole Troan668605f2019-12-09 16:08:27 +0100750 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800751 u32 tcp_in_vrf_id;
752 u32 tcp_out_vrf_id;
753 u32 udp_in_vrf_id;
754 u32 udp_out_vrf_id;
755};
756
Neale Rannscbe25aa2019-09-30 10:53:31 +0000757/** \brief IPv6 set link local address on interface request
John Lo7f358b32018-04-28 01:19:24 -0400758 @param client_index - opaque cookie to identify the sender
759 @param context - sender context, to match reply w/ request
Neale Rannscbe25aa2019-09-30 10:53:31 +0000760 @param sw_if_index - interface to set link local on
761 @param ip - the new link local address
John Lo7f358b32018-04-28 01:19:24 -0400762*/
Neale Rannscbe25aa2019-09-30 10:53:31 +0000763autoreply define sw_interface_ip6_set_link_local_address
Neale Rannsb8d44812017-11-10 06:53:54 -0800764{
765 u32 client_index;
766 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100767 vl_api_interface_index_t sw_if_index;
Neale Rannscbe25aa2019-09-30 10:53:31 +0000768 vl_api_ip6_address_t ip;
Neale Rannsb8d44812017-11-10 06:53:54 -0800769};
770
Benoît Ganne58a19152021-01-18 19:24:34 +0100771/** \brief IPv6 get link local address on interface request
772 @param client_index - opaque cookie to identify the sender
773 @param context - sender context, to match reply w/ request
774 @param sw_if_index - interface to set link local on
775*/
776define sw_interface_ip6_get_link_local_address
777{
778 u32 client_index;
779 u32 context;
780 vl_api_interface_index_t sw_if_index;
781};
782
783/** \brief IPv6 link local address detail
784 @param context - sender context, to match reply w/ request
785 @param ip - the link local address
786*/
787define sw_interface_ip6_get_link_local_address_reply
788{
789 u32 context;
790 i32 retval;
791 vl_api_ip6_address_t ip;
792};
793
Neale Rannsb8d44812017-11-10 06:53:54 -0800794/** \brief IOAM enable : Enable in-band OAM
795 @param id - profile id
796 @param seqno - To enable Seqno Processing
Jakub Grajciar58989a32019-10-08 14:05:18 +0200797 @param analyse - Enabling analysis of iOAM at decap node
798 @param pow_enable - Proof of Work enabled or not flag
Neale Rannsb8d44812017-11-10 06:53:54 -0800799 @param trace_enable - iOAM Trace enabled or not flag
800*/
801autoreply define ioam_enable
802{
803 u32 client_index;
804 u32 context;
805 u16 id;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200806 bool seqno;
807 bool analyse;
808 bool pot_enable;
809 bool trace_enable;
Neale Rannsb8d44812017-11-10 06:53:54 -0800810 u32 node_id;
811};
812
813/** \brief iOAM disable
814 @param client_index - opaque cookie to identify the sender
815 @param context - sender context, to match reply w/ request
816 @param index - MAP Domain index
817*/
818autoreply define ioam_disable
819{
820 u32 client_index;
821 u32 context;
822 u16 id;
823};
824
Klement Sekerade34c352019-06-25 11:19:22 +0000825enum ip_reass_type
826{
827 IP_REASS_TYPE_FULL = 0,
828 IP_REASS_TYPE_SHALLOW_VIRTUAL = 0x1,
829};
830
Klement Sekera75e7d132017-09-20 08:26:30 +0200831autoreply define ip_reassembly_set
832{
833 u32 client_index;
834 u32 context;
835 u32 timeout_ms;
836 u32 max_reassemblies;
Klement Sekera3a343d42019-05-16 14:35:46 +0200837 u32 max_reassembly_length;
Klement Sekera75e7d132017-09-20 08:26:30 +0200838 u32 expire_walk_interval_ms;
Ole Troan668605f2019-12-09 16:08:27 +0100839 bool is_ip6;
Klement Sekerade34c352019-06-25 11:19:22 +0000840 vl_api_ip_reass_type_t type;
Klement Sekera75e7d132017-09-20 08:26:30 +0200841};
842
843define ip_reassembly_get
844{
845 u32 client_index;
846 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100847 bool is_ip6;
Klement Sekerade34c352019-06-25 11:19:22 +0000848 vl_api_ip_reass_type_t type;
Klement Sekera75e7d132017-09-20 08:26:30 +0200849};
850
851define ip_reassembly_get_reply
852{
Klement Sekera75e7d132017-09-20 08:26:30 +0200853 u32 context;
854 i32 retval;
855 u32 timeout_ms;
856 u32 max_reassemblies;
Klement Sekera3a343d42019-05-16 14:35:46 +0200857 u32 max_reassembly_length;
Klement Sekera75e7d132017-09-20 08:26:30 +0200858 u32 expire_walk_interval_ms;
Ole Troan668605f2019-12-09 16:08:27 +0100859 bool is_ip6;
Klement Sekera75e7d132017-09-20 08:26:30 +0200860};
861
Klement Sekera4c533132018-02-22 11:41:12 +0100862/** \brief Enable/disable reassembly feature
863 @param client_index - opaque cookie to identify the sender
864 @param context - sender context, to match reply w/ request
865 @param sw_if_index - interface to enable/disable feature on
866 @param enable_ip4 - enable ip4 reassembly if non-zero, disable if 0
867 @param enable_ip6 - enable ip6 reassembly if non-zero, disable if 0
868*/
869autoreply define ip_reassembly_enable_disable
870{
871 u32 client_index;
872 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100873 vl_api_interface_index_t sw_if_index;
874 bool enable_ip4;
875 bool enable_ip6;
Klement Sekerade34c352019-06-25 11:19:22 +0000876 vl_api_ip_reass_type_t type;
Klement Sekera4c533132018-02-22 11:41:12 +0100877};
878
Klement Sekera01c1fa42021-12-14 18:25:11 +0000879/** enable/disable full reassembly of packets aimed at our addresses */
880autoreply define ip_local_reass_enable_disable
881{
882 u32 client_index;
883 u32 context;
884 bool enable_ip4;
885 bool enable_ip6;
886};
887
888/** get status of local reassembly */
889define ip_local_reass_get
890{
891 u32 client_index;
892 u32 context;
893};
894
895define ip_local_reass_get_reply
896{
897 u32 context;
898 i32 retval;
899 bool ip4_is_enabled;
900 bool ip6_is_enabled;
901};
902
Neale Ranns8f5fef22020-12-21 08:29:34 +0000903/**
904 @brief Set a Path MTU value. i.e. a MTU value for a given neighbour.
905 The neighbour can be described as attached (w/ interface and next-hop)
906 or remote (w/ table_id and next-hop);
907 @param client_index - opaque cookie to identify the sender
908 @param context - sender context, to match reply w/ request
909 @param table_id - table-ID for next-hop
910 @param nh - Next hop
911 @param path_mtu - value to set, 0 is disable.
912*/
913typedef ip_path_mtu
914{
915 u32 client_index;
916 u32 context;
917 u32 table_id;
918 vl_api_address_t nh;
919 u16 path_mtu;
920};
921autoreply define ip_path_mtu_update
922{
923 u32 client_index;
924 u32 context;
925 vl_api_ip_path_mtu_t pmtu;
926};
927define ip_path_mtu_get
928{
929 u32 client_index;
930 u32 context;
931 u32 cursor;
932};
933define ip_path_mtu_get_reply
934{
935 u32 context;
936 i32 retval;
937 u32 cursor;
938};
939define ip_path_mtu_details
940{
941 u32 context;
942 vl_api_ip_path_mtu_t pmtu;
943};
944service {
945 rpc ip_path_mtu_get returns ip_path_mtu_get_reply
946 stream ip_path_mtu_details;
947};
948
949autoreply define ip_path_mtu_replace_begin
950{
951 u32 client_index;
952 u32 context;
953};
954autoreply define ip_path_mtu_replace_end
955{
956 u32 client_index;
957 u32 context;
958};
959
Neale Rannse22a7042022-08-09 03:03:29 +0000960counters ip_frag {
961 none {
962 severity info;
963 type counter64;
964 units "packets";
965 description "packet fragmented";
966 };
967 small_packet {
968 severity error;
969 type counter64;
970 units "packets";
971 description "packet smaller than MTU";
972 };
973 fragment_sent {
974 severity info;
975 type counter64;
976 units "packets";
977 description "number of sent fragments";
978 };
979 cant_fragment_header {
980 severity error;
981 type counter64;
982 units "packets";
983 description "can't fragment header";
984 };
985 dont_fragment_set {
986 severity error;
987 type counter64;
988 units "packets";
989 description "can't fragment this packet";
990 };
991 malformed {
992 severity error;
993 type counter64;
994 units "packets";
995 description "malformed packet";
996 };
997 memory {
998 severity error;
999 type counter64;
1000 units "packets";
1001 description "could not allocate buffer";
1002 };
1003 unknown {
1004 severity error;
1005 type counter64;
1006 units "packets";
1007 description "unknown error";
1008 };
1009};
1010
1011counters ip4 {
1012 /* Must be first. */
1013 none {
1014 severity info;
1015 type counter64;
1016 units "packets";
1017 description "valid ip4 packets";
1018 };
1019
1020 /* Errors signalled by ip4-input */
1021 too_short {
1022 severity error;
1023 type counter64;
1024 units "packets";
1025 description "ip4 length < 20 bytes";
1026 };
1027 bad_length {
1028 severity error;
1029 type counter64;
1030 units "packets";
1031 description "ip4 length > l2 length";
1032 };
1033 bad_checksum {
1034 severity error;
1035 type counter64;
1036 units "packets";
1037 description "bad ip4 checksum";
1038 };
1039 version {
1040 severity error;
1041 type counter64;
1042 units "packets";
1043 description "ip4 version != 4";
1044 };
1045 options {
1046 severity info;
1047 type counter64;
1048 units "packets";
1049 description "ip4 options present";
1050 };
1051 fragment_offset_one {
1052 severity error;
1053 type counter64;
1054 units "packets";
1055 description "ip4 fragment offset == 1";
1056 };
1057 time_expired {
1058 severity error;
1059 type counter64;
1060 units "packets";
1061 description "ip4 ttl <= 1";
1062 };
Dmitry Valterd9252462022-09-16 12:33:25 +00001063 hdr_too_short {
1064 severity error;
1065 type counter64;
1066 units "packets";
1067 description "ip4 IHL < 5";
1068 };
Neale Rannse22a7042022-08-09 03:03:29 +00001069
1070 /* Errors signalled by ip4-rewrite. */
1071 mtu_exceeded {
1072 severity error;
1073 type counter64;
1074 units "packets";
1075 description "ip4 MTU exceeded and DF set";
1076 };
1077 dst_lookup_miss {
1078 severity error;
1079 type counter64;
1080 units "packets";
1081 description "ip4 destination lookup miss";
1082 };
1083 src_lookup_miss {
1084 severity error;
1085 type counter64;
1086 units "packets";
1087 description "ip4 source lookup miss";
1088 };
1089 drop {
1090 severity error;
1091 type counter64;
1092 units "packets";
1093 description "ip4 drop";
1094 };
1095 punt {
1096 severity error;
1097 type counter64;
1098 units "packets";
1099 description "ip4 punt";
1100 };
1101 same_interface {
1102 severity error;
1103 type counter64;
1104 units "packets";
1105 description "ip4 egress interface same as ingress";
1106 };
1107
1108 /* errors signalled by ip4-local. */
1109 unknown_protocol {
1110 severity error;
1111 type counter64;
1112 units "packets";
1113 description "unknown ip protocol";
1114 };
1115 tcp_checksum {
1116 severity error;
1117 type counter64;
1118 units "packets";
1119 description "bad tcp checksum";
1120 };
1121 udp_checksum {
1122 severity error;
1123 type counter64;
1124 units "packets";
1125 description "bad udp checksum";
1126 };
1127 udp_length {
1128 severity error;
1129 type counter64;
1130 units "packets";
1131 description "inconsistent udp/ip lengths";
1132 };
1133
1134 /* spoofed packets in ip4-rewrite-local */
1135 spoofed_local_packets {
1136 severity error;
1137 type counter64;
1138 units "packets";
1139 description "ip4 spoofed local-address packet drops";
1140 };
1141
1142 /* Errors signalled by ip4-inacl */
1143 inacl_table_miss {
1144 severity error;
1145 type counter64;
1146 units "packets";
1147 description "input ACL table-miss drops";
1148 };
1149 inacl_session_deny {
1150 severity error;
1151 type counter64;
1152 units "packets";
1153 description "input ACL session deny drops";
1154 };
1155
1156 /* Errors singalled by ip4-outacl */
1157 outacl_table_miss {
1158 severity error;
1159 type counter64;
1160 units "packets";
1161 description "output ACL table-miss drops";
1162 };
1163 outacl_session_deny {
1164 severity error;
1165 type counter64;
1166 units "packets";
1167 description "output ACL session deny drops";
1168 };
1169
1170 /* Errors from mfib-forward */
1171 rpf_failure {
1172 severity error;
1173 type counter64;
1174 units "packets";
1175 description "Multicast RPF check failed";
1176 };
1177
1178 /* Errors signalled by ip4-reassembly */
1179 reass_duplicate_fragment {
1180 severity error;
1181 type counter64;
1182 units "packets";
1183 description "duplicate/overlapping fragments";
1184 };
1185 reass_limit_reached {
1186 severity error;
1187 type counter64;
1188 units "packets";
1189 description "drops due to concurrent reassemblies limit";
1190 };
1191 reass_fragment_chain_too_long {
1192 severity error;
1193 type counter64;
1194 units "packets";
1195 description "fragment chain too long (drop)";
1196 };
1197 reass_no_buf {
1198 severity error;
1199 type counter64;
1200 units "packets";
1201 description "out of buffers (drop)";
1202 };
1203 reass_malformed_packet {
1204 severity error;
1205 type counter64;
1206 units "packets";
1207 description "malformed packets";
1208 };
1209 reass_internal_error {
1210 severity error;
1211 type counter64;
1212 units "packets";
1213 description "drops due to internal reassembly error";
1214 };
1215 reass_timeout {
1216 severity error;
1217 type counter64;
1218 units "packets";
1219 description "fragments dropped due to reassembly timeout";
1220 };
1221 reass_to_custom_app {
1222 severity error;
1223 type counter64;
1224 units "packets";
1225 description "send to custom drop app";
1226 };
1227 reass_success {
1228 severity info;
1229 type counter64;
1230 units "packets";
1231 description "successful reassemblies";
1232 };
1233 reass_fragments_reassembled {
1234 severity info;
1235 type counter64;
1236 units "packets";
1237 description "fragments reassembled";
1238 };
1239 reass_fragments_rcvd {
1240 severity info;
1241 type counter64;
1242 units "packets";
1243 description "fragments received";
1244 };
1245 reass_unsupp_ip_prot {
1246 severity error;
1247 type counter64;
1248 units "packets";
1249 description "unsupported ip protocol";
1250 };
1251};
1252
1253/**
1254 * IPv6 Error/info counters
1255 */
1256counters ip6 {
1257 /* Must be first. */
1258 none {
1259 severity info;
1260 type counter64;
1261 units "packets";
1262 description "valid ip6 packets";
1263 };
1264
1265 /* Errors signalled by ip6-input */
1266 too_short {
1267 severity error;
1268 type counter64;
1269 units "packets";
1270 description "ip6 length < 40 bytes";
1271 };
1272 bad_length {
1273 severity error;
1274 type counter64;
1275 units "packets";
1276 description "ip6 length > l2 length";
1277 };
1278 version {
1279 severity error;
1280 type counter64;
1281 units "packets";
1282 description "ip6 version != 6";
1283 };
1284 time_expired {
1285 severity error;
1286 type counter64;
1287 units "packets";
1288 description "ip6 ttl <= 1";
1289 };
1290
1291 /* Errors signalled by ip6-rewrite. */
1292 mtu_exceeded {
1293 severity error;
1294 type counter64;
1295 units "packets";
1296 description "ip6 MTU exceeded";
1297 };
1298 dst_lookup_miss {
1299 severity error;
1300 type counter64;
1301 units "packets";
1302 description "ip6 destination lookup miss";
1303 };
1304 src_lookup_miss {
1305 severity error;
1306 type counter64;
1307 units "packets";
1308 description "ip6 source lookup miss";
1309 };
1310 drop {
1311 severity error;
1312 type counter64;
1313 units "packets";
1314 description "ip6 drop";
1315 };
1316 punt {
1317 severity error;
1318 type counter64;
1319 units "packets";
1320 description "ip6 punt";
1321 };
1322
1323 /* errors signalled by ip6-local. */
1324 unknown_protocol {
1325 severity error;
1326 type counter64;
1327 units "packets";
1328 description "unknown ip protocol";
1329 };
1330 udp_checksum {
1331 severity error;
1332 type counter64;
1333 units "packets";
1334 description "bad udp checksum";
1335 };
1336 icmp_checksum {
1337 severity error;
1338 type counter64;
1339 units "packets";
1340 description "bad icmp checksum";
1341 };
1342 udp_length {
1343 severity error;
1344 type counter64;
1345 units "packets";
1346 description "inconsistent udp/ip lengths";
1347 };
1348 /* Errors signalled by udp6-lookup. */
1349 unknown_udp_port {
1350 severity error;
1351 type counter64;
1352 units "packets";
1353 description "no listener for udp port";
1354 };
1355
1356 /* spoofed packets in ip6-rewrite-local */
1357 spoofed_local_packets {
1358 severity error;
1359 type counter64;
1360 units "packets";
1361 description "ip6 spoofed local-address packet drops";
1362 };
1363
1364 /* Errors signalled by ip6-inacl */
1365 inacl_table_miss {
1366 severity error;
1367 type counter64;
1368 units "packets";
1369 description "input ACL table-miss drops";
1370 };
1371 inacl_session_deny {
1372 severity error;
1373 type counter64;
1374 units "packets";
1375 description "input ACL session deny drops";
1376 };
1377
1378 /* Errors singalled by ip6-outacl */
1379 outacl_table_miss {
1380 severity error;
1381 type counter64;
1382 units "packets";
1383 description "output ACL table-miss drops";
1384 };
1385 outacl_session_deny {
1386 severity error;
1387 type counter64;
1388 units "packets";
1389 description "output ACL session deny drops";
1390 };
1391
1392 /* Errors from mfib-forward */
1393 rpf_failure {
1394 severity error;
1395 type counter64;
1396 units "packets";
1397 description "Multicast RPF check failed";
1398 };
1399
1400 /* Errors signalled by ip6-reassembly */
1401 reass_missing_upper {
1402 severity error;
1403 type counter64;
1404 units "packets";
1405 description "missing-upper layer drops";
1406 };
1407 reass_duplicate_fragment {
1408 severity error;
1409 type counter64;
1410 units "packets";
1411 description "duplicate fragments";
1412 };
1413 reass_overlapping_fragment {
1414 severity error;
1415 type counter64;
1416 units "packets";
1417 description "overlapping fragments";
1418 };
1419 reass_limit_reached {
1420 severity error;
1421 type counter64;
1422 units "packets";
1423 description "drops due to concurrent reassemblies limit";
1424 };
1425 reass_fragment_chain_too_long {
1426 severity error;
1427 type counter64;
1428 units "packets";
1429 description "fragment chain too long (drop)";
1430 };
1431 reass_no_buf {
1432 severity error;
1433 type counter64;
1434 units "packets";
1435 description "out of buffers (drop)";
1436 };
1437 reass_timeout {
1438 severity error;
1439 type counter64;
1440 units "packets";
1441 description "fragments dropped due to reassembly timeout";
1442 };
1443 reass_internal_error {
1444 severity error;
1445 type counter64;
1446 units "packets";
1447 description "drops due to internal reassembly error";
1448 };
1449 reass_invalid_frag_len {
1450 severity error;
1451 type counter64;
1452 units "packets";
1453 description "invalid fragment length";
1454 };
1455 reass_to_custom_app {
1456 severity error;
1457 type counter64;
1458 units "packets";
1459 description "send to custom drop app";
1460 };
1461 reass_no_frag_hdr {
1462 severity error;
1463 type counter64;
1464 units "packets";
1465 description "no fragmentation header";
1466 };
1467 reass_invalid_frag_size {
1468 severity error;
1469 type counter64;
1470 units "packets";
1471 description "drop due to invalid fragment size";
1472 };
1473 reass_success {
1474 severity info;
1475 type counter64;
1476 units "packets";
1477 description "successful reassemblies";
1478 };
1479 reass_fragments_reassembled {
1480 severity info;
1481 type counter64;
1482 units "packets";
1483 description "fragments reassembled";
1484 };
1485 reass_fragments_rcvd {
1486 severity info;
1487 type counter64;
1488 units "packets";
1489 description "fragments received";
1490 };
1491 reass_unsupp_ip_proto {
1492 severity error;
1493 type counter64;
1494 units "packets";
1495 description "unsupported ip protocol";
1496 };
1497};
1498
Neale Rannsb29c6062022-08-12 01:50:24 +00001499counters icmp4 {
1500 none {
1501 severity info;
1502 type counter64;
1503 units "packets";
1504 description "valid packets";
1505 };
1506 unknown_type {
1507 severity error;
1508 type counter64;
1509 units "packets";
1510 description "unknown type";
1511 };
1512 invalid_code_for_type {
1513 severity error;
1514 type counter64;
1515 units "packets";
1516 description "invalid code for type";
1517 };
1518 invalid_hop_limit_for_type {
1519 severity error;
1520 type counter64;
1521 units "packets";
1522 description "hop_limit != 255";
1523 };
1524 length_too_small_for_type {
1525 severity error;
1526 type counter64;
1527 units "packets";
1528 description "payload length too small for type";
1529 };
1530 options_with_odd_length {
1531 severity error;
1532 type counter64;
1533 units "packets";
1534 description "total option length not multiple of 8 bytes";
1535 };
1536 option_with_zero_length {
1537 severity error;
1538 type counter64;
1539 units "packets";
1540 description "option has zero length";
1541 };
1542 echo_replies_sent {
1543 severity info;
1544 type counter64;
1545 units "packets";
1546 description "echo replies sent";
1547 };
1548 dst_lookup_miss {
1549 severity error;
1550 type counter64;
1551 units "packets";
1552 description "icmp6 dst address lookup misses";
1553 };
1554 dest_unreach_sent {
1555 severity info;
1556 type counter64;
1557 units "packets";
1558 description "destination unreachable response sent";
1559 };
1560 ttl_expire_sent {
1561 severity info;
1562 type counter64;
1563 units "packets";
1564 description "hop limit exceeded response sent";
1565 };
1566 param_problem_sent {
1567 severity info;
1568 type counter64;
1569 units "packets";
1570 description "parameter problem response sent";
1571 };
1572 drop {
1573 severity error;
1574 type counter64;
1575 units "packets";
1576 description "error message dropped";
1577 };
1578};
1579
1580counters icmp6 {
1581 none {
1582 severity info;
1583 type counter64;
1584 units "packets";
1585 description "valid packets";
1586 };
1587 unknown_type {
1588 severity error;
1589 type counter64;
1590 units "packets";
1591 description "unknown type";
1592 };
1593 invalid_code_for_type {
1594 severity error;
1595 type counter64;
1596 units "packets";
1597 description "invalid code for type";
1598 };
1599 invalid_hop_limit_for_type {
1600 severity error;
1601 type counter64;
1602 units "packets";
1603 description "hop_limit != 255";
1604 };
1605 length_too_small_for_type {
1606 severity error;
1607 type counter64;
1608 units "packets";
1609 description "payload length too small for type";
1610 };
1611 options_with_odd_length {
1612 severity error;
1613 type counter64;
1614 units "packets";
1615 description "total option length not multiple of 8 bytes";
1616 };
1617 option_with_zero_length {
1618 severity error;
1619 type counter64;
1620 units "packets";
1621 description "option has zero length";
1622 };
1623 echo_replies_sent {
1624 severity info;
1625 type counter64;
1626 units "packets";
1627 description "echo replies sent";
1628 };
1629 neighbor_solicitation_source_not_on_link {
1630 severity error;
1631 type counter64;
1632 units "packets";
1633 description "neighbor solicitations from source not on link";
1634 };
1635 neighbor_solicitation_source_unknown {
1636 severity error;
1637 type counter64;
1638 units "packets";
1639 description "neighbor solicitations for unknown targets";
1640 };
1641 neighbor_advertisements_tx {
1642 severity info;
1643 type counter64;
1644 units "packets";
1645 description "neighbor advertisements sent";
1646 };
1647 neighbor_advertisements_rx {
1648 severity info;
1649 type counter64;
1650 units "packets";
1651 description "neighbor advertisements received";
1652 };
1653 router_solicitation_source_not_on_link {
1654 severity error;
1655 type counter64;
1656 units "packets";
1657 description "router solicitations from source not on link";
1658 };
1659 router_solicitation_unsupported_intf {
1660 severity error;
1661 type counter64;
1662 units "packets";
1663 description "neighbor discovery unsupported interface";
1664 };
1665 router_solicitation_radv_not_config {
1666 severity error;
1667 type counter64;
1668 units "packets";
1669 description "neighbor discovery not configured";
1670 };
1671 router_advertisement_source_not_link_local {
1672 severity error;
1673 type counter64;
1674 units "packets";
1675 description "router advertisement source not link local";
1676 };
1677 router_advertisements_tx {
1678 severity info;
1679 type counter64;
1680 units "packets";
1681 description "router advertisements sent";
1682 };
1683 router_advertisements_rx {
1684 severity info;
1685 type counter64;
1686 units "packets";
1687 description "router advertisements received";
1688 };
1689 dst_lookup_miss {
1690 severity error;
1691 type counter64;
1692 units "packets";
1693 description "icmp6 dst address lookup misses";
1694 };
1695 dest_unreach_sent {
1696 severity info;
1697 type counter64;
1698 units "packets";
1699 description "destination unreachable response sent";
1700 };
1701 packet_too_big_sent {
1702 severity info;
1703 type counter64;
1704 units "packets";
1705 description "packet too big response sent";
1706 };
1707 ttl_expire_sent {
1708 severity info;
1709 type counter64;
1710 units "packets";
1711 description "hop limit exceeded response sent";
1712 };
1713 param_problem_sent {
1714 severity info;
1715 type counter64;
1716 units "packets";
1717 description "parameter problem response sent";
1718 };
1719 drop {
1720 severity error;
1721 type counter64;
1722 units "packets";
1723 description "error message dropped";
1724 };
1725 alloc_failure {
1726 severity error;
1727 type counter64;
1728 units "packets";
1729 description "buffer allocation failure";
1730 };
1731};
1732
Neale Rannse22a7042022-08-09 03:03:29 +00001733paths {
1734 "/err/ip-frag" "ip_frag";
1735 "/err/mpls-frag" "ip_frag";
1736 "/err/ip4-mpls-label-disposition-pipe" "ip4";
1737 "/err/ip4-mpls-label-disposition-uniform" "ip4";
1738 "/err/ip4-local" "ip4";
1739 "/err/ip4-input" "ip4";
1740 "/err/ip4-full-reassembly" "ip4";
1741 "/err/ip4-local-full-reassembly" "ip4";
1742 "/err/ip4-full-reassembly-feature" "ip4";
1743 "/err/ip4-full-reassembly-custom" "ip4";
1744 "/err/ip4-full-reassembly-expire-walk" "ip4";
1745 "/err/ip4-sv-reassembly" "ip4";
1746 "/err/ip4-sv-reassembly-feature" "ip4";
1747 "/err/ip4-sv-reassembly-output-feature" "ip4";
1748 "/err/ip4-sv-reassembly-custom-next" "ip4";
1749 "/err/ip4-sv-reassembly-expire-walk" "ip4";
1750 "/err/ip6-mpls-label-disposition-pipe" "ip6";
1751 "/err/ip6-mpls-label-disposition-uniform" "ip6";
1752 "/err/ip6-local" "ip6";
1753 "/err/ip6-input" "ip6";
1754 "/err/ip6-full-reassembly" "ip6";
1755 "/err/ip6-local-full-reassembly" "ip6";
1756 "/err/ip6-full-reassembly-feature" "ip6";
1757 "/err/ip6-full-reassembly-custom" "ip6";
1758 "/err/ip6-full-reassembly-expire-walk" "ip6";
1759 "/err/ip6-sv-reassembly" "ip6";
1760 "/err/ip6-sv-reassembly-feature" "ip6";
1761 "/err/ip6-sv-reassembly-output-feature" "ip6";
1762 "/err/ip6-sv-reassembly-custom-next" "ip6";
1763 "/err/ip6-sv-reassembly-expire-walk" "ip6";
Neale Rannsb29c6062022-08-12 01:50:24 +00001764 "/err/ip4-icmp-input" "icmp4";
1765 "/err/ip4-icmp-error" "icmp4";
1766 "/err/ip6-icmp-input" "icmp6";
1767 "/err/ip6-icmp-error" "icmp6";
Neale Rannse22a7042022-08-09 03:03:29 +00001768};
1769
Dave Barachb5e8a772016-12-06 12:04:42 -05001770/*
1771 * Local Variables:
1772 * eval: (c-set-style "gnu")
1773 * End:
1774 */