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 | |
Neale Ranns | 3d5f08a | 2021-01-22 16:12:38 +0000 | [diff] [blame] | 369 | /** \brief Set the ip flow hash router ID |
| 370 | @param client_index - opaque cookie to identify the sender |
| 371 | @param context - sender context, to match reply w/ request |
| 372 | @param router_id - The ID of the router. Mixed into the hash. |
| 373 | Used to prevent polarisation across a network, |
| 374 | since each router is assumed to have a different ID |
| 375 | */ |
| 376 | autoreply define set_ip_flow_hash_router_id |
| 377 | { |
| 378 | u32 client_index; |
| 379 | u32 context; |
| 380 | u32 router_id; |
| 381 | }; |
| 382 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 383 | /** \brief IPv6 interface enable / disable request |
| 384 | @param client_index - opaque cookie to identify the sender |
| 385 | @param context - sender context, to match reply w/ request |
| 386 | @param sw_if_index - interface used to reach neighbor |
| 387 | @param enable - if non-zero enable ip6 on interface, else disable |
| 388 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 389 | autoreply define sw_interface_ip6_enable_disable |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 390 | { |
| 391 | u32 client_index; |
| 392 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 393 | vl_api_interface_index_t sw_if_index; |
| 394 | bool enable; /* set to true if enable */ |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 395 | }; |
| 396 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 397 | /** \brief Dump IP multicast fib table |
| 398 | @param client_index - opaque cookie to identify the sender |
| 399 | */ |
| 400 | define ip_mtable_dump |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 401 | { |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 402 | u32 client_index; |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 403 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 404 | }; |
| 405 | define ip_mtable_details |
| 406 | { |
| 407 | u32 client_index; |
| 408 | u32 context; |
| 409 | vl_api_ip_table_t table; |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 410 | }; |
| 411 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 412 | /** \brief Add / del route request |
Ian Wells | 412ecd3 | 2018-10-04 12:31:11 -0700 | [diff] [blame] | 413 | |
| 414 | Adds a route, consisting both of the MFIB entry to match packets |
| 415 | (which may already exist) and a path to send those packets down. |
| 416 | Routes can be entered repeatedly to add multiple paths. Deletions are |
| 417 | per-path. |
| 418 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 419 | @param client_index - opaque cookie to identify the sender |
| 420 | @param context - sender context, to match reply w/ request |
Ian Wells | 412ecd3 | 2018-10-04 12:31:11 -0700 | [diff] [blame] | 421 | @param table_id - fib table /vrf associated with the route |
| 422 | @param is_add - true if adding a route; false if deleting one |
| 423 | @param is_ipv6 - true iff all the addresses are v6 |
| 424 | @param entry_flags - see fib_entry_flag_t |
| 425 | @param itf_flags - see mfib_entry_flags_t |
| 426 | @param next_hop_afi - see dpo_proto_t; the type of destination description |
| 427 | @param src_address - the source of the packet |
| 428 | @param grp_address - the group the packet is destined to |
| 429 | @param nh_address - the nexthop to forward the packet to |
| 430 | @param next_hop_sw_if_index - interface to emit packet on |
| 431 | |
| 432 | BIER AFIs use the BIER imposition ID. v4 and v6 AFIs use either the |
| 433 | interface or the nexthop address. |
| 434 | |
| 435 | Note that if the route is source-specific (S is supplied, not all 0s), |
| 436 | the prefix match is treated as exact (prefixlen /32 or /128). |
| 437 | |
| 438 | FIXME not complete yet |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 439 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 440 | typedef ip_mroute |
| 441 | { |
| 442 | u32 table_id; |
Neale Ranns | 990f694 | 2020-10-20 07:20:17 +0000 | [diff] [blame] | 443 | vl_api_mfib_entry_flags_t entry_flags; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 444 | u32 rpf_id; |
| 445 | vl_api_mprefix_t prefix; |
| 446 | u8 n_paths; |
| 447 | vl_api_mfib_path_t paths[n_paths]; |
| 448 | }; |
| 449 | |
Neale Ranns | 28c142e | 2018-09-07 09:37:07 -0700 | [diff] [blame] | 450 | define ip_mroute_add_del |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 451 | { |
| 452 | u32 client_index; |
| 453 | u32 context; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 454 | bool is_add [default=true]; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 455 | bool is_multipath; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 456 | vl_api_ip_mroute_t route; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 457 | }; |
Neale Ranns | 28c142e | 2018-09-07 09:37:07 -0700 | [diff] [blame] | 458 | define ip_mroute_add_del_reply |
| 459 | { |
| 460 | u32 context; |
| 461 | i32 retval; |
| 462 | u32 stats_index; |
| 463 | }; |
| 464 | |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 465 | /** \brief Dump IP multicast fib table |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 466 | @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] | 467 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 468 | define ip_mroute_dump |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 469 | { |
| 470 | u32 client_index; |
| 471 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 472 | vl_api_ip_table_t table; |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 473 | }; |
| 474 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 475 | /** \brief IP Multicast Route Details |
| 476 | @param route - Details of the route |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 477 | */ |
Ole Troan | df87f80 | 2020-11-18 19:17:48 +0100 | [diff] [blame] | 478 | define ip_mroute_details |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 479 | { |
| 480 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 481 | vl_api_ip_mroute_t route; |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 482 | }; |
| 483 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 484 | define ip_address_details |
| 485 | { |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 486 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 487 | vl_api_interface_index_t sw_if_index; |
Ole Troan | 75761b9 | 2019-09-11 17:49:08 +0200 | [diff] [blame] | 488 | vl_api_address_with_prefix_t prefix; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 489 | }; |
| 490 | |
| 491 | define ip_address_dump |
| 492 | { |
| 493 | u32 client_index; |
| 494 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 495 | vl_api_interface_index_t sw_if_index; |
| 496 | bool is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 497 | }; |
| 498 | |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 499 | /** \brief IP unnumbered configurations |
| 500 | @param sw_if_index The interface that has unnumbered configuration |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 501 | @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] | 502 | */ |
| 503 | define ip_unnumbered_details |
| 504 | { |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 505 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 506 | vl_api_interface_index_t sw_if_index; |
| 507 | vl_api_interface_index_t ip_sw_if_index; |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 508 | }; |
| 509 | |
| 510 | /** \brief Dump IP unnumbered configurations |
| 511 | @param sw_if_index ~0 for all interfaces, else the interface desired |
| 512 | */ |
| 513 | define ip_unnumbered_dump |
| 514 | { |
| 515 | u32 client_index; |
| 516 | u32 context; |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 517 | vl_api_interface_index_t sw_if_index [default=0xffffffff]; |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 518 | }; |
| 519 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 520 | define ip_details |
| 521 | { |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 522 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 523 | vl_api_interface_index_t sw_if_index; |
| 524 | bool is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 525 | }; |
| 526 | |
| 527 | define ip_dump |
| 528 | { |
| 529 | u32 client_index; |
| 530 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 531 | bool is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 532 | }; |
| 533 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 534 | define mfib_signal_dump |
| 535 | { |
| 536 | u32 client_index; |
| 537 | u32 context; |
| 538 | }; |
| 539 | |
| 540 | define mfib_signal_details |
| 541 | { |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 542 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 543 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 544 | u32 table_id; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 545 | vl_api_mprefix_t prefix; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 546 | u16 ip_packet_len; |
| 547 | u8 ip_packet_data[256]; |
| 548 | }; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 549 | |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 550 | /** \brief IP punt policer |
| 551 | @param client_index - opaque cookie to identify the sender |
| 552 | @param context - sender context, to match reply w/ request |
| 553 | @param is_add - 1 to add neighbor, 0 to delete |
| 554 | @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 |
| 555 | @param policer_index - Index of policer to use |
| 556 | */ |
| 557 | autoreply define ip_punt_police |
| 558 | { |
| 559 | u32 client_index; |
| 560 | u32 context; |
| 561 | u32 policer_index; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 562 | bool is_add [default=true]; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 563 | bool is_ip6; |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 564 | }; |
| 565 | |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 566 | /** \brief Punt redirect type |
Neale Ranns | 47527b2 | 2018-11-16 00:53:53 -0800 | [diff] [blame] | 567 | @param rx_sw_if_index - specify the original RX interface of traffic |
| 568 | that should be redirected. ~0 means any interface. |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 569 | @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] | 570 | redirected. |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 571 | @param nh - the next-hop to redirect the traffic to. |
| 572 | @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 |
| 573 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 574 | typedef punt_redirect |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 575 | { |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 576 | vl_api_interface_index_t rx_sw_if_index; |
| 577 | vl_api_interface_index_t tx_sw_if_index; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 578 | vl_api_address_t nh; |
| 579 | }; |
| 580 | |
| 581 | /** \brief IP punt redirect |
| 582 | @param client_index - opaque cookie to identify the sender |
| 583 | @param context - sender context, to match reply w/ request |
| 584 | @param punt - punt definition |
| 585 | @param is_add - 1 to add neighbor, 0 to delete |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 586 | */ |
| 587 | autoreply define ip_punt_redirect |
| 588 | { |
Nathan Skrzypczak | 2a1783f | 2021-08-10 15:05:29 +0200 | [diff] [blame] | 589 | option deprecated; |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 590 | u32 client_index; |
| 591 | u32 context; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 592 | vl_api_punt_redirect_t punt; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 593 | bool is_add [default=true]; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 594 | }; |
| 595 | |
| 596 | define ip_punt_redirect_dump |
| 597 | { |
| 598 | u32 client_index; |
| 599 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 600 | vl_api_interface_index_t sw_if_index; |
| 601 | bool is_ipv6; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 602 | }; |
| 603 | |
| 604 | define ip_punt_redirect_details |
| 605 | { |
| 606 | u32 context; |
| 607 | vl_api_punt_redirect_t punt; |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 608 | }; |
| 609 | |
Nathan Skrzypczak | 2a1783f | 2021-08-10 15:05:29 +0200 | [diff] [blame] | 610 | /** \brief Punt redirect type |
| 611 | @param rx_sw_if_index - specify the original RX interface of traffic |
| 612 | that should be redirected. ~0 means any interface. |
| 613 | @param af - Address family (ip4 or ip6) |
| 614 | @param paths - the TX paths to which traffic should be redirected. |
| 615 | */ |
| 616 | typedef punt_redirect_v2 |
| 617 | { |
| 618 | vl_api_interface_index_t rx_sw_if_index [default=0xffffffff]; |
| 619 | vl_api_address_family_t af; |
| 620 | u32 n_paths; |
| 621 | vl_api_fib_path_t paths[n_paths]; |
| 622 | }; |
| 623 | |
| 624 | /** \brief Add IP punt redirect rule |
| 625 | @param client_index - opaque cookie to identify the sender |
| 626 | @param context - sender context, to match reply w/ request |
| 627 | @param punt - punt definition |
| 628 | @param is_add - 1 to add punt_redirect rule, 0 to delete |
| 629 | */ |
| 630 | autoreply define add_del_ip_punt_redirect_v2 |
| 631 | { |
| 632 | u32 client_index; |
| 633 | u32 context; |
| 634 | bool is_add [default=true]; |
| 635 | vl_api_punt_redirect_v2_t punt; |
| 636 | }; |
| 637 | |
| 638 | define ip_punt_redirect_v2_dump |
| 639 | { |
| 640 | u32 client_index; |
| 641 | u32 context; |
| 642 | vl_api_interface_index_t sw_if_index; |
| 643 | vl_api_address_family_t af; |
| 644 | }; |
| 645 | |
| 646 | define ip_punt_redirect_v2_details |
| 647 | { |
| 648 | u32 context; |
| 649 | vl_api_punt_redirect_v2_t punt; |
| 650 | }; |
| 651 | |
Florin Coras | 595992c | 2017-11-06 17:17:08 -0800 | [diff] [blame] | 652 | autoreply define ip_container_proxy_add_del |
| 653 | { |
| 654 | u32 client_index; |
| 655 | u32 context; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 656 | vl_api_prefix_t pfx; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 657 | vl_api_interface_index_t sw_if_index; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 658 | bool is_add [default=true]; |
Florin Coras | 595992c | 2017-11-06 17:17:08 -0800 | [diff] [blame] | 659 | }; |
| 660 | |
Matus Fabian | 75b9f45 | 2018-10-02 23:27:21 -0700 | [diff] [blame] | 661 | define ip_container_proxy_dump |
| 662 | { |
| 663 | u32 client_index; |
| 664 | u32 context; |
| 665 | }; |
| 666 | |
| 667 | define ip_container_proxy_details |
| 668 | { |
| 669 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 670 | vl_api_interface_index_t sw_if_index; |
Matus Fabian | 75b9f45 | 2018-10-02 23:27:21 -0700 | [diff] [blame] | 671 | vl_api_prefix_t prefix; |
| 672 | }; |
| 673 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 674 | /** \brief Configure IP source and L4 port-range check |
| 675 | @param client_index - opaque cookie to identify the sender |
| 676 | @param context - sender context, to match reply w/ request |
| 677 | @param is_ip6 - 1 if source address type is IPv6 |
| 678 | @param is_add - 1 if add, 0 if delete |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 679 | @param ip - prefix to match |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 680 | @param number_of_ranges - length of low_port and high_port arrays (must match) |
| 681 | @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry) |
| 682 | @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry) |
| 683 | @param vrf_id - fib table/vrf id to associate the source and port-range check with |
| 684 | @note To specify a single port set low_port and high_port entry the same |
| 685 | */ |
| 686 | autoreply define ip_source_and_port_range_check_add_del |
| 687 | { |
| 688 | u32 client_index; |
| 689 | u32 context; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 690 | bool is_add [default=true]; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 691 | vl_api_prefix_t prefix; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 692 | u8 number_of_ranges; |
| 693 | u16 low_ports[32]; |
| 694 | u16 high_ports[32]; |
| 695 | u32 vrf_id; |
| 696 | }; |
| 697 | |
| 698 | /** \brief Set interface source and L4 port-range request |
| 699 | @param client_index - opaque cookie to identify the sender |
| 700 | @param context - sender context, to match reply w/ request |
| 701 | @param interface_id - interface index |
| 702 | @param tcp_vrf_id - VRF associated with source and TCP port-range check |
| 703 | @param udp_vrf_id - VRF associated with source and TCP port-range check |
| 704 | */ |
| 705 | autoreply define ip_source_and_port_range_check_interface_add_del |
| 706 | { |
| 707 | u32 client_index; |
| 708 | u32 context; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 709 | bool is_add [default=true]; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 710 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 711 | u32 tcp_in_vrf_id; |
| 712 | u32 tcp_out_vrf_id; |
| 713 | u32 udp_in_vrf_id; |
| 714 | u32 udp_out_vrf_id; |
| 715 | }; |
| 716 | |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 717 | /** \brief IPv6 set link local address on interface request |
John Lo | 7f358b3 | 2018-04-28 01:19:24 -0400 | [diff] [blame] | 718 | @param client_index - opaque cookie to identify the sender |
| 719 | @param context - sender context, to match reply w/ request |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 720 | @param sw_if_index - interface to set link local on |
| 721 | @param ip - the new link local address |
John Lo | 7f358b3 | 2018-04-28 01:19:24 -0400 | [diff] [blame] | 722 | */ |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 723 | autoreply define sw_interface_ip6_set_link_local_address |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 724 | { |
| 725 | u32 client_index; |
| 726 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 727 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 728 | vl_api_ip6_address_t ip; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 729 | }; |
| 730 | |
BenoƮt Ganne | 58a1915 | 2021-01-18 19:24:34 +0100 | [diff] [blame] | 731 | /** \brief IPv6 get link local address on interface request |
| 732 | @param client_index - opaque cookie to identify the sender |
| 733 | @param context - sender context, to match reply w/ request |
| 734 | @param sw_if_index - interface to set link local on |
| 735 | */ |
| 736 | define sw_interface_ip6_get_link_local_address |
| 737 | { |
| 738 | u32 client_index; |
| 739 | u32 context; |
| 740 | vl_api_interface_index_t sw_if_index; |
| 741 | }; |
| 742 | |
| 743 | /** \brief IPv6 link local address detail |
| 744 | @param context - sender context, to match reply w/ request |
| 745 | @param ip - the link local address |
| 746 | */ |
| 747 | define sw_interface_ip6_get_link_local_address_reply |
| 748 | { |
| 749 | u32 context; |
| 750 | i32 retval; |
| 751 | vl_api_ip6_address_t ip; |
| 752 | }; |
| 753 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 754 | /** \brief IOAM enable : Enable in-band OAM |
| 755 | @param id - profile id |
| 756 | @param seqno - To enable Seqno Processing |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 757 | @param analyse - Enabling analysis of iOAM at decap node |
| 758 | @param pow_enable - Proof of Work enabled or not flag |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 759 | @param trace_enable - iOAM Trace enabled or not flag |
| 760 | */ |
| 761 | autoreply define ioam_enable |
| 762 | { |
| 763 | u32 client_index; |
| 764 | u32 context; |
| 765 | u16 id; |
Jakub Grajciar | 58989a3 | 2019-10-08 14:05:18 +0200 | [diff] [blame] | 766 | bool seqno; |
| 767 | bool analyse; |
| 768 | bool pot_enable; |
| 769 | bool trace_enable; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 770 | u32 node_id; |
| 771 | }; |
| 772 | |
| 773 | /** \brief iOAM disable |
| 774 | @param client_index - opaque cookie to identify the sender |
| 775 | @param context - sender context, to match reply w/ request |
| 776 | @param index - MAP Domain index |
| 777 | */ |
| 778 | autoreply define ioam_disable |
| 779 | { |
| 780 | u32 client_index; |
| 781 | u32 context; |
| 782 | u16 id; |
| 783 | }; |
| 784 | |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 785 | enum ip_reass_type |
| 786 | { |
| 787 | IP_REASS_TYPE_FULL = 0, |
| 788 | IP_REASS_TYPE_SHALLOW_VIRTUAL = 0x1, |
| 789 | }; |
| 790 | |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 791 | autoreply define ip_reassembly_set |
| 792 | { |
| 793 | u32 client_index; |
| 794 | u32 context; |
| 795 | u32 timeout_ms; |
| 796 | u32 max_reassemblies; |
Klement Sekera | 3a343d4 | 2019-05-16 14:35:46 +0200 | [diff] [blame] | 797 | u32 max_reassembly_length; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 798 | u32 expire_walk_interval_ms; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 799 | bool is_ip6; |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 800 | vl_api_ip_reass_type_t type; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 801 | }; |
| 802 | |
| 803 | define ip_reassembly_get |
| 804 | { |
| 805 | u32 client_index; |
| 806 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 807 | bool is_ip6; |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 808 | vl_api_ip_reass_type_t type; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 809 | }; |
| 810 | |
| 811 | define ip_reassembly_get_reply |
| 812 | { |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 813 | u32 context; |
| 814 | i32 retval; |
| 815 | u32 timeout_ms; |
| 816 | u32 max_reassemblies; |
Klement Sekera | 3a343d4 | 2019-05-16 14:35:46 +0200 | [diff] [blame] | 817 | u32 max_reassembly_length; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 818 | u32 expire_walk_interval_ms; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 819 | bool is_ip6; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 820 | }; |
| 821 | |
Klement Sekera | 4c53313 | 2018-02-22 11:41:12 +0100 | [diff] [blame] | 822 | /** \brief Enable/disable reassembly feature |
| 823 | @param client_index - opaque cookie to identify the sender |
| 824 | @param context - sender context, to match reply w/ request |
| 825 | @param sw_if_index - interface to enable/disable feature on |
| 826 | @param enable_ip4 - enable ip4 reassembly if non-zero, disable if 0 |
| 827 | @param enable_ip6 - enable ip6 reassembly if non-zero, disable if 0 |
| 828 | */ |
| 829 | autoreply define ip_reassembly_enable_disable |
| 830 | { |
| 831 | u32 client_index; |
| 832 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 833 | vl_api_interface_index_t sw_if_index; |
| 834 | bool enable_ip4; |
| 835 | bool enable_ip6; |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 836 | vl_api_ip_reass_type_t type; |
Klement Sekera | 4c53313 | 2018-02-22 11:41:12 +0100 | [diff] [blame] | 837 | }; |
| 838 | |
Neale Ranns | 8f5fef2 | 2020-12-21 08:29:34 +0000 | [diff] [blame] | 839 | /** |
| 840 | @brief Set a Path MTU value. i.e. a MTU value for a given neighbour. |
| 841 | The neighbour can be described as attached (w/ interface and next-hop) |
| 842 | or remote (w/ table_id and next-hop); |
| 843 | @param client_index - opaque cookie to identify the sender |
| 844 | @param context - sender context, to match reply w/ request |
| 845 | @param table_id - table-ID for next-hop |
| 846 | @param nh - Next hop |
| 847 | @param path_mtu - value to set, 0 is disable. |
| 848 | */ |
| 849 | typedef ip_path_mtu |
| 850 | { |
| 851 | u32 client_index; |
| 852 | u32 context; |
| 853 | u32 table_id; |
| 854 | vl_api_address_t nh; |
| 855 | u16 path_mtu; |
| 856 | }; |
| 857 | autoreply define ip_path_mtu_update |
| 858 | { |
| 859 | u32 client_index; |
| 860 | u32 context; |
| 861 | vl_api_ip_path_mtu_t pmtu; |
| 862 | }; |
| 863 | define ip_path_mtu_get |
| 864 | { |
| 865 | u32 client_index; |
| 866 | u32 context; |
| 867 | u32 cursor; |
| 868 | }; |
| 869 | define ip_path_mtu_get_reply |
| 870 | { |
| 871 | u32 context; |
| 872 | i32 retval; |
| 873 | u32 cursor; |
| 874 | }; |
| 875 | define ip_path_mtu_details |
| 876 | { |
| 877 | u32 context; |
| 878 | vl_api_ip_path_mtu_t pmtu; |
| 879 | }; |
| 880 | service { |
| 881 | rpc ip_path_mtu_get returns ip_path_mtu_get_reply |
| 882 | stream ip_path_mtu_details; |
| 883 | }; |
| 884 | |
| 885 | autoreply define ip_path_mtu_replace_begin |
| 886 | { |
| 887 | u32 client_index; |
| 888 | u32 context; |
| 889 | }; |
| 890 | autoreply define ip_path_mtu_replace_end |
| 891 | { |
| 892 | u32 client_index; |
| 893 | u32 context; |
| 894 | }; |
| 895 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 896 | /* |
| 897 | * Local Variables: |
| 898 | * eval: (c-set-style "gnu") |
| 899 | * End: |
| 900 | */ |