Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 1 | /* Hey Emacs use -*- mode: C -*- */ |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 2 | /* |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 3 | * Copyright (c) 2018 Cisco and/or its affiliates. |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 4 | * 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 Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 20 | called through a shared memory interface. |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 21 | */ |
| 22 | |
Aloys Augustin | 6e4cfb5 | 2021-09-16 20:53:14 +0200 | [diff] [blame] | 23 | option version = "3.2.0"; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 24 | |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 25 | import "vnet/interface_types.api"; |
Neale Ranns | 31ed744 | 2018-02-23 05:29:09 -0800 | [diff] [blame] | 26 | import "vnet/fib/fib_types.api"; |
Neale Ranns | de5b08f | 2018-08-29 06:37:18 -0700 | [diff] [blame] | 27 | import "vnet/ethernet/ethernet_types.api"; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 28 | import "vnet/mfib/mfib_types.api"; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 29 | import "vnet/interface_types.api"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 30 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 31 | /** \brief An IP table |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 32 | @param is_ipv6 - V4 or V6 table |
| 33 | @param table_id - table ID associated with the route |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 34 | This table ID will apply to both the unicast |
| 35 | and multicast FIBs |
Neale Ranns | 2297af0 | 2017-09-12 09:45:04 -0700 | [diff] [blame] | 36 | @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 Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 38 | meaningful. |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 39 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 40 | typedef ip_table |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 41 | { |
| 42 | u32 table_id; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 43 | bool is_ip6; |
| 44 | string name[64]; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 45 | }; |
| 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 Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 52 | autoreply define ip_table_add_del |
| 53 | { |
| 54 | u32 client_index; |
| 55 | u32 context; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 56 | bool is_add [default=true]; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 57 | vl_api_ip_table_t table; |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 58 | }; |
| 59 | |
BenoƮt Ganne | ff570d3 | 2024-04-16 09:36:05 +0200 | [diff] [blame] | 60 | /** \brief Add / del table request - version 2 |
| 61 | A table can be added multiple times, but need be deleted only once. |
| 62 | @param client_index - opaque cookie to identify the sender |
| 63 | @param context - sender context, to match reply w/ request |
| 64 | @param table - the FIB table to add or del |
| 65 | @param create_mfib - whether to create mfib or not |
| 66 | @param is_add - add or del |
| 67 | */ |
| 68 | autoreply define ip_table_add_del_v2 |
| 69 | { |
| 70 | u32 client_index; |
| 71 | u32 context; |
| 72 | vl_api_ip_table_t table; |
| 73 | bool create_mfib [default=true]; |
| 74 | bool is_add [default=true]; |
| 75 | }; |
| 76 | |
Aloys Augustin | 6e4cfb5 | 2021-09-16 20:53:14 +0200 | [diff] [blame] | 77 | /** \brief Allocate an unused table |
| 78 | A table can be added multiple times. |
| 79 | If a large number of tables are in use (millions), this API might |
| 80 | fail to find a free ID with very low probability, and will return |
| 81 | EAGAIN. A subsequent attempt may be successful. |
| 82 | @param client_index - opaque cookie to identify the sender |
| 83 | @param context - sender context, to match reply w/ request |
| 84 | @param table - if table.table_id == ~0, vpp allocates an unused table_id and |
| 85 | proceeds as in ip_table_add_del with is_add = true |
| 86 | if table.table_id != ~0, vpp uses the table.table_id and |
| 87 | proceeds as in ip_table_add_del with is_add = true |
| 88 | table.table_id should never be 0 |
| 89 | */ |
| 90 | define ip_table_allocate |
| 91 | { |
| 92 | u32 client_index; |
| 93 | u32 context; |
| 94 | |
| 95 | vl_api_ip_table_t table; |
| 96 | }; |
| 97 | |
| 98 | define ip_table_allocate_reply |
| 99 | { |
| 100 | u32 context; |
| 101 | i32 retval; |
| 102 | |
| 103 | vl_api_ip_table_t table; |
| 104 | }; |
| 105 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 106 | /** \brief Dump IP all fib tables |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 107 | @param client_index - opaque cookie to identify the sender |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 108 | @param context - sender context, to match reply w/ request |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 109 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 110 | define ip_table_dump |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 111 | { |
| 112 | u32 client_index; |
| 113 | u32 context; |
| 114 | }; |
| 115 | |
Neale Ranns | 9db6ada | 2019-11-08 12:42:31 +0000 | [diff] [blame] | 116 | /** \brief IP table replace being |
| 117 | |
| 118 | The use-case is that, for some unspecified reason, the control plane |
| 119 | has a very different set of entries it wants in the table than VPP |
| 120 | currently has. The CP would thus like to 'replace' VPP's current table |
| 121 | only by specifying what the new set of entries shall be, i.e. it is not |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 122 | going to delete anything that already exists. |
| 123 | the CP declares the start of this procedure with this begin_replace |
Neale Ranns | 9db6ada | 2019-11-08 12:42:31 +0000 | [diff] [blame] | 124 | API Call, and when it has populated all the entries it wants, it calls |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 125 | the below end_replace API. From this point on it is of course free |
Neale Ranns | 9db6ada | 2019-11-08 12:42:31 +0000 | [diff] [blame] | 126 | to add and delete entries as usual. |
| 127 | The underlying mechanism by which VPP implements this replace is |
| 128 | purposefully left unspecified. |
| 129 | |
| 130 | @param client_index - opaque cookie to identify the sender |
| 131 | @param context - sender context, to match reply w/ request |
| 132 | @param table - The table to resync |
| 133 | */ |
| 134 | autoreply define ip_table_replace_begin |
| 135 | { |
| 136 | u32 client_index; |
| 137 | u32 context; |
| 138 | vl_api_ip_table_t table; |
| 139 | }; |
| 140 | |
| 141 | /** \brief IP table replace end |
| 142 | |
| 143 | see replace start/ |
| 144 | |
| 145 | @param client_index - opaque cookie to identify the sender |
| 146 | @param context - sender context, to match reply w/ request |
| 147 | @param table - The table that has converged |
| 148 | */ |
| 149 | autoreply define ip_table_replace_end |
| 150 | { |
| 151 | u32 client_index; |
| 152 | u32 context; |
| 153 | vl_api_ip_table_t table; |
| 154 | }; |
| 155 | |
| 156 | /** \brief IP table flush |
| 157 | Flush a table of all routes |
| 158 | @param client_index - opaque cookie to identify the sender |
| 159 | @param context - sender context, to match reply w/ request |
| 160 | @param table - The table to flush |
| 161 | */ |
| 162 | autoreply define ip_table_flush |
| 163 | { |
| 164 | u32 client_index; |
| 165 | u32 context; |
| 166 | vl_api_ip_table_t table; |
| 167 | }; |
| 168 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 169 | /** \brief IP FIB table response |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 170 | @param context - sender context |
| 171 | @param table - description of the table |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 172 | */ |
Ole Troan | df87f80 | 2020-11-18 19:17:48 +0100 | [diff] [blame] | 173 | define ip_table_details |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 174 | { |
| 175 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 176 | vl_api_ip_table_t table; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 177 | }; |
| 178 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 179 | /** \brief An IP route |
| 180 | @param table_id The IP table the route is in |
| 181 | @param stats_index The index of the route in the stats segment |
| 182 | @param prefix the prefix for the route |
| 183 | @param n_paths The number of paths the route has |
Neale Ranns | 976b259 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 184 | @param src The entity adding the route. either 0 for default |
| 185 | or a value returned from fib_source_sdd. |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 186 | @param paths The paths of the route |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 187 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 188 | typedef ip_route |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 189 | { |
| 190 | u32 table_id; |
| 191 | u32 stats_index; |
| 192 | vl_api_prefix_t prefix; |
| 193 | u8 n_paths; |
| 194 | vl_api_fib_path_t paths[n_paths]; |
| 195 | }; |
Neale Ranns | 976b259 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 196 | typedef ip_route_v2 |
| 197 | { |
| 198 | u32 table_id; |
| 199 | u32 stats_index; |
| 200 | vl_api_prefix_t prefix; |
| 201 | u8 n_paths; |
| 202 | u8 src; |
| 203 | vl_api_fib_path_t paths[n_paths]; |
| 204 | }; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 205 | |
| 206 | /** \brief Add / del route request |
| 207 | @param client_index - opaque cookie to identify the sender |
| 208 | @param context - sender context, to match reply w/ request |
| 209 | @param is_multipath - Set to 1 if these paths will be added/removed |
| 210 | to/from the existing set, or 0 to replace |
| 211 | the existing set. |
| 212 | is_add=0 & is_multipath=0 implies delete all paths |
| 213 | @param is_add - Are the paths being added or removed |
| 214 | */ |
| 215 | define ip_route_add_del |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 216 | { |
| 217 | u32 client_index; |
| 218 | u32 context; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 219 | bool is_add [default=true]; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 220 | bool is_multipath; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 221 | vl_api_ip_route_t route; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 222 | }; |
Neale Ranns | 976b259 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 223 | define ip_route_add_del_v2 |
| 224 | { |
| 225 | option in_progress; |
| 226 | u32 client_index; |
| 227 | u32 context; |
| 228 | bool is_add [default=true]; |
| 229 | bool is_multipath; |
| 230 | vl_api_ip_route_v2_t route; |
| 231 | }; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 232 | define ip_route_add_del_reply |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 233 | { |
| 234 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 235 | i32 retval; |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 236 | u32 stats_index; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 237 | }; |
Neale Ranns | 976b259 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 238 | define ip_route_add_del_v2_reply |
| 239 | { |
| 240 | option in_progress; |
| 241 | u32 context; |
| 242 | i32 retval; |
| 243 | u32 stats_index; |
| 244 | }; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 245 | |
| 246 | /** \brief Dump IP routes from a table |
| 247 | @param client_index - opaque cookie to identify the sender |
Neale Ranns | 976b259 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 248 | @param src The entity adding the route. either 0 for default |
| 249 | or a value returned from fib_source_sdd. |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 250 | @param table - The table from which to dump routes (ony ID an AF are needed) |
| 251 | */ |
| 252 | define ip_route_dump |
| 253 | { |
| 254 | u32 client_index; |
| 255 | u32 context; |
| 256 | vl_api_ip_table_t table; |
| 257 | }; |
Neale Ranns | 976b259 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 258 | define ip_route_v2_dump |
| 259 | { |
| 260 | option in_progress; |
| 261 | u32 client_index; |
| 262 | u32 context; |
| 263 | /* vl_api_fib_source_t src; */ |
| 264 | u8 src; |
| 265 | vl_api_ip_table_t table; |
| 266 | }; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 267 | |
| 268 | /** \brief IP FIB table entry response |
| 269 | @param route The route entry in the table |
| 270 | */ |
Ole Troan | df87f80 | 2020-11-18 19:17:48 +0100 | [diff] [blame] | 271 | define ip_route_details |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 272 | { |
| 273 | u32 context; |
| 274 | vl_api_ip_route_t route; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 275 | }; |
Neale Ranns | 976b259 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 276 | define ip_route_v2_details |
| 277 | { |
| 278 | option in_progress; |
| 279 | u32 context; |
| 280 | vl_api_ip_route_v2_t route; |
| 281 | }; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 282 | |
Christian Hopps | f5d38e0 | 2020-05-04 10:28:03 -0400 | [diff] [blame] | 283 | /** \brief Lookup IP route from a table |
| 284 | @param client_index - opaque cookie to identify the sender |
| 285 | @param table_id - The IP table to look the route up in |
| 286 | @param exact - 0 for normal route lookup, 1 for exact match only |
| 287 | @param prefix - The prefix (or host) for route lookup. |
| 288 | */ |
| 289 | define ip_route_lookup |
| 290 | { |
| 291 | u32 client_index; |
| 292 | u32 context; |
| 293 | u32 table_id; |
| 294 | u8 exact; |
| 295 | vl_api_prefix_t prefix; |
| 296 | }; |
Neale Ranns | 976b259 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 297 | define ip_route_lookup_v2 |
| 298 | { |
| 299 | option in_progress; |
| 300 | u32 client_index; |
| 301 | u32 context; |
| 302 | u32 table_id; |
| 303 | u8 exact; |
| 304 | vl_api_prefix_t prefix; |
| 305 | }; |
Christian Hopps | f5d38e0 | 2020-05-04 10:28:03 -0400 | [diff] [blame] | 306 | |
| 307 | /** \brief IP FIB table lookup response |
| 308 | @param retval - return code of the lookup |
| 309 | @param route - The route entry in the table if found |
| 310 | */ |
| 311 | define ip_route_lookup_reply |
| 312 | { |
| 313 | u32 context; |
| 314 | i32 retval; |
| 315 | vl_api_ip_route_t route; |
| 316 | }; |
Neale Ranns | 976b259 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 317 | define ip_route_lookup_v2_reply |
| 318 | { |
| 319 | option in_progress; |
| 320 | u32 context; |
| 321 | i32 retval; |
| 322 | vl_api_ip_route_v2_t route; |
| 323 | }; |
Christian Hopps | f5d38e0 | 2020-05-04 10:28:03 -0400 | [diff] [blame] | 324 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 325 | /** \brief Set the ip flow hash config for a fib request |
| 326 | @param client_index - opaque cookie to identify the sender |
| 327 | @param context - sender context, to match reply w/ request |
| 328 | @param vrf_id - vrf/fib id |
| 329 | @param is_ipv6 - if non-zero the fib is ip6, else ip4 |
| 330 | @param src - if non-zero include src in flow hash |
| 331 | @param dst - if non-zero include dst in flow hash |
| 332 | @param sport - if non-zero include sport in flow hash |
| 333 | @param dport - if non-zero include dport in flow hash |
| 334 | @param proto -if non-zero include proto in flow hash |
| 335 | @param reverse - if non-zero include reverse in flow hash |
Mohsin Kazmi | 2af0e3a | 2018-11-20 11:11:12 +0100 | [diff] [blame] | 336 | @param symmetric - if non-zero include symmetry in flow hash |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 337 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 338 | autoreply define set_ip_flow_hash |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 339 | { |
Ahmed Abdelsalam | f2984bb | 2020-11-20 18:56:09 +0000 | [diff] [blame] | 340 | option deprecated; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 341 | u32 client_index; |
| 342 | u32 context; |
| 343 | u32 vrf_id; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 344 | bool is_ipv6; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 345 | bool src; |
| 346 | bool dst; |
| 347 | bool sport; |
| 348 | bool dport; |
| 349 | bool proto; |
| 350 | bool reverse; |
| 351 | bool symmetric; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 352 | }; |
| 353 | |
Ahmed Abdelsalam | f2984bb | 2020-11-20 18:56:09 +0000 | [diff] [blame] | 354 | /** |
| 355 | @brief flow hash settings for an IP table |
| 356 | @param src - include src in flow hash |
| 357 | @param dst - include dst in flow hash |
| 358 | @param sport - include sport in flow hash |
| 359 | @param dport - include dport in flow hash |
| 360 | @param proto - include proto in flow hash |
| 361 | @param reverse - include reverse in flow hash |
| 362 | @param symmetric - include symmetry in flow hash |
| 363 | @param flowlabel - include flowlabel in flow hash |
| 364 | */ |
| 365 | enumflag ip_flow_hash_config |
| 366 | { |
| 367 | IP_API_FLOW_HASH_SRC_IP = 0x01, |
| 368 | IP_API_FLOW_HASH_DST_IP = 0x02, |
| 369 | IP_API_FLOW_HASH_SRC_PORT = 0x04, |
| 370 | IP_API_FLOW_HASH_DST_PORT = 0x08, |
| 371 | IP_API_FLOW_HASH_PROTO = 0x10, |
| 372 | IP_API_FLOW_HASH_REVERSE = 0x20, |
| 373 | IP_API_FLOW_HASH_SYMETRIC = 0x40, |
| 374 | IP_API_FLOW_HASH_FLOW_LABEL = 0x80, |
| 375 | }; |
| 376 | |
| 377 | autoreply define set_ip_flow_hash_v2 |
| 378 | { |
| 379 | u32 client_index; |
| 380 | u32 context; |
| 381 | u32 table_id; |
| 382 | vl_api_address_family_t af; |
| 383 | vl_api_ip_flow_hash_config_t flow_hash_config; |
| 384 | }; |
| 385 | |
Takeru Hayasaka | b23c6f4 | 2023-01-17 04:45:58 +0900 | [diff] [blame] | 386 | /** |
| 387 | @brief flow hash settings for an IP table |
| 388 | @param src - include src in flow hash |
| 389 | @param dst - include dst in flow hash |
| 390 | @param sport - include sport in flow hash |
| 391 | @param dport - include dport in flow hash |
| 392 | @param proto - include proto in flow hash |
| 393 | @param reverse - include reverse in flow hash |
| 394 | @param symmetric - include symmetry in flow hash |
| 395 | @param flowlabel - include flowlabel in flow hash |
| 396 | @param gtpv1teid - include gtpv1teid in flow hash |
| 397 | */ |
| 398 | enumflag ip_flow_hash_config_v2 |
| 399 | { |
| 400 | IP_API_V2_FLOW_HASH_SRC_IP = 0x01, |
| 401 | IP_API_V2_FLOW_HASH_DST_IP = 0x02, |
| 402 | IP_API_V2_FLOW_HASH_SRC_PORT = 0x04, |
| 403 | IP_API_V2_FLOW_HASH_DST_PORT = 0x08, |
| 404 | IP_API_V2_FLOW_HASH_PROTO = 0x10, |
| 405 | IP_API_V2_FLOW_HASH_REVERSE = 0x20, |
| 406 | IP_API_V2_FLOW_HASH_SYMETRIC = 0x40, |
| 407 | IP_API_V2_FLOW_HASH_FLOW_LABEL = 0x80, |
| 408 | IP_API_V2_FLOW_HASH_GTPV1_TEID = 0x100, |
| 409 | }; |
| 410 | |
| 411 | autoreply define set_ip_flow_hash_v3 |
| 412 | { |
| 413 | u32 client_index; |
| 414 | u32 context; |
| 415 | u32 table_id; |
| 416 | vl_api_address_family_t af; |
| 417 | vl_api_ip_flow_hash_config_v2_t flow_hash_config; |
| 418 | option status="in_progress"; |
| 419 | }; |
| 420 | |
Neale Ranns | 3d5f08a | 2021-01-22 16:12:38 +0000 | [diff] [blame] | 421 | /** \brief Set the ip flow hash router ID |
| 422 | @param client_index - opaque cookie to identify the sender |
| 423 | @param context - sender context, to match reply w/ request |
| 424 | @param router_id - The ID of the router. Mixed into the hash. |
| 425 | Used to prevent polarisation across a network, |
| 426 | since each router is assumed to have a different ID |
| 427 | */ |
| 428 | autoreply define set_ip_flow_hash_router_id |
| 429 | { |
| 430 | u32 client_index; |
| 431 | u32 context; |
| 432 | u32 router_id; |
| 433 | }; |
| 434 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 435 | /** \brief IPv6 interface enable / disable request |
| 436 | @param client_index - opaque cookie to identify the sender |
| 437 | @param context - sender context, to match reply w/ request |
| 438 | @param sw_if_index - interface used to reach neighbor |
| 439 | @param enable - if non-zero enable ip6 on interface, else disable |
| 440 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 441 | autoreply define sw_interface_ip6_enable_disable |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 442 | { |
| 443 | u32 client_index; |
| 444 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 445 | vl_api_interface_index_t sw_if_index; |
| 446 | bool enable; /* set to true if enable */ |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 447 | }; |
| 448 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 449 | /** \brief Dump IP multicast fib table |
| 450 | @param client_index - opaque cookie to identify the sender |
| 451 | */ |
| 452 | define ip_mtable_dump |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 453 | { |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 454 | u32 client_index; |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 455 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 456 | }; |
| 457 | define ip_mtable_details |
| 458 | { |
| 459 | u32 client_index; |
| 460 | u32 context; |
| 461 | vl_api_ip_table_t table; |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 462 | }; |
| 463 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 464 | /** \brief Add / del route request |
Ian Wells | 412ecd3 | 2018-10-04 12:31:11 -0700 | [diff] [blame] | 465 | |
| 466 | Adds a route, consisting both of the MFIB entry to match packets |
| 467 | (which may already exist) and a path to send those packets down. |
| 468 | Routes can be entered repeatedly to add multiple paths. Deletions are |
| 469 | per-path. |
| 470 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 471 | @param client_index - opaque cookie to identify the sender |
| 472 | @param context - sender context, to match reply w/ request |
Ian Wells | 412ecd3 | 2018-10-04 12:31:11 -0700 | [diff] [blame] | 473 | @param table_id - fib table /vrf associated with the route |
| 474 | @param is_add - true if adding a route; false if deleting one |
| 475 | @param is_ipv6 - true iff all the addresses are v6 |
| 476 | @param entry_flags - see fib_entry_flag_t |
| 477 | @param itf_flags - see mfib_entry_flags_t |
| 478 | @param next_hop_afi - see dpo_proto_t; the type of destination description |
| 479 | @param src_address - the source of the packet |
| 480 | @param grp_address - the group the packet is destined to |
| 481 | @param nh_address - the nexthop to forward the packet to |
| 482 | @param next_hop_sw_if_index - interface to emit packet on |
| 483 | |
| 484 | BIER AFIs use the BIER imposition ID. v4 and v6 AFIs use either the |
| 485 | interface or the nexthop address. |
| 486 | |
| 487 | Note that if the route is source-specific (S is supplied, not all 0s), |
| 488 | the prefix match is treated as exact (prefixlen /32 or /128). |
| 489 | |
| 490 | FIXME not complete yet |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 491 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 492 | typedef ip_mroute |
| 493 | { |
| 494 | u32 table_id; |
Neale Ranns | 990f694 | 2020-10-20 07:20:17 +0000 | [diff] [blame] | 495 | vl_api_mfib_entry_flags_t entry_flags; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 496 | u32 rpf_id; |
| 497 | vl_api_mprefix_t prefix; |
| 498 | u8 n_paths; |
| 499 | vl_api_mfib_path_t paths[n_paths]; |
| 500 | }; |
| 501 | |
Neale Ranns | 28c142e | 2018-09-07 09:37:07 -0700 | [diff] [blame] | 502 | define ip_mroute_add_del |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 503 | { |
| 504 | u32 client_index; |
| 505 | u32 context; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 506 | bool is_add [default=true]; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 507 | bool is_multipath; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 508 | vl_api_ip_mroute_t route; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 509 | }; |
Neale Ranns | 28c142e | 2018-09-07 09:37:07 -0700 | [diff] [blame] | 510 | define ip_mroute_add_del_reply |
| 511 | { |
| 512 | u32 context; |
| 513 | i32 retval; |
| 514 | u32 stats_index; |
| 515 | }; |
| 516 | |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 517 | /** \brief Dump IP multicast fib table |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 518 | @param table - The table from which to dump routes (ony ID an AF are needed) |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 519 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 520 | define ip_mroute_dump |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 521 | { |
| 522 | u32 client_index; |
| 523 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 524 | vl_api_ip_table_t table; |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 525 | }; |
| 526 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 527 | /** \brief IP Multicast Route Details |
| 528 | @param route - Details of the route |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 529 | */ |
Ole Troan | df87f80 | 2020-11-18 19:17:48 +0100 | [diff] [blame] | 530 | define ip_mroute_details |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 531 | { |
| 532 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 533 | vl_api_ip_mroute_t route; |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 534 | }; |
| 535 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 536 | define ip_address_details |
| 537 | { |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 538 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 539 | vl_api_interface_index_t sw_if_index; |
Ole Troan | 75761b9 | 2019-09-11 17:49:08 +0200 | [diff] [blame] | 540 | vl_api_address_with_prefix_t prefix; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 541 | }; |
| 542 | |
| 543 | define ip_address_dump |
| 544 | { |
| 545 | u32 client_index; |
| 546 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 547 | vl_api_interface_index_t sw_if_index; |
| 548 | bool is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 549 | }; |
| 550 | |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 551 | /** \brief IP unnumbered configurations |
| 552 | @param sw_if_index The interface that has unnumbered configuration |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 553 | @param ip_sw_if_index The IP interface that it is unnumbered to |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 554 | */ |
| 555 | define ip_unnumbered_details |
| 556 | { |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 557 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 558 | vl_api_interface_index_t sw_if_index; |
| 559 | vl_api_interface_index_t ip_sw_if_index; |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 560 | }; |
| 561 | |
| 562 | /** \brief Dump IP unnumbered configurations |
| 563 | @param sw_if_index ~0 for all interfaces, else the interface desired |
| 564 | */ |
| 565 | define ip_unnumbered_dump |
| 566 | { |
| 567 | u32 client_index; |
| 568 | u32 context; |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 569 | vl_api_interface_index_t sw_if_index [default=0xffffffff]; |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 570 | }; |
| 571 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 572 | define ip_details |
| 573 | { |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 574 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 575 | vl_api_interface_index_t sw_if_index; |
| 576 | bool is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 577 | }; |
| 578 | |
| 579 | define ip_dump |
| 580 | { |
| 581 | u32 client_index; |
| 582 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 583 | bool is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 584 | }; |
| 585 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 586 | define mfib_signal_dump |
| 587 | { |
| 588 | u32 client_index; |
| 589 | u32 context; |
| 590 | }; |
| 591 | |
| 592 | define mfib_signal_details |
| 593 | { |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 594 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 595 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 596 | u32 table_id; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 597 | vl_api_mprefix_t prefix; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 598 | u16 ip_packet_len; |
| 599 | u8 ip_packet_data[256]; |
| 600 | }; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 601 | |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 602 | /** \brief IP punt policer |
| 603 | @param client_index - opaque cookie to identify the sender |
| 604 | @param context - sender context, to match reply w/ request |
| 605 | @param is_add - 1 to add neighbor, 0 to delete |
| 606 | @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 |
| 607 | @param policer_index - Index of policer to use |
| 608 | */ |
| 609 | autoreply define ip_punt_police |
| 610 | { |
| 611 | u32 client_index; |
| 612 | u32 context; |
| 613 | u32 policer_index; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 614 | bool is_add [default=true]; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 615 | bool is_ip6; |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 616 | }; |
| 617 | |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 618 | /** \brief Punt redirect type |
Neale Ranns | 47527b2 | 2018-11-16 00:53:53 -0800 | [diff] [blame] | 619 | @param rx_sw_if_index - specify the original RX interface of traffic |
| 620 | that should be redirected. ~0 means any interface. |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 621 | @param tx_sw_if_index - the TX interface to which traffic should be |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 622 | redirected. |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 623 | @param nh - the next-hop to redirect the traffic to. |
| 624 | @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 |
| 625 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 626 | typedef punt_redirect |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 627 | { |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 628 | vl_api_interface_index_t rx_sw_if_index; |
| 629 | vl_api_interface_index_t tx_sw_if_index; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 630 | vl_api_address_t nh; |
| 631 | }; |
| 632 | |
| 633 | /** \brief IP punt redirect |
| 634 | @param client_index - opaque cookie to identify the sender |
| 635 | @param context - sender context, to match reply w/ request |
| 636 | @param punt - punt definition |
| 637 | @param is_add - 1 to add neighbor, 0 to delete |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 638 | */ |
| 639 | autoreply define ip_punt_redirect |
| 640 | { |
Nathan Skrzypczak | 2a1783f | 2021-08-10 15:05:29 +0200 | [diff] [blame] | 641 | option deprecated; |
Ondrej Fabry | 755e3aa | 2023-04-13 08:55:28 +0200 | [diff] [blame] | 642 | |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 643 | u32 client_index; |
| 644 | u32 context; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 645 | vl_api_punt_redirect_t punt; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 646 | bool is_add [default=true]; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 647 | }; |
| 648 | |
| 649 | define ip_punt_redirect_dump |
| 650 | { |
Ondrej Fabry | 755e3aa | 2023-04-13 08:55:28 +0200 | [diff] [blame] | 651 | option deprecated; |
| 652 | |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 653 | u32 client_index; |
| 654 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 655 | vl_api_interface_index_t sw_if_index; |
| 656 | bool is_ipv6; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 657 | }; |
| 658 | |
| 659 | define ip_punt_redirect_details |
| 660 | { |
Ondrej Fabry | 755e3aa | 2023-04-13 08:55:28 +0200 | [diff] [blame] | 661 | option deprecated; |
| 662 | |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 663 | u32 context; |
| 664 | vl_api_punt_redirect_t punt; |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 665 | }; |
| 666 | |
Nathan Skrzypczak | 2a1783f | 2021-08-10 15:05:29 +0200 | [diff] [blame] | 667 | /** \brief Punt redirect type |
| 668 | @param rx_sw_if_index - specify the original RX interface of traffic |
| 669 | that should be redirected. ~0 means any interface. |
| 670 | @param af - Address family (ip4 or ip6) |
| 671 | @param paths - the TX paths to which traffic should be redirected. |
| 672 | */ |
| 673 | typedef punt_redirect_v2 |
| 674 | { |
| 675 | vl_api_interface_index_t rx_sw_if_index [default=0xffffffff]; |
| 676 | vl_api_address_family_t af; |
| 677 | u32 n_paths; |
| 678 | vl_api_fib_path_t paths[n_paths]; |
| 679 | }; |
| 680 | |
| 681 | /** \brief Add IP punt redirect rule |
| 682 | @param client_index - opaque cookie to identify the sender |
| 683 | @param context - sender context, to match reply w/ request |
| 684 | @param punt - punt definition |
| 685 | @param is_add - 1 to add punt_redirect rule, 0 to delete |
| 686 | */ |
| 687 | autoreply define add_del_ip_punt_redirect_v2 |
| 688 | { |
| 689 | u32 client_index; |
| 690 | u32 context; |
| 691 | bool is_add [default=true]; |
| 692 | vl_api_punt_redirect_v2_t punt; |
| 693 | }; |
| 694 | |
| 695 | define ip_punt_redirect_v2_dump |
| 696 | { |
| 697 | u32 client_index; |
| 698 | u32 context; |
| 699 | vl_api_interface_index_t sw_if_index; |
| 700 | vl_api_address_family_t af; |
| 701 | }; |
| 702 | |
| 703 | define ip_punt_redirect_v2_details |
| 704 | { |
| 705 | u32 context; |
| 706 | vl_api_punt_redirect_v2_t punt; |
| 707 | }; |
| 708 | |
Florin Coras | 595992c | 2017-11-06 17:17:08 -0800 | [diff] [blame] | 709 | autoreply define ip_container_proxy_add_del |
| 710 | { |
| 711 | u32 client_index; |
| 712 | u32 context; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 713 | vl_api_prefix_t pfx; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 714 | vl_api_interface_index_t sw_if_index; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 715 | bool is_add [default=true]; |
Florin Coras | 595992c | 2017-11-06 17:17:08 -0800 | [diff] [blame] | 716 | }; |
| 717 | |
Matus Fabian | 75b9f45 | 2018-10-02 23:27:21 -0700 | [diff] [blame] | 718 | define ip_container_proxy_dump |
| 719 | { |
| 720 | u32 client_index; |
| 721 | u32 context; |
| 722 | }; |
| 723 | |
| 724 | define ip_container_proxy_details |
| 725 | { |
| 726 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 727 | vl_api_interface_index_t sw_if_index; |
Matus Fabian | 75b9f45 | 2018-10-02 23:27:21 -0700 | [diff] [blame] | 728 | vl_api_prefix_t prefix; |
| 729 | }; |
| 730 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 731 | /** \brief Configure IP source and L4 port-range check |
| 732 | @param client_index - opaque cookie to identify the sender |
| 733 | @param context - sender context, to match reply w/ request |
| 734 | @param is_ip6 - 1 if source address type is IPv6 |
| 735 | @param is_add - 1 if add, 0 if delete |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 736 | @param ip - prefix to match |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 737 | @param number_of_ranges - length of low_port and high_port arrays (must match) |
| 738 | @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry) |
| 739 | @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry) |
| 740 | @param vrf_id - fib table/vrf id to associate the source and port-range check with |
| 741 | @note To specify a single port set low_port and high_port entry the same |
| 742 | */ |
| 743 | autoreply define ip_source_and_port_range_check_add_del |
| 744 | { |
| 745 | u32 client_index; |
| 746 | u32 context; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 747 | bool is_add [default=true]; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 748 | vl_api_prefix_t prefix; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 749 | u8 number_of_ranges; |
| 750 | u16 low_ports[32]; |
| 751 | u16 high_ports[32]; |
| 752 | u32 vrf_id; |
| 753 | }; |
| 754 | |
| 755 | /** \brief Set interface source and L4 port-range request |
| 756 | @param client_index - opaque cookie to identify the sender |
| 757 | @param context - sender context, to match reply w/ request |
| 758 | @param interface_id - interface index |
| 759 | @param tcp_vrf_id - VRF associated with source and TCP port-range check |
| 760 | @param udp_vrf_id - VRF associated with source and TCP port-range check |
| 761 | */ |
| 762 | autoreply define ip_source_and_port_range_check_interface_add_del |
| 763 | { |
| 764 | u32 client_index; |
| 765 | u32 context; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 766 | bool is_add [default=true]; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 767 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 768 | u32 tcp_in_vrf_id; |
| 769 | u32 tcp_out_vrf_id; |
| 770 | u32 udp_in_vrf_id; |
| 771 | u32 udp_out_vrf_id; |
| 772 | }; |
| 773 | |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 774 | /** \brief IPv6 set link local address on interface request |
John Lo | 7f358b3 | 2018-04-28 01:19:24 -0400 | [diff] [blame] | 775 | @param client_index - opaque cookie to identify the sender |
| 776 | @param context - sender context, to match reply w/ request |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 777 | @param sw_if_index - interface to set link local on |
| 778 | @param ip - the new link local address |
John Lo | 7f358b3 | 2018-04-28 01:19:24 -0400 | [diff] [blame] | 779 | */ |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 780 | autoreply define sw_interface_ip6_set_link_local_address |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 781 | { |
| 782 | u32 client_index; |
| 783 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 784 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 785 | vl_api_ip6_address_t ip; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 786 | }; |
| 787 | |
BenoƮt Ganne | 58a1915 | 2021-01-18 19:24:34 +0100 | [diff] [blame] | 788 | /** \brief IPv6 get link local address on interface request |
| 789 | @param client_index - opaque cookie to identify the sender |
| 790 | @param context - sender context, to match reply w/ request |
| 791 | @param sw_if_index - interface to set link local on |
| 792 | */ |
| 793 | define sw_interface_ip6_get_link_local_address |
| 794 | { |
| 795 | u32 client_index; |
| 796 | u32 context; |
| 797 | vl_api_interface_index_t sw_if_index; |
| 798 | }; |
| 799 | |
| 800 | /** \brief IPv6 link local address detail |
| 801 | @param context - sender context, to match reply w/ request |
| 802 | @param ip - the link local address |
| 803 | */ |
| 804 | define sw_interface_ip6_get_link_local_address_reply |
| 805 | { |
| 806 | u32 context; |
| 807 | i32 retval; |
| 808 | vl_api_ip6_address_t ip; |
| 809 | }; |
| 810 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 811 | /** \brief IOAM enable : Enable in-band OAM |
| 812 | @param id - profile id |
| 813 | @param seqno - To enable Seqno Processing |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 814 | @param analyse - Enabling analysis of iOAM at decap node |
| 815 | @param pow_enable - Proof of Work enabled or not flag |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 816 | @param trace_enable - iOAM Trace enabled or not flag |
| 817 | */ |
| 818 | autoreply define ioam_enable |
| 819 | { |
| 820 | u32 client_index; |
| 821 | u32 context; |
| 822 | u16 id; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 823 | bool seqno; |
| 824 | bool analyse; |
| 825 | bool pot_enable; |
| 826 | bool trace_enable; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 827 | u32 node_id; |
| 828 | }; |
| 829 | |
| 830 | /** \brief iOAM disable |
| 831 | @param client_index - opaque cookie to identify the sender |
| 832 | @param context - sender context, to match reply w/ request |
| 833 | @param index - MAP Domain index |
| 834 | */ |
| 835 | autoreply define ioam_disable |
| 836 | { |
| 837 | u32 client_index; |
| 838 | u32 context; |
| 839 | u16 id; |
| 840 | }; |
| 841 | |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 842 | enum ip_reass_type |
| 843 | { |
| 844 | IP_REASS_TYPE_FULL = 0, |
| 845 | IP_REASS_TYPE_SHALLOW_VIRTUAL = 0x1, |
| 846 | }; |
| 847 | |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 848 | autoreply define ip_reassembly_set |
| 849 | { |
| 850 | u32 client_index; |
| 851 | u32 context; |
| 852 | u32 timeout_ms; |
| 853 | u32 max_reassemblies; |
Klement Sekera | 3a343d4 | 2019-05-16 14:35:46 +0200 | [diff] [blame] | 854 | u32 max_reassembly_length; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 855 | u32 expire_walk_interval_ms; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 856 | bool is_ip6; |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 857 | vl_api_ip_reass_type_t type; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 858 | }; |
| 859 | |
| 860 | define ip_reassembly_get |
| 861 | { |
| 862 | u32 client_index; |
| 863 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 864 | bool is_ip6; |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 865 | vl_api_ip_reass_type_t type; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 866 | }; |
| 867 | |
| 868 | define ip_reassembly_get_reply |
| 869 | { |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 870 | u32 context; |
| 871 | i32 retval; |
| 872 | u32 timeout_ms; |
| 873 | u32 max_reassemblies; |
Klement Sekera | 3a343d4 | 2019-05-16 14:35:46 +0200 | [diff] [blame] | 874 | u32 max_reassembly_length; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 875 | u32 expire_walk_interval_ms; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 876 | bool is_ip6; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 877 | }; |
| 878 | |
Klement Sekera | 4c53313 | 2018-02-22 11:41:12 +0100 | [diff] [blame] | 879 | /** \brief Enable/disable reassembly feature |
| 880 | @param client_index - opaque cookie to identify the sender |
| 881 | @param context - sender context, to match reply w/ request |
| 882 | @param sw_if_index - interface to enable/disable feature on |
| 883 | @param enable_ip4 - enable ip4 reassembly if non-zero, disable if 0 |
| 884 | @param enable_ip6 - enable ip6 reassembly if non-zero, disable if 0 |
| 885 | */ |
| 886 | autoreply define ip_reassembly_enable_disable |
| 887 | { |
| 888 | u32 client_index; |
| 889 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 890 | vl_api_interface_index_t sw_if_index; |
| 891 | bool enable_ip4; |
| 892 | bool enable_ip6; |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 893 | vl_api_ip_reass_type_t type; |
Klement Sekera | 4c53313 | 2018-02-22 11:41:12 +0100 | [diff] [blame] | 894 | }; |
| 895 | |
Klement Sekera | 01c1fa4 | 2021-12-14 18:25:11 +0000 | [diff] [blame] | 896 | /** enable/disable full reassembly of packets aimed at our addresses */ |
| 897 | autoreply define ip_local_reass_enable_disable |
| 898 | { |
| 899 | u32 client_index; |
| 900 | u32 context; |
| 901 | bool enable_ip4; |
| 902 | bool enable_ip6; |
| 903 | }; |
| 904 | |
| 905 | /** get status of local reassembly */ |
| 906 | define ip_local_reass_get |
| 907 | { |
| 908 | u32 client_index; |
| 909 | u32 context; |
| 910 | }; |
| 911 | |
| 912 | define ip_local_reass_get_reply |
| 913 | { |
| 914 | u32 context; |
| 915 | i32 retval; |
| 916 | bool ip4_is_enabled; |
| 917 | bool ip6_is_enabled; |
| 918 | }; |
| 919 | |
Neale Ranns | 8f5fef2 | 2020-12-21 08:29:34 +0000 | [diff] [blame] | 920 | /** |
| 921 | @brief Set a Path MTU value. i.e. a MTU value for a given neighbour. |
| 922 | The neighbour can be described as attached (w/ interface and next-hop) |
| 923 | or remote (w/ table_id and next-hop); |
| 924 | @param client_index - opaque cookie to identify the sender |
| 925 | @param context - sender context, to match reply w/ request |
| 926 | @param table_id - table-ID for next-hop |
| 927 | @param nh - Next hop |
| 928 | @param path_mtu - value to set, 0 is disable. |
| 929 | */ |
| 930 | typedef ip_path_mtu |
| 931 | { |
| 932 | u32 client_index; |
| 933 | u32 context; |
| 934 | u32 table_id; |
| 935 | vl_api_address_t nh; |
| 936 | u16 path_mtu; |
| 937 | }; |
| 938 | autoreply define ip_path_mtu_update |
| 939 | { |
| 940 | u32 client_index; |
| 941 | u32 context; |
| 942 | vl_api_ip_path_mtu_t pmtu; |
| 943 | }; |
| 944 | define ip_path_mtu_get |
| 945 | { |
| 946 | u32 client_index; |
| 947 | u32 context; |
| 948 | u32 cursor; |
| 949 | }; |
| 950 | define ip_path_mtu_get_reply |
| 951 | { |
| 952 | u32 context; |
| 953 | i32 retval; |
| 954 | u32 cursor; |
| 955 | }; |
| 956 | define ip_path_mtu_details |
| 957 | { |
| 958 | u32 context; |
| 959 | vl_api_ip_path_mtu_t pmtu; |
| 960 | }; |
| 961 | service { |
| 962 | rpc ip_path_mtu_get returns ip_path_mtu_get_reply |
| 963 | stream ip_path_mtu_details; |
| 964 | }; |
| 965 | |
| 966 | autoreply define ip_path_mtu_replace_begin |
| 967 | { |
| 968 | u32 client_index; |
| 969 | u32 context; |
| 970 | }; |
| 971 | autoreply define ip_path_mtu_replace_end |
| 972 | { |
| 973 | u32 client_index; |
| 974 | u32 context; |
| 975 | }; |
| 976 | |
Neale Ranns | e22a704 | 2022-08-09 03:03:29 +0000 | [diff] [blame] | 977 | counters ip_frag { |
| 978 | none { |
| 979 | severity info; |
| 980 | type counter64; |
| 981 | units "packets"; |
| 982 | description "packet fragmented"; |
| 983 | }; |
| 984 | small_packet { |
| 985 | severity error; |
| 986 | type counter64; |
| 987 | units "packets"; |
| 988 | description "packet smaller than MTU"; |
| 989 | }; |
| 990 | fragment_sent { |
| 991 | severity info; |
| 992 | type counter64; |
| 993 | units "packets"; |
| 994 | description "number of sent fragments"; |
| 995 | }; |
| 996 | cant_fragment_header { |
| 997 | severity error; |
| 998 | type counter64; |
| 999 | units "packets"; |
| 1000 | description "can't fragment header"; |
| 1001 | }; |
| 1002 | dont_fragment_set { |
| 1003 | severity error; |
| 1004 | type counter64; |
| 1005 | units "packets"; |
| 1006 | description "can't fragment this packet"; |
| 1007 | }; |
| 1008 | malformed { |
| 1009 | severity error; |
| 1010 | type counter64; |
| 1011 | units "packets"; |
| 1012 | description "malformed packet"; |
| 1013 | }; |
| 1014 | memory { |
| 1015 | severity error; |
| 1016 | type counter64; |
| 1017 | units "packets"; |
| 1018 | description "could not allocate buffer"; |
| 1019 | }; |
| 1020 | unknown { |
| 1021 | severity error; |
| 1022 | type counter64; |
| 1023 | units "packets"; |
| 1024 | description "unknown error"; |
| 1025 | }; |
| 1026 | }; |
| 1027 | |
| 1028 | counters ip4 { |
| 1029 | /* Must be first. */ |
| 1030 | none { |
| 1031 | severity info; |
| 1032 | type counter64; |
| 1033 | units "packets"; |
| 1034 | description "valid ip4 packets"; |
| 1035 | }; |
| 1036 | |
| 1037 | /* Errors signalled by ip4-input */ |
| 1038 | too_short { |
| 1039 | severity error; |
| 1040 | type counter64; |
| 1041 | units "packets"; |
| 1042 | description "ip4 length < 20 bytes"; |
| 1043 | }; |
| 1044 | bad_length { |
| 1045 | severity error; |
| 1046 | type counter64; |
| 1047 | units "packets"; |
| 1048 | description "ip4 length > l2 length"; |
| 1049 | }; |
| 1050 | bad_checksum { |
| 1051 | severity error; |
| 1052 | type counter64; |
| 1053 | units "packets"; |
| 1054 | description "bad ip4 checksum"; |
| 1055 | }; |
| 1056 | version { |
| 1057 | severity error; |
| 1058 | type counter64; |
| 1059 | units "packets"; |
| 1060 | description "ip4 version != 4"; |
| 1061 | }; |
| 1062 | options { |
| 1063 | severity info; |
| 1064 | type counter64; |
| 1065 | units "packets"; |
| 1066 | description "ip4 options present"; |
| 1067 | }; |
| 1068 | fragment_offset_one { |
| 1069 | severity error; |
| 1070 | type counter64; |
| 1071 | units "packets"; |
| 1072 | description "ip4 fragment offset == 1"; |
| 1073 | }; |
| 1074 | time_expired { |
| 1075 | severity error; |
| 1076 | type counter64; |
| 1077 | units "packets"; |
| 1078 | description "ip4 ttl <= 1"; |
| 1079 | }; |
Dmitry Valter | d925246 | 2022-09-16 12:33:25 +0000 | [diff] [blame] | 1080 | hdr_too_short { |
| 1081 | severity error; |
| 1082 | type counter64; |
| 1083 | units "packets"; |
| 1084 | description "ip4 IHL < 5"; |
| 1085 | }; |
Neale Ranns | e22a704 | 2022-08-09 03:03:29 +0000 | [diff] [blame] | 1086 | |
| 1087 | /* Errors signalled by ip4-rewrite. */ |
| 1088 | mtu_exceeded { |
| 1089 | severity error; |
| 1090 | type counter64; |
| 1091 | units "packets"; |
| 1092 | description "ip4 MTU exceeded and DF set"; |
| 1093 | }; |
| 1094 | dst_lookup_miss { |
| 1095 | severity error; |
| 1096 | type counter64; |
| 1097 | units "packets"; |
| 1098 | description "ip4 destination lookup miss"; |
| 1099 | }; |
| 1100 | src_lookup_miss { |
| 1101 | severity error; |
| 1102 | type counter64; |
| 1103 | units "packets"; |
| 1104 | description "ip4 source lookup miss"; |
| 1105 | }; |
| 1106 | drop { |
| 1107 | severity error; |
| 1108 | type counter64; |
| 1109 | units "packets"; |
| 1110 | description "ip4 drop"; |
| 1111 | }; |
| 1112 | punt { |
| 1113 | severity error; |
| 1114 | type counter64; |
| 1115 | units "packets"; |
| 1116 | description "ip4 punt"; |
| 1117 | }; |
| 1118 | same_interface { |
| 1119 | severity error; |
| 1120 | type counter64; |
| 1121 | units "packets"; |
| 1122 | description "ip4 egress interface same as ingress"; |
| 1123 | }; |
| 1124 | |
| 1125 | /* errors signalled by ip4-local. */ |
| 1126 | unknown_protocol { |
| 1127 | severity error; |
| 1128 | type counter64; |
| 1129 | units "packets"; |
| 1130 | description "unknown ip protocol"; |
| 1131 | }; |
| 1132 | tcp_checksum { |
| 1133 | severity error; |
| 1134 | type counter64; |
| 1135 | units "packets"; |
| 1136 | description "bad tcp checksum"; |
| 1137 | }; |
| 1138 | udp_checksum { |
| 1139 | severity error; |
| 1140 | type counter64; |
| 1141 | units "packets"; |
| 1142 | description "bad udp checksum"; |
| 1143 | }; |
| 1144 | udp_length { |
| 1145 | severity error; |
| 1146 | type counter64; |
| 1147 | units "packets"; |
| 1148 | description "inconsistent udp/ip lengths"; |
| 1149 | }; |
| 1150 | |
| 1151 | /* spoofed packets in ip4-rewrite-local */ |
| 1152 | spoofed_local_packets { |
| 1153 | severity error; |
| 1154 | type counter64; |
| 1155 | units "packets"; |
| 1156 | description "ip4 spoofed local-address packet drops"; |
| 1157 | }; |
| 1158 | |
| 1159 | /* Errors signalled by ip4-inacl */ |
| 1160 | inacl_table_miss { |
| 1161 | severity error; |
| 1162 | type counter64; |
| 1163 | units "packets"; |
| 1164 | description "input ACL table-miss drops"; |
| 1165 | }; |
| 1166 | inacl_session_deny { |
| 1167 | severity error; |
| 1168 | type counter64; |
| 1169 | units "packets"; |
| 1170 | description "input ACL session deny drops"; |
| 1171 | }; |
| 1172 | |
| 1173 | /* Errors singalled by ip4-outacl */ |
| 1174 | outacl_table_miss { |
| 1175 | severity error; |
| 1176 | type counter64; |
| 1177 | units "packets"; |
| 1178 | description "output ACL table-miss drops"; |
| 1179 | }; |
| 1180 | outacl_session_deny { |
| 1181 | severity error; |
| 1182 | type counter64; |
| 1183 | units "packets"; |
| 1184 | description "output ACL session deny drops"; |
| 1185 | }; |
| 1186 | |
| 1187 | /* Errors from mfib-forward */ |
| 1188 | rpf_failure { |
| 1189 | severity error; |
| 1190 | type counter64; |
| 1191 | units "packets"; |
| 1192 | description "Multicast RPF check failed"; |
| 1193 | }; |
| 1194 | |
| 1195 | /* Errors signalled by ip4-reassembly */ |
| 1196 | reass_duplicate_fragment { |
| 1197 | severity error; |
| 1198 | type counter64; |
| 1199 | units "packets"; |
| 1200 | description "duplicate/overlapping fragments"; |
| 1201 | }; |
| 1202 | reass_limit_reached { |
| 1203 | severity error; |
| 1204 | type counter64; |
| 1205 | units "packets"; |
| 1206 | description "drops due to concurrent reassemblies limit"; |
| 1207 | }; |
| 1208 | reass_fragment_chain_too_long { |
| 1209 | severity error; |
| 1210 | type counter64; |
| 1211 | units "packets"; |
| 1212 | description "fragment chain too long (drop)"; |
| 1213 | }; |
| 1214 | reass_no_buf { |
| 1215 | severity error; |
| 1216 | type counter64; |
| 1217 | units "packets"; |
| 1218 | description "out of buffers (drop)"; |
| 1219 | }; |
| 1220 | reass_malformed_packet { |
| 1221 | severity error; |
| 1222 | type counter64; |
| 1223 | units "packets"; |
| 1224 | description "malformed packets"; |
| 1225 | }; |
| 1226 | reass_internal_error { |
| 1227 | severity error; |
| 1228 | type counter64; |
| 1229 | units "packets"; |
| 1230 | description "drops due to internal reassembly error"; |
| 1231 | }; |
| 1232 | reass_timeout { |
| 1233 | severity error; |
| 1234 | type counter64; |
| 1235 | units "packets"; |
| 1236 | description "fragments dropped due to reassembly timeout"; |
| 1237 | }; |
| 1238 | reass_to_custom_app { |
| 1239 | severity error; |
| 1240 | type counter64; |
| 1241 | units "packets"; |
| 1242 | description "send to custom drop app"; |
| 1243 | }; |
| 1244 | reass_success { |
| 1245 | severity info; |
| 1246 | type counter64; |
| 1247 | units "packets"; |
| 1248 | description "successful reassemblies"; |
| 1249 | }; |
| 1250 | reass_fragments_reassembled { |
| 1251 | severity info; |
| 1252 | type counter64; |
| 1253 | units "packets"; |
| 1254 | description "fragments reassembled"; |
| 1255 | }; |
| 1256 | reass_fragments_rcvd { |
| 1257 | severity info; |
| 1258 | type counter64; |
| 1259 | units "packets"; |
| 1260 | description "fragments received"; |
| 1261 | }; |
| 1262 | reass_unsupp_ip_prot { |
| 1263 | severity error; |
| 1264 | type counter64; |
| 1265 | units "packets"; |
| 1266 | description "unsupported ip protocol"; |
| 1267 | }; |
| 1268 | }; |
| 1269 | |
| 1270 | /** |
| 1271 | * IPv6 Error/info counters |
| 1272 | */ |
| 1273 | counters ip6 { |
| 1274 | /* Must be first. */ |
| 1275 | none { |
| 1276 | severity info; |
| 1277 | type counter64; |
| 1278 | units "packets"; |
| 1279 | description "valid ip6 packets"; |
| 1280 | }; |
| 1281 | |
| 1282 | /* Errors signalled by ip6-input */ |
| 1283 | too_short { |
| 1284 | severity error; |
| 1285 | type counter64; |
| 1286 | units "packets"; |
| 1287 | description "ip6 length < 40 bytes"; |
| 1288 | }; |
| 1289 | bad_length { |
| 1290 | severity error; |
| 1291 | type counter64; |
| 1292 | units "packets"; |
| 1293 | description "ip6 length > l2 length"; |
| 1294 | }; |
| 1295 | version { |
| 1296 | severity error; |
| 1297 | type counter64; |
| 1298 | units "packets"; |
| 1299 | description "ip6 version != 6"; |
| 1300 | }; |
| 1301 | time_expired { |
| 1302 | severity error; |
| 1303 | type counter64; |
| 1304 | units "packets"; |
| 1305 | description "ip6 ttl <= 1"; |
| 1306 | }; |
| 1307 | |
| 1308 | /* Errors signalled by ip6-rewrite. */ |
| 1309 | mtu_exceeded { |
| 1310 | severity error; |
| 1311 | type counter64; |
| 1312 | units "packets"; |
| 1313 | description "ip6 MTU exceeded"; |
| 1314 | }; |
| 1315 | dst_lookup_miss { |
| 1316 | severity error; |
| 1317 | type counter64; |
| 1318 | units "packets"; |
| 1319 | description "ip6 destination lookup miss"; |
| 1320 | }; |
| 1321 | src_lookup_miss { |
| 1322 | severity error; |
| 1323 | type counter64; |
| 1324 | units "packets"; |
| 1325 | description "ip6 source lookup miss"; |
| 1326 | }; |
| 1327 | drop { |
| 1328 | severity error; |
| 1329 | type counter64; |
| 1330 | units "packets"; |
| 1331 | description "ip6 drop"; |
| 1332 | }; |
| 1333 | punt { |
| 1334 | severity error; |
| 1335 | type counter64; |
| 1336 | units "packets"; |
| 1337 | description "ip6 punt"; |
| 1338 | }; |
| 1339 | |
| 1340 | /* errors signalled by ip6-local. */ |
| 1341 | unknown_protocol { |
| 1342 | severity error; |
| 1343 | type counter64; |
| 1344 | units "packets"; |
| 1345 | description "unknown ip protocol"; |
| 1346 | }; |
| 1347 | udp_checksum { |
| 1348 | severity error; |
| 1349 | type counter64; |
| 1350 | units "packets"; |
| 1351 | description "bad udp checksum"; |
| 1352 | }; |
| 1353 | icmp_checksum { |
| 1354 | severity error; |
| 1355 | type counter64; |
| 1356 | units "packets"; |
| 1357 | description "bad icmp checksum"; |
| 1358 | }; |
| 1359 | udp_length { |
| 1360 | severity error; |
| 1361 | type counter64; |
| 1362 | units "packets"; |
| 1363 | description "inconsistent udp/ip lengths"; |
| 1364 | }; |
| 1365 | /* Errors signalled by udp6-lookup. */ |
| 1366 | unknown_udp_port { |
| 1367 | severity error; |
| 1368 | type counter64; |
| 1369 | units "packets"; |
| 1370 | description "no listener for udp port"; |
| 1371 | }; |
| 1372 | |
| 1373 | /* spoofed packets in ip6-rewrite-local */ |
| 1374 | spoofed_local_packets { |
| 1375 | severity error; |
| 1376 | type counter64; |
| 1377 | units "packets"; |
| 1378 | description "ip6 spoofed local-address packet drops"; |
| 1379 | }; |
| 1380 | |
| 1381 | /* Errors signalled by ip6-inacl */ |
| 1382 | inacl_table_miss { |
| 1383 | severity error; |
| 1384 | type counter64; |
| 1385 | units "packets"; |
| 1386 | description "input ACL table-miss drops"; |
| 1387 | }; |
| 1388 | inacl_session_deny { |
| 1389 | severity error; |
| 1390 | type counter64; |
| 1391 | units "packets"; |
| 1392 | description "input ACL session deny drops"; |
| 1393 | }; |
| 1394 | |
| 1395 | /* Errors singalled by ip6-outacl */ |
| 1396 | outacl_table_miss { |
| 1397 | severity error; |
| 1398 | type counter64; |
| 1399 | units "packets"; |
| 1400 | description "output ACL table-miss drops"; |
| 1401 | }; |
| 1402 | outacl_session_deny { |
| 1403 | severity error; |
| 1404 | type counter64; |
| 1405 | units "packets"; |
| 1406 | description "output ACL session deny drops"; |
| 1407 | }; |
| 1408 | |
| 1409 | /* Errors from mfib-forward */ |
| 1410 | rpf_failure { |
| 1411 | severity error; |
| 1412 | type counter64; |
| 1413 | units "packets"; |
| 1414 | description "Multicast RPF check failed"; |
| 1415 | }; |
| 1416 | |
| 1417 | /* Errors signalled by ip6-reassembly */ |
| 1418 | reass_missing_upper { |
| 1419 | severity error; |
| 1420 | type counter64; |
| 1421 | units "packets"; |
| 1422 | description "missing-upper layer drops"; |
| 1423 | }; |
| 1424 | reass_duplicate_fragment { |
| 1425 | severity error; |
| 1426 | type counter64; |
| 1427 | units "packets"; |
| 1428 | description "duplicate fragments"; |
| 1429 | }; |
| 1430 | reass_overlapping_fragment { |
| 1431 | severity error; |
| 1432 | type counter64; |
| 1433 | units "packets"; |
| 1434 | description "overlapping fragments"; |
| 1435 | }; |
| 1436 | reass_limit_reached { |
| 1437 | severity error; |
| 1438 | type counter64; |
| 1439 | units "packets"; |
| 1440 | description "drops due to concurrent reassemblies limit"; |
| 1441 | }; |
| 1442 | reass_fragment_chain_too_long { |
| 1443 | severity error; |
| 1444 | type counter64; |
| 1445 | units "packets"; |
| 1446 | description "fragment chain too long (drop)"; |
| 1447 | }; |
| 1448 | reass_no_buf { |
| 1449 | severity error; |
| 1450 | type counter64; |
| 1451 | units "packets"; |
| 1452 | description "out of buffers (drop)"; |
| 1453 | }; |
| 1454 | reass_timeout { |
| 1455 | severity error; |
| 1456 | type counter64; |
| 1457 | units "packets"; |
| 1458 | description "fragments dropped due to reassembly timeout"; |
| 1459 | }; |
| 1460 | reass_internal_error { |
| 1461 | severity error; |
| 1462 | type counter64; |
| 1463 | units "packets"; |
| 1464 | description "drops due to internal reassembly error"; |
| 1465 | }; |
| 1466 | reass_invalid_frag_len { |
| 1467 | severity error; |
| 1468 | type counter64; |
| 1469 | units "packets"; |
| 1470 | description "invalid fragment length"; |
| 1471 | }; |
| 1472 | reass_to_custom_app { |
| 1473 | severity error; |
| 1474 | type counter64; |
| 1475 | units "packets"; |
| 1476 | description "send to custom drop app"; |
| 1477 | }; |
| 1478 | reass_no_frag_hdr { |
| 1479 | severity error; |
| 1480 | type counter64; |
| 1481 | units "packets"; |
| 1482 | description "no fragmentation header"; |
| 1483 | }; |
| 1484 | reass_invalid_frag_size { |
| 1485 | severity error; |
| 1486 | type counter64; |
| 1487 | units "packets"; |
| 1488 | description "drop due to invalid fragment size"; |
| 1489 | }; |
| 1490 | reass_success { |
| 1491 | severity info; |
| 1492 | type counter64; |
| 1493 | units "packets"; |
| 1494 | description "successful reassemblies"; |
| 1495 | }; |
| 1496 | reass_fragments_reassembled { |
| 1497 | severity info; |
| 1498 | type counter64; |
| 1499 | units "packets"; |
| 1500 | description "fragments reassembled"; |
| 1501 | }; |
| 1502 | reass_fragments_rcvd { |
| 1503 | severity info; |
| 1504 | type counter64; |
| 1505 | units "packets"; |
| 1506 | description "fragments received"; |
| 1507 | }; |
| 1508 | reass_unsupp_ip_proto { |
| 1509 | severity error; |
| 1510 | type counter64; |
| 1511 | units "packets"; |
| 1512 | description "unsupported ip protocol"; |
| 1513 | }; |
| 1514 | }; |
| 1515 | |
Neale Ranns | b29c606 | 2022-08-12 01:50:24 +0000 | [diff] [blame] | 1516 | counters icmp4 { |
| 1517 | none { |
| 1518 | severity info; |
| 1519 | type counter64; |
| 1520 | units "packets"; |
| 1521 | description "valid packets"; |
| 1522 | }; |
| 1523 | unknown_type { |
| 1524 | severity error; |
| 1525 | type counter64; |
| 1526 | units "packets"; |
| 1527 | description "unknown type"; |
| 1528 | }; |
| 1529 | invalid_code_for_type { |
| 1530 | severity error; |
| 1531 | type counter64; |
| 1532 | units "packets"; |
| 1533 | description "invalid code for type"; |
| 1534 | }; |
| 1535 | invalid_hop_limit_for_type { |
| 1536 | severity error; |
| 1537 | type counter64; |
| 1538 | units "packets"; |
| 1539 | description "hop_limit != 255"; |
| 1540 | }; |
| 1541 | length_too_small_for_type { |
| 1542 | severity error; |
| 1543 | type counter64; |
| 1544 | units "packets"; |
| 1545 | description "payload length too small for type"; |
| 1546 | }; |
| 1547 | options_with_odd_length { |
| 1548 | severity error; |
| 1549 | type counter64; |
| 1550 | units "packets"; |
| 1551 | description "total option length not multiple of 8 bytes"; |
| 1552 | }; |
| 1553 | option_with_zero_length { |
| 1554 | severity error; |
| 1555 | type counter64; |
| 1556 | units "packets"; |
| 1557 | description "option has zero length"; |
| 1558 | }; |
| 1559 | echo_replies_sent { |
| 1560 | severity info; |
| 1561 | type counter64; |
| 1562 | units "packets"; |
| 1563 | description "echo replies sent"; |
| 1564 | }; |
| 1565 | dst_lookup_miss { |
| 1566 | severity error; |
| 1567 | type counter64; |
| 1568 | units "packets"; |
| 1569 | description "icmp6 dst address lookup misses"; |
| 1570 | }; |
| 1571 | dest_unreach_sent { |
| 1572 | severity info; |
| 1573 | type counter64; |
| 1574 | units "packets"; |
| 1575 | description "destination unreachable response sent"; |
| 1576 | }; |
| 1577 | ttl_expire_sent { |
| 1578 | severity info; |
| 1579 | type counter64; |
| 1580 | units "packets"; |
| 1581 | description "hop limit exceeded response sent"; |
| 1582 | }; |
| 1583 | param_problem_sent { |
| 1584 | severity info; |
| 1585 | type counter64; |
| 1586 | units "packets"; |
| 1587 | description "parameter problem response sent"; |
| 1588 | }; |
| 1589 | drop { |
| 1590 | severity error; |
| 1591 | type counter64; |
| 1592 | units "packets"; |
| 1593 | description "error message dropped"; |
| 1594 | }; |
| 1595 | }; |
| 1596 | |
| 1597 | counters icmp6 { |
| 1598 | none { |
| 1599 | severity info; |
| 1600 | type counter64; |
| 1601 | units "packets"; |
| 1602 | description "valid packets"; |
| 1603 | }; |
| 1604 | unknown_type { |
| 1605 | severity error; |
| 1606 | type counter64; |
| 1607 | units "packets"; |
| 1608 | description "unknown type"; |
| 1609 | }; |
| 1610 | invalid_code_for_type { |
| 1611 | severity error; |
| 1612 | type counter64; |
| 1613 | units "packets"; |
| 1614 | description "invalid code for type"; |
| 1615 | }; |
| 1616 | invalid_hop_limit_for_type { |
| 1617 | severity error; |
| 1618 | type counter64; |
| 1619 | units "packets"; |
| 1620 | description "hop_limit != 255"; |
| 1621 | }; |
| 1622 | length_too_small_for_type { |
| 1623 | severity error; |
| 1624 | type counter64; |
| 1625 | units "packets"; |
| 1626 | description "payload length too small for type"; |
| 1627 | }; |
| 1628 | options_with_odd_length { |
| 1629 | severity error; |
| 1630 | type counter64; |
| 1631 | units "packets"; |
| 1632 | description "total option length not multiple of 8 bytes"; |
| 1633 | }; |
| 1634 | option_with_zero_length { |
| 1635 | severity error; |
| 1636 | type counter64; |
| 1637 | units "packets"; |
| 1638 | description "option has zero length"; |
| 1639 | }; |
| 1640 | echo_replies_sent { |
| 1641 | severity info; |
| 1642 | type counter64; |
| 1643 | units "packets"; |
| 1644 | description "echo replies sent"; |
| 1645 | }; |
| 1646 | neighbor_solicitation_source_not_on_link { |
| 1647 | severity error; |
| 1648 | type counter64; |
| 1649 | units "packets"; |
| 1650 | description "neighbor solicitations from source not on link"; |
| 1651 | }; |
| 1652 | neighbor_solicitation_source_unknown { |
| 1653 | severity error; |
| 1654 | type counter64; |
| 1655 | units "packets"; |
| 1656 | description "neighbor solicitations for unknown targets"; |
| 1657 | }; |
| 1658 | neighbor_advertisements_tx { |
| 1659 | severity info; |
| 1660 | type counter64; |
| 1661 | units "packets"; |
| 1662 | description "neighbor advertisements sent"; |
| 1663 | }; |
| 1664 | neighbor_advertisements_rx { |
| 1665 | severity info; |
| 1666 | type counter64; |
| 1667 | units "packets"; |
| 1668 | description "neighbor advertisements received"; |
| 1669 | }; |
| 1670 | router_solicitation_source_not_on_link { |
| 1671 | severity error; |
| 1672 | type counter64; |
| 1673 | units "packets"; |
| 1674 | description "router solicitations from source not on link"; |
| 1675 | }; |
| 1676 | router_solicitation_unsupported_intf { |
| 1677 | severity error; |
| 1678 | type counter64; |
| 1679 | units "packets"; |
| 1680 | description "neighbor discovery unsupported interface"; |
| 1681 | }; |
| 1682 | router_solicitation_radv_not_config { |
| 1683 | severity error; |
| 1684 | type counter64; |
| 1685 | units "packets"; |
| 1686 | description "neighbor discovery not configured"; |
| 1687 | }; |
| 1688 | router_advertisement_source_not_link_local { |
| 1689 | severity error; |
| 1690 | type counter64; |
| 1691 | units "packets"; |
| 1692 | description "router advertisement source not link local"; |
| 1693 | }; |
| 1694 | router_advertisements_tx { |
| 1695 | severity info; |
| 1696 | type counter64; |
| 1697 | units "packets"; |
| 1698 | description "router advertisements sent"; |
| 1699 | }; |
| 1700 | router_advertisements_rx { |
| 1701 | severity info; |
| 1702 | type counter64; |
| 1703 | units "packets"; |
| 1704 | description "router advertisements received"; |
| 1705 | }; |
| 1706 | dst_lookup_miss { |
| 1707 | severity error; |
| 1708 | type counter64; |
| 1709 | units "packets"; |
| 1710 | description "icmp6 dst address lookup misses"; |
| 1711 | }; |
| 1712 | dest_unreach_sent { |
| 1713 | severity info; |
| 1714 | type counter64; |
| 1715 | units "packets"; |
| 1716 | description "destination unreachable response sent"; |
| 1717 | }; |
| 1718 | packet_too_big_sent { |
| 1719 | severity info; |
| 1720 | type counter64; |
| 1721 | units "packets"; |
| 1722 | description "packet too big response sent"; |
| 1723 | }; |
| 1724 | ttl_expire_sent { |
| 1725 | severity info; |
| 1726 | type counter64; |
| 1727 | units "packets"; |
| 1728 | description "hop limit exceeded response sent"; |
| 1729 | }; |
| 1730 | param_problem_sent { |
| 1731 | severity info; |
| 1732 | type counter64; |
| 1733 | units "packets"; |
| 1734 | description "parameter problem response sent"; |
| 1735 | }; |
| 1736 | drop { |
| 1737 | severity error; |
| 1738 | type counter64; |
| 1739 | units "packets"; |
| 1740 | description "error message dropped"; |
| 1741 | }; |
| 1742 | alloc_failure { |
| 1743 | severity error; |
| 1744 | type counter64; |
| 1745 | units "packets"; |
| 1746 | description "buffer allocation failure"; |
| 1747 | }; |
| 1748 | }; |
| 1749 | |
Neale Ranns | e22a704 | 2022-08-09 03:03:29 +0000 | [diff] [blame] | 1750 | paths { |
| 1751 | "/err/ip-frag" "ip_frag"; |
| 1752 | "/err/mpls-frag" "ip_frag"; |
| 1753 | "/err/ip4-mpls-label-disposition-pipe" "ip4"; |
| 1754 | "/err/ip4-mpls-label-disposition-uniform" "ip4"; |
| 1755 | "/err/ip4-local" "ip4"; |
| 1756 | "/err/ip4-input" "ip4"; |
| 1757 | "/err/ip4-full-reassembly" "ip4"; |
| 1758 | "/err/ip4-local-full-reassembly" "ip4"; |
| 1759 | "/err/ip4-full-reassembly-feature" "ip4"; |
| 1760 | "/err/ip4-full-reassembly-custom" "ip4"; |
| 1761 | "/err/ip4-full-reassembly-expire-walk" "ip4"; |
| 1762 | "/err/ip4-sv-reassembly" "ip4"; |
| 1763 | "/err/ip4-sv-reassembly-feature" "ip4"; |
| 1764 | "/err/ip4-sv-reassembly-output-feature" "ip4"; |
| 1765 | "/err/ip4-sv-reassembly-custom-next" "ip4"; |
| 1766 | "/err/ip4-sv-reassembly-expire-walk" "ip4"; |
| 1767 | "/err/ip6-mpls-label-disposition-pipe" "ip6"; |
| 1768 | "/err/ip6-mpls-label-disposition-uniform" "ip6"; |
| 1769 | "/err/ip6-local" "ip6"; |
| 1770 | "/err/ip6-input" "ip6"; |
| 1771 | "/err/ip6-full-reassembly" "ip6"; |
| 1772 | "/err/ip6-local-full-reassembly" "ip6"; |
| 1773 | "/err/ip6-full-reassembly-feature" "ip6"; |
| 1774 | "/err/ip6-full-reassembly-custom" "ip6"; |
| 1775 | "/err/ip6-full-reassembly-expire-walk" "ip6"; |
| 1776 | "/err/ip6-sv-reassembly" "ip6"; |
| 1777 | "/err/ip6-sv-reassembly-feature" "ip6"; |
| 1778 | "/err/ip6-sv-reassembly-output-feature" "ip6"; |
| 1779 | "/err/ip6-sv-reassembly-custom-next" "ip6"; |
| 1780 | "/err/ip6-sv-reassembly-expire-walk" "ip6"; |
Neale Ranns | b29c606 | 2022-08-12 01:50:24 +0000 | [diff] [blame] | 1781 | "/err/ip4-icmp-input" "icmp4"; |
| 1782 | "/err/ip4-icmp-error" "icmp4"; |
| 1783 | "/err/ip6-icmp-input" "icmp6"; |
| 1784 | "/err/ip6-icmp-error" "icmp6"; |
Neale Ranns | e22a704 | 2022-08-09 03:03:29 +0000 | [diff] [blame] | 1785 | }; |
| 1786 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 1787 | /* |
| 1788 | * Local Variables: |
| 1789 | * eval: (c-set-style "gnu") |
| 1790 | * End: |
| 1791 | */ |