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"; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 28 | import "vnet/interface_types.api"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 29 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 30 | /** \brief An IP table |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 31 | @param is_ipv6 - V4 or V6 table |
| 32 | @param table_id - table ID associated with the route |
Ole Troan | 75761b9 | 2019-09-11 17:49:08 +0200 | [diff] [blame] | 33 | This table ID will apply to both the unicats |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 34 | and mlticast FIBs |
Neale Ranns | 2297af0 | 2017-09-12 09:45:04 -0700 | [diff] [blame] | 35 | @param name - A client provided name/tag for the table. If this is |
| 36 | not set by the client, then VPP will generate something |
| 37 | meaningfull. |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 38 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 39 | typedef ip_table |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 40 | { |
| 41 | u32 table_id; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 42 | bool is_ip6; |
| 43 | string name[64]; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 44 | }; |
| 45 | |
| 46 | /** \brief Add / del table request |
| 47 | A table can be added multiple times, but need be deleted only once. |
| 48 | @param client_index - opaque cookie to identify the sender |
| 49 | @param context - sender context, to match reply w/ request |
| 50 | */ |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 51 | autoreply define ip_table_add_del |
| 52 | { |
| 53 | u32 client_index; |
| 54 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 55 | bool is_add; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 56 | vl_api_ip_table_t table; |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 57 | }; |
| 58 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 59 | /** \brief Dump IP all fib tables |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 60 | @param client_index - opaque cookie to identify the sender |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 61 | @param context - sender context, to match reply w/ request |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 62 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 63 | define ip_table_dump |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 64 | { |
| 65 | u32 client_index; |
| 66 | u32 context; |
| 67 | }; |
| 68 | |
Neale Ranns | 9db6ada | 2019-11-08 12:42:31 +0000 | [diff] [blame] | 69 | /** \brief IP table replace being |
| 70 | |
| 71 | The use-case is that, for some unspecified reason, the control plane |
| 72 | has a very different set of entries it wants in the table than VPP |
| 73 | currently has. The CP would thus like to 'replace' VPP's current table |
| 74 | only by specifying what the new set of entries shall be, i.e. it is not |
| 75 | going to delete anything that already eixts. |
| 76 | the CP delcartes the start of this procedure with this begin_replace |
| 77 | API Call, and when it has populated all the entries it wants, it calls |
| 78 | the below end_replace API. From this point on it is of coursce free |
| 79 | to add and delete entries as usual. |
| 80 | The underlying mechanism by which VPP implements this replace is |
| 81 | purposefully left unspecified. |
| 82 | |
| 83 | @param client_index - opaque cookie to identify the sender |
| 84 | @param context - sender context, to match reply w/ request |
| 85 | @param table - The table to resync |
| 86 | */ |
| 87 | autoreply define ip_table_replace_begin |
| 88 | { |
| 89 | u32 client_index; |
| 90 | u32 context; |
| 91 | vl_api_ip_table_t table; |
| 92 | }; |
| 93 | |
| 94 | /** \brief IP table replace end |
| 95 | |
| 96 | see replace start/ |
| 97 | |
| 98 | @param client_index - opaque cookie to identify the sender |
| 99 | @param context - sender context, to match reply w/ request |
| 100 | @param table - The table that has converged |
| 101 | */ |
| 102 | autoreply define ip_table_replace_end |
| 103 | { |
| 104 | u32 client_index; |
| 105 | u32 context; |
| 106 | vl_api_ip_table_t table; |
| 107 | }; |
| 108 | |
| 109 | /** \brief IP table flush |
| 110 | Flush a table of all routes |
| 111 | @param client_index - opaque cookie to identify the sender |
| 112 | @param context - sender context, to match reply w/ request |
| 113 | @param table - The table to flush |
| 114 | */ |
| 115 | autoreply define ip_table_flush |
| 116 | { |
| 117 | u32 client_index; |
| 118 | u32 context; |
| 119 | vl_api_ip_table_t table; |
| 120 | }; |
| 121 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 122 | /** \brief IP FIB table response |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 123 | @param context - sender context |
| 124 | @param table - description of the table |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 125 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 126 | manual_endian manual_print define ip_table_details |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 127 | { |
| 128 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 129 | vl_api_ip_table_t table; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 130 | }; |
| 131 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 132 | /** \brief An IP route |
| 133 | @param table_id The IP table the route is in |
| 134 | @param stats_index The index of the route in the stats segment |
| 135 | @param prefix the prefix for the route |
| 136 | @param n_paths The number of paths the route has |
| 137 | @param paths The paths of the route |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 138 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 139 | typedef ip_route |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 140 | { |
| 141 | u32 table_id; |
| 142 | u32 stats_index; |
| 143 | vl_api_prefix_t prefix; |
| 144 | u8 n_paths; |
| 145 | vl_api_fib_path_t paths[n_paths]; |
| 146 | }; |
| 147 | |
| 148 | /** \brief Add / del route request |
| 149 | @param client_index - opaque cookie to identify the sender |
| 150 | @param context - sender context, to match reply w/ request |
| 151 | @param is_multipath - Set to 1 if these paths will be added/removed |
| 152 | to/from the existing set, or 0 to replace |
| 153 | the existing set. |
| 154 | is_add=0 & is_multipath=0 implies delete all paths |
| 155 | @param is_add - Are the paths being added or removed |
| 156 | */ |
| 157 | define ip_route_add_del |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 158 | { |
| 159 | u32 client_index; |
| 160 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 161 | bool is_add; |
| 162 | bool is_multipath; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 163 | vl_api_ip_route_t route; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 164 | }; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 165 | define ip_route_add_del_reply |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 166 | { |
| 167 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 168 | i32 retval; |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 169 | u32 stats_index; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 170 | }; |
| 171 | |
| 172 | /** \brief Dump IP routes from a table |
| 173 | @param client_index - opaque cookie to identify the sender |
| 174 | @param table - The table from which to dump routes (ony ID an AF are needed) |
| 175 | */ |
| 176 | define ip_route_dump |
| 177 | { |
| 178 | u32 client_index; |
| 179 | u32 context; |
| 180 | vl_api_ip_table_t table; |
| 181 | }; |
| 182 | |
| 183 | /** \brief IP FIB table entry response |
| 184 | @param route The route entry in the table |
| 185 | */ |
| 186 | manual_endian manual_print define ip_route_details |
| 187 | { |
| 188 | u32 context; |
| 189 | vl_api_ip_route_t route; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 190 | }; |
| 191 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 192 | /** \brief Set the ip flow hash config for a fib request |
| 193 | @param client_index - opaque cookie to identify the sender |
| 194 | @param context - sender context, to match reply w/ request |
| 195 | @param vrf_id - vrf/fib id |
| 196 | @param is_ipv6 - if non-zero the fib is ip6, else ip4 |
| 197 | @param src - if non-zero include src in flow hash |
| 198 | @param dst - if non-zero include dst in flow hash |
| 199 | @param sport - if non-zero include sport in flow hash |
| 200 | @param dport - if non-zero include dport in flow hash |
| 201 | @param proto -if non-zero include proto in flow hash |
| 202 | @param reverse - if non-zero include reverse in flow hash |
Mohsin Kazmi | 2af0e3a | 2018-11-20 11:11:12 +0100 | [diff] [blame] | 203 | @param symmetric - if non-zero include symmetry in flow hash |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 204 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 205 | autoreply define set_ip_flow_hash |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 206 | { |
| 207 | u32 client_index; |
| 208 | u32 context; |
| 209 | u32 vrf_id; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 210 | bool is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 211 | u8 src; |
| 212 | u8 dst; |
| 213 | u8 sport; |
| 214 | u8 dport; |
| 215 | u8 proto; |
| 216 | u8 reverse; |
Mohsin Kazmi | 2af0e3a | 2018-11-20 11:11:12 +0100 | [diff] [blame] | 217 | u8 symmetric; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 218 | }; |
| 219 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 220 | /** \brief IPv6 interface enable / disable request |
| 221 | @param client_index - opaque cookie to identify the sender |
| 222 | @param context - sender context, to match reply w/ request |
| 223 | @param sw_if_index - interface used to reach neighbor |
| 224 | @param enable - if non-zero enable ip6 on interface, else disable |
| 225 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 226 | autoreply define sw_interface_ip6_enable_disable |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 227 | { |
| 228 | u32 client_index; |
| 229 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 230 | vl_api_interface_index_t sw_if_index; |
| 231 | bool enable; /* set to true if enable */ |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 232 | }; |
| 233 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 234 | /** \brief Dump IP multicast fib table |
| 235 | @param client_index - opaque cookie to identify the sender |
| 236 | */ |
| 237 | define ip_mtable_dump |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 238 | { |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 239 | u32 client_index; |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 240 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 241 | }; |
| 242 | define ip_mtable_details |
| 243 | { |
| 244 | u32 client_index; |
| 245 | u32 context; |
| 246 | vl_api_ip_table_t table; |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 247 | }; |
| 248 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 249 | /** \brief Add / del route request |
Ian Wells | 412ecd3 | 2018-10-04 12:31:11 -0700 | [diff] [blame] | 250 | |
| 251 | Adds a route, consisting both of the MFIB entry to match packets |
| 252 | (which may already exist) and a path to send those packets down. |
| 253 | Routes can be entered repeatedly to add multiple paths. Deletions are |
| 254 | per-path. |
| 255 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 256 | @param client_index - opaque cookie to identify the sender |
| 257 | @param context - sender context, to match reply w/ request |
Ian Wells | 412ecd3 | 2018-10-04 12:31:11 -0700 | [diff] [blame] | 258 | @param table_id - fib table /vrf associated with the route |
| 259 | @param is_add - true if adding a route; false if deleting one |
| 260 | @param is_ipv6 - true iff all the addresses are v6 |
| 261 | @param entry_flags - see fib_entry_flag_t |
| 262 | @param itf_flags - see mfib_entry_flags_t |
| 263 | @param next_hop_afi - see dpo_proto_t; the type of destination description |
| 264 | @param src_address - the source of the packet |
| 265 | @param grp_address - the group the packet is destined to |
| 266 | @param nh_address - the nexthop to forward the packet to |
| 267 | @param next_hop_sw_if_index - interface to emit packet on |
| 268 | |
| 269 | BIER AFIs use the BIER imposition ID. v4 and v6 AFIs use either the |
| 270 | interface or the nexthop address. |
| 271 | |
| 272 | Note that if the route is source-specific (S is supplied, not all 0s), |
| 273 | the prefix match is treated as exact (prefixlen /32 or /128). |
| 274 | |
| 275 | FIXME not complete yet |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 276 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 277 | typedef ip_mroute |
| 278 | { |
| 279 | u32 table_id; |
| 280 | u32 entry_flags; |
| 281 | u32 rpf_id; |
| 282 | vl_api_mprefix_t prefix; |
| 283 | u8 n_paths; |
| 284 | vl_api_mfib_path_t paths[n_paths]; |
| 285 | }; |
| 286 | |
Neale Ranns | 28c142e | 2018-09-07 09:37:07 -0700 | [diff] [blame] | 287 | define ip_mroute_add_del |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 288 | { |
| 289 | u32 client_index; |
| 290 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 291 | bool is_add; |
| 292 | bool is_multipath; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 293 | vl_api_ip_mroute_t route; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 294 | }; |
Neale Ranns | 28c142e | 2018-09-07 09:37:07 -0700 | [diff] [blame] | 295 | define ip_mroute_add_del_reply |
| 296 | { |
| 297 | u32 context; |
| 298 | i32 retval; |
| 299 | u32 stats_index; |
| 300 | }; |
| 301 | |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 302 | /** \brief Dump IP multicast fib table |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 303 | @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] | 304 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 305 | define ip_mroute_dump |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 306 | { |
| 307 | u32 client_index; |
| 308 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 309 | vl_api_ip_table_t table; |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 310 | }; |
| 311 | |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 312 | /** \brief IP Multicast Route Details |
| 313 | @param route - Details of the route |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 314 | */ |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 315 | manual_endian manual_print define ip_mroute_details |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 316 | { |
| 317 | u32 context; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 318 | vl_api_ip_mroute_t route; |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 319 | }; |
| 320 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 321 | define ip_address_details |
| 322 | { |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 323 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 324 | vl_api_interface_index_t sw_if_index; |
Ole Troan | 75761b9 | 2019-09-11 17:49:08 +0200 | [diff] [blame] | 325 | vl_api_address_with_prefix_t prefix; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 326 | }; |
| 327 | |
| 328 | define ip_address_dump |
| 329 | { |
| 330 | u32 client_index; |
| 331 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 332 | vl_api_interface_index_t sw_if_index; |
| 333 | bool is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 334 | }; |
| 335 | |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 336 | /** \brief IP unnumbered configurations |
| 337 | @param sw_if_index The interface that has unnumbered configuration |
| 338 | @param ip_sw_if_index The IP interface that it is unnnumbered to |
| 339 | */ |
| 340 | define ip_unnumbered_details |
| 341 | { |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 342 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 343 | vl_api_interface_index_t sw_if_index; |
| 344 | vl_api_interface_index_t ip_sw_if_index; |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 345 | }; |
| 346 | |
| 347 | /** \brief Dump IP unnumbered configurations |
| 348 | @param sw_if_index ~0 for all interfaces, else the interface desired |
| 349 | */ |
| 350 | define ip_unnumbered_dump |
| 351 | { |
| 352 | u32 client_index; |
| 353 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 354 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | 9e2f915 | 2018-05-18 02:27:10 -0700 | [diff] [blame] | 355 | }; |
| 356 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 357 | define ip_details |
| 358 | { |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 359 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 360 | vl_api_interface_index_t sw_if_index; |
| 361 | bool is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 362 | }; |
| 363 | |
| 364 | define ip_dump |
| 365 | { |
| 366 | u32 client_index; |
| 367 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 368 | bool is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 369 | }; |
| 370 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 371 | define mfib_signal_dump |
| 372 | { |
| 373 | u32 client_index; |
| 374 | u32 context; |
| 375 | }; |
| 376 | |
| 377 | define mfib_signal_details |
| 378 | { |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 379 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 380 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 381 | u32 table_id; |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 382 | vl_api_mprefix_t prefix; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 383 | u16 ip_packet_len; |
| 384 | u8 ip_packet_data[256]; |
| 385 | }; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 386 | |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 387 | /** \brief IP punt policer |
| 388 | @param client_index - opaque cookie to identify the sender |
| 389 | @param context - sender context, to match reply w/ request |
| 390 | @param is_add - 1 to add neighbor, 0 to delete |
| 391 | @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 |
| 392 | @param policer_index - Index of policer to use |
| 393 | */ |
| 394 | autoreply define ip_punt_police |
| 395 | { |
| 396 | u32 client_index; |
| 397 | u32 context; |
| 398 | u32 policer_index; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 399 | bool is_add; |
| 400 | bool is_ip6; |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 401 | }; |
| 402 | |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 403 | /** \brief Punt redirect type |
Neale Ranns | 47527b2 | 2018-11-16 00:53:53 -0800 | [diff] [blame] | 404 | @param rx_sw_if_index - specify the original RX interface of traffic |
| 405 | that should be redirected. ~0 means any interface. |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 406 | @param tx_sw_if_index - the TX interface to which traffic shoulde be |
| 407 | redirected. |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 408 | @param nh - the next-hop to redirect the traffic to. |
| 409 | @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 |
| 410 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 411 | typedef punt_redirect |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 412 | { |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 413 | vl_api_interface_index_t rx_sw_if_index; |
| 414 | vl_api_interface_index_t tx_sw_if_index; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 415 | vl_api_address_t nh; |
| 416 | }; |
| 417 | |
| 418 | /** \brief IP punt redirect |
| 419 | @param client_index - opaque cookie to identify the sender |
| 420 | @param context - sender context, to match reply w/ request |
| 421 | @param punt - punt definition |
| 422 | @param is_add - 1 to add neighbor, 0 to delete |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 423 | */ |
| 424 | autoreply define ip_punt_redirect |
| 425 | { |
| 426 | u32 client_index; |
| 427 | u32 context; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 428 | vl_api_punt_redirect_t punt; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 429 | bool is_add; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 430 | }; |
| 431 | |
| 432 | define ip_punt_redirect_dump |
| 433 | { |
| 434 | u32 client_index; |
| 435 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 436 | vl_api_interface_index_t sw_if_index; |
| 437 | bool is_ipv6; |
Pavel Kotucek | 609e121 | 2018-11-27 09:59:44 +0100 | [diff] [blame] | 438 | }; |
| 439 | |
| 440 | define ip_punt_redirect_details |
| 441 | { |
| 442 | u32 context; |
| 443 | vl_api_punt_redirect_t punt; |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 444 | }; |
| 445 | |
Florin Coras | 595992c | 2017-11-06 17:17:08 -0800 | [diff] [blame] | 446 | autoreply define ip_container_proxy_add_del |
| 447 | { |
| 448 | u32 client_index; |
| 449 | u32 context; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 450 | vl_api_prefix_t pfx; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 451 | vl_api_interface_index_t sw_if_index; |
| 452 | bool is_add; |
Florin Coras | 595992c | 2017-11-06 17:17:08 -0800 | [diff] [blame] | 453 | }; |
| 454 | |
Matus Fabian | 75b9f45 | 2018-10-02 23:27:21 -0700 | [diff] [blame] | 455 | define ip_container_proxy_dump |
| 456 | { |
| 457 | u32 client_index; |
| 458 | u32 context; |
| 459 | }; |
| 460 | |
| 461 | define ip_container_proxy_details |
| 462 | { |
| 463 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 464 | vl_api_interface_index_t sw_if_index; |
Matus Fabian | 75b9f45 | 2018-10-02 23:27:21 -0700 | [diff] [blame] | 465 | vl_api_prefix_t prefix; |
| 466 | }; |
| 467 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 468 | /** \brief Configure IP source and L4 port-range check |
| 469 | @param client_index - opaque cookie to identify the sender |
| 470 | @param context - sender context, to match reply w/ request |
| 471 | @param is_ip6 - 1 if source address type is IPv6 |
| 472 | @param is_add - 1 if add, 0 if delete |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 473 | @param ip - prefix to match |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 474 | @param number_of_ranges - length of low_port and high_port arrays (must match) |
| 475 | @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry) |
| 476 | @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry) |
| 477 | @param vrf_id - fib table/vrf id to associate the source and port-range check with |
| 478 | @note To specify a single port set low_port and high_port entry the same |
| 479 | */ |
| 480 | autoreply define ip_source_and_port_range_check_add_del |
| 481 | { |
| 482 | u32 client_index; |
| 483 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 484 | bool is_add; |
Neale Ranns | 3702930 | 2018-08-10 05:30:06 -0700 | [diff] [blame] | 485 | vl_api_prefix_t prefix; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 486 | u8 number_of_ranges; |
| 487 | u16 low_ports[32]; |
| 488 | u16 high_ports[32]; |
| 489 | u32 vrf_id; |
| 490 | }; |
| 491 | |
| 492 | /** \brief Set interface source and L4 port-range request |
| 493 | @param client_index - opaque cookie to identify the sender |
| 494 | @param context - sender context, to match reply w/ request |
| 495 | @param interface_id - interface index |
| 496 | @param tcp_vrf_id - VRF associated with source and TCP port-range check |
| 497 | @param udp_vrf_id - VRF associated with source and TCP port-range check |
| 498 | */ |
| 499 | autoreply define ip_source_and_port_range_check_interface_add_del |
| 500 | { |
| 501 | u32 client_index; |
| 502 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 503 | bool is_add; |
| 504 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 505 | u32 tcp_in_vrf_id; |
| 506 | u32 tcp_out_vrf_id; |
| 507 | u32 udp_in_vrf_id; |
| 508 | u32 udp_out_vrf_id; |
| 509 | }; |
| 510 | |
Chore | 3460b01 | 2018-11-28 10:53:11 +0330 | [diff] [blame] | 511 | /** \brief Set interface source check request |
| 512 | @param client_index - opaque cookie to identify the sender |
| 513 | @param context - sender context, to match reply w/ request |
| 514 | @param is_add - add or del |
| 515 | @param loose - strict or loose |
| 516 | @param sw_if_index - interface index |
| 517 | */ |
| 518 | autoreply define ip_source_check_interface_add_del |
| 519 | { |
| 520 | u32 client_index; |
| 521 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 522 | bool is_add; |
Chore | 3460b01 | 2018-11-28 10:53:11 +0330 | [diff] [blame] | 523 | u8 loose; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 524 | vl_api_interface_index_t sw_if_index; |
Chore | 3460b01 | 2018-11-28 10:53:11 +0330 | [diff] [blame] | 525 | }; |
| 526 | |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 527 | /** \brief IPv6 set link local address on interface request |
John Lo | 7f358b3 | 2018-04-28 01:19:24 -0400 | [diff] [blame] | 528 | @param client_index - opaque cookie to identify the sender |
| 529 | @param context - sender context, to match reply w/ request |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 530 | @param sw_if_index - interface to set link local on |
| 531 | @param ip - the new link local address |
John Lo | 7f358b3 | 2018-04-28 01:19:24 -0400 | [diff] [blame] | 532 | */ |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 533 | autoreply define sw_interface_ip6_set_link_local_address |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 534 | { |
| 535 | u32 client_index; |
| 536 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 537 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 538 | vl_api_ip6_address_t ip; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 539 | }; |
| 540 | |
| 541 | /** \brief IOAM enable : Enable in-band OAM |
| 542 | @param id - profile id |
| 543 | @param seqno - To enable Seqno Processing |
| 544 | @param analyse - Enabling analysis of iOAM at decap node |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 545 | @param pot_enable - Proof of Work enabled or not flag |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 546 | @param trace_enable - iOAM Trace enabled or not flag |
| 547 | */ |
| 548 | autoreply define ioam_enable |
| 549 | { |
| 550 | u32 client_index; |
| 551 | u32 context; |
| 552 | u16 id; |
| 553 | u8 seqno; |
| 554 | u8 analyse; |
| 555 | u8 pot_enable; |
| 556 | u8 trace_enable; |
| 557 | u32 node_id; |
| 558 | }; |
| 559 | |
| 560 | /** \brief iOAM disable |
| 561 | @param client_index - opaque cookie to identify the sender |
| 562 | @param context - sender context, to match reply w/ request |
| 563 | @param index - MAP Domain index |
| 564 | */ |
| 565 | autoreply define ioam_disable |
| 566 | { |
| 567 | u32 client_index; |
| 568 | u32 context; |
| 569 | u16 id; |
| 570 | }; |
| 571 | |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 572 | enum ip_reass_type |
| 573 | { |
| 574 | IP_REASS_TYPE_FULL = 0, |
| 575 | IP_REASS_TYPE_SHALLOW_VIRTUAL = 0x1, |
| 576 | }; |
| 577 | |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 578 | autoreply define ip_reassembly_set |
| 579 | { |
| 580 | u32 client_index; |
| 581 | u32 context; |
| 582 | u32 timeout_ms; |
| 583 | u32 max_reassemblies; |
Klement Sekera | 3a343d4 | 2019-05-16 14:35:46 +0200 | [diff] [blame] | 584 | u32 max_reassembly_length; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 585 | u32 expire_walk_interval_ms; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 586 | bool is_ip6; |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 587 | vl_api_ip_reass_type_t type; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 588 | }; |
| 589 | |
| 590 | define ip_reassembly_get |
| 591 | { |
| 592 | u32 client_index; |
| 593 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 594 | bool is_ip6; |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 595 | vl_api_ip_reass_type_t type; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 596 | }; |
| 597 | |
| 598 | define ip_reassembly_get_reply |
| 599 | { |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 600 | u32 context; |
| 601 | i32 retval; |
| 602 | u32 timeout_ms; |
| 603 | u32 max_reassemblies; |
Klement Sekera | 3a343d4 | 2019-05-16 14:35:46 +0200 | [diff] [blame] | 604 | u32 max_reassembly_length; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 605 | u32 expire_walk_interval_ms; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 606 | bool is_ip6; |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 607 | }; |
| 608 | |
Klement Sekera | 4c53313 | 2018-02-22 11:41:12 +0100 | [diff] [blame] | 609 | /** \brief Enable/disable reassembly feature |
| 610 | @param client_index - opaque cookie to identify the sender |
| 611 | @param context - sender context, to match reply w/ request |
| 612 | @param sw_if_index - interface to enable/disable feature on |
| 613 | @param enable_ip4 - enable ip4 reassembly if non-zero, disable if 0 |
| 614 | @param enable_ip6 - enable ip6 reassembly if non-zero, disable if 0 |
| 615 | */ |
| 616 | autoreply define ip_reassembly_enable_disable |
| 617 | { |
| 618 | u32 client_index; |
| 619 | u32 context; |
Ole Troan | 668605f | 2019-12-09 16:08:27 +0100 | [diff] [blame] | 620 | vl_api_interface_index_t sw_if_index; |
| 621 | bool enable_ip4; |
| 622 | bool enable_ip6; |
Klement Sekera | de34c35 | 2019-06-25 11:19:22 +0000 | [diff] [blame] | 623 | vl_api_ip_reass_type_t type; |
Klement Sekera | 4c53313 | 2018-02-22 11:41:12 +0100 | [diff] [blame] | 624 | }; |
| 625 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 626 | /* |
| 627 | * Local Variables: |
| 628 | * eval: (c-set-style "gnu") |
| 629 | * End: |
| 630 | */ |