blob: 85e4b8e04c3408d535737d899818a0c3fdf733df [file] [log] [blame]
Dave Barachb5e8a772016-12-06 12:04:42 -05001/*
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
Dave Barach0d056e52017-09-28 15:11:16 -040022vl_api_version 1.0.0
23
Neale Ranns28ab9cc2017-08-14 07:18:42 -070024/** \brief Add / del table request
25 A table can be added multiple times, but need be deleted only once.
26 @param client_index - opaque cookie to identify the sender
27 @param context - sender context, to match reply w/ request
28 @param is_ipv6 - V4 or V6 table
29 @param table_id - table ID associated with the route
30 This table ID will apply to both the unicats
31 and mlticast FIBs
Neale Ranns2297af02017-09-12 09:45:04 -070032 @param name - A client provided name/tag for the table. If this is
33 not set by the client, then VPP will generate something
34 meaningfull.
Neale Ranns28ab9cc2017-08-14 07:18:42 -070035*/
36autoreply define ip_table_add_del
37{
38 u32 client_index;
39 u32 context;
40 u32 table_id;
41 u8 is_ipv6;
42 u8 is_add;
Neale Ranns2297af02017-09-12 09:45:04 -070043 u8 name[64];
Neale Ranns28ab9cc2017-08-14 07:18:42 -070044};
45
Dave Barachb5e8a772016-12-06 12:04:42 -050046/** \brief Dump IP fib table
47 @param client_index - opaque cookie to identify the sender
48*/
49define ip_fib_dump
50{
51 u32 client_index;
52 u32 context;
53};
54
55/** \brief FIB path
56 @param sw_if_index - index of the interface
57 @param weight - The weight, for UCMP
Neale Ranns57b58602017-07-15 07:37:25 -070058 @param preference - The preference of the path. lowest preference is prefered
Dave Barachb5e8a772016-12-06 12:04:42 -050059 @param is_local - local if non-zero, else remote
60 @param is_drop - Drop the packet
61 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
62 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
63 @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
64 @param next_hop[16] - the next hop address
65
66 WARNING: this type is replicated, pending cleanup completion
67*/
68typeonly manual_print manual_endian define fib_path
69{
70 u32 sw_if_index;
Neale Ranns57b58602017-07-15 07:37:25 -070071 u8 weight;
72 u8 preference;
Dave Barachb5e8a772016-12-06 12:04:42 -050073 u8 is_local;
74 u8 is_drop;
75 u8 is_unreach;
76 u8 is_prohibit;
77 u8 afi;
78 u8 next_hop[16];
79};
80
81/** \brief IP FIB table response
82 @param table_id - IP fib table id
83 @address_length - mask length
84 @address - ip4 prefix
85 @param count - the number of fib_path in path
86 @param path - array of of fib_path structures
87*/
88manual_endian manual_print define ip_fib_details
89{
90 u32 context;
91 u32 table_id;
Neale Ranns2297af02017-09-12 09:45:04 -070092 u8 table_name[64];
Dave Barachb5e8a772016-12-06 12:04:42 -050093 u8 address_length;
94 u8 address[4];
95 u32 count;
96 vl_api_fib_path_t path[count];
97};
98
99/** \brief Dump IP6 fib table
100 @param client_index - opaque cookie to identify the sender
101*/
102define ip6_fib_dump
103{
104 u32 client_index;
105 u32 context;
106};
107
Neale Ranns2297af02017-09-12 09:45:04 -0700108/** \brief IP6 FIB table entry response
Dave Barachb5e8a772016-12-06 12:04:42 -0500109 @param table_id - IP6 fib table id
Neale Ranns2297af02017-09-12 09:45:04 -0700110 @param address_length - mask length
111 @param address - ip6 prefix
Dave Barachb5e8a772016-12-06 12:04:42 -0500112 @param count - the number of fib_path in path
113 @param path - array of of fib_path structures
114*/
115manual_endian manual_print define ip6_fib_details
116{
117 u32 context;
118 u32 table_id;
Neale Ranns2297af02017-09-12 09:45:04 -0700119 u8 table_name[64];
Dave Barachb5e8a772016-12-06 12:04:42 -0500120 u8 address_length;
121 u8 address[16];
122 u32 count;
123 vl_api_fib_path_t path[count];
124};
125
126/** \brief Dump IP neighboors
127 @param client_index - opaque cookie to identify the sender
128 @param context - sender context, to match reply w/ request
129 @param sw_if_index - the interface to dump neighboors
130 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
131*/
132define ip_neighbor_dump
133{
134 u32 client_index;
135 u32 context;
136 u32 sw_if_index;
137 u8 is_ipv6;
138};
139
140/** \brief IP neighboors dump response
141 @param context - sender context which was passed in the request
142 @param is_static - [1|0] to indicate if neighbor is statically configured
143 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
144*/
145define ip_neighbor_details {
146 u32 context;
Pavel Kotucek8cb07c92017-01-11 10:13:54 +0100147 u8 is_static;
Dave Barachb5e8a772016-12-06 12:04:42 -0500148 u8 is_ipv6;
149 u8 mac_address[6];
150 u8 ip_address[16];
151};
152
153/** \brief IP neighbor add / del request
154 @param client_index - opaque cookie to identify the sender
155 @param context - sender context, to match reply w/ request
Dave Barachb5e8a772016-12-06 12:04:42 -0500156 @param sw_if_index - interface used to reach neighbor
157 @param is_add - 1 to add neighbor, 0 to delete
158 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
Neale Ranns239d3fe2017-03-08 08:56:58 -0800159 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
160 @param is_static - A static neighbor Entry - there are not flushed
161 If the interface goes down.
162 @param is_no_adj_fib - Do not create a corresponding entry in the FIB
163 table for the neighbor.
Dave Barachb5e8a772016-12-06 12:04:42 -0500164 @param mac_address - l2 address of the neighbor
165 @param dst_address - ip4 or ip6 address of the neighbor
166*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400167autoreply define ip_neighbor_add_del
Dave Barachb5e8a772016-12-06 12:04:42 -0500168{
169 u32 client_index;
170 u32 context;
Dave Barachb5e8a772016-12-06 12:04:42 -0500171 u32 sw_if_index;
172 /* 1 = add, 0 = delete */
173 u8 is_add;
174 u8 is_ipv6;
175 u8 is_static;
Neale Ranns239d3fe2017-03-08 08:56:58 -0800176 u8 is_no_adj_fib;
Dave Barachb5e8a772016-12-06 12:04:42 -0500177 u8 mac_address[6];
178 u8 dst_address[16];
179};
180
Dave Barachb5e8a772016-12-06 12:04:42 -0500181/** \brief Set the ip flow hash config for a fib request
182 @param client_index - opaque cookie to identify the sender
183 @param context - sender context, to match reply w/ request
184 @param vrf_id - vrf/fib id
185 @param is_ipv6 - if non-zero the fib is ip6, else ip4
186 @param src - if non-zero include src in flow hash
187 @param dst - if non-zero include dst in flow hash
188 @param sport - if non-zero include sport in flow hash
189 @param dport - if non-zero include dport in flow hash
190 @param proto -if non-zero include proto in flow hash
191 @param reverse - if non-zero include reverse in flow hash
192*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400193autoreply define set_ip_flow_hash
Dave Barachb5e8a772016-12-06 12:04:42 -0500194{
195 u32 client_index;
196 u32 context;
197 u32 vrf_id;
198 u8 is_ipv6;
199 u8 src;
200 u8 dst;
201 u8 sport;
202 u8 dport;
203 u8 proto;
204 u8 reverse;
205};
206
Dave Barachb5e8a772016-12-06 12:04:42 -0500207/** \brief IPv6 router advertisement config request
208 @param client_index - opaque cookie to identify the sender
209 @param context - sender context, to match reply w/ request
210 @param suppress -
211 @param managed -
212 @param other -
213 @param ll_option -
214 @param send_unicast -
215 @param cease -
216 @param is_no -
217 @param default_router -
218 @param max_interval -
219 @param min_interval -
220 @param lifetime -
221 @param initial_count -
222 @param initial_interval -
223*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400224autoreply define sw_interface_ip6nd_ra_config
Dave Barachb5e8a772016-12-06 12:04:42 -0500225{
226 u32 client_index;
227 u32 context;
228 u32 sw_if_index;
229 u8 suppress;
230 u8 managed;
231 u8 other;
232 u8 ll_option;
233 u8 send_unicast;
234 u8 cease;
235 u8 is_no;
236 u8 default_router;
237 u32 max_interval;
238 u32 min_interval;
239 u32 lifetime;
240 u32 initial_count;
241 u32 initial_interval;
242};
243
Dave Barachb5e8a772016-12-06 12:04:42 -0500244/** \brief IPv6 router advertisement prefix config request
245 @param client_index - opaque cookie to identify the sender
246 @param context - sender context, to match reply w/ request
Neale Ranns87df12d2017-02-18 08:16:41 -0800247 @param sw_if_index - The interface the RA prefix information is for
248 @param address[] - The prefix to advertise
249 @param address_length - the prefix length
250 @param use_default - Revert to default settings
251 @param no_advertise - Do not advertise this prefix
252 @param off_link - The prefix is off link (it is not configured on the interface)
253 Configures the L-flag, When set, indicates that this
254 prefix can be used for on-link determination.
255 @param no_autoconfig - Setting for the A-flag. When
256 set indicates that this prefix can be used for
257 stateless address configuration.
258 @param no_onlink - The prefix is not on link. Make sure this is consistent
259 with the off_link parameter else YMMV
260 @param is_no - add/delete
261 @param val_lifetime - The length of time in
262 seconds (relative to the time the packet is sent)
263 that the prefix is valid for the purpose of on-link
264 determination. A value of all one bits
265 (0xffffffff) represents infinity
266 @param pref_lifetime - The length of time in
267 seconds (relative to the time the packet is sent)
268 that addresses generated from the prefix via
269 stateless address autoconfiguration remain
270 preferred [ADDRCONF]. A value of all one bits
271 (0xffffffff) represents infinity.
Dave Barachb5e8a772016-12-06 12:04:42 -0500272*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400273autoreply define sw_interface_ip6nd_ra_prefix
Dave Barachb5e8a772016-12-06 12:04:42 -0500274{
275 u32 client_index;
276 u32 context;
277 u32 sw_if_index;
278 u8 address[16];
279 u8 address_length;
280 u8 use_default;
281 u8 no_advertise;
282 u8 off_link;
283 u8 no_autoconfig;
284 u8 no_onlink;
285 u8 is_no;
286 u32 val_lifetime;
287 u32 pref_lifetime;
288};
289
Neale Ranns3f844d02017-02-18 00:03:54 -0800290/** \brief IPv6 ND proxy config
291 @param client_index - opaque cookie to identify the sender
292 @param context - sender context, to match reply w/ request
293 @param sw_if_index - The interface the host is on
294 @param address - The address of the host for which to proxy for
295 @param is_add - Adding or deleting
296*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400297autoreply define ip6nd_proxy_add_del
Neale Ranns3f844d02017-02-18 00:03:54 -0800298{
299 u32 client_index;
300 u32 context;
301 u32 sw_if_index;
302 u8 is_del;
303 u8 address[16];
304};
305
Neale Ranns3f844d02017-02-18 00:03:54 -0800306/** \brief IPv6 ND proxy details returned after request
307 @param context - sender context, to match reply w/ request
308 @param retval - return code for the request
309*/
310define ip6nd_proxy_details
311{
312 u32 client_index;
313 u32 context;
314 u32 sw_if_index;
315 u8 address[16];
316};
317
318/** \brief IPv6 ND proxy dump request
319 @param context - sender context, to match reply w/ request
320 @param retval - return code for the request
321 @param sw_if_index - The interface the host is on
322 @param address - The address of the host for which to proxy for
323*/
324define ip6nd_proxy_dump
325{
326 u32 client_index;
327 u32 context;
328};
329
Dave Barachb5e8a772016-12-06 12:04:42 -0500330/** \brief IPv6 interface enable / disable request
331 @param client_index - opaque cookie to identify the sender
332 @param context - sender context, to match reply w/ request
333 @param sw_if_index - interface used to reach neighbor
334 @param enable - if non-zero enable ip6 on interface, else disable
335*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400336autoreply define sw_interface_ip6_enable_disable
Dave Barachb5e8a772016-12-06 12:04:42 -0500337{
338 u32 client_index;
339 u32 context;
340 u32 sw_if_index;
341 u8 enable; /* set to true if enable */
342};
343
Dave Barachb5e8a772016-12-06 12:04:42 -0500344/** \brief IPv6 set link local address on interface request
345 @param client_index - opaque cookie to identify the sender
346 @param context - sender context, to match reply w/ request
347 @param sw_if_index - interface to set link local on
348 @param address[] - the new link local address
Dave Barachb5e8a772016-12-06 12:04:42 -0500349*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400350autoreply define sw_interface_ip6_set_link_local_address
Dave Barachb5e8a772016-12-06 12:04:42 -0500351{
352 u32 client_index;
353 u32 context;
354 u32 sw_if_index;
355 u8 address[16];
Dave Barachb5e8a772016-12-06 12:04:42 -0500356};
357
Dave Barachb5e8a772016-12-06 12:04:42 -0500358/** \brief Add / del route request
359 @param client_index - opaque cookie to identify the sender
360 @param context - sender context, to match reply w/ request
361 @param sw_if_index - software index of the new vlan's parent interface
362 @param vrf_id - fib table /vrf associated with the route
363 @param lookup_in_vrf -
364 @param classify_table_index -
Florin Corasd0a59722017-10-15 17:41:21 +0000365 @param create_vrf_if_needed -
Dave Barachb5e8a772016-12-06 12:04:42 -0500366 @param is_add - 1 if adding the route, 0 if deleting
367 @param is_drop - Drop the packet
368 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
369 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
370 @param is_ipv6 - 0 if an ip4 route, else ip6
Neale Ranns810086d2017-11-05 16:26:46 -0800371 @param is_local - The route will result in packets sent to VPP IP stack
372 @param is_udp_encap - The path describes a UDP-o-IP encapsulation.
Dave Barachb5e8a772016-12-06 12:04:42 -0500373 @param is_classify -
374 @param is_multipath - Set to 1 if this is a multipath route, else 0
Neale Ranns054c03a2017-10-13 05:15:07 -0700375 @param is_source_lookup - The the path is a deaggregate path (i.e. a lookup
376 in another table) is the lookup on the packet's
377 source address or destination.
Neale Ranns810086d2017-11-05 16:26:46 -0800378 @param next_hop_weight - Weight for Unequal cost multi-path
379 @param next_hop_preference - Path that are up that have the best preference are
380 are used for forwarding. lower value is better.
381 @param next_hop_id - Used when the path resolves via an object that has a unique
382 identifier.
Dave Barachb5e8a772016-12-06 12:04:42 -0500383 @param dst_address_length -
384 @param dst_address[16] -
385 @param next_hop_address[16] -
386 @param next_hop_n_out_labels - the number of labels in the label stack
387 @param next_hop_out_label_stack - the next-hop output label stack, outer most first
388 @param next_hop_via_label - The next-hop is a resolved via a local label
389*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400390autoreply define ip_add_del_route
Dave Barachb5e8a772016-12-06 12:04:42 -0500391{
392 u32 client_index;
393 u32 context;
394 u32 next_hop_sw_if_index;
395 u32 table_id;
396 u32 classify_table_index;
397 u32 next_hop_table_id;
Neale Ranns810086d2017-11-05 16:26:46 -0800398 u32 next_hop_id;
Florin Corasd0a59722017-10-15 17:41:21 +0000399 u8 create_vrf_if_needed;
Dave Barachb5e8a772016-12-06 12:04:42 -0500400 u8 is_add;
401 u8 is_drop;
402 u8 is_unreach;
403 u8 is_prohibit;
404 u8 is_ipv6;
405 u8 is_local;
406 u8 is_classify;
407 u8 is_multipath;
408 u8 is_resolve_host;
409 u8 is_resolve_attached;
Neale Ranns6f631152017-10-03 08:20:21 -0700410 u8 is_l2_bridged;
Neale Ranns054c03a2017-10-13 05:15:07 -0700411 u8 is_source_lookup;
Neale Ranns810086d2017-11-05 16:26:46 -0800412 u8 is_udp_encap;
Dave Barachb5e8a772016-12-06 12:04:42 -0500413 u8 next_hop_weight;
Neale Ranns57b58602017-07-15 07:37:25 -0700414 u8 next_hop_preference;
Neale Ranns810086d2017-11-05 16:26:46 -0800415 u8 next_hop_proto;
Dave Barachb5e8a772016-12-06 12:04:42 -0500416 u8 dst_address_length;
417 u8 dst_address[16];
418 u8 next_hop_address[16];
419 u8 next_hop_n_out_labels;
420 u32 next_hop_via_label;
421 u32 next_hop_out_label_stack[next_hop_n_out_labels];
422};
423
Neale Ranns32e1c012016-11-22 17:07:28 +0000424/** \brief Add / del route request
425 @param client_index - opaque cookie to identify the sender
426 @param context - sender context, to match reply w/ request
427 @param sw_if_index - software index of the new vlan's parent interface
428 @param vrf_id - fib table /vrf associated with the route
429
430 FIXME
431*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400432autoreply define ip_mroute_add_del
Neale Ranns32e1c012016-11-22 17:07:28 +0000433{
434 u32 client_index;
435 u32 context;
436 u32 next_hop_sw_if_index;
437 u32 table_id;
438 u32 entry_flags;
439 u32 itf_flags;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800440 u32 rpf_id;
Neale Ranns32e1c012016-11-22 17:07:28 +0000441 u16 grp_address_length;
Florin Corasd0a59722017-10-15 17:41:21 +0000442 u8 create_vrf_if_needed;
Neale Ranns32e1c012016-11-22 17:07:28 +0000443 u8 is_add;
444 u8 is_ipv6;
445 u8 is_local;
446 u8 grp_address[16];
447 u8 src_address[16];
448};
449
Neale Ranns5a8123b2017-01-26 01:18:23 -0800450/** \brief Dump IP multicast fib table
451 @param client_index - opaque cookie to identify the sender
452*/
453define ip_mfib_dump
454{
455 u32 client_index;
456 u32 context;
457};
458
459/** \brief IP Multicast FIB table response
460 @param table_id - IP fib table id
461 @address_length - mask length
462 @grp_address - Group address/prefix
463 @src_address - Source address
464 @param count - the number of fib_path in path
465 @param path - array of of fib_path structures
466*/
467manual_endian manual_print define ip_mfib_details
468{
469 u32 context;
470 u32 table_id;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800471 u32 entry_flags;
472 u32 rpf_id;
Neale Ranns5a8123b2017-01-26 01:18:23 -0800473 u8 address_length;
474 u8 grp_address[4];
475 u8 src_address[4];
476 u32 count;
477 vl_api_fib_path_t path[count];
478};
479
480/** \brief Dump IP6 multicast fib table
481 @param client_index - opaque cookie to identify the sender
482*/
483define ip6_mfib_dump
484{
485 u32 client_index;
486 u32 context;
487};
488
489/** \brief IP6 Multicast FIB table response
490 @param table_id - IP fib table id
491 @address_length - mask length
492 @grp_address - Group address/prefix
493 @src_address - Source address
494 @param count - the number of fib_path in path
495 @param path - array of of fib_path structures
496*/
497manual_endian manual_print define ip6_mfib_details
498{
499 u32 context;
500 u32 table_id;
501 u8 address_length;
502 u8 grp_address[16];
503 u8 src_address[16];
504 u32 count;
505 vl_api_fib_path_t path[count];
506};
507
Dave Barachb5e8a772016-12-06 12:04:42 -0500508define ip_address_details
509{
510 u32 client_index;
511 u32 context;
512 u8 ip[16];
513 u8 prefix_length;
Jon Loeliger466f0d42017-02-09 12:17:50 -0600514 u32 sw_if_index;
515 u8 is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500516};
517
518define ip_address_dump
519{
520 u32 client_index;
521 u32 context;
522 u32 sw_if_index;
523 u8 is_ipv6;
524};
525
526define ip_details
527{
528 u32 sw_if_index;
529 u32 context;
Jon Loeliger466f0d42017-02-09 12:17:50 -0600530 u8 is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500531};
532
533define ip_dump
534{
535 u32 client_index;
536 u32 context;
537 u8 is_ipv6;
538};
539
Neale Ranns32e1c012016-11-22 17:07:28 +0000540define mfib_signal_dump
541{
542 u32 client_index;
543 u32 context;
544};
545
546define mfib_signal_details
547{
548 u32 client_index;
549 u32 context;
550 u32 sw_if_index;
551 u32 table_id;
552 u16 grp_address_len;
553 u8 grp_address[16];
554 u8 src_address[16];
555 u16 ip_packet_len;
556 u8 ip_packet_data[256];
557};
Dave Barachb5e8a772016-12-06 12:04:42 -0500558
Neale Rannsd91c1db2017-07-31 02:30:50 -0700559/** \brief IP punt policer
560 @param client_index - opaque cookie to identify the sender
561 @param context - sender context, to match reply w/ request
562 @param is_add - 1 to add neighbor, 0 to delete
563 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
564 @param policer_index - Index of policer to use
565*/
566autoreply define ip_punt_police
567{
568 u32 client_index;
569 u32 context;
570 u32 policer_index;
571 u8 is_add;
572 u8 is_ip6;
573};
574
575/** \brief IP punt redirect
576 @param client_index - opaque cookie to identify the sender
577 @param context - sender context, to match reply w/ request
578 @param is_add - 1 to add neighbor, 0 to delete
579 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
580 @param tx_sw_if_index - the TX interface to which traffic shoulde be
581 redirected.
582 @param nh - The next-hop to redirect the traffic to.
583*/
584autoreply define ip_punt_redirect
585{
586 u32 client_index;
587 u32 context;
588 u32 rx_sw_if_index;
589 u32 tx_sw_if_index;
590 u8 is_add;
591 u8 is_ip6;
592 u8 nh[16];
593};
594
Florin Coras595992c2017-11-06 17:17:08 -0800595autoreply define ip_container_proxy_add_del
596{
597 u32 client_index;
598 u32 context;
599 u8 ip[16];
600 u8 is_ip4;
601 u8 plen;
602 u32 sw_if_index;
603 u8 is_add;
604};
605
Dave Barachb5e8a772016-12-06 12:04:42 -0500606/*
607 * Local Variables:
608 * eval: (c-set-style "gnu")
609 * End:
610 */