blob: 69c7b88f2e68d73d5ce026e69ecd162981dd07be [file] [log] [blame]
Neale Ranns008dbe12018-09-07 09:32:36 -07001/* Hey Emacs use -*- mode: C -*- */
Dave Barachb5e8a772016-12-06 12:04:42 -05002/*
Neale Ranns008dbe12018-09-07 09:32:36 -07003 * Copyright (c) 2018 Cisco and/or its affiliates.
Dave Barachb5e8a772016-12-06 12:04:42 -05004 * 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 Ranns097fa662018-05-01 05:17:55 -070023option version = "3.0.0";
24
Neale Ranns31ed7442018-02-23 05:29:09 -080025import "vnet/fib/fib_types.api";
Neale Rannsde5b08f2018-08-29 06:37:18 -070026import "vnet/ethernet/ethernet_types.api";
Neale Ranns097fa662018-05-01 05:17:55 -070027import "vnet/mfib/mfib_types.api";
Dave Barach0d056e52017-09-28 15:11:16 -040028
Neale Ranns097fa662018-05-01 05:17:55 -070029/** \brief An IP table
Neale Ranns28ab9cc2017-08-14 07:18:42 -070030 @param is_ipv6 - V4 or V6 table
31 @param table_id - table ID associated with the route
Ole Troan75761b92019-09-11 17:49:08 +020032 This table ID will apply to both the unicats
Neale Ranns28ab9cc2017-08-14 07:18:42 -070033 and mlticast FIBs
Neale Ranns2297af02017-09-12 09:45:04 -070034 @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 Ranns28ab9cc2017-08-14 07:18:42 -070037*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -040038typedef ip_table
Neale Ranns097fa662018-05-01 05:17:55 -070039{
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 Ranns28ab9cc2017-08-14 07:18:42 -070050autoreply define ip_table_add_del
51{
52 u32 client_index;
53 u32 context;
Neale Ranns28ab9cc2017-08-14 07:18:42 -070054 u8 is_add;
Neale Ranns097fa662018-05-01 05:17:55 -070055 vl_api_ip_table_t table;
Neale Ranns28ab9cc2017-08-14 07:18:42 -070056};
57
Neale Ranns097fa662018-05-01 05:17:55 -070058/** \brief Dump IP all fib tables
Dave Barachb5e8a772016-12-06 12:04:42 -050059 @param client_index - opaque cookie to identify the sender
Neale Ranns097fa662018-05-01 05:17:55 -070060 @param context - sender context, to match reply w/ request
Dave Barachb5e8a772016-12-06 12:04:42 -050061*/
Neale Ranns097fa662018-05-01 05:17:55 -070062define ip_table_dump
Dave Barachb5e8a772016-12-06 12:04:42 -050063{
64 u32 client_index;
65 u32 context;
66};
67
Dave Barachb5e8a772016-12-06 12:04:42 -050068/** \brief IP FIB table response
Neale Ranns097fa662018-05-01 05:17:55 -070069 @param context - sender context
70 @param table - description of the table
Dave Barachb5e8a772016-12-06 12:04:42 -050071*/
Neale Ranns097fa662018-05-01 05:17:55 -070072manual_endian manual_print define ip_table_details
Dave Barachb5e8a772016-12-06 12:04:42 -050073{
74 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -070075 vl_api_ip_table_t table;
Dave Barachb5e8a772016-12-06 12:04:42 -050076};
77
Neale Ranns097fa662018-05-01 05:17:55 -070078/** \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 Barachb5e8a772016-12-06 12:04:42 -050084*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -040085typedef ip_route
Neale Ranns097fa662018-05-01 05:17:55 -070086{
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*/
103define ip_route_add_del
Dave Barachb5e8a772016-12-06 12:04:42 -0500104{
105 u32 client_index;
106 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700107 u8 is_add;
108 u8 is_multipath;
109 vl_api_ip_route_t route;
Dave Barachb5e8a772016-12-06 12:04:42 -0500110};
Neale Ranns097fa662018-05-01 05:17:55 -0700111define ip_route_add_del_reply
Dave Barachb5e8a772016-12-06 12:04:42 -0500112{
113 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700114 i32 retval;
Neale Ranns008dbe12018-09-07 09:32:36 -0700115 u32 stats_index;
Neale Ranns097fa662018-05-01 05:17:55 -0700116};
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*/
122define 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*/
132manual_endian manual_print define ip_route_details
133{
134 u32 context;
135 vl_api_ip_route_t route;
Dave Barachb5e8a772016-12-06 12:04:42 -0500136};
137
Neale Ranns37029302018-08-10 05:30:06 -0700138/** \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*/
144enum 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 Ranns37029302018-08-10 05:30:06 -0700149};
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*/
157typedef 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*/
170define 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};
178define ip_neighbor_add_del_reply
179{
180 u32 context;
181 i32 retval;
182 u32 stats_index;
183};
184
Dave Barachb5e8a772016-12-06 12:04:42 -0500185/** \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 Loeligeraf8dfbf2017-11-08 13:07:39 -0600188 @param sw_if_index - the interface to dump neighboors, ~0 == all
Dave Barachb5e8a772016-12-06 12:04:42 -0500189 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
190*/
191define ip_neighbor_dump
192{
Neale Ranns37029302018-08-10 05:30:06 -0700193 u32 client_index;
194 u32 context;
195 u32 sw_if_index;
196 u8 is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500197};
198
199/** \brief IP neighboors dump response
200 @param context - sender context which was passed in the request
Neale Ranns37029302018-08-10 05:30:06 -0700201 @param neighbour - the neighbor
Dave Barachb5e8a772016-12-06 12:04:42 -0500202*/
203define ip_neighbor_details {
Dave Barachb5e8a772016-12-06 12:04:42 -0500204 u32 context;
Neale Ranns37029302018-08-10 05:30:06 -0700205 vl_api_ip_neighbor_t neighbor;
Neale Ranns14260392018-09-28 05:00:57 -0700206};
207
Dave Barachb5e8a772016-12-06 12:04:42 -0500208/** \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 Kazmi2af0e3a2018-11-20 11:11:12 +0100219 @param symmetric - if non-zero include symmetry in flow hash
Dave Barachb5e8a772016-12-06 12:04:42 -0500220*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400221autoreply define set_ip_flow_hash
Dave Barachb5e8a772016-12-06 12:04:42 -0500222{
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 Kazmi2af0e3a2018-11-20 11:11:12 +0100233 u8 symmetric;
Dave Barachb5e8a772016-12-06 12:04:42 -0500234};
235
Dave Barachb5e8a772016-12-06 12:04:42 -0500236/** \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 Barach11b8dbf2017-04-24 10:46:54 -0400253autoreply define sw_interface_ip6nd_ra_config
Dave Barachb5e8a772016-12-06 12:04:42 -0500254{
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 Barachb5e8a772016-12-06 12:04:42 -0500273/** \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 Ranns87df12d2017-02-18 08:16:41 -0800276 @param sw_if_index - The interface the RA prefix information is for
Neale Ranns37029302018-08-10 05:30:06 -0700277 @param prefix - The prefix to advertise
Neale Ranns87df12d2017-02-18 08:16:41 -0800278 @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 Barachb5e8a772016-12-06 12:04:42 -0500300*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400301autoreply define sw_interface_ip6nd_ra_prefix
Dave Barachb5e8a772016-12-06 12:04:42 -0500302{
303 u32 client_index;
304 u32 context;
305 u32 sw_if_index;
Neale Ranns37029302018-08-10 05:30:06 -0700306 vl_api_prefix_t prefix;
Dave Barachb5e8a772016-12-06 12:04:42 -0500307 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 Ranns3f844d02017-02-18 00:03:54 -0800317/** \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 Barach11b8dbf2017-04-24 10:46:54 -0400324autoreply define ip6nd_proxy_add_del
Neale Ranns3f844d02017-02-18 00:03:54 -0800325{
326 u32 client_index;
327 u32 context;
328 u32 sw_if_index;
329 u8 is_del;
Neale Ranns37029302018-08-10 05:30:06 -0700330 vl_api_ip6_address_t ip;
Neale Ranns3f844d02017-02-18 00:03:54 -0800331};
332
Neale Ranns3f844d02017-02-18 00:03:54 -0800333/** \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*/
337define ip6nd_proxy_details
338{
Neale Ranns3f844d02017-02-18 00:03:54 -0800339 u32 context;
340 u32 sw_if_index;
Neale Ranns37029302018-08-10 05:30:06 -0700341 vl_api_ip6_address_t ip;
Neale Ranns3f844d02017-02-18 00:03:54 -0800342};
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*/
350define ip6nd_proxy_dump
351{
352 u32 client_index;
353 u32 context;
354};
355
Juraj Sloboda4b9669d2018-01-15 10:39:21 +0100356/** \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*/
368autoreply 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 Barachb5e8a772016-12-06 12:04:42 -0500380/** \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 Barach11b8dbf2017-04-24 10:46:54 -0400386autoreply define sw_interface_ip6_enable_disable
Dave Barachb5e8a772016-12-06 12:04:42 -0500387{
388 u32 client_index;
389 u32 context;
390 u32 sw_if_index;
391 u8 enable; /* set to true if enable */
392};
393
Neale Ranns097fa662018-05-01 05:17:55 -0700394/** \brief IPv6 set link local address on interface request
Dave Barachb5e8a772016-12-06 12:04:42 -0500395 @param client_index - opaque cookie to identify the sender
396 @param context - sender context, to match reply w/ request
Neale Ranns097fa662018-05-01 05:17:55 -0700397 @param sw_if_index - interface to set link local on
398 @param address[] - the new link local address
Dave Barachb5e8a772016-12-06 12:04:42 -0500399*/
Neale Ranns097fa662018-05-01 05:17:55 -0700400autoreply define sw_interface_ip6_set_link_local_address
Dave Barachb5e8a772016-12-06 12:04:42 -0500401{
402 u32 client_index;
403 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700404 u32 sw_if_index;
405 u8 address[16];
Dave Barachb5e8a772016-12-06 12:04:42 -0500406};
407
Neale Ranns097fa662018-05-01 05:17:55 -0700408/** \brief Dump IP multicast fib table
409 @param client_index - opaque cookie to identify the sender
410*/
411define ip_mtable_dump
Neale Ranns008dbe12018-09-07 09:32:36 -0700412{
Neale Ranns097fa662018-05-01 05:17:55 -0700413 u32 client_index;
Neale Ranns008dbe12018-09-07 09:32:36 -0700414 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700415};
416define ip_mtable_details
417{
418 u32 client_index;
419 u32 context;
420 vl_api_ip_table_t table;
Neale Ranns008dbe12018-09-07 09:32:36 -0700421};
422
Neale Ranns32e1c012016-11-22 17:07:28 +0000423/** \brief Add / del route request
Ian Wells412ecd32018-10-04 12:31:11 -0700424
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 Ranns32e1c012016-11-22 17:07:28 +0000430 @param client_index - opaque cookie to identify the sender
431 @param context - sender context, to match reply w/ request
Ian Wells412ecd32018-10-04 12:31:11 -0700432 @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 Ranns32e1c012016-11-22 17:07:28 +0000450*/
Neale Ranns097fa662018-05-01 05:17:55 -0700451typedef 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 Ranns28c142e2018-09-07 09:37:07 -0700461define ip_mroute_add_del
Neale Ranns32e1c012016-11-22 17:07:28 +0000462{
463 u32 client_index;
464 u32 context;
Neale Ranns32e1c012016-11-22 17:07:28 +0000465 u8 is_add;
Neale Ranns097fa662018-05-01 05:17:55 -0700466 u8 is_multipath;
467 vl_api_ip_mroute_t route;
Neale Ranns32e1c012016-11-22 17:07:28 +0000468};
Neale Ranns28c142e2018-09-07 09:37:07 -0700469define ip_mroute_add_del_reply
470{
471 u32 context;
472 i32 retval;
473 u32 stats_index;
474};
475
Neale Ranns5a8123b2017-01-26 01:18:23 -0800476/** \brief Dump IP multicast fib table
Neale Ranns097fa662018-05-01 05:17:55 -0700477 @param table - The table from which to dump routes (ony ID an AF are needed)
Neale Ranns5a8123b2017-01-26 01:18:23 -0800478*/
Neale Ranns097fa662018-05-01 05:17:55 -0700479define ip_mroute_dump
Neale Ranns5a8123b2017-01-26 01:18:23 -0800480{
481 u32 client_index;
482 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700483 vl_api_ip_table_t table;
Neale Ranns5a8123b2017-01-26 01:18:23 -0800484};
485
Neale Ranns097fa662018-05-01 05:17:55 -0700486/** \brief IP Multicast Route Details
487 @param route - Details of the route
Neale Ranns5a8123b2017-01-26 01:18:23 -0800488*/
Neale Ranns097fa662018-05-01 05:17:55 -0700489manual_endian manual_print define ip_mroute_details
Neale Ranns5a8123b2017-01-26 01:18:23 -0800490{
491 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700492 vl_api_ip_mroute_t route;
Neale Ranns5a8123b2017-01-26 01:18:23 -0800493};
494
Dave Barachb5e8a772016-12-06 12:04:42 -0500495define ip_address_details
496{
Dave Barachb5e8a772016-12-06 12:04:42 -0500497 u32 context;
Jon Loeliger466f0d42017-02-09 12:17:50 -0600498 u32 sw_if_index;
Ole Troan75761b92019-09-11 17:49:08 +0200499 vl_api_address_with_prefix_t prefix;
Dave Barachb5e8a772016-12-06 12:04:42 -0500500};
501
502define ip_address_dump
503{
504 u32 client_index;
505 u32 context;
506 u32 sw_if_index;
507 u8 is_ipv6;
508};
509
Neale Ranns9e2f9152018-05-18 02:27:10 -0700510/** \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*/
514define ip_unnumbered_details
515{
Neale Ranns9e2f9152018-05-18 02:27:10 -0700516 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*/
524define ip_unnumbered_dump
525{
526 u32 client_index;
527 u32 context;
528 u32 sw_if_index;
529};
530
Dave Barachb5e8a772016-12-06 12:04:42 -0500531define ip_details
532{
Dave Barachb5e8a772016-12-06 12:04:42 -0500533 u32 context;
Ondrej Fabryb11f9032018-08-14 12:39:40 +0200534 u32 sw_if_index;
Jon Loeliger466f0d42017-02-09 12:17:50 -0600535 u8 is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500536};
537
538define ip_dump
539{
540 u32 client_index;
541 u32 context;
542 u8 is_ipv6;
543};
544
Neale Ranns32e1c012016-11-22 17:07:28 +0000545define mfib_signal_dump
546{
547 u32 client_index;
548 u32 context;
549};
550
551define mfib_signal_details
552{
Neale Ranns32e1c012016-11-22 17:07:28 +0000553 u32 context;
554 u32 sw_if_index;
555 u32 table_id;
Neale Ranns097fa662018-05-01 05:17:55 -0700556 vl_api_mprefix_t prefix;
Neale Ranns32e1c012016-11-22 17:07:28 +0000557 u16 ip_packet_len;
558 u8 ip_packet_data[256];
559};
Dave Barachb5e8a772016-12-06 12:04:42 -0500560
Neale Rannsd91c1db2017-07-31 02:30:50 -0700561/** \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*/
568autoreply 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 Kotucek609e1212018-11-27 09:59:44 +0100577/** \brief Punt redirect type
Neale Ranns47527b22018-11-16 00:53:53 -0800578 @param rx_sw_if_index - specify the original RX interface of traffic
579 that should be redirected. ~0 means any interface.
Neale Rannsd91c1db2017-07-31 02:30:50 -0700580 @param tx_sw_if_index - the TX interface to which traffic shoulde be
581 redirected.
Pavel Kotucek609e1212018-11-27 09:59:44 +0100582 @param nh - the next-hop to redirect the traffic to.
583 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
584*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400585typedef punt_redirect
Pavel Kotucek609e1212018-11-27 09:59:44 +0100586{
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 Rannsd91c1db2017-07-31 02:30:50 -0700597*/
598autoreply define ip_punt_redirect
599{
600 u32 client_index;
601 u32 context;
Pavel Kotucek609e1212018-11-27 09:59:44 +0100602 vl_api_punt_redirect_t punt;
Neale Rannsd91c1db2017-07-31 02:30:50 -0700603 u8 is_add;
Pavel Kotucek609e1212018-11-27 09:59:44 +0100604};
605
606define ip_punt_redirect_dump
607{
608 u32 client_index;
609 u32 context;
610 u32 sw_if_index;
611 u8 is_ipv6;
612};
613
614define ip_punt_redirect_details
615{
616 u32 context;
617 vl_api_punt_redirect_t punt;
Neale Rannsd91c1db2017-07-31 02:30:50 -0700618};
619
Florin Coras595992c2017-11-06 17:17:08 -0800620autoreply define ip_container_proxy_add_del
621{
622 u32 client_index;
623 u32 context;
Neale Ranns37029302018-08-10 05:30:06 -0700624 vl_api_prefix_t pfx;
Florin Coras595992c2017-11-06 17:17:08 -0800625 u32 sw_if_index;
626 u8 is_add;
627};
628
Matus Fabian75b9f452018-10-02 23:27:21 -0700629define ip_container_proxy_dump
630{
631 u32 client_index;
632 u32 context;
633};
634
635define ip_container_proxy_details
636{
637 u32 context;
638 u32 sw_if_index;
639 vl_api_prefix_t prefix;
640};
641
Neale Rannsb8d44812017-11-10 06:53:54 -0800642/** \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 Ranns37029302018-08-10 05:30:06 -0700647 @param ip - prefix to match
Neale Rannsb8d44812017-11-10 06:53:54 -0800648 @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*/
654autoreply define ip_source_and_port_range_check_add_del
655{
656 u32 client_index;
657 u32 context;
Neale Rannsb8d44812017-11-10 06:53:54 -0800658 u8 is_add;
Neale Ranns37029302018-08-10 05:30:06 -0700659 vl_api_prefix_t prefix;
Neale Rannsb8d44812017-11-10 06:53:54 -0800660 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*/
673autoreply 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
Chore3460b012018-11-28 10:53:11 +0330685/** \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*/
692autoreply 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 Lo7f358b32018-04-28 01:19:24 -0400701/** \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*/
713autoreply 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 Loc7b43042018-04-13 16:46:22 -0400725/** \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 Ranns37029302018-08-10 05:30:06 -0700730 @param dst - target IP address to send IP addr resolution request
John Loc7b43042018-04-13 16:46:22 -0400731*/
732autoreply define ip_probe_neighbor
733{
734 u32 client_index;
735 u32 context;
736 u32 sw_if_index;
Neale Ranns37029302018-08-10 05:30:06 -0700737 vl_api_address_t dst;
John Loc7b43042018-04-13 16:46:22 -0400738};
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 Rannsb8d44812017-11-10 06:53:54 -0800742 @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 Ranns37029302018-08-10 05:30:06 -0700746 @param ip - exact IP4 address of interested arp resolution event, or
747 0 to get MAC/IP info from ARP requests in BDs
Neale Rannsb8d44812017-11-10 06:53:54 -0800748*/
749autoreply define want_ip4_arp_events
750{
751 u32 client_index;
752 u32 context;
753 u8 enable_disable;
754 u32 pid;
Neale Ranns37029302018-08-10 05:30:06 -0700755 vl_api_ip4_address_t ip;
Neale Rannsb8d44812017-11-10 06:53:54 -0800756};
757
John Loc7b43042018-04-13 16:46:22 -0400758/** \brief Tell client about an IP4 ARP resolution event or
759 MAC/IP info from ARP requests in L2 BDs
Neale Rannsb8d44812017-11-10 06:53:54 -0800760 @param client_index - opaque cookie to identify the sender
Neale Ranns37029302018-08-10 05:30:06 -0700761 @param ip - the exact ip4 address of interest
Neale Rannsb8d44812017-11-10 06:53:54 -0800762 @param pid - client pid registered to receive notification
763 @param sw_if_index - interface which received ARP packet
Neale Ranns37029302018-08-10 05:30:06 -0700764 @param mac - the new mac address
John Loc7b43042018-04-13 16:46:22 -0400765 @param mac_ip - 0: ARP resolution event, 1: MAC/IP info from L2 BDs
Neale Rannsb8d44812017-11-10 06:53:54 -0800766*/
767define ip4_arp_event
768{
769 u32 client_index;
Neale Ranns37029302018-08-10 05:30:06 -0700770 vl_api_ip4_address_t ip;
Neale Rannsb8d44812017-11-10 06:53:54 -0800771 u32 pid;
772 u32 sw_if_index;
Neale Ranns37029302018-08-10 05:30:06 -0700773 vl_api_mac_address_t mac;
Neale Rannsb8d44812017-11-10 06:53:54 -0800774 u8 mac_ip;
775};
776
Marek Gradzki51e59682018-03-06 10:05:44 +0100777service {
778 rpc want_ip4_arp_events returns want_ip4_arp_events_reply
779 events ip4_arp_event;
780};
781
John Loc7b43042018-04-13 16:46:22 -0400782/** \brief Register for IP6 ND resolution event on recieving NA reply
783 MAC/IP info from ICMP6 Neighbor Solicitation in L2 BDs
Neale Rannsb8d44812017-11-10 06:53:54 -0800784 @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 Ranns37029302018-08-10 05:30:06 -0700788 @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 Rannsb8d44812017-11-10 06:53:54 -0800790*/
791autoreply define want_ip6_nd_events
792{
793 u32 client_index;
794 u32 context;
795 u8 enable_disable;
796 u32 pid;
Neale Ranns37029302018-08-10 05:30:06 -0700797 vl_api_ip6_address_t ip;
Neale Rannsb8d44812017-11-10 06:53:54 -0800798};
799
John Loc7b43042018-04-13 16:46:22 -0400800/** \brief Tell client about an IP6 ND resolution or
801 MAC/IP info from ICMP6 Neighbor Solicitation in L2 BDs.
Neale Rannsb8d44812017-11-10 06:53:54 -0800802 @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 Ranns37029302018-08-10 05:30:06 -0700805 @param ip - the exact ip6 address of interest
Neale Rannsb8d44812017-11-10 06:53:54 -0800806 @param new_mac - the new mac address
John Loc7b43042018-04-13 16:46:22 -0400807 @param mac_ip - 0: ND resolution event, 1: MAC/IP info from L2 BDs
Neale Rannsb8d44812017-11-10 06:53:54 -0800808*/
809define ip6_nd_event
810{
811 u32 client_index;
812 u32 pid;
813 u32 sw_if_index;
Neale Ranns37029302018-08-10 05:30:06 -0700814 vl_api_ip6_address_t ip;
815 vl_api_mac_address_t mac;
Neale Rannsb8d44812017-11-10 06:53:54 -0800816 u8 mac_ip;
817};
818
Marek Gradzki51e59682018-03-06 10:05:44 +0100819service {
Juraj Sloboda4b9669d2018-01-15 10:39:21 +0100820 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*/
830autoreply 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 Ranns37029302018-08-10 05:30:06 -0700839 @param prefix - RA prefix info destination address
Juraj Sloboda4b9669d2018-01-15 10:39:21 +0100840 @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 Vinciguerrae7174822019-08-07 00:05:59 -0400844typedef ip6_ra_prefix_info
Juraj Sloboda4b9669d2018-01-15 10:39:21 +0100845{
Neale Ranns37029302018-08-10 05:30:06 -0700846 vl_api_prefix_t prefix;
Juraj Sloboda4b9669d2018-01-15 10:39:21 +0100847 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 Ranns37029302018-08-10 05:30:06 -0700858 @param router_addr - The router's address
Juraj Sloboda4b9669d2018-01-15 10:39:21 +0100859 @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*/
865define ip6_ra_event
866{
867 u32 client_index;
868 u32 pid;
869 u32 sw_if_index;
Neale Ranns37029302018-08-10 05:30:06 -0700870 vl_api_ip6_address_t router_addr;
Juraj Sloboda4b9669d2018-01-15 10:39:21 +0100871 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
880service {
Marek Gradzki51e59682018-03-06 10:05:44 +0100881 rpc want_ip6_nd_events returns want_ip6_nd_events_reply
882 events ip6_nd_event;
883};
884
Neale Ranns0053de62018-05-22 08:40:52 -0700885/** \brief Proxy ARP configuration type
Neale Ranns37029302018-08-10 05:30:06 -0700886 @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 Rannsb8d44812017-11-10 06:53:54 -0800889*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400890typedef proxy_arp
Neale Rannsb8d44812017-11-10 06:53:54 -0800891{
Neale Ranns37029302018-08-10 05:30:06 -0700892 u32 table_id;
893 vl_api_ip4_address_t low;
894 vl_api_ip4_address_t hi;
Neale Rannsb8d44812017-11-10 06:53:54 -0800895};
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 Ranns0053de62018-05-22 08:40:52 -0700900 @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
901 @param proxy - Proxy configuration
902*/
903autoreply 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 */
913define 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 */
922define 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 Rannsb8d44812017-11-10 06:53:54 -0800931 @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*/
934autoreply 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 Ranns0053de62018-05-22 08:40:52 -0700943/** \brief Proxy ARP interface dump request
944 */
945define 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 */
954define proxy_arp_intfc_details
955{
956 u32 context;
957 u32 sw_if_index;
958};
959
Neale Rannsb8d44812017-11-10 06:53:54 -0800960/** \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*/
966autoreply 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*/
980autoreply 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*/
995autoreply 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*/
1012autoreply define ioam_disable
1013{
1014 u32 client_index;
1015 u32 context;
1016 u16 id;
1017};
1018
Klement Sekerade34c352019-06-25 11:19:22 +00001019enum ip_reass_type
1020{
1021 IP_REASS_TYPE_FULL = 0,
1022 IP_REASS_TYPE_SHALLOW_VIRTUAL = 0x1,
1023};
1024
Klement Sekera75e7d132017-09-20 08:26:30 +02001025autoreply define ip_reassembly_set
1026{
1027 u32 client_index;
1028 u32 context;
1029 u32 timeout_ms;
1030 u32 max_reassemblies;
Klement Sekera3a343d42019-05-16 14:35:46 +02001031 u32 max_reassembly_length;
Klement Sekera75e7d132017-09-20 08:26:30 +02001032 u32 expire_walk_interval_ms;
1033 u8 is_ip6;
Klement Sekerade34c352019-06-25 11:19:22 +00001034 vl_api_ip_reass_type_t type;
Klement Sekera75e7d132017-09-20 08:26:30 +02001035};
1036
1037define ip_reassembly_get
1038{
1039 u32 client_index;
1040 u32 context;
1041 u8 is_ip6;
Klement Sekerade34c352019-06-25 11:19:22 +00001042 vl_api_ip_reass_type_t type;
Klement Sekera75e7d132017-09-20 08:26:30 +02001043};
1044
1045define ip_reassembly_get_reply
1046{
Klement Sekera75e7d132017-09-20 08:26:30 +02001047 u32 context;
1048 i32 retval;
1049 u32 timeout_ms;
1050 u32 max_reassemblies;
Klement Sekera3a343d42019-05-16 14:35:46 +02001051 u32 max_reassembly_length;
Klement Sekera75e7d132017-09-20 08:26:30 +02001052 u32 expire_walk_interval_ms;
1053 u8 is_ip6;
1054};
1055
Klement Sekera4c533132018-02-22 11:41:12 +01001056/** \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*/
1063autoreply 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 Sekerade34c352019-06-25 11:19:22 +00001070 vl_api_ip_reass_type_t type;
Klement Sekera4c533132018-02-22 11:41:12 +01001071};
1072
Dave Barachb5e8a772016-12-06 12:04:42 -05001073/*
1074 * Local Variables:
1075 * eval: (c-set-style "gnu")
1076 * End:
1077 */