blob: 8a6ecc8da2f8819862adf0d2ab8452c67cabe90b [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
Neale Ranns3d5f08a2021-01-22 16:12:38 +0000369/** \brief Set the ip flow hash router ID
370 @param client_index - opaque cookie to identify the sender
371 @param context - sender context, to match reply w/ request
372 @param router_id - The ID of the router. Mixed into the hash.
373 Used to prevent polarisation across a network,
374 since each router is assumed to have a different ID
375*/
376autoreply define set_ip_flow_hash_router_id
377{
378 u32 client_index;
379 u32 context;
380 u32 router_id;
381};
382
Dave Barachb5e8a772016-12-06 12:04:42 -0500383/** \brief IPv6 interface enable / disable request
384 @param client_index - opaque cookie to identify the sender
385 @param context - sender context, to match reply w/ request
386 @param sw_if_index - interface used to reach neighbor
387 @param enable - if non-zero enable ip6 on interface, else disable
388*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400389autoreply define sw_interface_ip6_enable_disable
Dave Barachb5e8a772016-12-06 12:04:42 -0500390{
391 u32 client_index;
392 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100393 vl_api_interface_index_t sw_if_index;
394 bool enable; /* set to true if enable */
Dave Barachb5e8a772016-12-06 12:04:42 -0500395};
396
Neale Ranns097fa662018-05-01 05:17:55 -0700397/** \brief Dump IP multicast fib table
398 @param client_index - opaque cookie to identify the sender
399*/
400define ip_mtable_dump
Neale Ranns008dbe12018-09-07 09:32:36 -0700401{
Neale Ranns097fa662018-05-01 05:17:55 -0700402 u32 client_index;
Neale Ranns008dbe12018-09-07 09:32:36 -0700403 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700404};
405define ip_mtable_details
406{
407 u32 client_index;
408 u32 context;
409 vl_api_ip_table_t table;
Neale Ranns008dbe12018-09-07 09:32:36 -0700410};
411
Neale Ranns32e1c012016-11-22 17:07:28 +0000412/** \brief Add / del route request
Ian Wells412ecd32018-10-04 12:31:11 -0700413
414 Adds a route, consisting both of the MFIB entry to match packets
415 (which may already exist) and a path to send those packets down.
416 Routes can be entered repeatedly to add multiple paths. Deletions are
417 per-path.
418
Neale Ranns32e1c012016-11-22 17:07:28 +0000419 @param client_index - opaque cookie to identify the sender
420 @param context - sender context, to match reply w/ request
Ian Wells412ecd32018-10-04 12:31:11 -0700421 @param table_id - fib table /vrf associated with the route
422 @param is_add - true if adding a route; false if deleting one
423 @param is_ipv6 - true iff all the addresses are v6
424 @param entry_flags - see fib_entry_flag_t
425 @param itf_flags - see mfib_entry_flags_t
426 @param next_hop_afi - see dpo_proto_t; the type of destination description
427 @param src_address - the source of the packet
428 @param grp_address - the group the packet is destined to
429 @param nh_address - the nexthop to forward the packet to
430 @param next_hop_sw_if_index - interface to emit packet on
431
432 BIER AFIs use the BIER imposition ID. v4 and v6 AFIs use either the
433 interface or the nexthop address.
434
435 Note that if the route is source-specific (S is supplied, not all 0s),
436 the prefix match is treated as exact (prefixlen /32 or /128).
437
438 FIXME not complete yet
Neale Ranns32e1c012016-11-22 17:07:28 +0000439*/
Neale Ranns097fa662018-05-01 05:17:55 -0700440typedef ip_mroute
441{
442 u32 table_id;
Neale Ranns990f6942020-10-20 07:20:17 +0000443 vl_api_mfib_entry_flags_t entry_flags;
Neale Ranns097fa662018-05-01 05:17:55 -0700444 u32 rpf_id;
445 vl_api_mprefix_t prefix;
446 u8 n_paths;
447 vl_api_mfib_path_t paths[n_paths];
448};
449
Neale Ranns28c142e2018-09-07 09:37:07 -0700450define ip_mroute_add_del
Neale Ranns32e1c012016-11-22 17:07:28 +0000451{
452 u32 client_index;
453 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200454 bool is_add [default=true];
Ole Troan668605f2019-12-09 16:08:27 +0100455 bool is_multipath;
Neale Ranns097fa662018-05-01 05:17:55 -0700456 vl_api_ip_mroute_t route;
Neale Ranns32e1c012016-11-22 17:07:28 +0000457};
Neale Ranns28c142e2018-09-07 09:37:07 -0700458define ip_mroute_add_del_reply
459{
460 u32 context;
461 i32 retval;
462 u32 stats_index;
463};
464
Neale Ranns5a8123b2017-01-26 01:18:23 -0800465/** \brief Dump IP multicast fib table
Neale Ranns097fa662018-05-01 05:17:55 -0700466 @param table - The table from which to dump routes (ony ID an AF are needed)
Neale Ranns5a8123b2017-01-26 01:18:23 -0800467*/
Neale Ranns097fa662018-05-01 05:17:55 -0700468define ip_mroute_dump
Neale Ranns5a8123b2017-01-26 01:18:23 -0800469{
470 u32 client_index;
471 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700472 vl_api_ip_table_t table;
Neale Ranns5a8123b2017-01-26 01:18:23 -0800473};
474
Neale Ranns097fa662018-05-01 05:17:55 -0700475/** \brief IP Multicast Route Details
476 @param route - Details of the route
Neale Ranns5a8123b2017-01-26 01:18:23 -0800477*/
Ole Troandf87f802020-11-18 19:17:48 +0100478define ip_mroute_details
Neale Ranns5a8123b2017-01-26 01:18:23 -0800479{
480 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700481 vl_api_ip_mroute_t route;
Neale Ranns5a8123b2017-01-26 01:18:23 -0800482};
483
Dave Barachb5e8a772016-12-06 12:04:42 -0500484define ip_address_details
485{
Dave Barachb5e8a772016-12-06 12:04:42 -0500486 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100487 vl_api_interface_index_t sw_if_index;
Ole Troan75761b92019-09-11 17:49:08 +0200488 vl_api_address_with_prefix_t prefix;
Dave Barachb5e8a772016-12-06 12:04:42 -0500489};
490
491define ip_address_dump
492{
493 u32 client_index;
494 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100495 vl_api_interface_index_t sw_if_index;
496 bool is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500497};
498
Neale Ranns9e2f9152018-05-18 02:27:10 -0700499/** \brief IP unnumbered configurations
500 @param sw_if_index The interface that has unnumbered configuration
Paul Vinciguerrac0e94412020-04-28 01:12:04 -0400501 @param ip_sw_if_index The IP interface that it is unnumbered to
Neale Ranns9e2f9152018-05-18 02:27:10 -0700502*/
503define ip_unnumbered_details
504{
Neale Ranns9e2f9152018-05-18 02:27:10 -0700505 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100506 vl_api_interface_index_t sw_if_index;
507 vl_api_interface_index_t ip_sw_if_index;
Neale Ranns9e2f9152018-05-18 02:27:10 -0700508};
509
510/** \brief Dump IP unnumbered configurations
511 @param sw_if_index ~0 for all interfaces, else the interface desired
512*/
513define ip_unnumbered_dump
514{
515 u32 client_index;
516 u32 context;
Paul Vinciguerrac0e94412020-04-28 01:12:04 -0400517 vl_api_interface_index_t sw_if_index [default=0xffffffff];
Neale Ranns9e2f9152018-05-18 02:27:10 -0700518};
519
Dave Barachb5e8a772016-12-06 12:04:42 -0500520define ip_details
521{
Dave Barachb5e8a772016-12-06 12:04:42 -0500522 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100523 vl_api_interface_index_t sw_if_index;
524 bool is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500525};
526
527define ip_dump
528{
529 u32 client_index;
530 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100531 bool is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500532};
533
Neale Ranns32e1c012016-11-22 17:07:28 +0000534define mfib_signal_dump
535{
536 u32 client_index;
537 u32 context;
538};
539
540define mfib_signal_details
541{
Neale Ranns32e1c012016-11-22 17:07:28 +0000542 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100543 vl_api_interface_index_t sw_if_index;
Neale Ranns32e1c012016-11-22 17:07:28 +0000544 u32 table_id;
Neale Ranns097fa662018-05-01 05:17:55 -0700545 vl_api_mprefix_t prefix;
Neale Ranns32e1c012016-11-22 17:07:28 +0000546 u16 ip_packet_len;
547 u8 ip_packet_data[256];
548};
Dave Barachb5e8a772016-12-06 12:04:42 -0500549
Neale Rannsd91c1db2017-07-31 02:30:50 -0700550/** \brief IP punt policer
551 @param client_index - opaque cookie to identify the sender
552 @param context - sender context, to match reply w/ request
553 @param is_add - 1 to add neighbor, 0 to delete
554 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
555 @param policer_index - Index of policer to use
556*/
557autoreply define ip_punt_police
558{
559 u32 client_index;
560 u32 context;
561 u32 policer_index;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200562 bool is_add [default=true];
Ole Troan668605f2019-12-09 16:08:27 +0100563 bool is_ip6;
Neale Rannsd91c1db2017-07-31 02:30:50 -0700564};
565
Pavel Kotucek609e1212018-11-27 09:59:44 +0100566/** \brief Punt redirect type
Neale Ranns47527b22018-11-16 00:53:53 -0800567 @param rx_sw_if_index - specify the original RX interface of traffic
568 that should be redirected. ~0 means any interface.
Paul Vinciguerrac0e94412020-04-28 01:12:04 -0400569 @param tx_sw_if_index - the TX interface to which traffic should be
Neale Rannsd91c1db2017-07-31 02:30:50 -0700570 redirected.
Pavel Kotucek609e1212018-11-27 09:59:44 +0100571 @param nh - the next-hop to redirect the traffic to.
572 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
573*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400574typedef punt_redirect
Pavel Kotucek609e1212018-11-27 09:59:44 +0100575{
Ole Troan668605f2019-12-09 16:08:27 +0100576 vl_api_interface_index_t rx_sw_if_index;
577 vl_api_interface_index_t tx_sw_if_index;
Pavel Kotucek609e1212018-11-27 09:59:44 +0100578 vl_api_address_t nh;
579};
580
581/** \brief IP punt redirect
582 @param client_index - opaque cookie to identify the sender
583 @param context - sender context, to match reply w/ request
584 @param punt - punt definition
585 @param is_add - 1 to add neighbor, 0 to delete
Neale Rannsd91c1db2017-07-31 02:30:50 -0700586*/
587autoreply define ip_punt_redirect
588{
Nathan Skrzypczak2a1783f2021-08-10 15:05:29 +0200589 option deprecated;
Neale Rannsd91c1db2017-07-31 02:30:50 -0700590 u32 client_index;
591 u32 context;
Pavel Kotucek609e1212018-11-27 09:59:44 +0100592 vl_api_punt_redirect_t punt;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200593 bool is_add [default=true];
Pavel Kotucek609e1212018-11-27 09:59:44 +0100594};
595
596define ip_punt_redirect_dump
597{
598 u32 client_index;
599 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100600 vl_api_interface_index_t sw_if_index;
601 bool is_ipv6;
Pavel Kotucek609e1212018-11-27 09:59:44 +0100602};
603
604define ip_punt_redirect_details
605{
606 u32 context;
607 vl_api_punt_redirect_t punt;
Neale Rannsd91c1db2017-07-31 02:30:50 -0700608};
609
Nathan Skrzypczak2a1783f2021-08-10 15:05:29 +0200610/** \brief Punt redirect type
611 @param rx_sw_if_index - specify the original RX interface of traffic
612 that should be redirected. ~0 means any interface.
613 @param af - Address family (ip4 or ip6)
614 @param paths - the TX paths to which traffic should be redirected.
615*/
616typedef punt_redirect_v2
617{
618 vl_api_interface_index_t rx_sw_if_index [default=0xffffffff];
619 vl_api_address_family_t af;
620 u32 n_paths;
621 vl_api_fib_path_t paths[n_paths];
622};
623
624/** \brief Add IP punt redirect rule
625 @param client_index - opaque cookie to identify the sender
626 @param context - sender context, to match reply w/ request
627 @param punt - punt definition
628 @param is_add - 1 to add punt_redirect rule, 0 to delete
629*/
630autoreply define add_del_ip_punt_redirect_v2
631{
632 u32 client_index;
633 u32 context;
634 bool is_add [default=true];
635 vl_api_punt_redirect_v2_t punt;
636};
637
638define ip_punt_redirect_v2_dump
639{
640 u32 client_index;
641 u32 context;
642 vl_api_interface_index_t sw_if_index;
643 vl_api_address_family_t af;
644};
645
646define ip_punt_redirect_v2_details
647{
648 u32 context;
649 vl_api_punt_redirect_v2_t punt;
650};
651
Florin Coras595992c2017-11-06 17:17:08 -0800652autoreply define ip_container_proxy_add_del
653{
654 u32 client_index;
655 u32 context;
Neale Ranns37029302018-08-10 05:30:06 -0700656 vl_api_prefix_t pfx;
Ole Troan668605f2019-12-09 16:08:27 +0100657 vl_api_interface_index_t sw_if_index;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200658 bool is_add [default=true];
Florin Coras595992c2017-11-06 17:17:08 -0800659};
660
Matus Fabian75b9f452018-10-02 23:27:21 -0700661define ip_container_proxy_dump
662{
663 u32 client_index;
664 u32 context;
665};
666
667define ip_container_proxy_details
668{
669 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100670 vl_api_interface_index_t sw_if_index;
Matus Fabian75b9f452018-10-02 23:27:21 -0700671 vl_api_prefix_t prefix;
672};
673
Neale Rannsb8d44812017-11-10 06:53:54 -0800674/** \brief Configure IP source and L4 port-range check
675 @param client_index - opaque cookie to identify the sender
676 @param context - sender context, to match reply w/ request
677 @param is_ip6 - 1 if source address type is IPv6
678 @param is_add - 1 if add, 0 if delete
Neale Ranns37029302018-08-10 05:30:06 -0700679 @param ip - prefix to match
Neale Rannsb8d44812017-11-10 06:53:54 -0800680 @param number_of_ranges - length of low_port and high_port arrays (must match)
681 @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
682 @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
683 @param vrf_id - fib table/vrf id to associate the source and port-range check with
684 @note To specify a single port set low_port and high_port entry the same
685*/
686autoreply define ip_source_and_port_range_check_add_del
687{
688 u32 client_index;
689 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200690 bool is_add [default=true];
Neale Ranns37029302018-08-10 05:30:06 -0700691 vl_api_prefix_t prefix;
Neale Rannsb8d44812017-11-10 06:53:54 -0800692 u8 number_of_ranges;
693 u16 low_ports[32];
694 u16 high_ports[32];
695 u32 vrf_id;
696};
697
698/** \brief Set interface source and L4 port-range request
699 @param client_index - opaque cookie to identify the sender
700 @param context - sender context, to match reply w/ request
701 @param interface_id - interface index
702 @param tcp_vrf_id - VRF associated with source and TCP port-range check
703 @param udp_vrf_id - VRF associated with source and TCP port-range check
704*/
705autoreply define ip_source_and_port_range_check_interface_add_del
706{
707 u32 client_index;
708 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200709 bool is_add [default=true];
Ole Troan668605f2019-12-09 16:08:27 +0100710 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800711 u32 tcp_in_vrf_id;
712 u32 tcp_out_vrf_id;
713 u32 udp_in_vrf_id;
714 u32 udp_out_vrf_id;
715};
716
Neale Rannscbe25aa2019-09-30 10:53:31 +0000717/** \brief IPv6 set link local address on interface request
John Lo7f358b32018-04-28 01:19:24 -0400718 @param client_index - opaque cookie to identify the sender
719 @param context - sender context, to match reply w/ request
Neale Rannscbe25aa2019-09-30 10:53:31 +0000720 @param sw_if_index - interface to set link local on
721 @param ip - the new link local address
John Lo7f358b32018-04-28 01:19:24 -0400722*/
Neale Rannscbe25aa2019-09-30 10:53:31 +0000723autoreply define sw_interface_ip6_set_link_local_address
Neale Rannsb8d44812017-11-10 06:53:54 -0800724{
725 u32 client_index;
726 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100727 vl_api_interface_index_t sw_if_index;
Neale Rannscbe25aa2019-09-30 10:53:31 +0000728 vl_api_ip6_address_t ip;
Neale Rannsb8d44812017-11-10 06:53:54 -0800729};
730
Benoît Ganne58a19152021-01-18 19:24:34 +0100731/** \brief IPv6 get link local address on interface request
732 @param client_index - opaque cookie to identify the sender
733 @param context - sender context, to match reply w/ request
734 @param sw_if_index - interface to set link local on
735*/
736define sw_interface_ip6_get_link_local_address
737{
738 u32 client_index;
739 u32 context;
740 vl_api_interface_index_t sw_if_index;
741};
742
743/** \brief IPv6 link local address detail
744 @param context - sender context, to match reply w/ request
745 @param ip - the link local address
746*/
747define sw_interface_ip6_get_link_local_address_reply
748{
749 u32 context;
750 i32 retval;
751 vl_api_ip6_address_t ip;
752};
753
Neale Rannsb8d44812017-11-10 06:53:54 -0800754/** \brief IOAM enable : Enable in-band OAM
755 @param id - profile id
756 @param seqno - To enable Seqno Processing
Jakub Grajciar58989a32019-10-08 14:05:18 +0200757 @param analyse - Enabling analysis of iOAM at decap node
758 @param pow_enable - Proof of Work enabled or not flag
Neale Rannsb8d44812017-11-10 06:53:54 -0800759 @param trace_enable - iOAM Trace enabled or not flag
760*/
761autoreply define ioam_enable
762{
763 u32 client_index;
764 u32 context;
765 u16 id;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200766 bool seqno;
767 bool analyse;
768 bool pot_enable;
769 bool trace_enable;
Neale Rannsb8d44812017-11-10 06:53:54 -0800770 u32 node_id;
771};
772
773/** \brief iOAM disable
774 @param client_index - opaque cookie to identify the sender
775 @param context - sender context, to match reply w/ request
776 @param index - MAP Domain index
777*/
778autoreply define ioam_disable
779{
780 u32 client_index;
781 u32 context;
782 u16 id;
783};
784
Klement Sekerade34c352019-06-25 11:19:22 +0000785enum ip_reass_type
786{
787 IP_REASS_TYPE_FULL = 0,
788 IP_REASS_TYPE_SHALLOW_VIRTUAL = 0x1,
789};
790
Klement Sekera75e7d132017-09-20 08:26:30 +0200791autoreply define ip_reassembly_set
792{
793 u32 client_index;
794 u32 context;
795 u32 timeout_ms;
796 u32 max_reassemblies;
Klement Sekera3a343d42019-05-16 14:35:46 +0200797 u32 max_reassembly_length;
Klement Sekera75e7d132017-09-20 08:26:30 +0200798 u32 expire_walk_interval_ms;
Ole Troan668605f2019-12-09 16:08:27 +0100799 bool is_ip6;
Klement Sekerade34c352019-06-25 11:19:22 +0000800 vl_api_ip_reass_type_t type;
Klement Sekera75e7d132017-09-20 08:26:30 +0200801};
802
803define ip_reassembly_get
804{
805 u32 client_index;
806 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100807 bool is_ip6;
Klement Sekerade34c352019-06-25 11:19:22 +0000808 vl_api_ip_reass_type_t type;
Klement Sekera75e7d132017-09-20 08:26:30 +0200809};
810
811define ip_reassembly_get_reply
812{
Klement Sekera75e7d132017-09-20 08:26:30 +0200813 u32 context;
814 i32 retval;
815 u32 timeout_ms;
816 u32 max_reassemblies;
Klement Sekera3a343d42019-05-16 14:35:46 +0200817 u32 max_reassembly_length;
Klement Sekera75e7d132017-09-20 08:26:30 +0200818 u32 expire_walk_interval_ms;
Ole Troan668605f2019-12-09 16:08:27 +0100819 bool is_ip6;
Klement Sekera75e7d132017-09-20 08:26:30 +0200820};
821
Klement Sekera4c533132018-02-22 11:41:12 +0100822/** \brief Enable/disable reassembly feature
823 @param client_index - opaque cookie to identify the sender
824 @param context - sender context, to match reply w/ request
825 @param sw_if_index - interface to enable/disable feature on
826 @param enable_ip4 - enable ip4 reassembly if non-zero, disable if 0
827 @param enable_ip6 - enable ip6 reassembly if non-zero, disable if 0
828*/
829autoreply define ip_reassembly_enable_disable
830{
831 u32 client_index;
832 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100833 vl_api_interface_index_t sw_if_index;
834 bool enable_ip4;
835 bool enable_ip6;
Klement Sekerade34c352019-06-25 11:19:22 +0000836 vl_api_ip_reass_type_t type;
Klement Sekera4c533132018-02-22 11:41:12 +0100837};
838
Klement Sekera01c1fa42021-12-14 18:25:11 +0000839/** enable/disable full reassembly of packets aimed at our addresses */
840autoreply define ip_local_reass_enable_disable
841{
842 u32 client_index;
843 u32 context;
844 bool enable_ip4;
845 bool enable_ip6;
846};
847
848/** get status of local reassembly */
849define ip_local_reass_get
850{
851 u32 client_index;
852 u32 context;
853};
854
855define ip_local_reass_get_reply
856{
857 u32 context;
858 i32 retval;
859 bool ip4_is_enabled;
860 bool ip6_is_enabled;
861};
862
Neale Ranns8f5fef22020-12-21 08:29:34 +0000863/**
864 @brief Set a Path MTU value. i.e. a MTU value for a given neighbour.
865 The neighbour can be described as attached (w/ interface and next-hop)
866 or remote (w/ table_id and next-hop);
867 @param client_index - opaque cookie to identify the sender
868 @param context - sender context, to match reply w/ request
869 @param table_id - table-ID for next-hop
870 @param nh - Next hop
871 @param path_mtu - value to set, 0 is disable.
872*/
873typedef ip_path_mtu
874{
875 u32 client_index;
876 u32 context;
877 u32 table_id;
878 vl_api_address_t nh;
879 u16 path_mtu;
880};
881autoreply define ip_path_mtu_update
882{
883 u32 client_index;
884 u32 context;
885 vl_api_ip_path_mtu_t pmtu;
886};
887define ip_path_mtu_get
888{
889 u32 client_index;
890 u32 context;
891 u32 cursor;
892};
893define ip_path_mtu_get_reply
894{
895 u32 context;
896 i32 retval;
897 u32 cursor;
898};
899define ip_path_mtu_details
900{
901 u32 context;
902 vl_api_ip_path_mtu_t pmtu;
903};
904service {
905 rpc ip_path_mtu_get returns ip_path_mtu_get_reply
906 stream ip_path_mtu_details;
907};
908
909autoreply define ip_path_mtu_replace_begin
910{
911 u32 client_index;
912 u32 context;
913};
914autoreply define ip_path_mtu_replace_end
915{
916 u32 client_index;
917 u32 context;
918};
919
Neale Rannse22a7042022-08-09 03:03:29 +0000920counters ip_frag {
921 none {
922 severity info;
923 type counter64;
924 units "packets";
925 description "packet fragmented";
926 };
927 small_packet {
928 severity error;
929 type counter64;
930 units "packets";
931 description "packet smaller than MTU";
932 };
933 fragment_sent {
934 severity info;
935 type counter64;
936 units "packets";
937 description "number of sent fragments";
938 };
939 cant_fragment_header {
940 severity error;
941 type counter64;
942 units "packets";
943 description "can't fragment header";
944 };
945 dont_fragment_set {
946 severity error;
947 type counter64;
948 units "packets";
949 description "can't fragment this packet";
950 };
951 malformed {
952 severity error;
953 type counter64;
954 units "packets";
955 description "malformed packet";
956 };
957 memory {
958 severity error;
959 type counter64;
960 units "packets";
961 description "could not allocate buffer";
962 };
963 unknown {
964 severity error;
965 type counter64;
966 units "packets";
967 description "unknown error";
968 };
969};
970
971counters ip4 {
972 /* Must be first. */
973 none {
974 severity info;
975 type counter64;
976 units "packets";
977 description "valid ip4 packets";
978 };
979
980 /* Errors signalled by ip4-input */
981 too_short {
982 severity error;
983 type counter64;
984 units "packets";
985 description "ip4 length < 20 bytes";
986 };
987 bad_length {
988 severity error;
989 type counter64;
990 units "packets";
991 description "ip4 length > l2 length";
992 };
993 bad_checksum {
994 severity error;
995 type counter64;
996 units "packets";
997 description "bad ip4 checksum";
998 };
999 version {
1000 severity error;
1001 type counter64;
1002 units "packets";
1003 description "ip4 version != 4";
1004 };
1005 options {
1006 severity info;
1007 type counter64;
1008 units "packets";
1009 description "ip4 options present";
1010 };
1011 fragment_offset_one {
1012 severity error;
1013 type counter64;
1014 units "packets";
1015 description "ip4 fragment offset == 1";
1016 };
1017 time_expired {
1018 severity error;
1019 type counter64;
1020 units "packets";
1021 description "ip4 ttl <= 1";
1022 };
Dmitry Valterd9252462022-09-16 12:33:25 +00001023 hdr_too_short {
1024 severity error;
1025 type counter64;
1026 units "packets";
1027 description "ip4 IHL < 5";
1028 };
Neale Rannse22a7042022-08-09 03:03:29 +00001029
1030 /* Errors signalled by ip4-rewrite. */
1031 mtu_exceeded {
1032 severity error;
1033 type counter64;
1034 units "packets";
1035 description "ip4 MTU exceeded and DF set";
1036 };
1037 dst_lookup_miss {
1038 severity error;
1039 type counter64;
1040 units "packets";
1041 description "ip4 destination lookup miss";
1042 };
1043 src_lookup_miss {
1044 severity error;
1045 type counter64;
1046 units "packets";
1047 description "ip4 source lookup miss";
1048 };
1049 drop {
1050 severity error;
1051 type counter64;
1052 units "packets";
1053 description "ip4 drop";
1054 };
1055 punt {
1056 severity error;
1057 type counter64;
1058 units "packets";
1059 description "ip4 punt";
1060 };
1061 same_interface {
1062 severity error;
1063 type counter64;
1064 units "packets";
1065 description "ip4 egress interface same as ingress";
1066 };
1067
1068 /* errors signalled by ip4-local. */
1069 unknown_protocol {
1070 severity error;
1071 type counter64;
1072 units "packets";
1073 description "unknown ip protocol";
1074 };
1075 tcp_checksum {
1076 severity error;
1077 type counter64;
1078 units "packets";
1079 description "bad tcp checksum";
1080 };
1081 udp_checksum {
1082 severity error;
1083 type counter64;
1084 units "packets";
1085 description "bad udp checksum";
1086 };
1087 udp_length {
1088 severity error;
1089 type counter64;
1090 units "packets";
1091 description "inconsistent udp/ip lengths";
1092 };
1093
1094 /* spoofed packets in ip4-rewrite-local */
1095 spoofed_local_packets {
1096 severity error;
1097 type counter64;
1098 units "packets";
1099 description "ip4 spoofed local-address packet drops";
1100 };
1101
1102 /* Errors signalled by ip4-inacl */
1103 inacl_table_miss {
1104 severity error;
1105 type counter64;
1106 units "packets";
1107 description "input ACL table-miss drops";
1108 };
1109 inacl_session_deny {
1110 severity error;
1111 type counter64;
1112 units "packets";
1113 description "input ACL session deny drops";
1114 };
1115
1116 /* Errors singalled by ip4-outacl */
1117 outacl_table_miss {
1118 severity error;
1119 type counter64;
1120 units "packets";
1121 description "output ACL table-miss drops";
1122 };
1123 outacl_session_deny {
1124 severity error;
1125 type counter64;
1126 units "packets";
1127 description "output ACL session deny drops";
1128 };
1129
1130 /* Errors from mfib-forward */
1131 rpf_failure {
1132 severity error;
1133 type counter64;
1134 units "packets";
1135 description "Multicast RPF check failed";
1136 };
1137
1138 /* Errors signalled by ip4-reassembly */
1139 reass_duplicate_fragment {
1140 severity error;
1141 type counter64;
1142 units "packets";
1143 description "duplicate/overlapping fragments";
1144 };
1145 reass_limit_reached {
1146 severity error;
1147 type counter64;
1148 units "packets";
1149 description "drops due to concurrent reassemblies limit";
1150 };
1151 reass_fragment_chain_too_long {
1152 severity error;
1153 type counter64;
1154 units "packets";
1155 description "fragment chain too long (drop)";
1156 };
1157 reass_no_buf {
1158 severity error;
1159 type counter64;
1160 units "packets";
1161 description "out of buffers (drop)";
1162 };
1163 reass_malformed_packet {
1164 severity error;
1165 type counter64;
1166 units "packets";
1167 description "malformed packets";
1168 };
1169 reass_internal_error {
1170 severity error;
1171 type counter64;
1172 units "packets";
1173 description "drops due to internal reassembly error";
1174 };
1175 reass_timeout {
1176 severity error;
1177 type counter64;
1178 units "packets";
1179 description "fragments dropped due to reassembly timeout";
1180 };
1181 reass_to_custom_app {
1182 severity error;
1183 type counter64;
1184 units "packets";
1185 description "send to custom drop app";
1186 };
1187 reass_success {
1188 severity info;
1189 type counter64;
1190 units "packets";
1191 description "successful reassemblies";
1192 };
1193 reass_fragments_reassembled {
1194 severity info;
1195 type counter64;
1196 units "packets";
1197 description "fragments reassembled";
1198 };
1199 reass_fragments_rcvd {
1200 severity info;
1201 type counter64;
1202 units "packets";
1203 description "fragments received";
1204 };
1205 reass_unsupp_ip_prot {
1206 severity error;
1207 type counter64;
1208 units "packets";
1209 description "unsupported ip protocol";
1210 };
1211};
1212
1213/**
1214 * IPv6 Error/info counters
1215 */
1216counters ip6 {
1217 /* Must be first. */
1218 none {
1219 severity info;
1220 type counter64;
1221 units "packets";
1222 description "valid ip6 packets";
1223 };
1224
1225 /* Errors signalled by ip6-input */
1226 too_short {
1227 severity error;
1228 type counter64;
1229 units "packets";
1230 description "ip6 length < 40 bytes";
1231 };
1232 bad_length {
1233 severity error;
1234 type counter64;
1235 units "packets";
1236 description "ip6 length > l2 length";
1237 };
1238 version {
1239 severity error;
1240 type counter64;
1241 units "packets";
1242 description "ip6 version != 6";
1243 };
1244 time_expired {
1245 severity error;
1246 type counter64;
1247 units "packets";
1248 description "ip6 ttl <= 1";
1249 };
1250
1251 /* Errors signalled by ip6-rewrite. */
1252 mtu_exceeded {
1253 severity error;
1254 type counter64;
1255 units "packets";
1256 description "ip6 MTU exceeded";
1257 };
1258 dst_lookup_miss {
1259 severity error;
1260 type counter64;
1261 units "packets";
1262 description "ip6 destination lookup miss";
1263 };
1264 src_lookup_miss {
1265 severity error;
1266 type counter64;
1267 units "packets";
1268 description "ip6 source lookup miss";
1269 };
1270 drop {
1271 severity error;
1272 type counter64;
1273 units "packets";
1274 description "ip6 drop";
1275 };
1276 punt {
1277 severity error;
1278 type counter64;
1279 units "packets";
1280 description "ip6 punt";
1281 };
1282
1283 /* errors signalled by ip6-local. */
1284 unknown_protocol {
1285 severity error;
1286 type counter64;
1287 units "packets";
1288 description "unknown ip protocol";
1289 };
1290 udp_checksum {
1291 severity error;
1292 type counter64;
1293 units "packets";
1294 description "bad udp checksum";
1295 };
1296 icmp_checksum {
1297 severity error;
1298 type counter64;
1299 units "packets";
1300 description "bad icmp checksum";
1301 };
1302 udp_length {
1303 severity error;
1304 type counter64;
1305 units "packets";
1306 description "inconsistent udp/ip lengths";
1307 };
1308 /* Errors signalled by udp6-lookup. */
1309 unknown_udp_port {
1310 severity error;
1311 type counter64;
1312 units "packets";
1313 description "no listener for udp port";
1314 };
1315
1316 /* spoofed packets in ip6-rewrite-local */
1317 spoofed_local_packets {
1318 severity error;
1319 type counter64;
1320 units "packets";
1321 description "ip6 spoofed local-address packet drops";
1322 };
1323
1324 /* Errors signalled by ip6-inacl */
1325 inacl_table_miss {
1326 severity error;
1327 type counter64;
1328 units "packets";
1329 description "input ACL table-miss drops";
1330 };
1331 inacl_session_deny {
1332 severity error;
1333 type counter64;
1334 units "packets";
1335 description "input ACL session deny drops";
1336 };
1337
1338 /* Errors singalled by ip6-outacl */
1339 outacl_table_miss {
1340 severity error;
1341 type counter64;
1342 units "packets";
1343 description "output ACL table-miss drops";
1344 };
1345 outacl_session_deny {
1346 severity error;
1347 type counter64;
1348 units "packets";
1349 description "output ACL session deny drops";
1350 };
1351
1352 /* Errors from mfib-forward */
1353 rpf_failure {
1354 severity error;
1355 type counter64;
1356 units "packets";
1357 description "Multicast RPF check failed";
1358 };
1359
1360 /* Errors signalled by ip6-reassembly */
1361 reass_missing_upper {
1362 severity error;
1363 type counter64;
1364 units "packets";
1365 description "missing-upper layer drops";
1366 };
1367 reass_duplicate_fragment {
1368 severity error;
1369 type counter64;
1370 units "packets";
1371 description "duplicate fragments";
1372 };
1373 reass_overlapping_fragment {
1374 severity error;
1375 type counter64;
1376 units "packets";
1377 description "overlapping fragments";
1378 };
1379 reass_limit_reached {
1380 severity error;
1381 type counter64;
1382 units "packets";
1383 description "drops due to concurrent reassemblies limit";
1384 };
1385 reass_fragment_chain_too_long {
1386 severity error;
1387 type counter64;
1388 units "packets";
1389 description "fragment chain too long (drop)";
1390 };
1391 reass_no_buf {
1392 severity error;
1393 type counter64;
1394 units "packets";
1395 description "out of buffers (drop)";
1396 };
1397 reass_timeout {
1398 severity error;
1399 type counter64;
1400 units "packets";
1401 description "fragments dropped due to reassembly timeout";
1402 };
1403 reass_internal_error {
1404 severity error;
1405 type counter64;
1406 units "packets";
1407 description "drops due to internal reassembly error";
1408 };
1409 reass_invalid_frag_len {
1410 severity error;
1411 type counter64;
1412 units "packets";
1413 description "invalid fragment length";
1414 };
1415 reass_to_custom_app {
1416 severity error;
1417 type counter64;
1418 units "packets";
1419 description "send to custom drop app";
1420 };
1421 reass_no_frag_hdr {
1422 severity error;
1423 type counter64;
1424 units "packets";
1425 description "no fragmentation header";
1426 };
1427 reass_invalid_frag_size {
1428 severity error;
1429 type counter64;
1430 units "packets";
1431 description "drop due to invalid fragment size";
1432 };
1433 reass_success {
1434 severity info;
1435 type counter64;
1436 units "packets";
1437 description "successful reassemblies";
1438 };
1439 reass_fragments_reassembled {
1440 severity info;
1441 type counter64;
1442 units "packets";
1443 description "fragments reassembled";
1444 };
1445 reass_fragments_rcvd {
1446 severity info;
1447 type counter64;
1448 units "packets";
1449 description "fragments received";
1450 };
1451 reass_unsupp_ip_proto {
1452 severity error;
1453 type counter64;
1454 units "packets";
1455 description "unsupported ip protocol";
1456 };
1457};
1458
Neale Rannsb29c6062022-08-12 01:50:24 +00001459counters icmp4 {
1460 none {
1461 severity info;
1462 type counter64;
1463 units "packets";
1464 description "valid packets";
1465 };
1466 unknown_type {
1467 severity error;
1468 type counter64;
1469 units "packets";
1470 description "unknown type";
1471 };
1472 invalid_code_for_type {
1473 severity error;
1474 type counter64;
1475 units "packets";
1476 description "invalid code for type";
1477 };
1478 invalid_hop_limit_for_type {
1479 severity error;
1480 type counter64;
1481 units "packets";
1482 description "hop_limit != 255";
1483 };
1484 length_too_small_for_type {
1485 severity error;
1486 type counter64;
1487 units "packets";
1488 description "payload length too small for type";
1489 };
1490 options_with_odd_length {
1491 severity error;
1492 type counter64;
1493 units "packets";
1494 description "total option length not multiple of 8 bytes";
1495 };
1496 option_with_zero_length {
1497 severity error;
1498 type counter64;
1499 units "packets";
1500 description "option has zero length";
1501 };
1502 echo_replies_sent {
1503 severity info;
1504 type counter64;
1505 units "packets";
1506 description "echo replies sent";
1507 };
1508 dst_lookup_miss {
1509 severity error;
1510 type counter64;
1511 units "packets";
1512 description "icmp6 dst address lookup misses";
1513 };
1514 dest_unreach_sent {
1515 severity info;
1516 type counter64;
1517 units "packets";
1518 description "destination unreachable response sent";
1519 };
1520 ttl_expire_sent {
1521 severity info;
1522 type counter64;
1523 units "packets";
1524 description "hop limit exceeded response sent";
1525 };
1526 param_problem_sent {
1527 severity info;
1528 type counter64;
1529 units "packets";
1530 description "parameter problem response sent";
1531 };
1532 drop {
1533 severity error;
1534 type counter64;
1535 units "packets";
1536 description "error message dropped";
1537 };
1538};
1539
1540counters icmp6 {
1541 none {
1542 severity info;
1543 type counter64;
1544 units "packets";
1545 description "valid packets";
1546 };
1547 unknown_type {
1548 severity error;
1549 type counter64;
1550 units "packets";
1551 description "unknown type";
1552 };
1553 invalid_code_for_type {
1554 severity error;
1555 type counter64;
1556 units "packets";
1557 description "invalid code for type";
1558 };
1559 invalid_hop_limit_for_type {
1560 severity error;
1561 type counter64;
1562 units "packets";
1563 description "hop_limit != 255";
1564 };
1565 length_too_small_for_type {
1566 severity error;
1567 type counter64;
1568 units "packets";
1569 description "payload length too small for type";
1570 };
1571 options_with_odd_length {
1572 severity error;
1573 type counter64;
1574 units "packets";
1575 description "total option length not multiple of 8 bytes";
1576 };
1577 option_with_zero_length {
1578 severity error;
1579 type counter64;
1580 units "packets";
1581 description "option has zero length";
1582 };
1583 echo_replies_sent {
1584 severity info;
1585 type counter64;
1586 units "packets";
1587 description "echo replies sent";
1588 };
1589 neighbor_solicitation_source_not_on_link {
1590 severity error;
1591 type counter64;
1592 units "packets";
1593 description "neighbor solicitations from source not on link";
1594 };
1595 neighbor_solicitation_source_unknown {
1596 severity error;
1597 type counter64;
1598 units "packets";
1599 description "neighbor solicitations for unknown targets";
1600 };
1601 neighbor_advertisements_tx {
1602 severity info;
1603 type counter64;
1604 units "packets";
1605 description "neighbor advertisements sent";
1606 };
1607 neighbor_advertisements_rx {
1608 severity info;
1609 type counter64;
1610 units "packets";
1611 description "neighbor advertisements received";
1612 };
1613 router_solicitation_source_not_on_link {
1614 severity error;
1615 type counter64;
1616 units "packets";
1617 description "router solicitations from source not on link";
1618 };
1619 router_solicitation_unsupported_intf {
1620 severity error;
1621 type counter64;
1622 units "packets";
1623 description "neighbor discovery unsupported interface";
1624 };
1625 router_solicitation_radv_not_config {
1626 severity error;
1627 type counter64;
1628 units "packets";
1629 description "neighbor discovery not configured";
1630 };
1631 router_advertisement_source_not_link_local {
1632 severity error;
1633 type counter64;
1634 units "packets";
1635 description "router advertisement source not link local";
1636 };
1637 router_advertisements_tx {
1638 severity info;
1639 type counter64;
1640 units "packets";
1641 description "router advertisements sent";
1642 };
1643 router_advertisements_rx {
1644 severity info;
1645 type counter64;
1646 units "packets";
1647 description "router advertisements received";
1648 };
1649 dst_lookup_miss {
1650 severity error;
1651 type counter64;
1652 units "packets";
1653 description "icmp6 dst address lookup misses";
1654 };
1655 dest_unreach_sent {
1656 severity info;
1657 type counter64;
1658 units "packets";
1659 description "destination unreachable response sent";
1660 };
1661 packet_too_big_sent {
1662 severity info;
1663 type counter64;
1664 units "packets";
1665 description "packet too big response sent";
1666 };
1667 ttl_expire_sent {
1668 severity info;
1669 type counter64;
1670 units "packets";
1671 description "hop limit exceeded response sent";
1672 };
1673 param_problem_sent {
1674 severity info;
1675 type counter64;
1676 units "packets";
1677 description "parameter problem response sent";
1678 };
1679 drop {
1680 severity error;
1681 type counter64;
1682 units "packets";
1683 description "error message dropped";
1684 };
1685 alloc_failure {
1686 severity error;
1687 type counter64;
1688 units "packets";
1689 description "buffer allocation failure";
1690 };
1691};
1692
Neale Rannse22a7042022-08-09 03:03:29 +00001693paths {
1694 "/err/ip-frag" "ip_frag";
1695 "/err/mpls-frag" "ip_frag";
1696 "/err/ip4-mpls-label-disposition-pipe" "ip4";
1697 "/err/ip4-mpls-label-disposition-uniform" "ip4";
1698 "/err/ip4-local" "ip4";
1699 "/err/ip4-input" "ip4";
1700 "/err/ip4-full-reassembly" "ip4";
1701 "/err/ip4-local-full-reassembly" "ip4";
1702 "/err/ip4-full-reassembly-feature" "ip4";
1703 "/err/ip4-full-reassembly-custom" "ip4";
1704 "/err/ip4-full-reassembly-expire-walk" "ip4";
1705 "/err/ip4-sv-reassembly" "ip4";
1706 "/err/ip4-sv-reassembly-feature" "ip4";
1707 "/err/ip4-sv-reassembly-output-feature" "ip4";
1708 "/err/ip4-sv-reassembly-custom-next" "ip4";
1709 "/err/ip4-sv-reassembly-expire-walk" "ip4";
1710 "/err/ip6-mpls-label-disposition-pipe" "ip6";
1711 "/err/ip6-mpls-label-disposition-uniform" "ip6";
1712 "/err/ip6-local" "ip6";
1713 "/err/ip6-input" "ip6";
1714 "/err/ip6-full-reassembly" "ip6";
1715 "/err/ip6-local-full-reassembly" "ip6";
1716 "/err/ip6-full-reassembly-feature" "ip6";
1717 "/err/ip6-full-reassembly-custom" "ip6";
1718 "/err/ip6-full-reassembly-expire-walk" "ip6";
1719 "/err/ip6-sv-reassembly" "ip6";
1720 "/err/ip6-sv-reassembly-feature" "ip6";
1721 "/err/ip6-sv-reassembly-output-feature" "ip6";
1722 "/err/ip6-sv-reassembly-custom-next" "ip6";
1723 "/err/ip6-sv-reassembly-expire-walk" "ip6";
Neale Rannsb29c6062022-08-12 01:50:24 +00001724 "/err/ip4-icmp-input" "icmp4";
1725 "/err/ip4-icmp-error" "icmp4";
1726 "/err/ip6-icmp-input" "icmp6";
1727 "/err/ip6-icmp-error" "icmp6";
Neale Rannse22a7042022-08-09 03:03:29 +00001728};
1729
Dave Barachb5e8a772016-12-06 12:04:42 -05001730/*
1731 * Local Variables:
1732 * eval: (c-set-style "gnu")
1733 * End:
1734 */