blob: e302b1e7a44ab3d4f719a6eaf11899eea7ecb35d [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 -
365 @param create_vrf_if_needed -
366 @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
371 @param is_local -
372 @param is_classify -
373 @param is_multipath - Set to 1 if this is a multipath route, else 0
374 @param not_last - Is last or not last msg in group of multiple add/del msgs
375 @param next_hop_weight -
376 @param dst_address_length -
377 @param dst_address[16] -
378 @param next_hop_address[16] -
379 @param next_hop_n_out_labels - the number of labels in the label stack
380 @param next_hop_out_label_stack - the next-hop output label stack, outer most first
381 @param next_hop_via_label - The next-hop is a resolved via a local label
382*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400383autoreply define ip_add_del_route
Dave Barachb5e8a772016-12-06 12:04:42 -0500384{
385 u32 client_index;
386 u32 context;
387 u32 next_hop_sw_if_index;
388 u32 table_id;
389 u32 classify_table_index;
390 u32 next_hop_table_id;
391 u8 create_vrf_if_needed;
392 u8 is_add;
393 u8 is_drop;
394 u8 is_unreach;
395 u8 is_prohibit;
396 u8 is_ipv6;
397 u8 is_local;
398 u8 is_classify;
399 u8 is_multipath;
400 u8 is_resolve_host;
401 u8 is_resolve_attached;
Neale Ranns6f631152017-10-03 08:20:21 -0700402 u8 is_l2_bridged;
Dave Barachb5e8a772016-12-06 12:04:42 -0500403 /* Is last/not-last message in group of multiple add/del messages. */
404 u8 not_last;
405 u8 next_hop_weight;
Neale Ranns57b58602017-07-15 07:37:25 -0700406 u8 next_hop_preference;
Dave Barachb5e8a772016-12-06 12:04:42 -0500407 u8 dst_address_length;
408 u8 dst_address[16];
409 u8 next_hop_address[16];
410 u8 next_hop_n_out_labels;
411 u32 next_hop_via_label;
412 u32 next_hop_out_label_stack[next_hop_n_out_labels];
413};
414
Neale Ranns32e1c012016-11-22 17:07:28 +0000415/** \brief Add / del route request
416 @param client_index - opaque cookie to identify the sender
417 @param context - sender context, to match reply w/ request
418 @param sw_if_index - software index of the new vlan's parent interface
419 @param vrf_id - fib table /vrf associated with the route
420
421 FIXME
422*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400423autoreply define ip_mroute_add_del
Neale Ranns32e1c012016-11-22 17:07:28 +0000424{
425 u32 client_index;
426 u32 context;
427 u32 next_hop_sw_if_index;
428 u32 table_id;
429 u32 entry_flags;
430 u32 itf_flags;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800431 u32 rpf_id;
Neale Ranns32e1c012016-11-22 17:07:28 +0000432 u16 grp_address_length;
433 u8 create_vrf_if_needed;
434 u8 is_add;
435 u8 is_ipv6;
436 u8 is_local;
437 u8 grp_address[16];
438 u8 src_address[16];
439};
440
Neale Ranns5a8123b2017-01-26 01:18:23 -0800441/** \brief Dump IP multicast fib table
442 @param client_index - opaque cookie to identify the sender
443*/
444define ip_mfib_dump
445{
446 u32 client_index;
447 u32 context;
448};
449
450/** \brief IP Multicast FIB table response
451 @param table_id - IP fib table id
452 @address_length - mask length
453 @grp_address - Group address/prefix
454 @src_address - Source address
455 @param count - the number of fib_path in path
456 @param path - array of of fib_path structures
457*/
458manual_endian manual_print define ip_mfib_details
459{
460 u32 context;
461 u32 table_id;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800462 u32 entry_flags;
463 u32 rpf_id;
Neale Ranns5a8123b2017-01-26 01:18:23 -0800464 u8 address_length;
465 u8 grp_address[4];
466 u8 src_address[4];
467 u32 count;
468 vl_api_fib_path_t path[count];
469};
470
471/** \brief Dump IP6 multicast fib table
472 @param client_index - opaque cookie to identify the sender
473*/
474define ip6_mfib_dump
475{
476 u32 client_index;
477 u32 context;
478};
479
480/** \brief IP6 Multicast FIB table response
481 @param table_id - IP fib table id
482 @address_length - mask length
483 @grp_address - Group address/prefix
484 @src_address - Source address
485 @param count - the number of fib_path in path
486 @param path - array of of fib_path structures
487*/
488manual_endian manual_print define ip6_mfib_details
489{
490 u32 context;
491 u32 table_id;
492 u8 address_length;
493 u8 grp_address[16];
494 u8 src_address[16];
495 u32 count;
496 vl_api_fib_path_t path[count];
497};
498
Dave Barachb5e8a772016-12-06 12:04:42 -0500499define ip_address_details
500{
501 u32 client_index;
502 u32 context;
503 u8 ip[16];
504 u8 prefix_length;
Jon Loeliger466f0d42017-02-09 12:17:50 -0600505 u32 sw_if_index;
506 u8 is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500507};
508
509define ip_address_dump
510{
511 u32 client_index;
512 u32 context;
513 u32 sw_if_index;
514 u8 is_ipv6;
515};
516
517define ip_details
518{
519 u32 sw_if_index;
520 u32 context;
Jon Loeliger466f0d42017-02-09 12:17:50 -0600521 u8 is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500522};
523
524define ip_dump
525{
526 u32 client_index;
527 u32 context;
528 u8 is_ipv6;
529};
530
Neale Ranns32e1c012016-11-22 17:07:28 +0000531define mfib_signal_dump
532{
533 u32 client_index;
534 u32 context;
535};
536
537define mfib_signal_details
538{
539 u32 client_index;
540 u32 context;
541 u32 sw_if_index;
542 u32 table_id;
543 u16 grp_address_len;
544 u8 grp_address[16];
545 u8 src_address[16];
546 u16 ip_packet_len;
547 u8 ip_packet_data[256];
548};
Dave Barachb5e8a772016-12-06 12:04:42 -0500549
Neale Rannsd91c1db2017-07-31 02:30:50 -0700550/** \brief IP punt policer
551 @param client_index - opaque cookie to identify the sender
552 @param context - sender context, to match reply w/ request
553 @param is_add - 1 to add neighbor, 0 to delete
554 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
555 @param policer_index - Index of policer to use
556*/
557autoreply define ip_punt_police
558{
559 u32 client_index;
560 u32 context;
561 u32 policer_index;
562 u8 is_add;
563 u8 is_ip6;
564};
565
566/** \brief IP punt redirect
567 @param client_index - opaque cookie to identify the sender
568 @param context - sender context, to match reply w/ request
569 @param is_add - 1 to add neighbor, 0 to delete
570 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
571 @param tx_sw_if_index - the TX interface to which traffic shoulde be
572 redirected.
573 @param nh - The next-hop to redirect the traffic to.
574*/
575autoreply define ip_punt_redirect
576{
577 u32 client_index;
578 u32 context;
579 u32 rx_sw_if_index;
580 u32 tx_sw_if_index;
581 u8 is_add;
582 u8 is_ip6;
583 u8 nh[16];
584};
585
Dave Barachb5e8a772016-12-06 12:04:42 -0500586/*
587 * Local Variables:
588 * eval: (c-set-style "gnu")
589 * End:
590 */