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