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 |
| 20 | called through a shared memory interface. |
| 21 | */ |
| 22 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 23 | option version = "3.0.0"; |
| 24 | |
Neale Ranns | 31ed744 | 2018-02-23 05:29:09 -0800 | [diff] [blame] | 25 | import "vnet/fib/fib_types.api"; |
Neale Ranns | de5b08f | 2018-08-29 06:37:18 -0700 | [diff] [blame] | 26 | import "vnet/ethernet/ethernet_types.api"; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 27 | import "vnet/mfib/mfib_types.api"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 28 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 29 | /** \brief An IP table |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 30 | @param is_ipv6 - V4 or V6 table |
| 31 | @param table_id - table ID associated with the route |
Ole Troan | 75761b9 | 2019-09-11 17:49:08 +0200 | [diff] [blame] | 32 | This table ID will apply to both the unicats |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 33 | and mlticast FIBs |
Neale Ranns | 2297af0 | 2017-09-12 09:45:04 -0700 | [diff] [blame] | 34 | @param name - A client provided name/tag for the table. If this is |
| 35 | not set by the client, then VPP will generate something |
| 36 | meaningfull. |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 37 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 38 | typedef ip_table |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 39 | { |
| 40 | u32 table_id; |
| 41 | u8 is_ip6; |
| 42 | u8 name[64]; |
| 43 | }; |
| 44 | |
| 45 | /** \brief Add / del table request |
| 46 | A table can be added multiple times, but need be deleted only once. |
| 47 | @param client_index - opaque cookie to identify the sender |
| 48 | @param context - sender context, to match reply w/ request |
| 49 | */ |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 50 | autoreply define ip_table_add_del |
| 51 | { |
| 52 | u32 client_index; |
| 53 | u32 context; |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 54 | u8 is_add; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 55 | vl_api_ip_table_t table; |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 56 | }; |
| 57 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 58 | /** \brief Dump IP all fib tables |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 59 | @param client_index - opaque cookie to identify the sender |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 60 | @param context - sender context, to match reply w/ request |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 61 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 62 | define ip_table_dump |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 63 | { |
| 64 | u32 client_index; |
| 65 | u32 context; |
| 66 | }; |
| 67 | |
Neale Ranns | 9db6ada | 2019-11-08 12:42:31 +0000 | [diff] [blame] | 68 | /** \brief IP table replace being |
| 69 | |
| 70 | The use-case is that, for some unspecified reason, the control plane |
| 71 | has a very different set of entries it wants in the table than VPP |
| 72 | currently has. The CP would thus like to 'replace' VPP's current table |
| 73 | only by specifying what the new set of entries shall be, i.e. it is not |
| 74 | going to delete anything that already eixts. |
| 75 | the CP delcartes the start of this procedure with this begin_replace |
| 76 | API Call, and when it has populated all the entries it wants, it calls |
| 77 | the below end_replace API. From this point on it is of coursce free |
| 78 | to add and delete entries as usual. |
| 79 | The underlying mechanism by which VPP implements this replace is |
| 80 | purposefully left unspecified. |
| 81 | |
| 82 | @param client_index - opaque cookie to identify the sender |
| 83 | @param context - sender context, to match reply w/ request |
| 84 | @param table - The table to resync |
| 85 | */ |
| 86 | autoreply define ip_table_replace_begin |
| 87 | { |
| 88 | u32 client_index; |
| 89 | u32 context; |
| 90 | vl_api_ip_table_t table; |
| 91 | }; |
| 92 | |
| 93 | /** \brief IP table replace end |
| 94 | |
| 95 | see replace start/ |
| 96 | |
| 97 | @param client_index - opaque cookie to identify the sender |
| 98 | @param context - sender context, to match reply w/ request |
| 99 | @param table - The table that has converged |
| 100 | */ |
| 101 | autoreply define ip_table_replace_end |
| 102 | { |
| 103 | u32 client_index; |
| 104 | u32 context; |
| 105 | vl_api_ip_table_t table; |
| 106 | }; |
| 107 | |
| 108 | /** \brief IP table flush |
| 109 | Flush a table of all routes |
| 110 | @param client_index - opaque cookie to identify the sender |
| 111 | @param context - sender context, to match reply w/ request |
| 112 | @param table - The table to flush |
| 113 | */ |
| 114 | autoreply define ip_table_flush |
| 115 | { |
| 116 | u32 client_index; |
| 117 | u32 context; |
| 118 | vl_api_ip_table_t table; |
| 119 | }; |
| 120 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 121 | /** \brief IP FIB table response |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 122 | @param context - sender context |
| 123 | @param table - description of the table |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 124 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 125 | manual_endian manual_print define ip_table_details |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 126 | { |
| 127 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 128 | vl_api_ip_table_t table; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 129 | }; |
| 130 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 131 | /** \brief An IP route |
| 132 | @param table_id The IP table the route is in |
| 133 | @param stats_index The index of the route in the stats segment |
| 134 | @param prefix the prefix for the route |
| 135 | @param n_paths The number of paths the route has |
| 136 | @param paths The paths of the route |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 137 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 138 | typedef ip_route |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 139 | { |
| 140 | u32 table_id; |
| 141 | u32 stats_index; |
| 142 | vl_api_prefix_t prefix; |
| 143 | u8 n_paths; |
| 144 | vl_api_fib_path_t paths[n_paths]; |
| 145 | }; |
| 146 | |
| 147 | /** \brief Add / del route request |
| 148 | @param client_index - opaque cookie to identify the sender |
| 149 | @param context - sender context, to match reply w/ request |
| 150 | @param is_multipath - Set to 1 if these paths will be added/removed |
| 151 | to/from the existing set, or 0 to replace |
| 152 | the existing set. |
| 153 | is_add=0 & is_multipath=0 implies delete all paths |
| 154 | @param is_add - Are the paths being added or removed |
| 155 | */ |
| 156 | define ip_route_add_del |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 157 | { |
| 158 | u32 client_index; |
| 159 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 160 | u8 is_add; |
| 161 | u8 is_multipath; |
| 162 | vl_api_ip_route_t route; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 163 | }; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 164 | define ip_route_add_del_reply |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 165 | { |
| 166 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 167 | i32 retval; |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 168 | u32 stats_index; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 169 | }; |
| 170 | |
| 171 | /** \brief Dump IP routes from a table |
| 172 | @param client_index - opaque cookie to identify the sender |
| 173 | @param table - The table from which to dump routes (ony ID an AF are needed) |
| 174 | */ |
| 175 | define ip_route_dump |
| 176 | { |
| 177 | u32 client_index; |
| 178 | u32 context; |
| 179 | vl_api_ip_table_t table; |
| 180 | }; |
| 181 | |
| 182 | /** \brief IP FIB table entry response |
| 183 | @param route The route entry in the table |
| 184 | */ |
| 185 | manual_endian manual_print define ip_route_details |
| 186 | { |
| 187 | u32 context; |
| 188 | vl_api_ip_route_t route; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 189 | }; |
| 190 | |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 191 | /** \brief IP neighbor flags |
| 192 | @param is_static - A static neighbor Entry - there are not flushed |
| 193 | If the interface goes down. |
| 194 | @param is_no_fib_entry - Do not create a corresponding entry in the FIB |
| 195 | table for the neighbor. |
| 196 | */ |
| 197 | enum ip_neighbor_flags |
| 198 | { |
| 199 | IP_API_NEIGHBOR_FLAG_NONE = 0, |
| 200 | IP_API_NEIGHBOR_FLAG_STATIC = 0x1, |
| 201 | IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY = 0x2, |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 202 | }; |
| 203 | |
| 204 | /** \brief IP neighbor |
| 205 | @param sw_if_index - interface used to reach neighbor |
| 206 | @param mac_address - l2 address of the neighbor |
| 207 | @param ip_address - ip4 or ip6 address of the neighbor |
| 208 | @param flags - flags for the nieghbor |
| 209 | */ |
| 210 | typedef ip_neighbor { |
| 211 | u32 sw_if_index; |
| 212 | vl_api_ip_neighbor_flags_t flags; |
| 213 | vl_api_mac_address_t mac_address; |
| 214 | vl_api_address_t ip_address; |
| 215 | }; |
| 216 | |
| 217 | /** \brief IP neighbor add / del request |
| 218 | @param client_index - opaque cookie to identify the sender |
| 219 | @param context - sender context, to match reply w/ request |
| 220 | @param is_add - 1 to add neighbor, 0 to delete |
| 221 | @param neighbor - the neighor to add/remove |
| 222 | */ |
| 223 | define ip_neighbor_add_del |
| 224 | { |
| 225 | u32 client_index; |
| 226 | u32 context; |
| 227 | /* 1 = add, 0 = delete */ |
| 228 | u8 is_add; |
| 229 | vl_api_ip_neighbor_t neighbor; |
| 230 | }; |
| 231 | define ip_neighbor_add_del_reply |
| 232 | { |
| 233 | u32 context; |
| 234 | i32 retval; |
| 235 | u32 stats_index; |
| 236 | }; |
| 237 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 238 | /** \brief Dump IP neighboors |
| 239 | @param client_index - opaque cookie to identify the sender |
| 240 | @param context - sender context, to match reply w/ request |
Jon Loeliger | af8dfbf | 2017-11-08 13:07:39 -0600 | [diff] [blame] | 241 | @param sw_if_index - the interface to dump neighboors, ~0 == all |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 242 | @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4] |
| 243 | */ |
| 244 | define ip_neighbor_dump |
| 245 | { |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 246 | u32 client_index; |
| 247 | u32 context; |
| 248 | u32 sw_if_index; |
| 249 | u8 is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 250 | }; |
| 251 | |
| 252 | /** \brief IP neighboors dump response |
| 253 | @param context - sender context which was passed in the request |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 254 | @param neighbour - the neighbor |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 255 | */ |
| 256 | define ip_neighbor_details { |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 257 | u32 context; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 258 | vl_api_ip_neighbor_t neighbor; |
Neale Ranns | 1426039 | 2018-09-28 05:00:57 -0700 | [diff] [blame] | 259 | }; |
| 260 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 261 | /** \brief Set the ip flow hash config for a fib request |
| 262 | @param client_index - opaque cookie to identify the sender |
| 263 | @param context - sender context, to match reply w/ request |
| 264 | @param vrf_id - vrf/fib id |
| 265 | @param is_ipv6 - if non-zero the fib is ip6, else ip4 |
| 266 | @param src - if non-zero include src in flow hash |
| 267 | @param dst - if non-zero include dst in flow hash |
| 268 | @param sport - if non-zero include sport in flow hash |
| 269 | @param dport - if non-zero include dport in flow hash |
| 270 | @param proto -if non-zero include proto in flow hash |
| 271 | @param reverse - if non-zero include reverse in flow hash |
Mohsin Kazmi | 2af0e3a | 2018-11-20 11:11:12 +0100 | [diff] [blame] | 272 | @param symmetric - if non-zero include symmetry in flow hash |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 273 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 274 | autoreply define set_ip_flow_hash |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 275 | { |
| 276 | u32 client_index; |
| 277 | u32 context; |
| 278 | u32 vrf_id; |
| 279 | u8 is_ipv6; |
| 280 | u8 src; |
| 281 | u8 dst; |
| 282 | u8 sport; |
| 283 | u8 dport; |
| 284 | u8 proto; |
| 285 | u8 reverse; |
Mohsin Kazmi | 2af0e3a | 2018-11-20 11:11:12 +0100 | [diff] [blame] | 286 | u8 symmetric; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 287 | }; |
| 288 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 289 | /** \brief IPv6 router advertisement config request |
| 290 | @param client_index - opaque cookie to identify the sender |
| 291 | @param context - sender context, to match reply w/ request |
| 292 | @param suppress - |
| 293 | @param managed - |
| 294 | @param other - |
| 295 | @param ll_option - |
| 296 | @param send_unicast - |
| 297 | @param cease - |
| 298 | @param is_no - |
| 299 | @param default_router - |
| 300 | @param max_interval - |
| 301 | @param min_interval - |
| 302 | @param lifetime - |
| 303 | @param initial_count - |
| 304 | @param initial_interval - |
| 305 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 306 | autoreply define sw_interface_ip6nd_ra_config |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 307 | { |
| 308 | u32 client_index; |
| 309 | u32 context; |
| 310 | u32 sw_if_index; |
| 311 | u8 suppress; |
| 312 | u8 managed; |
| 313 | u8 other; |
| 314 | u8 ll_option; |
| 315 | u8 send_unicast; |
| 316 | u8 cease; |
| 317 | u8 is_no; |
| 318 | u8 default_router; |
| 319 | u32 max_interval; |
| 320 | u32 min_interval; |
| 321 | u32 lifetime; |
| 322 | u32 initial_count; |
| 323 | u32 initial_interval; |
| 324 | }; |
| 325 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 326 | /** \brief IPv6 router advertisement prefix config request |
| 327 | @param client_index - opaque cookie to identify the sender |
| 328 | @param context - sender context, to match reply w/ request |
Neale Ranns | 87df12d | 2017-02-18 08:16:41 -0800 | [diff] [blame] | 329 | @param sw_if_index - The interface the RA prefix information is for |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 330 | @param prefix - The prefix to advertise |
Neale Ranns | 87df12d | 2017-02-18 08:16:41 -0800 | [diff] [blame] | 331 | @param use_default - Revert to default settings |
| 332 | @param no_advertise - Do not advertise this prefix |
| 333 | @param off_link - The prefix is off link (it is not configured on the interface) |
| 334 | Configures the L-flag, When set, indicates that this |
| 335 | prefix can be used for on-link determination. |
| 336 | @param no_autoconfig - Setting for the A-flag. When |
| 337 | set indicates that this prefix can be used for |
| 338 | stateless address configuration. |
| 339 | @param no_onlink - The prefix is not on link. Make sure this is consistent |
| 340 | with the off_link parameter else YMMV |
| 341 | @param is_no - add/delete |
| 342 | @param val_lifetime - The length of time in |
| 343 | seconds (relative to the time the packet is sent) |
| 344 | that the prefix is valid for the purpose of on-link |
| 345 | determination. A value of all one bits |
| 346 | (0xffffffff) represents infinity |
| 347 | @param pref_lifetime - The length of time in |
| 348 | seconds (relative to the time the packet is sent) |
| 349 | that addresses generated from the prefix via |
| 350 | stateless address autoconfiguration remain |
| 351 | preferred [ADDRCONF]. A value of all one bits |
| 352 | (0xffffffff) represents infinity. |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 353 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 354 | autoreply define sw_interface_ip6nd_ra_prefix |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 355 | { |
| 356 | u32 client_index; |
| 357 | u32 context; |
| 358 | u32 sw_if_index; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 359 | vl_api_prefix_t prefix; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 360 | u8 use_default; |
| 361 | u8 no_advertise; |
| 362 | u8 off_link; |
| 363 | u8 no_autoconfig; |
| 364 | u8 no_onlink; |
| 365 | u8 is_no; |
| 366 | u32 val_lifetime; |
| 367 | u32 pref_lifetime; |
| 368 | }; |
| 369 | |
Neale Ranns | 3f844d0 | 2017-02-18 00:03:54 -0800 | [diff] [blame] | 370 | /** \brief IPv6 ND proxy config |
| 371 | @param client_index - opaque cookie to identify the sender |
| 372 | @param context - sender context, to match reply w/ request |
| 373 | @param sw_if_index - The interface the host is on |
| 374 | @param address - The address of the host for which to proxy for |
| 375 | @param is_add - Adding or deleting |
| 376 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 377 | autoreply define ip6nd_proxy_add_del |
Neale Ranns | 3f844d0 | 2017-02-18 00:03:54 -0800 | [diff] [blame] | 378 | { |
| 379 | u32 client_index; |
| 380 | u32 context; |
| 381 | u32 sw_if_index; |
| 382 | u8 is_del; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 383 | vl_api_ip6_address_t ip; |
Neale Ranns | 3f844d0 | 2017-02-18 00:03:54 -0800 | [diff] [blame] | 384 | }; |
| 385 | |
Neale Ranns | 3f844d0 | 2017-02-18 00:03:54 -0800 | [diff] [blame] | 386 | /** \brief IPv6 ND proxy details returned after request |
| 387 | @param context - sender context, to match reply w/ request |
| 388 | @param retval - return code for the request |
| 389 | */ |
| 390 | define ip6nd_proxy_details |
| 391 | { |
Neale Ranns | 3f844d0 | 2017-02-18 00:03:54 -0800 | [diff] [blame] | 392 | u32 context; |
| 393 | u32 sw_if_index; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 394 | vl_api_ip6_address_t ip; |
Neale Ranns | 3f844d0 | 2017-02-18 00:03:54 -0800 | [diff] [blame] | 395 | }; |
| 396 | |
| 397 | /** \brief IPv6 ND proxy dump request |
| 398 | @param context - sender context, to match reply w/ request |
| 399 | @param retval - return code for the request |
| 400 | @param sw_if_index - The interface the host is on |
| 401 | @param address - The address of the host for which to proxy for |
| 402 | */ |
| 403 | define ip6nd_proxy_dump |
| 404 | { |
| 405 | u32 client_index; |
| 406 | u32 context; |
| 407 | }; |
| 408 | |
Juraj Sloboda | 4b9669d | 2018-01-15 10:39:21 +0100 | [diff] [blame] | 409 | /** \brief Start / stop sending router solicitation |
| 410 | @param client_index - opaque cookie to identify the sender |
| 411 | @param context - sender context, to match reply w/ request |
| 412 | @param irt - initial retransmission time |
| 413 | @param mrt - maximum retransmission time |
| 414 | @param mrc - maximum retransmission count |
| 415 | @param mrd - maximum retransmission duration |
| 416 | @param sw_if_index - software interface index of interface |
| 417 | for sending router solicitation |
| 418 | @param stop - if non-zero then stop sending router solicitation, |
| 419 | otherwise start sending router solicitation |
| 420 | */ |
| 421 | autoreply define ip6nd_send_router_solicitation |
| 422 | { |
| 423 | u32 client_index; |
| 424 | u32 context; |
| 425 | u32 irt; |
| 426 | u32 mrt; |
| 427 | u32 mrc; |
| 428 | u32 mrd; |
| 429 | u32 sw_if_index; |
| 430 | u8 stop; |
| 431 | }; |
| 432 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 433 | /** \brief IPv6 interface enable / disable request |
| 434 | @param client_index - opaque cookie to identify the sender |
| 435 | @param context - sender context, to match reply w/ request |
| 436 | @param sw_if_index - interface used to reach neighbor |
| 437 | @param enable - if non-zero enable ip6 on interface, else disable |
| 438 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 439 | autoreply define sw_interface_ip6_enable_disable |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 440 | { |
| 441 | u32 client_index; |
| 442 | u32 context; |
| 443 | u32 sw_if_index; |
| 444 | u8 enable; /* set to true if enable */ |
| 445 | }; |
| 446 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 447 | /** \brief IPv6 set link local address on interface request |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 448 | @param client_index - opaque cookie to identify the sender |
| 449 | @param context - sender context, to match reply w/ request |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 450 | @param sw_if_index - interface to set link local on |
| 451 | @param address[] - the new link local address |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 452 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 453 | autoreply define sw_interface_ip6_set_link_local_address |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 454 | { |
| 455 | u32 client_index; |
| 456 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 457 | u32 sw_if_index; |
| 458 | u8 address[16]; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 459 | }; |
| 460 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 461 | /** \brief Dump IP multicast fib table |
| 462 | @param client_index - opaque cookie to identify the sender |
| 463 | */ |
| 464 | define ip_mtable_dump |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 465 | { |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 466 | u32 client_index; |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 467 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 468 | }; |
| 469 | define ip_mtable_details |
| 470 | { |
| 471 | u32 client_index; |
| 472 | u32 context; |
| 473 | vl_api_ip_table_t table; |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 474 | }; |
| 475 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 476 | /** \brief Add / del route request |
Ian Wells | 412ecd3 | 2018-10-04 12:31:11 -0700 | [diff] [blame] | 477 | |
| 478 | Adds a route, consisting both of the MFIB entry to match packets |
| 479 | (which may already exist) and a path to send those packets down. |
| 480 | Routes can be entered repeatedly to add multiple paths. Deletions are |
| 481 | per-path. |
| 482 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 483 | @param client_index - opaque cookie to identify the sender |
| 484 | @param context - sender context, to match reply w/ request |
Ian Wells | 412ecd3 | 2018-10-04 12:31:11 -0700 | [diff] [blame] | 485 | @param table_id - fib table /vrf associated with the route |
| 486 | @param is_add - true if adding a route; false if deleting one |
| 487 | @param is_ipv6 - true iff all the addresses are v6 |
| 488 | @param entry_flags - see fib_entry_flag_t |
| 489 | @param itf_flags - see mfib_entry_flags_t |
| 490 | @param next_hop_afi - see dpo_proto_t; the type of destination description |
| 491 | @param src_address - the source of the packet |
| 492 | @param grp_address - the group the packet is destined to |
| 493 | @param nh_address - the nexthop to forward the packet to |
| 494 | @param next_hop_sw_if_index - interface to emit packet on |
| 495 | |
| 496 | BIER AFIs use the BIER imposition ID. v4 and v6 AFIs use either the |
| 497 | interface or the nexthop address. |
| 498 | |
| 499 | Note that if the route is source-specific (S is supplied, not all 0s), |
| 500 | the prefix match is treated as exact (prefixlen /32 or /128). |
| 501 | |
| 502 | FIXME not complete yet |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 503 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 504 | typedef ip_mroute |
| 505 | { |
| 506 | u32 table_id; |
| 507 | u32 entry_flags; |
| 508 | u32 rpf_id; |
| 509 | vl_api_mprefix_t prefix; |
| 510 | u8 n_paths; |
| 511 | vl_api_mfib_path_t paths[n_paths]; |
| 512 | }; |
| 513 | |
Neale Ranns | 28c142e | 2018-09-07 09:37:07 -0700 | [diff] [blame] | 514 | define ip_mroute_add_del |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 515 | { |
| 516 | u32 client_index; |
| 517 | u32 context; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 518 | u8 is_add; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 519 | u8 is_multipath; |
| 520 | vl_api_ip_mroute_t route; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 521 | }; |
Neale Ranns | 28c142e | 2018-09-07 09:37:07 -0700 | [diff] [blame] | 522 | define ip_mroute_add_del_reply |
| 523 | { |
| 524 | u32 context; |
| 525 | i32 retval; |
| 526 | u32 stats_index; |
| 527 | }; |
| 528 | |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 529 | /** \brief Dump IP multicast fib table |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 530 | @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] | 531 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 532 | define ip_mroute_dump |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 533 | { |
| 534 | u32 client_index; |
| 535 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 536 | vl_api_ip_table_t table; |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 537 | }; |
| 538 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 539 | /** \brief IP Multicast Route Details |
| 540 | @param route - Details of the route |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 541 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 542 | manual_endian manual_print define ip_mroute_details |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 543 | { |
| 544 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 545 | vl_api_ip_mroute_t route; |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 546 | }; |
| 547 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 548 | define ip_address_details |
| 549 | { |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 550 | u32 context; |
Jon Loeliger | 466f0d4 | 2017-02-09 12:17:50 -0600 | [diff] [blame] | 551 | u32 sw_if_index; |
Ole Troan | 75761b9 | 2019-09-11 17:49:08 +0200 | [diff] [blame] | 552 | vl_api_address_with_prefix_t prefix; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 553 | }; |
| 554 | |
| 555 | define ip_address_dump |
| 556 | { |
| 557 | u32 client_index; |
| 558 | u32 context; |
| 559 | u32 sw_if_index; |
| 560 | u8 is_ipv6; |
| 561 | }; |
| 562 | |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 563 | /** \brief IP unnumbered configurations |
| 564 | @param sw_if_index The interface that has unnumbered configuration |
| 565 | @param ip_sw_if_index The IP interface that it is unnnumbered to |
| 566 | */ |
| 567 | define ip_unnumbered_details |
| 568 | { |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 569 | u32 context; |
| 570 | u32 sw_if_index; |
| 571 | u32 ip_sw_if_index; |
| 572 | }; |
| 573 | |
| 574 | /** \brief Dump IP unnumbered configurations |
| 575 | @param sw_if_index ~0 for all interfaces, else the interface desired |
| 576 | */ |
| 577 | define ip_unnumbered_dump |
| 578 | { |
| 579 | u32 client_index; |
| 580 | u32 context; |
| 581 | u32 sw_if_index; |
| 582 | }; |
| 583 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 584 | define ip_details |
| 585 | { |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 586 | u32 context; |
Ondrej Fabry | b11f903 | 2018-08-14 12:39:40 +0200 | [diff] [blame] | 587 | u32 sw_if_index; |
Jon Loeliger | 466f0d4 | 2017-02-09 12:17:50 -0600 | [diff] [blame] | 588 | u8 is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 589 | }; |
| 590 | |
| 591 | define ip_dump |
| 592 | { |
| 593 | u32 client_index; |
| 594 | u32 context; |
| 595 | u8 is_ipv6; |
| 596 | }; |
| 597 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 598 | define mfib_signal_dump |
| 599 | { |
| 600 | u32 client_index; |
| 601 | u32 context; |
| 602 | }; |
| 603 | |
| 604 | define mfib_signal_details |
| 605 | { |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 606 | u32 context; |
| 607 | u32 sw_if_index; |
| 608 | u32 table_id; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 609 | vl_api_mprefix_t prefix; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 610 | u16 ip_packet_len; |
| 611 | u8 ip_packet_data[256]; |
| 612 | }; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 613 | |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 614 | /** \brief IP punt policer |
| 615 | @param client_index - opaque cookie to identify the sender |
| 616 | @param context - sender context, to match reply w/ request |
| 617 | @param is_add - 1 to add neighbor, 0 to delete |
| 618 | @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 |
| 619 | @param policer_index - Index of policer to use |
| 620 | */ |
| 621 | autoreply define ip_punt_police |
| 622 | { |
| 623 | u32 client_index; |
| 624 | u32 context; |
| 625 | u32 policer_index; |
| 626 | u8 is_add; |
| 627 | u8 is_ip6; |
| 628 | }; |
| 629 | |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 630 | /** \brief Punt redirect type |
Neale Ranns | 47527b2 | 2018-11-16 00:53:53 -0800 | [diff] [blame] | 631 | @param rx_sw_if_index - specify the original RX interface of traffic |
| 632 | that should be redirected. ~0 means any interface. |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 633 | @param tx_sw_if_index - the TX interface to which traffic shoulde be |
| 634 | redirected. |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 635 | @param nh - the next-hop to redirect the traffic to. |
| 636 | @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 |
| 637 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 638 | typedef punt_redirect |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 639 | { |
| 640 | u32 rx_sw_if_index; |
| 641 | u32 tx_sw_if_index; |
| 642 | vl_api_address_t nh; |
| 643 | }; |
| 644 | |
| 645 | /** \brief IP punt redirect |
| 646 | @param client_index - opaque cookie to identify the sender |
| 647 | @param context - sender context, to match reply w/ request |
| 648 | @param punt - punt definition |
| 649 | @param is_add - 1 to add neighbor, 0 to delete |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 650 | */ |
| 651 | autoreply define ip_punt_redirect |
| 652 | { |
| 653 | u32 client_index; |
| 654 | u32 context; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 655 | vl_api_punt_redirect_t punt; |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 656 | u8 is_add; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 657 | }; |
| 658 | |
| 659 | define ip_punt_redirect_dump |
| 660 | { |
| 661 | u32 client_index; |
| 662 | u32 context; |
| 663 | u32 sw_if_index; |
| 664 | u8 is_ipv6; |
| 665 | }; |
| 666 | |
| 667 | define ip_punt_redirect_details |
| 668 | { |
| 669 | u32 context; |
| 670 | vl_api_punt_redirect_t punt; |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 671 | }; |
| 672 | |
Florin Coras | 595992c | 2017-11-06 17:17:08 -0800 | [diff] [blame] | 673 | autoreply define ip_container_proxy_add_del |
| 674 | { |
| 675 | u32 client_index; |
| 676 | u32 context; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 677 | vl_api_prefix_t pfx; |
Florin Coras | 595992c | 2017-11-06 17:17:08 -0800 | [diff] [blame] | 678 | u32 sw_if_index; |
| 679 | u8 is_add; |
| 680 | }; |
| 681 | |
Matus Fabian | 75b9f45 | 2018-10-02 23:27:21 -0700 | [diff] [blame] | 682 | define ip_container_proxy_dump |
| 683 | { |
| 684 | u32 client_index; |
| 685 | u32 context; |
| 686 | }; |
| 687 | |
| 688 | define ip_container_proxy_details |
| 689 | { |
| 690 | u32 context; |
| 691 | u32 sw_if_index; |
| 692 | vl_api_prefix_t prefix; |
| 693 | }; |
| 694 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 695 | /** \brief Configure IP source and L4 port-range check |
| 696 | @param client_index - opaque cookie to identify the sender |
| 697 | @param context - sender context, to match reply w/ request |
| 698 | @param is_ip6 - 1 if source address type is IPv6 |
| 699 | @param is_add - 1 if add, 0 if delete |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 700 | @param ip - prefix to match |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 701 | @param number_of_ranges - length of low_port and high_port arrays (must match) |
| 702 | @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry) |
| 703 | @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry) |
| 704 | @param vrf_id - fib table/vrf id to associate the source and port-range check with |
| 705 | @note To specify a single port set low_port and high_port entry the same |
| 706 | */ |
| 707 | autoreply define ip_source_and_port_range_check_add_del |
| 708 | { |
| 709 | u32 client_index; |
| 710 | u32 context; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 711 | u8 is_add; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 712 | vl_api_prefix_t prefix; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 713 | u8 number_of_ranges; |
| 714 | u16 low_ports[32]; |
| 715 | u16 high_ports[32]; |
| 716 | u32 vrf_id; |
| 717 | }; |
| 718 | |
| 719 | /** \brief Set interface source and L4 port-range request |
| 720 | @param client_index - opaque cookie to identify the sender |
| 721 | @param context - sender context, to match reply w/ request |
| 722 | @param interface_id - interface index |
| 723 | @param tcp_vrf_id - VRF associated with source and TCP port-range check |
| 724 | @param udp_vrf_id - VRF associated with source and TCP port-range check |
| 725 | */ |
| 726 | autoreply define ip_source_and_port_range_check_interface_add_del |
| 727 | { |
| 728 | u32 client_index; |
| 729 | u32 context; |
| 730 | u8 is_add; |
| 731 | u32 sw_if_index; |
| 732 | u32 tcp_in_vrf_id; |
| 733 | u32 tcp_out_vrf_id; |
| 734 | u32 udp_in_vrf_id; |
| 735 | u32 udp_out_vrf_id; |
| 736 | }; |
| 737 | |
Chore | 3460b01 | 2018-11-28 10:53:11 +0330 | [diff] [blame] | 738 | /** \brief Set interface source check request |
| 739 | @param client_index - opaque cookie to identify the sender |
| 740 | @param context - sender context, to match reply w/ request |
| 741 | @param is_add - add or del |
| 742 | @param loose - strict or loose |
| 743 | @param sw_if_index - interface index |
| 744 | */ |
| 745 | autoreply define ip_source_check_interface_add_del |
| 746 | { |
| 747 | u32 client_index; |
| 748 | u32 context; |
| 749 | u8 is_add; |
| 750 | u8 loose; |
| 751 | u32 sw_if_index; |
| 752 | }; |
| 753 | |
John Lo | 7f358b3 | 2018-04-28 01:19:24 -0400 | [diff] [blame] | 754 | /** \brief Enable/disable periodic IP neighbor scan |
| 755 | @param client_index - opaque cookie to identify the sender |
| 756 | @param context - sender context, to match reply w/ request |
| 757 | @param mode - 0: disable, 1: IPv4, 2: IPv6, 3: both IPv4/v6 |
| 758 | @param scan_interval - neighbor scan interval in minutes, 0: default to 1 |
| 759 | @param max_proc_time - max processing time per run in usec, 0: default to 20 |
| 760 | @param max_update - max neighbor probe/delete per run, 0: default to 10 |
| 761 | @param scan_int_delay - delay in msec to resume scan if exceed max proc |
| 762 | time or update, 0: default to 1 |
| 763 | @param stale_threshold - threshold in minutes for neighbor deletion, |
| 764 | 0: default to 4*scan_interval |
| 765 | */ |
| 766 | autoreply define ip_scan_neighbor_enable_disable |
| 767 | { |
| 768 | u32 client_index; |
| 769 | u32 context; |
| 770 | u8 mode; |
| 771 | u8 scan_interval; |
| 772 | u8 max_proc_time; |
| 773 | u8 max_update; |
| 774 | u8 scan_int_delay; |
| 775 | u8 stale_threshold; |
| 776 | }; |
| 777 | |
John Lo | c7b4304 | 2018-04-13 16:46:22 -0400 | [diff] [blame] | 778 | /** \brief IP probe neighbor address on an interface by sending an |
| 779 | ARP request (for IP4) or ICMP6 Neighbor Solicitation (for IP6) |
| 780 | @param client_index - opaque cookie to identify the sender |
| 781 | @param context - sender context, to match reply w/ request |
| 782 | @param sw_if_index - interface index |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 783 | @param dst - target IP address to send IP addr resolution request |
John Lo | c7b4304 | 2018-04-13 16:46:22 -0400 | [diff] [blame] | 784 | */ |
| 785 | autoreply define ip_probe_neighbor |
| 786 | { |
| 787 | u32 client_index; |
| 788 | u32 context; |
| 789 | u32 sw_if_index; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 790 | vl_api_address_t dst; |
John Lo | c7b4304 | 2018-04-13 16:46:22 -0400 | [diff] [blame] | 791 | }; |
| 792 | |
| 793 | /** \brief Register for IP4 ARP resolution event on receing ARP reply or |
| 794 | MAC/IP info from ARP requests in L2 BDs |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 795 | @param client_index - opaque cookie to identify the sender |
| 796 | @param context - sender context, to match reply w/ request |
| 797 | @param enable_disable - 1 => register for events, 0 => cancel registration |
| 798 | @param pid - sender's pid |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 799 | @param ip - exact IP4 address of interested arp resolution event, or |
| 800 | 0 to get MAC/IP info from ARP requests in BDs |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 801 | */ |
| 802 | autoreply define want_ip4_arp_events |
| 803 | { |
| 804 | u32 client_index; |
| 805 | u32 context; |
| 806 | u8 enable_disable; |
| 807 | u32 pid; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 808 | vl_api_ip4_address_t ip; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 809 | }; |
| 810 | |
John Lo | c7b4304 | 2018-04-13 16:46:22 -0400 | [diff] [blame] | 811 | /** \brief Tell client about an IP4 ARP resolution event or |
| 812 | MAC/IP info from ARP requests in L2 BDs |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 813 | @param client_index - opaque cookie to identify the sender |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 814 | @param ip - the exact ip4 address of interest |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 815 | @param pid - client pid registered to receive notification |
| 816 | @param sw_if_index - interface which received ARP packet |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 817 | @param mac - the new mac address |
John Lo | c7b4304 | 2018-04-13 16:46:22 -0400 | [diff] [blame] | 818 | @param mac_ip - 0: ARP resolution event, 1: MAC/IP info from L2 BDs |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 819 | */ |
| 820 | define ip4_arp_event |
| 821 | { |
| 822 | u32 client_index; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 823 | vl_api_ip4_address_t ip; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 824 | u32 pid; |
| 825 | u32 sw_if_index; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 826 | vl_api_mac_address_t mac; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 827 | u8 mac_ip; |
| 828 | }; |
| 829 | |
Marek Gradzki | 51e5968 | 2018-03-06 10:05:44 +0100 | [diff] [blame] | 830 | service { |
| 831 | rpc want_ip4_arp_events returns want_ip4_arp_events_reply |
| 832 | events ip4_arp_event; |
| 833 | }; |
| 834 | |
John Lo | c7b4304 | 2018-04-13 16:46:22 -0400 | [diff] [blame] | 835 | /** \brief Register for IP6 ND resolution event on recieving NA reply |
| 836 | MAC/IP info from ICMP6 Neighbor Solicitation in L2 BDs |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 837 | @param client_index - opaque cookie to identify the sender |
| 838 | @param context - sender context, to match reply w/ request |
| 839 | @param enable_disable - 1 => register for events, 0 => cancel registration |
| 840 | @param pid - sender's pid |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 841 | @param ip - the exact IP6 address of interested ND resolution event, or |
| 842 | 0 to get MAC/IP info from ICMP6 NS in L2 BDs. |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 843 | */ |
| 844 | autoreply define want_ip6_nd_events |
| 845 | { |
| 846 | u32 client_index; |
| 847 | u32 context; |
| 848 | u8 enable_disable; |
| 849 | u32 pid; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 850 | vl_api_ip6_address_t ip; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 851 | }; |
| 852 | |
John Lo | c7b4304 | 2018-04-13 16:46:22 -0400 | [diff] [blame] | 853 | /** \brief Tell client about an IP6 ND resolution or |
| 854 | MAC/IP info from ICMP6 Neighbor Solicitation in L2 BDs. |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 855 | @param client_index - opaque cookie to identify the sender |
| 856 | @param pid - client pid registered to receive notification |
| 857 | @param sw_if_index - interface which received ARP packet |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 858 | @param ip - the exact ip6 address of interest |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 859 | @param new_mac - the new mac address |
John Lo | c7b4304 | 2018-04-13 16:46:22 -0400 | [diff] [blame] | 860 | @param mac_ip - 0: ND resolution event, 1: MAC/IP info from L2 BDs |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 861 | */ |
| 862 | define ip6_nd_event |
| 863 | { |
| 864 | u32 client_index; |
| 865 | u32 pid; |
| 866 | u32 sw_if_index; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 867 | vl_api_ip6_address_t ip; |
| 868 | vl_api_mac_address_t mac; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 869 | u8 mac_ip; |
| 870 | }; |
| 871 | |
Marek Gradzki | 51e5968 | 2018-03-06 10:05:44 +0100 | [diff] [blame] | 872 | service { |
Juraj Sloboda | 4b9669d | 2018-01-15 10:39:21 +0100 | [diff] [blame] | 873 | rpc want_ip6_ra_events returns want_ip6_ra_events_reply |
| 874 | events ip6_ra_event; |
| 875 | }; |
| 876 | |
| 877 | /** \brief Register for ip6 router advertisement events |
| 878 | @param client_index - opaque cookie to identify the sender |
| 879 | @param context - sender context, to match reply w/ request |
| 880 | @param enable_disable - 1 => register for events, 0 => cancel registration |
| 881 | @param pid - sender's pid |
| 882 | */ |
| 883 | autoreply define want_ip6_ra_events |
| 884 | { |
| 885 | u32 client_index; |
| 886 | u32 context; |
| 887 | u8 enable_disable; |
| 888 | u32 pid; |
| 889 | }; |
| 890 | |
| 891 | /** \brief Struct representing RA prefix info |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 892 | @param prefix - RA prefix info destination address |
Juraj Sloboda | 4b9669d | 2018-01-15 10:39:21 +0100 | [diff] [blame] | 893 | @param flags - RA prefix info flags |
| 894 | @param valid_time - RA prefix info valid time |
| 895 | @param preferred_time - RA prefix info preferred time |
| 896 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 897 | typedef ip6_ra_prefix_info |
Juraj Sloboda | 4b9669d | 2018-01-15 10:39:21 +0100 | [diff] [blame] | 898 | { |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 899 | vl_api_prefix_t prefix; |
Juraj Sloboda | 4b9669d | 2018-01-15 10:39:21 +0100 | [diff] [blame] | 900 | u8 flags; |
| 901 | u32 valid_time; |
| 902 | u32 preferred_time; |
| 903 | }; |
| 904 | |
| 905 | /** \brief Tell client about a router advertisement event |
| 906 | @param client_index - opaque cookie to identify the sender |
| 907 | @param pid - client pid registered to receive notification |
| 908 | @param current_hop_limit - RA current hop limit |
| 909 | @param flags - RA flags |
| 910 | @param router_lifetime_in_sec - RA lifetime in seconds |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 911 | @param router_addr - The router's address |
Juraj Sloboda | 4b9669d | 2018-01-15 10:39:21 +0100 | [diff] [blame] | 912 | @param neighbor_reachable_time_in_msec - RA neighbor reachable time in msec |
| 913 | @param time_in_msec_between_retransmitted_neighbor_solicitations - |
| 914 | time in msec between retransmitted neighbor solicitations |
| 915 | @param n_prefixes - |
| 916 | @param prefixes - |
| 917 | */ |
| 918 | define ip6_ra_event |
| 919 | { |
| 920 | u32 client_index; |
| 921 | u32 pid; |
| 922 | u32 sw_if_index; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 923 | vl_api_ip6_address_t router_addr; |
Juraj Sloboda | 4b9669d | 2018-01-15 10:39:21 +0100 | [diff] [blame] | 924 | u8 current_hop_limit; |
| 925 | u8 flags; |
| 926 | u16 router_lifetime_in_sec; |
| 927 | u32 neighbor_reachable_time_in_msec; |
| 928 | u32 time_in_msec_between_retransmitted_neighbor_solicitations; |
| 929 | u32 n_prefixes; |
| 930 | vl_api_ip6_ra_prefix_info_t prefixes[n_prefixes]; |
| 931 | }; |
| 932 | |
| 933 | service { |
Marek Gradzki | 51e5968 | 2018-03-06 10:05:44 +0100 | [diff] [blame] | 934 | rpc want_ip6_nd_events returns want_ip6_nd_events_reply |
| 935 | events ip6_nd_event; |
| 936 | }; |
| 937 | |
Neale Ranns | 0053de6 | 2018-05-22 08:40:52 -0700 | [diff] [blame] | 938 | /** \brief Proxy ARP configuration type |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 939 | @param table_id - VRF / Fib table ID |
| 940 | @param low - Low address of the Proxy ARP range |
| 941 | @param hi - High address of the Proxy ARP range |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 942 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 943 | typedef proxy_arp |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 944 | { |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 945 | u32 table_id; |
| 946 | vl_api_ip4_address_t low; |
| 947 | vl_api_ip4_address_t hi; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 948 | }; |
| 949 | |
| 950 | /** \brief Proxy ARP add / del request |
| 951 | @param client_index - opaque cookie to identify the sender |
| 952 | @param context - sender context, to match reply w/ request |
Neale Ranns | 0053de6 | 2018-05-22 08:40:52 -0700 | [diff] [blame] | 953 | @param is_add - 1 if adding the Proxy ARP range, 0 if deleting |
| 954 | @param proxy - Proxy configuration |
| 955 | */ |
| 956 | autoreply define proxy_arp_add_del |
| 957 | { |
| 958 | u32 client_index; |
| 959 | u32 context; |
| 960 | u8 is_add; |
| 961 | vl_api_proxy_arp_t proxy; |
| 962 | }; |
| 963 | |
| 964 | /** \brief Proxy ARP dump request |
| 965 | */ |
| 966 | define proxy_arp_dump |
| 967 | { |
| 968 | u32 client_index; |
| 969 | u32 context; |
| 970 | }; |
| 971 | |
| 972 | /** \brief Proxy ARP dump details reply |
| 973 | * @param proxy - Same data as used to configure |
| 974 | */ |
| 975 | define proxy_arp_details |
| 976 | { |
| 977 | u32 context; |
| 978 | vl_api_proxy_arp_t proxy; |
| 979 | }; |
| 980 | |
| 981 | /** \brief Proxy ARP add / del interface request |
| 982 | @param client_index - opaque cookie to identify the sender |
| 983 | @param context - sender context, to match reply w/ request |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 984 | @param sw_if_index - Which interface to enable / disable Proxy Arp on |
| 985 | @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable |
| 986 | */ |
| 987 | autoreply define proxy_arp_intfc_enable_disable |
| 988 | { |
| 989 | u32 client_index; |
| 990 | u32 context; |
| 991 | u32 sw_if_index; |
| 992 | /* 1 = on, 0 = off */ |
| 993 | u8 enable_disable; |
| 994 | }; |
| 995 | |
Neale Ranns | 0053de6 | 2018-05-22 08:40:52 -0700 | [diff] [blame] | 996 | /** \brief Proxy ARP interface dump request |
| 997 | */ |
| 998 | define proxy_arp_intfc_dump |
| 999 | { |
| 1000 | u32 client_index; |
| 1001 | u32 context; |
| 1002 | }; |
| 1003 | |
| 1004 | /** \brief Proxy ARP interface dump details reply |
| 1005 | * @param sw_if_index The interface on which ARP proxy is enabled. |
| 1006 | */ |
| 1007 | define proxy_arp_intfc_details |
| 1008 | { |
| 1009 | u32 context; |
| 1010 | u32 sw_if_index; |
| 1011 | }; |
| 1012 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 1013 | /** \brief Set max allowed ARP or ip6 neighbor entries request |
| 1014 | @param client_index - opaque cookie to identify the sender |
| 1015 | @param context - sender context, to match reply w/ request |
| 1016 | @param is_ipv6 - neighbor limit if non-zero, else ARP limit |
| 1017 | @param arp_neighbor_limit - the new limit, defaults are ~ 50k |
| 1018 | */ |
| 1019 | autoreply define set_arp_neighbor_limit |
| 1020 | { |
| 1021 | u32 client_index; |
| 1022 | u32 context; |
| 1023 | u8 is_ipv6; |
| 1024 | u32 arp_neighbor_limit; |
| 1025 | }; |
| 1026 | |
| 1027 | /** \brief IOAM enable : Enable in-band OAM |
| 1028 | @param id - profile id |
| 1029 | @param seqno - To enable Seqno Processing |
| 1030 | @param analyse - Enabling analysis of iOAM at decap node |
| 1031 | @param pow_enable - Proof of Work enabled or not flag |
| 1032 | @param trace_enable - iOAM Trace enabled or not flag |
| 1033 | */ |
| 1034 | autoreply define ioam_enable |
| 1035 | { |
| 1036 | u32 client_index; |
| 1037 | u32 context; |
| 1038 | u16 id; |
| 1039 | u8 seqno; |
| 1040 | u8 analyse; |
| 1041 | u8 pot_enable; |
| 1042 | u8 trace_enable; |
| 1043 | u32 node_id; |
| 1044 | }; |
| 1045 | |
| 1046 | /** \brief iOAM disable |
| 1047 | @param client_index - opaque cookie to identify the sender |
| 1048 | @param context - sender context, to match reply w/ request |
| 1049 | @param index - MAP Domain index |
| 1050 | */ |
| 1051 | autoreply define ioam_disable |
| 1052 | { |
| 1053 | u32 client_index; |
| 1054 | u32 context; |
| 1055 | u16 id; |
| 1056 | }; |
| 1057 | |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 1058 | enum ip_reass_type |
| 1059 | { |
| 1060 | IP_REASS_TYPE_FULL = 0, |
| 1061 | IP_REASS_TYPE_SHALLOW_VIRTUAL = 0x1, |
| 1062 | }; |
| 1063 | |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 1064 | autoreply define ip_reassembly_set |
| 1065 | { |
| 1066 | u32 client_index; |
| 1067 | u32 context; |
| 1068 | u32 timeout_ms; |
| 1069 | u32 max_reassemblies; |
Klement Sekera | 3a343d4 | 2019-05-16 14:35:46 +0200 | [diff] [blame] | 1070 | u32 max_reassembly_length; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 1071 | u32 expire_walk_interval_ms; |
| 1072 | u8 is_ip6; |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 1073 | vl_api_ip_reass_type_t type; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 1074 | }; |
| 1075 | |
| 1076 | define ip_reassembly_get |
| 1077 | { |
| 1078 | u32 client_index; |
| 1079 | u32 context; |
| 1080 | u8 is_ip6; |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 1081 | vl_api_ip_reass_type_t type; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 1082 | }; |
| 1083 | |
| 1084 | define ip_reassembly_get_reply |
| 1085 | { |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 1086 | u32 context; |
| 1087 | i32 retval; |
| 1088 | u32 timeout_ms; |
| 1089 | u32 max_reassemblies; |
Klement Sekera | 3a343d4 | 2019-05-16 14:35:46 +0200 | [diff] [blame] | 1090 | u32 max_reassembly_length; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 1091 | u32 expire_walk_interval_ms; |
| 1092 | u8 is_ip6; |
| 1093 | }; |
| 1094 | |
Klement Sekera | 4c53313 | 2018-02-22 11:41:12 +0100 | [diff] [blame] | 1095 | /** \brief Enable/disable reassembly feature |
| 1096 | @param client_index - opaque cookie to identify the sender |
| 1097 | @param context - sender context, to match reply w/ request |
| 1098 | @param sw_if_index - interface to enable/disable feature on |
| 1099 | @param enable_ip4 - enable ip4 reassembly if non-zero, disable if 0 |
| 1100 | @param enable_ip6 - enable ip6 reassembly if non-zero, disable if 0 |
| 1101 | */ |
| 1102 | autoreply define ip_reassembly_enable_disable |
| 1103 | { |
| 1104 | u32 client_index; |
| 1105 | u32 context; |
| 1106 | u32 sw_if_index; |
| 1107 | u8 enable_ip4; |
| 1108 | u8 enable_ip6; |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 1109 | vl_api_ip_reass_type_t type; |
Klement Sekera | 4c53313 | 2018-02-22 11:41:12 +0100 | [diff] [blame] | 1110 | }; |
| 1111 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 1112 | /* |
| 1113 | * Local Variables: |
| 1114 | * eval: (c-set-style "gnu") |
| 1115 | * End: |
| 1116 | */ |