Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016 Cisco and/or its affiliates. |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | * you may not use this file except in compliance with the License. |
| 5 | * You may obtain a copy of the License at: |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | * See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | */ |
| 15 | |
| 16 | /** \file |
| 17 | |
| 18 | This file defines vpp IP control-plane API messages which are generally |
| 19 | called through a shared memory interface. |
| 20 | */ |
| 21 | |
Neale Ranns | 31ed744 | 2018-02-23 05:29:09 -0800 | [diff] [blame^] | 22 | option version = "1.1.0"; |
| 23 | import "vnet/fib/fib_types.api"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 24 | |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 25 | /** \brief Add / del table request |
| 26 | A table can be added multiple times, but need be deleted only once. |
| 27 | @param client_index - opaque cookie to identify the sender |
| 28 | @param context - sender context, to match reply w/ request |
| 29 | @param is_ipv6 - V4 or V6 table |
| 30 | @param table_id - table ID associated with the route |
| 31 | This table ID will apply to both the unicats |
| 32 | and mlticast FIBs |
Neale Ranns | 2297af0 | 2017-09-12 09:45:04 -0700 | [diff] [blame] | 33 | @param name - A client provided name/tag for the table. If this is |
| 34 | not set by the client, then VPP will generate something |
| 35 | meaningfull. |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 36 | */ |
| 37 | autoreply define ip_table_add_del |
| 38 | { |
| 39 | u32 client_index; |
| 40 | u32 context; |
| 41 | u32 table_id; |
| 42 | u8 is_ipv6; |
| 43 | u8 is_add; |
Neale Ranns | 2297af0 | 2017-09-12 09:45:04 -0700 | [diff] [blame] | 44 | u8 name[64]; |
Neale Ranns | 28ab9cc | 2017-08-14 07:18:42 -0700 | [diff] [blame] | 45 | }; |
| 46 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 47 | /** \brief Dump IP fib table |
| 48 | @param client_index - opaque cookie to identify the sender |
| 49 | */ |
| 50 | define ip_fib_dump |
| 51 | { |
| 52 | u32 client_index; |
| 53 | u32 context; |
| 54 | }; |
| 55 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 56 | /** \brief IP FIB table response |
| 57 | @param table_id - IP fib table id |
| 58 | @address_length - mask length |
| 59 | @address - ip4 prefix |
| 60 | @param count - the number of fib_path in path |
| 61 | @param path - array of of fib_path structures |
| 62 | */ |
| 63 | manual_endian manual_print define ip_fib_details |
| 64 | { |
| 65 | u32 context; |
| 66 | u32 table_id; |
Neale Ranns | 2297af0 | 2017-09-12 09:45:04 -0700 | [diff] [blame] | 67 | u8 table_name[64]; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 68 | u8 address_length; |
| 69 | u8 address[4]; |
| 70 | u32 count; |
| 71 | vl_api_fib_path_t path[count]; |
| 72 | }; |
| 73 | |
| 74 | /** \brief Dump IP6 fib table |
| 75 | @param client_index - opaque cookie to identify the sender |
| 76 | */ |
| 77 | define ip6_fib_dump |
| 78 | { |
| 79 | u32 client_index; |
| 80 | u32 context; |
| 81 | }; |
| 82 | |
Neale Ranns | 2297af0 | 2017-09-12 09:45:04 -0700 | [diff] [blame] | 83 | /** \brief IP6 FIB table entry response |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 84 | @param table_id - IP6 fib table id |
Neale Ranns | 2297af0 | 2017-09-12 09:45:04 -0700 | [diff] [blame] | 85 | @param address_length - mask length |
| 86 | @param address - ip6 prefix |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 87 | @param count - the number of fib_path in path |
| 88 | @param path - array of of fib_path structures |
| 89 | */ |
| 90 | manual_endian manual_print define ip6_fib_details |
| 91 | { |
| 92 | u32 context; |
| 93 | u32 table_id; |
Neale Ranns | 2297af0 | 2017-09-12 09:45:04 -0700 | [diff] [blame] | 94 | u8 table_name[64]; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 95 | u8 address_length; |
| 96 | u8 address[16]; |
| 97 | u32 count; |
| 98 | vl_api_fib_path_t path[count]; |
| 99 | }; |
| 100 | |
| 101 | /** \brief Dump IP neighboors |
| 102 | @param client_index - opaque cookie to identify the sender |
| 103 | @param context - sender context, to match reply w/ request |
Jon Loeliger | af8dfbf | 2017-11-08 13:07:39 -0600 | [diff] [blame] | 104 | @param sw_if_index - the interface to dump neighboors, ~0 == all |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 105 | @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4] |
| 106 | */ |
| 107 | define ip_neighbor_dump |
| 108 | { |
| 109 | u32 client_index; |
| 110 | u32 context; |
| 111 | u32 sw_if_index; |
| 112 | u8 is_ipv6; |
| 113 | }; |
| 114 | |
| 115 | /** \brief IP neighboors dump response |
| 116 | @param context - sender context which was passed in the request |
Jon Loeliger | af8dfbf | 2017-11-08 13:07:39 -0600 | [diff] [blame] | 117 | @param sw_if_index - The interface used to reach the neighbor |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 118 | @param is_static - [1|0] to indicate if neighbor is statically configured |
| 119 | @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4] |
| 120 | */ |
| 121 | define ip_neighbor_details { |
| 122 | u32 context; |
Jon Loeliger | af8dfbf | 2017-11-08 13:07:39 -0600 | [diff] [blame] | 123 | u32 sw_if_index; |
Pavel Kotucek | 8cb07c9 | 2017-01-11 10:13:54 +0100 | [diff] [blame] | 124 | u8 is_static; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 125 | u8 is_ipv6; |
| 126 | u8 mac_address[6]; |
| 127 | u8 ip_address[16]; |
| 128 | }; |
| 129 | |
| 130 | /** \brief IP neighbor add / del request |
| 131 | @param client_index - opaque cookie to identify the sender |
| 132 | @param context - sender context, to match reply w/ request |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 133 | @param sw_if_index - interface used to reach neighbor |
| 134 | @param is_add - 1 to add neighbor, 0 to delete |
| 135 | @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 |
Neale Ranns | 239d3fe | 2017-03-08 08:56:58 -0800 | [diff] [blame] | 136 | @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 |
| 137 | @param is_static - A static neighbor Entry - there are not flushed |
| 138 | If the interface goes down. |
| 139 | @param is_no_adj_fib - Do not create a corresponding entry in the FIB |
| 140 | table for the neighbor. |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 141 | @param mac_address - l2 address of the neighbor |
| 142 | @param dst_address - ip4 or ip6 address of the neighbor |
| 143 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 144 | autoreply define ip_neighbor_add_del |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 145 | { |
| 146 | u32 client_index; |
| 147 | u32 context; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 148 | u32 sw_if_index; |
| 149 | /* 1 = add, 0 = delete */ |
| 150 | u8 is_add; |
| 151 | u8 is_ipv6; |
| 152 | u8 is_static; |
Neale Ranns | 239d3fe | 2017-03-08 08:56:58 -0800 | [diff] [blame] | 153 | u8 is_no_adj_fib; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 154 | u8 mac_address[6]; |
| 155 | u8 dst_address[16]; |
| 156 | }; |
| 157 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 158 | /** \brief Set the ip flow hash config for a fib request |
| 159 | @param client_index - opaque cookie to identify the sender |
| 160 | @param context - sender context, to match reply w/ request |
| 161 | @param vrf_id - vrf/fib id |
| 162 | @param is_ipv6 - if non-zero the fib is ip6, else ip4 |
| 163 | @param src - if non-zero include src in flow hash |
| 164 | @param dst - if non-zero include dst in flow hash |
| 165 | @param sport - if non-zero include sport in flow hash |
| 166 | @param dport - if non-zero include dport in flow hash |
| 167 | @param proto -if non-zero include proto in flow hash |
| 168 | @param reverse - if non-zero include reverse in flow hash |
| 169 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 170 | autoreply define set_ip_flow_hash |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 171 | { |
| 172 | u32 client_index; |
| 173 | u32 context; |
| 174 | u32 vrf_id; |
| 175 | u8 is_ipv6; |
| 176 | u8 src; |
| 177 | u8 dst; |
| 178 | u8 sport; |
| 179 | u8 dport; |
| 180 | u8 proto; |
| 181 | u8 reverse; |
| 182 | }; |
| 183 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 184 | /** \brief IPv6 router advertisement config request |
| 185 | @param client_index - opaque cookie to identify the sender |
| 186 | @param context - sender context, to match reply w/ request |
| 187 | @param suppress - |
| 188 | @param managed - |
| 189 | @param other - |
| 190 | @param ll_option - |
| 191 | @param send_unicast - |
| 192 | @param cease - |
| 193 | @param is_no - |
| 194 | @param default_router - |
| 195 | @param max_interval - |
| 196 | @param min_interval - |
| 197 | @param lifetime - |
| 198 | @param initial_count - |
| 199 | @param initial_interval - |
| 200 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 201 | autoreply define sw_interface_ip6nd_ra_config |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 202 | { |
| 203 | u32 client_index; |
| 204 | u32 context; |
| 205 | u32 sw_if_index; |
| 206 | u8 suppress; |
| 207 | u8 managed; |
| 208 | u8 other; |
| 209 | u8 ll_option; |
| 210 | u8 send_unicast; |
| 211 | u8 cease; |
| 212 | u8 is_no; |
| 213 | u8 default_router; |
| 214 | u32 max_interval; |
| 215 | u32 min_interval; |
| 216 | u32 lifetime; |
| 217 | u32 initial_count; |
| 218 | u32 initial_interval; |
| 219 | }; |
| 220 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 221 | /** \brief IPv6 router advertisement prefix config request |
| 222 | @param client_index - opaque cookie to identify the sender |
| 223 | @param context - sender context, to match reply w/ request |
Neale Ranns | 87df12d | 2017-02-18 08:16:41 -0800 | [diff] [blame] | 224 | @param sw_if_index - The interface the RA prefix information is for |
| 225 | @param address[] - The prefix to advertise |
| 226 | @param address_length - the prefix length |
| 227 | @param use_default - Revert to default settings |
| 228 | @param no_advertise - Do not advertise this prefix |
| 229 | @param off_link - The prefix is off link (it is not configured on the interface) |
| 230 | Configures the L-flag, When set, indicates that this |
| 231 | prefix can be used for on-link determination. |
| 232 | @param no_autoconfig - Setting for the A-flag. When |
| 233 | set indicates that this prefix can be used for |
| 234 | stateless address configuration. |
| 235 | @param no_onlink - The prefix is not on link. Make sure this is consistent |
| 236 | with the off_link parameter else YMMV |
| 237 | @param is_no - add/delete |
| 238 | @param val_lifetime - The length of time in |
| 239 | seconds (relative to the time the packet is sent) |
| 240 | that the prefix is valid for the purpose of on-link |
| 241 | determination. A value of all one bits |
| 242 | (0xffffffff) represents infinity |
| 243 | @param pref_lifetime - The length of time in |
| 244 | seconds (relative to the time the packet is sent) |
| 245 | that addresses generated from the prefix via |
| 246 | stateless address autoconfiguration remain |
| 247 | preferred [ADDRCONF]. A value of all one bits |
| 248 | (0xffffffff) represents infinity. |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 249 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 250 | autoreply define sw_interface_ip6nd_ra_prefix |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 251 | { |
| 252 | u32 client_index; |
| 253 | u32 context; |
| 254 | u32 sw_if_index; |
| 255 | u8 address[16]; |
| 256 | u8 address_length; |
| 257 | u8 use_default; |
| 258 | u8 no_advertise; |
| 259 | u8 off_link; |
| 260 | u8 no_autoconfig; |
| 261 | u8 no_onlink; |
| 262 | u8 is_no; |
| 263 | u32 val_lifetime; |
| 264 | u32 pref_lifetime; |
| 265 | }; |
| 266 | |
Neale Ranns | 3f844d0 | 2017-02-18 00:03:54 -0800 | [diff] [blame] | 267 | /** \brief IPv6 ND proxy config |
| 268 | @param client_index - opaque cookie to identify the sender |
| 269 | @param context - sender context, to match reply w/ request |
| 270 | @param sw_if_index - The interface the host is on |
| 271 | @param address - The address of the host for which to proxy for |
| 272 | @param is_add - Adding or deleting |
| 273 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 274 | autoreply define ip6nd_proxy_add_del |
Neale Ranns | 3f844d0 | 2017-02-18 00:03:54 -0800 | [diff] [blame] | 275 | { |
| 276 | u32 client_index; |
| 277 | u32 context; |
| 278 | u32 sw_if_index; |
| 279 | u8 is_del; |
| 280 | u8 address[16]; |
| 281 | }; |
| 282 | |
Neale Ranns | 3f844d0 | 2017-02-18 00:03:54 -0800 | [diff] [blame] | 283 | /** \brief IPv6 ND proxy details returned after request |
| 284 | @param context - sender context, to match reply w/ request |
| 285 | @param retval - return code for the request |
| 286 | */ |
| 287 | define ip6nd_proxy_details |
| 288 | { |
| 289 | u32 client_index; |
| 290 | u32 context; |
| 291 | u32 sw_if_index; |
| 292 | u8 address[16]; |
| 293 | }; |
| 294 | |
| 295 | /** \brief IPv6 ND proxy dump request |
| 296 | @param context - sender context, to match reply w/ request |
| 297 | @param retval - return code for the request |
| 298 | @param sw_if_index - The interface the host is on |
| 299 | @param address - The address of the host for which to proxy for |
| 300 | */ |
| 301 | define ip6nd_proxy_dump |
| 302 | { |
| 303 | u32 client_index; |
| 304 | u32 context; |
| 305 | }; |
| 306 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 307 | /** \brief IPv6 interface enable / disable request |
| 308 | @param client_index - opaque cookie to identify the sender |
| 309 | @param context - sender context, to match reply w/ request |
| 310 | @param sw_if_index - interface used to reach neighbor |
| 311 | @param enable - if non-zero enable ip6 on interface, else disable |
| 312 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 313 | autoreply define sw_interface_ip6_enable_disable |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 314 | { |
| 315 | u32 client_index; |
| 316 | u32 context; |
| 317 | u32 sw_if_index; |
| 318 | u8 enable; /* set to true if enable */ |
| 319 | }; |
| 320 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 321 | /** \brief IPv6 set link local address on interface request |
| 322 | @param client_index - opaque cookie to identify the sender |
| 323 | @param context - sender context, to match reply w/ request |
| 324 | @param sw_if_index - interface to set link local on |
| 325 | @param address[] - the new link local address |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 326 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 327 | autoreply define sw_interface_ip6_set_link_local_address |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 328 | { |
| 329 | u32 client_index; |
| 330 | u32 context; |
| 331 | u32 sw_if_index; |
| 332 | u8 address[16]; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 333 | }; |
| 334 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 335 | /** \brief Add / del route request |
| 336 | @param client_index - opaque cookie to identify the sender |
| 337 | @param context - sender context, to match reply w/ request |
| 338 | @param sw_if_index - software index of the new vlan's parent interface |
| 339 | @param vrf_id - fib table /vrf associated with the route |
| 340 | @param lookup_in_vrf - |
| 341 | @param classify_table_index - |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 342 | @param is_add - 1 if adding the route, 0 if deleting |
| 343 | @param is_drop - Drop the packet |
| 344 | @param is_unreach - Drop the packet and rate limit send ICMP unreachable |
| 345 | @param is_prohibit - Drop the packet and rate limit send ICMP prohibited |
| 346 | @param is_ipv6 - 0 if an ip4 route, else ip6 |
Neale Ranns | 810086d | 2017-11-05 16:26:46 -0800 | [diff] [blame] | 347 | @param is_local - The route will result in packets sent to VPP IP stack |
| 348 | @param is_udp_encap - The path describes a UDP-o-IP encapsulation. |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 349 | @param is_classify - |
| 350 | @param is_multipath - Set to 1 if this is a multipath route, else 0 |
Neale Ranns | f068c3e | 2018-01-03 04:18:48 -0800 | [diff] [blame] | 351 | @param is_dvr - Does the route resolve via a DVR interface. |
Neale Ranns | 054c03a | 2017-10-13 05:15:07 -0700 | [diff] [blame] | 352 | @param is_source_lookup - The the path is a deaggregate path (i.e. a lookup |
| 353 | in another table) is the lookup on the packet's |
| 354 | source address or destination. |
Neale Ranns | 810086d | 2017-11-05 16:26:46 -0800 | [diff] [blame] | 355 | @param next_hop_weight - Weight for Unequal cost multi-path |
| 356 | @param next_hop_preference - Path that are up that have the best preference are |
| 357 | are used for forwarding. lower value is better. |
| 358 | @param next_hop_id - Used when the path resolves via an object that has a unique |
| 359 | identifier. |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 360 | @param dst_address_length - |
| 361 | @param dst_address[16] - |
| 362 | @param next_hop_address[16] - |
| 363 | @param next_hop_n_out_labels - the number of labels in the label stack |
| 364 | @param next_hop_out_label_stack - the next-hop output label stack, outer most first |
| 365 | @param next_hop_via_label - The next-hop is a resolved via a local label |
| 366 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 367 | autoreply define ip_add_del_route |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 368 | { |
| 369 | u32 client_index; |
| 370 | u32 context; |
| 371 | u32 next_hop_sw_if_index; |
| 372 | u32 table_id; |
| 373 | u32 classify_table_index; |
| 374 | u32 next_hop_table_id; |
Neale Ranns | 810086d | 2017-11-05 16:26:46 -0800 | [diff] [blame] | 375 | u32 next_hop_id; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 376 | u8 is_add; |
| 377 | u8 is_drop; |
| 378 | u8 is_unreach; |
| 379 | u8 is_prohibit; |
| 380 | u8 is_ipv6; |
| 381 | u8 is_local; |
| 382 | u8 is_classify; |
| 383 | u8 is_multipath; |
| 384 | u8 is_resolve_host; |
| 385 | u8 is_resolve_attached; |
Neale Ranns | f068c3e | 2018-01-03 04:18:48 -0800 | [diff] [blame] | 386 | u8 is_dvr; |
Neale Ranns | 054c03a | 2017-10-13 05:15:07 -0700 | [diff] [blame] | 387 | u8 is_source_lookup; |
Neale Ranns | 810086d | 2017-11-05 16:26:46 -0800 | [diff] [blame] | 388 | u8 is_udp_encap; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 389 | u8 next_hop_weight; |
Neale Ranns | 57b5860 | 2017-07-15 07:37:25 -0700 | [diff] [blame] | 390 | u8 next_hop_preference; |
Neale Ranns | 810086d | 2017-11-05 16:26:46 -0800 | [diff] [blame] | 391 | u8 next_hop_proto; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 392 | u8 dst_address_length; |
| 393 | u8 dst_address[16]; |
| 394 | u8 next_hop_address[16]; |
| 395 | u8 next_hop_n_out_labels; |
| 396 | u32 next_hop_via_label; |
Neale Ranns | 31ed744 | 2018-02-23 05:29:09 -0800 | [diff] [blame^] | 397 | vl_api_fib_mpls_label_t next_hop_out_label_stack[next_hop_n_out_labels]; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 398 | }; |
| 399 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 400 | /** \brief Add / del route request |
| 401 | @param client_index - opaque cookie to identify the sender |
| 402 | @param context - sender context, to match reply w/ request |
| 403 | @param sw_if_index - software index of the new vlan's parent interface |
| 404 | @param vrf_id - fib table /vrf associated with the route |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 405 | @param next_hop_afi - Use dpo_proto_t |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 406 | FIXME |
| 407 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 408 | autoreply define ip_mroute_add_del |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 409 | { |
| 410 | u32 client_index; |
| 411 | u32 context; |
| 412 | u32 next_hop_sw_if_index; |
| 413 | u32 table_id; |
| 414 | u32 entry_flags; |
| 415 | u32 itf_flags; |
Neale Ranns | 0f26c5a | 2017-03-01 15:12:11 -0800 | [diff] [blame] | 416 | u32 rpf_id; |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 417 | u32 bier_imp; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 418 | u16 grp_address_length; |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 419 | u8 next_hop_afi; |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 420 | u8 is_add; |
| 421 | u8 is_ipv6; |
| 422 | u8 is_local; |
| 423 | u8 grp_address[16]; |
| 424 | u8 src_address[16]; |
| 425 | }; |
| 426 | |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 427 | /** \brief Dump IP multicast fib table |
| 428 | @param client_index - opaque cookie to identify the sender |
| 429 | */ |
| 430 | define ip_mfib_dump |
| 431 | { |
| 432 | u32 client_index; |
| 433 | u32 context; |
| 434 | }; |
| 435 | |
| 436 | /** \brief IP Multicast FIB table response |
| 437 | @param table_id - IP fib table id |
| 438 | @address_length - mask length |
| 439 | @grp_address - Group address/prefix |
| 440 | @src_address - Source address |
| 441 | @param count - the number of fib_path in path |
| 442 | @param path - array of of fib_path structures |
| 443 | */ |
| 444 | manual_endian manual_print define ip_mfib_details |
| 445 | { |
| 446 | u32 context; |
| 447 | u32 table_id; |
Neale Ranns | 0f26c5a | 2017-03-01 15:12:11 -0800 | [diff] [blame] | 448 | u32 entry_flags; |
| 449 | u32 rpf_id; |
Neale Ranns | 5a8123b | 2017-01-26 01:18:23 -0800 | [diff] [blame] | 450 | u8 address_length; |
| 451 | u8 grp_address[4]; |
| 452 | u8 src_address[4]; |
| 453 | u32 count; |
| 454 | vl_api_fib_path_t path[count]; |
| 455 | }; |
| 456 | |
| 457 | /** \brief Dump IP6 multicast fib table |
| 458 | @param client_index - opaque cookie to identify the sender |
| 459 | */ |
| 460 | define ip6_mfib_dump |
| 461 | { |
| 462 | u32 client_index; |
| 463 | u32 context; |
| 464 | }; |
| 465 | |
| 466 | /** \brief IP6 Multicast FIB table response |
| 467 | @param table_id - IP fib table id |
| 468 | @address_length - mask length |
| 469 | @grp_address - Group address/prefix |
| 470 | @src_address - Source address |
| 471 | @param count - the number of fib_path in path |
| 472 | @param path - array of of fib_path structures |
| 473 | */ |
| 474 | manual_endian manual_print define ip6_mfib_details |
| 475 | { |
| 476 | u32 context; |
| 477 | u32 table_id; |
| 478 | u8 address_length; |
| 479 | u8 grp_address[16]; |
| 480 | u8 src_address[16]; |
| 481 | u32 count; |
| 482 | vl_api_fib_path_t path[count]; |
| 483 | }; |
| 484 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 485 | define ip_address_details |
| 486 | { |
| 487 | u32 client_index; |
| 488 | u32 context; |
| 489 | u8 ip[16]; |
| 490 | u8 prefix_length; |
Jon Loeliger | 466f0d4 | 2017-02-09 12:17:50 -0600 | [diff] [blame] | 491 | u32 sw_if_index; |
| 492 | u8 is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 493 | }; |
| 494 | |
| 495 | define ip_address_dump |
| 496 | { |
| 497 | u32 client_index; |
| 498 | u32 context; |
| 499 | u32 sw_if_index; |
| 500 | u8 is_ipv6; |
| 501 | }; |
| 502 | |
| 503 | define ip_details |
| 504 | { |
| 505 | u32 sw_if_index; |
| 506 | u32 context; |
Jon Loeliger | 466f0d4 | 2017-02-09 12:17:50 -0600 | [diff] [blame] | 507 | u8 is_ipv6; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 508 | }; |
| 509 | |
| 510 | define ip_dump |
| 511 | { |
| 512 | u32 client_index; |
| 513 | u32 context; |
| 514 | u8 is_ipv6; |
| 515 | }; |
| 516 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 517 | define mfib_signal_dump |
| 518 | { |
| 519 | u32 client_index; |
| 520 | u32 context; |
| 521 | }; |
| 522 | |
| 523 | define mfib_signal_details |
| 524 | { |
| 525 | u32 client_index; |
| 526 | u32 context; |
| 527 | u32 sw_if_index; |
| 528 | u32 table_id; |
| 529 | u16 grp_address_len; |
| 530 | u8 grp_address[16]; |
| 531 | u8 src_address[16]; |
| 532 | u16 ip_packet_len; |
| 533 | u8 ip_packet_data[256]; |
| 534 | }; |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 535 | |
Neale Ranns | d91c1db | 2017-07-31 02:30:50 -0700 | [diff] [blame] | 536 | /** \brief IP punt policer |
| 537 | @param client_index - opaque cookie to identify the sender |
| 538 | @param context - sender context, to match reply w/ request |
| 539 | @param is_add - 1 to add neighbor, 0 to delete |
| 540 | @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 |
| 541 | @param policer_index - Index of policer to use |
| 542 | */ |
| 543 | autoreply define ip_punt_police |
| 544 | { |
| 545 | u32 client_index; |
| 546 | u32 context; |
| 547 | u32 policer_index; |
| 548 | u8 is_add; |
| 549 | u8 is_ip6; |
| 550 | }; |
| 551 | |
| 552 | /** \brief IP punt redirect |
| 553 | @param client_index - opaque cookie to identify the sender |
| 554 | @param context - sender context, to match reply w/ request |
| 555 | @param is_add - 1 to add neighbor, 0 to delete |
| 556 | @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 |
| 557 | @param tx_sw_if_index - the TX interface to which traffic shoulde be |
| 558 | redirected. |
| 559 | @param nh - The next-hop to redirect the traffic to. |
| 560 | */ |
| 561 | autoreply define ip_punt_redirect |
| 562 | { |
| 563 | u32 client_index; |
| 564 | u32 context; |
| 565 | u32 rx_sw_if_index; |
| 566 | u32 tx_sw_if_index; |
| 567 | u8 is_add; |
| 568 | u8 is_ip6; |
| 569 | u8 nh[16]; |
| 570 | }; |
| 571 | |
Florin Coras | 595992c | 2017-11-06 17:17:08 -0800 | [diff] [blame] | 572 | autoreply define ip_container_proxy_add_del |
| 573 | { |
| 574 | u32 client_index; |
| 575 | u32 context; |
| 576 | u8 ip[16]; |
| 577 | u8 is_ip4; |
| 578 | u8 plen; |
| 579 | u32 sw_if_index; |
| 580 | u8 is_add; |
| 581 | }; |
| 582 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 583 | /** \brief Configure IP source and L4 port-range check |
| 584 | @param client_index - opaque cookie to identify the sender |
| 585 | @param context - sender context, to match reply w/ request |
| 586 | @param is_ip6 - 1 if source address type is IPv6 |
| 587 | @param is_add - 1 if add, 0 if delete |
| 588 | @param mask_length - mask length for address entry |
| 589 | @param address - array of address bytes |
| 590 | @param number_of_ranges - length of low_port and high_port arrays (must match) |
| 591 | @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry) |
| 592 | @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry) |
| 593 | @param vrf_id - fib table/vrf id to associate the source and port-range check with |
| 594 | @note To specify a single port set low_port and high_port entry the same |
| 595 | */ |
| 596 | autoreply define ip_source_and_port_range_check_add_del |
| 597 | { |
| 598 | u32 client_index; |
| 599 | u32 context; |
| 600 | u8 is_ipv6; |
| 601 | u8 is_add; |
| 602 | u8 mask_length; |
| 603 | u8 address[16]; |
| 604 | u8 number_of_ranges; |
| 605 | u16 low_ports[32]; |
| 606 | u16 high_ports[32]; |
| 607 | u32 vrf_id; |
| 608 | }; |
| 609 | |
| 610 | /** \brief Set interface source and L4 port-range request |
| 611 | @param client_index - opaque cookie to identify the sender |
| 612 | @param context - sender context, to match reply w/ request |
| 613 | @param interface_id - interface index |
| 614 | @param tcp_vrf_id - VRF associated with source and TCP port-range check |
| 615 | @param udp_vrf_id - VRF associated with source and TCP port-range check |
| 616 | */ |
| 617 | autoreply define ip_source_and_port_range_check_interface_add_del |
| 618 | { |
| 619 | u32 client_index; |
| 620 | u32 context; |
| 621 | u8 is_add; |
| 622 | u32 sw_if_index; |
| 623 | u32 tcp_in_vrf_id; |
| 624 | u32 tcp_out_vrf_id; |
| 625 | u32 udp_in_vrf_id; |
| 626 | u32 udp_out_vrf_id; |
| 627 | }; |
| 628 | |
| 629 | /** \brief Register for ip4 arp resolution events |
| 630 | @param client_index - opaque cookie to identify the sender |
| 631 | @param context - sender context, to match reply w/ request |
| 632 | @param enable_disable - 1 => register for events, 0 => cancel registration |
| 633 | @param pid - sender's pid |
| 634 | @param address - the exact ip4 address of interest |
| 635 | */ |
| 636 | autoreply define want_ip4_arp_events |
| 637 | { |
| 638 | u32 client_index; |
| 639 | u32 context; |
| 640 | u8 enable_disable; |
| 641 | u32 pid; |
| 642 | u32 address; |
| 643 | }; |
| 644 | |
| 645 | /** \brief Tell client about an ip4 arp resolution event |
| 646 | @param client_index - opaque cookie to identify the sender |
| 647 | @param address - the exact ip4 address of interest |
| 648 | @param pid - client pid registered to receive notification |
| 649 | @param sw_if_index - interface which received ARP packet |
| 650 | @param new_mac - the new mac address |
| 651 | @param mac_ip - 0: resolution event, 1: mac/ip binding in bd |
| 652 | */ |
| 653 | define ip4_arp_event |
| 654 | { |
| 655 | u32 client_index; |
| 656 | u32 address; |
| 657 | u32 pid; |
| 658 | u32 sw_if_index; |
| 659 | u8 new_mac[6]; |
| 660 | u8 mac_ip; |
| 661 | }; |
| 662 | |
Marek Gradzki | 51e5968 | 2018-03-06 10:05:44 +0100 | [diff] [blame] | 663 | service { |
| 664 | rpc want_ip4_arp_events returns want_ip4_arp_events_reply |
| 665 | events ip4_arp_event; |
| 666 | }; |
| 667 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 668 | /** \brief Register for ip6 nd resolution events |
| 669 | @param client_index - opaque cookie to identify the sender |
| 670 | @param context - sender context, to match reply w/ request |
| 671 | @param enable_disable - 1 => register for events, 0 => cancel registration |
| 672 | @param pid - sender's pid |
| 673 | @param address - the exact ip6 address of interest |
| 674 | */ |
| 675 | autoreply define want_ip6_nd_events |
| 676 | { |
| 677 | u32 client_index; |
| 678 | u32 context; |
| 679 | u8 enable_disable; |
| 680 | u32 pid; |
| 681 | u8 address[16]; |
| 682 | }; |
| 683 | |
| 684 | /** \brief Tell client about an ip6 nd resolution or mac/ip event |
| 685 | @param client_index - opaque cookie to identify the sender |
| 686 | @param pid - client pid registered to receive notification |
| 687 | @param sw_if_index - interface which received ARP packet |
| 688 | @param address - the exact ip6 address of interest |
| 689 | @param new_mac - the new mac address |
| 690 | @param mac_ip - 0: resolution event, 1: mac/ip binding in bd |
| 691 | */ |
| 692 | define ip6_nd_event |
| 693 | { |
| 694 | u32 client_index; |
| 695 | u32 pid; |
| 696 | u32 sw_if_index; |
| 697 | u8 address[16]; |
| 698 | u8 new_mac[6]; |
| 699 | u8 mac_ip; |
| 700 | }; |
| 701 | |
Marek Gradzki | 51e5968 | 2018-03-06 10:05:44 +0100 | [diff] [blame] | 702 | service { |
| 703 | rpc want_ip6_nd_events returns want_ip6_nd_events_reply |
| 704 | events ip6_nd_event; |
| 705 | }; |
| 706 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 707 | /** \brief Proxy ARP add / del request |
| 708 | @param client_index - opaque cookie to identify the sender |
| 709 | @param context - sender context, to match reply w/ request |
| 710 | @param vrf_id - VRF / Fib table ID |
| 711 | @param is_add - 1 if adding the Proxy ARP range, 0 if deleting |
| 712 | @param low_address[4] - Low address of the Proxy ARP range |
| 713 | @param hi_address[4] - High address of the Proxy ARP range |
| 714 | */ |
| 715 | autoreply define proxy_arp_add_del |
| 716 | { |
| 717 | u32 client_index; |
| 718 | u32 context; |
| 719 | u32 vrf_id; |
| 720 | u8 is_add; |
| 721 | u8 low_address[4]; |
| 722 | u8 hi_address[4]; |
| 723 | }; |
| 724 | |
| 725 | /** \brief Proxy ARP add / del request |
| 726 | @param client_index - opaque cookie to identify the sender |
| 727 | @param context - sender context, to match reply w/ request |
| 728 | @param sw_if_index - Which interface to enable / disable Proxy Arp on |
| 729 | @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable |
| 730 | */ |
| 731 | autoreply define proxy_arp_intfc_enable_disable |
| 732 | { |
| 733 | u32 client_index; |
| 734 | u32 context; |
| 735 | u32 sw_if_index; |
| 736 | /* 1 = on, 0 = off */ |
| 737 | u8 enable_disable; |
| 738 | }; |
| 739 | |
| 740 | /** \brief Reset fib table request |
| 741 | @param client_index - opaque cookie to identify the sender |
| 742 | @param context - sender context, to match reply w/ request |
| 743 | @param vrf_id - vrf/table id of the fib table to reset |
| 744 | @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4 |
| 745 | */ |
| 746 | autoreply define reset_fib |
| 747 | { |
| 748 | u32 client_index; |
| 749 | u32 context; |
| 750 | u32 vrf_id; |
| 751 | u8 is_ipv6; |
| 752 | }; |
| 753 | |
| 754 | /** \brief Set max allowed ARP or ip6 neighbor entries request |
| 755 | @param client_index - opaque cookie to identify the sender |
| 756 | @param context - sender context, to match reply w/ request |
| 757 | @param is_ipv6 - neighbor limit if non-zero, else ARP limit |
| 758 | @param arp_neighbor_limit - the new limit, defaults are ~ 50k |
| 759 | */ |
| 760 | autoreply define set_arp_neighbor_limit |
| 761 | { |
| 762 | u32 client_index; |
| 763 | u32 context; |
| 764 | u8 is_ipv6; |
| 765 | u32 arp_neighbor_limit; |
| 766 | }; |
| 767 | |
| 768 | /** \brief IOAM enable : Enable in-band OAM |
| 769 | @param id - profile id |
| 770 | @param seqno - To enable Seqno Processing |
| 771 | @param analyse - Enabling analysis of iOAM at decap node |
| 772 | @param pow_enable - Proof of Work enabled or not flag |
| 773 | @param trace_enable - iOAM Trace enabled or not flag |
| 774 | */ |
| 775 | autoreply define ioam_enable |
| 776 | { |
| 777 | u32 client_index; |
| 778 | u32 context; |
| 779 | u16 id; |
| 780 | u8 seqno; |
| 781 | u8 analyse; |
| 782 | u8 pot_enable; |
| 783 | u8 trace_enable; |
| 784 | u32 node_id; |
| 785 | }; |
| 786 | |
| 787 | /** \brief iOAM disable |
| 788 | @param client_index - opaque cookie to identify the sender |
| 789 | @param context - sender context, to match reply w/ request |
| 790 | @param index - MAP Domain index |
| 791 | */ |
| 792 | autoreply define ioam_disable |
| 793 | { |
| 794 | u32 client_index; |
| 795 | u32 context; |
| 796 | u16 id; |
| 797 | }; |
| 798 | |
Klement Sekera | 75e7d13 | 2017-09-20 08:26:30 +0200 | [diff] [blame] | 799 | autoreply define ip_reassembly_set |
| 800 | { |
| 801 | u32 client_index; |
| 802 | u32 context; |
| 803 | u32 timeout_ms; |
| 804 | u32 max_reassemblies; |
| 805 | u32 expire_walk_interval_ms; |
| 806 | u8 is_ip6; |
| 807 | }; |
| 808 | |
| 809 | define ip_reassembly_get |
| 810 | { |
| 811 | u32 client_index; |
| 812 | u32 context; |
| 813 | u8 is_ip6; |
| 814 | }; |
| 815 | |
| 816 | define ip_reassembly_get_reply |
| 817 | { |
| 818 | u32 client_index; |
| 819 | u32 context; |
| 820 | i32 retval; |
| 821 | u32 timeout_ms; |
| 822 | u32 max_reassemblies; |
| 823 | u32 expire_walk_interval_ms; |
| 824 | u8 is_ip6; |
| 825 | }; |
| 826 | |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 827 | /* |
| 828 | * Local Variables: |
| 829 | * eval: (c-set-style "gnu") |
| 830 | * End: |
| 831 | */ |