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