blob: 6af1714f34dc302af9298ea198d8bfa1854e1bb0 [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
22/** \brief Dump IP fib table
23 @param client_index - opaque cookie to identify the sender
24*/
25define ip_fib_dump
26{
27 u32 client_index;
28 u32 context;
29};
30
31/** \brief FIB path
32 @param sw_if_index - index of the interface
33 @param weight - The weight, for UCMP
34 @param is_local - local if non-zero, else remote
35 @param is_drop - Drop the packet
36 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
37 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
38 @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
39 @param next_hop[16] - the next hop address
40
41 WARNING: this type is replicated, pending cleanup completion
42*/
43typeonly manual_print manual_endian define fib_path
44{
45 u32 sw_if_index;
46 u32 weight;
47 u8 is_local;
48 u8 is_drop;
49 u8 is_unreach;
50 u8 is_prohibit;
51 u8 afi;
52 u8 next_hop[16];
53};
54
55/** \brief IP FIB table response
56 @param table_id - IP fib table id
57 @address_length - mask length
58 @address - ip4 prefix
59 @param count - the number of fib_path in path
60 @param path - array of of fib_path structures
61*/
62manual_endian manual_print define ip_fib_details
63{
64 u32 context;
65 u32 table_id;
66 u8 address_length;
67 u8 address[4];
68 u32 count;
69 vl_api_fib_path_t path[count];
70};
71
72/** \brief Dump IP6 fib table
73 @param client_index - opaque cookie to identify the sender
74*/
75define ip6_fib_dump
76{
77 u32 client_index;
78 u32 context;
79};
80
81/** \brief IP6 FIB table response
82 @param table_id - IP6 fib table id
83 @address_length - mask length
84 @address - ip6 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 ip6_fib_details
89{
90 u32 context;
91 u32 table_id;
92 u8 address_length;
93 u8 address[16];
94 u32 count;
95 vl_api_fib_path_t path[count];
96};
97
98/** \brief Dump IP neighboors
99 @param client_index - opaque cookie to identify the sender
100 @param context - sender context, to match reply w/ request
101 @param sw_if_index - the interface to dump neighboors
102 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
103*/
104define ip_neighbor_dump
105{
106 u32 client_index;
107 u32 context;
108 u32 sw_if_index;
109 u8 is_ipv6;
110};
111
112/** \brief IP neighboors dump response
113 @param context - sender context which was passed in the request
114 @param is_static - [1|0] to indicate if neighbor is statically configured
115 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
116*/
117define ip_neighbor_details {
118 u32 context;
Pavel Kotucek8cb07c92017-01-11 10:13:54 +0100119 u8 is_static;
Dave Barachb5e8a772016-12-06 12:04:42 -0500120 u8 is_ipv6;
121 u8 mac_address[6];
122 u8 ip_address[16];
123};
124
125/** \brief IP neighbor add / del request
126 @param client_index - opaque cookie to identify the sender
127 @param context - sender context, to match reply w/ request
Dave Barachb5e8a772016-12-06 12:04:42 -0500128 @param sw_if_index - interface used to reach neighbor
129 @param is_add - 1 to add neighbor, 0 to delete
130 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
Neale Ranns239d3fe2017-03-08 08:56:58 -0800131 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
132 @param is_static - A static neighbor Entry - there are not flushed
133 If the interface goes down.
134 @param is_no_adj_fib - Do not create a corresponding entry in the FIB
135 table for the neighbor.
Dave Barachb5e8a772016-12-06 12:04:42 -0500136 @param mac_address - l2 address of the neighbor
137 @param dst_address - ip4 or ip6 address of the neighbor
138*/
139define ip_neighbor_add_del
140{
141 u32 client_index;
142 u32 context;
Dave Barachb5e8a772016-12-06 12:04:42 -0500143 u32 sw_if_index;
144 /* 1 = add, 0 = delete */
145 u8 is_add;
146 u8 is_ipv6;
147 u8 is_static;
Neale Ranns239d3fe2017-03-08 08:56:58 -0800148 u8 is_no_adj_fib;
Dave Barachb5e8a772016-12-06 12:04:42 -0500149 u8 mac_address[6];
150 u8 dst_address[16];
151};
152
153/** \brief Reply for IP Neighbor add / delete request
154 @param context - returned sender context, to match reply w/ request
155 @param retval - return code
156*/
157define ip_neighbor_add_del_reply
158{
159 u32 context;
160 i32 retval;
161};
162
163/** \brief Set the ip flow hash config for a fib request
164 @param client_index - opaque cookie to identify the sender
165 @param context - sender context, to match reply w/ request
166 @param vrf_id - vrf/fib id
167 @param is_ipv6 - if non-zero the fib is ip6, else ip4
168 @param src - if non-zero include src in flow hash
169 @param dst - if non-zero include dst in flow hash
170 @param sport - if non-zero include sport in flow hash
171 @param dport - if non-zero include dport in flow hash
172 @param proto -if non-zero include proto in flow hash
173 @param reverse - if non-zero include reverse in flow hash
174*/
175define set_ip_flow_hash
176{
177 u32 client_index;
178 u32 context;
179 u32 vrf_id;
180 u8 is_ipv6;
181 u8 src;
182 u8 dst;
183 u8 sport;
184 u8 dport;
185 u8 proto;
186 u8 reverse;
187};
188
189/** \brief Set the ip flow hash config for a fib response
190 @param context - sender context, to match reply w/ request
191 @param retval - return code for the request
192*/
193define set_ip_flow_hash_reply
194{
195 u32 context;
196 i32 retval;
197};
198
199/** \brief IPv6 router advertisement config request
200 @param client_index - opaque cookie to identify the sender
201 @param context - sender context, to match reply w/ request
202 @param suppress -
203 @param managed -
204 @param other -
205 @param ll_option -
206 @param send_unicast -
207 @param cease -
208 @param is_no -
209 @param default_router -
210 @param max_interval -
211 @param min_interval -
212 @param lifetime -
213 @param initial_count -
214 @param initial_interval -
215*/
216define sw_interface_ip6nd_ra_config
217{
218 u32 client_index;
219 u32 context;
220 u32 sw_if_index;
221 u8 suppress;
222 u8 managed;
223 u8 other;
224 u8 ll_option;
225 u8 send_unicast;
226 u8 cease;
227 u8 is_no;
228 u8 default_router;
229 u32 max_interval;
230 u32 min_interval;
231 u32 lifetime;
232 u32 initial_count;
233 u32 initial_interval;
234};
235
236/** \brief IPv6 router advertisement config response
237 @param context - sender context, to match reply w/ request
238 @param retval - return code for the request
239*/
240define sw_interface_ip6nd_ra_config_reply
241{
242 u32 context;
243 i32 retval;
244};
245
246/** \brief IPv6 router advertisement prefix config request
247 @param client_index - opaque cookie to identify the sender
248 @param context - sender context, to match reply w/ request
Neale Ranns87df12d2017-02-18 08:16:41 -0800249 @param sw_if_index - The interface the RA prefix information is for
250 @param address[] - The prefix to advertise
251 @param address_length - the prefix length
252 @param use_default - Revert to default settings
253 @param no_advertise - Do not advertise this prefix
254 @param off_link - The prefix is off link (it is not configured on the interface)
255 Configures the L-flag, When set, indicates that this
256 prefix can be used for on-link determination.
257 @param no_autoconfig - Setting for the A-flag. When
258 set indicates that this prefix can be used for
259 stateless address configuration.
260 @param no_onlink - The prefix is not on link. Make sure this is consistent
261 with the off_link parameter else YMMV
262 @param is_no - add/delete
263 @param val_lifetime - The length of time in
264 seconds (relative to the time the packet is sent)
265 that the prefix is valid for the purpose of on-link
266 determination. A value of all one bits
267 (0xffffffff) represents infinity
268 @param pref_lifetime - The length of time in
269 seconds (relative to the time the packet is sent)
270 that addresses generated from the prefix via
271 stateless address autoconfiguration remain
272 preferred [ADDRCONF]. A value of all one bits
273 (0xffffffff) represents infinity.
Dave Barachb5e8a772016-12-06 12:04:42 -0500274*/
275define sw_interface_ip6nd_ra_prefix
276{
277 u32 client_index;
278 u32 context;
279 u32 sw_if_index;
280 u8 address[16];
281 u8 address_length;
282 u8 use_default;
283 u8 no_advertise;
284 u8 off_link;
285 u8 no_autoconfig;
286 u8 no_onlink;
287 u8 is_no;
288 u32 val_lifetime;
289 u32 pref_lifetime;
290};
291
292/** \brief IPv6 router advertisement prefix config response
293 @param context - sender context, to match reply w/ request
294 @param retval - return code for the request
295*/
296define sw_interface_ip6nd_ra_prefix_reply
297{
298 u32 context;
299 i32 retval;
300};
301
Neale Ranns3f844d02017-02-18 00:03:54 -0800302/** \brief IPv6 ND proxy config
303 @param client_index - opaque cookie to identify the sender
304 @param context - sender context, to match reply w/ request
305 @param sw_if_index - The interface the host is on
306 @param address - The address of the host for which to proxy for
307 @param is_add - Adding or deleting
308*/
309define ip6nd_proxy_add_del
310{
311 u32 client_index;
312 u32 context;
313 u32 sw_if_index;
314 u8 is_del;
315 u8 address[16];
316};
317
318/** \brief IPv6 ND proxy response
319 @param context - sender context, to match reply w/ request
320 @param retval - return code for the request
321*/
322define ip6nd_proxy_add_del_reply
323{
324 u32 context;
325 i32 retval;
326};
327
328/** \brief IPv6 ND proxy details returned after request
329 @param context - sender context, to match reply w/ request
330 @param retval - return code for the request
331*/
332define ip6nd_proxy_details
333{
334 u32 client_index;
335 u32 context;
336 u32 sw_if_index;
337 u8 address[16];
338};
339
340/** \brief IPv6 ND proxy dump request
341 @param context - sender context, to match reply w/ request
342 @param retval - return code for the request
343 @param sw_if_index - The interface the host is on
344 @param address - The address of the host for which to proxy for
345*/
346define ip6nd_proxy_dump
347{
348 u32 client_index;
349 u32 context;
350};
351
Dave Barachb5e8a772016-12-06 12:04:42 -0500352/** \brief IPv6 interface enable / disable request
353 @param client_index - opaque cookie to identify the sender
354 @param context - sender context, to match reply w/ request
355 @param sw_if_index - interface used to reach neighbor
356 @param enable - if non-zero enable ip6 on interface, else disable
357*/
358define sw_interface_ip6_enable_disable
359{
360 u32 client_index;
361 u32 context;
362 u32 sw_if_index;
363 u8 enable; /* set to true if enable */
364};
365
366/** \brief IPv6 interface enable / disable response
367 @param context - sender context, to match reply w/ request
368 @param retval - return code for the request
369*/
370define sw_interface_ip6_enable_disable_reply
371{
372 u32 context;
373 i32 retval;
374};
375
376/** \brief IPv6 set link local address on interface request
377 @param client_index - opaque cookie to identify the sender
378 @param context - sender context, to match reply w/ request
379 @param sw_if_index - interface to set link local on
380 @param address[] - the new link local address
Dave Barachb5e8a772016-12-06 12:04:42 -0500381*/
382define sw_interface_ip6_set_link_local_address
383{
384 u32 client_index;
385 u32 context;
386 u32 sw_if_index;
387 u8 address[16];
Dave Barachb5e8a772016-12-06 12:04:42 -0500388};
389
390/** \brief IPv6 set link local address on interface response
391 @param context - sender context, to match reply w/ request
392 @param retval - error code for the request
393*/
394define sw_interface_ip6_set_link_local_address_reply
395{
396 u32 context;
397 i32 retval;
398};
399
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
405 @param lookup_in_vrf -
406 @param classify_table_index -
407 @param create_vrf_if_needed -
408 @param is_add - 1 if adding the route, 0 if deleting
409 @param is_drop - Drop the packet
410 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
411 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
412 @param is_ipv6 - 0 if an ip4 route, else ip6
413 @param is_local -
414 @param is_classify -
415 @param is_multipath - Set to 1 if this is a multipath route, else 0
416 @param not_last - Is last or not last msg in group of multiple add/del msgs
417 @param next_hop_weight -
418 @param dst_address_length -
419 @param dst_address[16] -
420 @param next_hop_address[16] -
421 @param next_hop_n_out_labels - the number of labels in the label stack
422 @param next_hop_out_label_stack - the next-hop output label stack, outer most first
423 @param next_hop_via_label - The next-hop is a resolved via a local label
424*/
425define ip_add_del_route
426{
427 u32 client_index;
428 u32 context;
429 u32 next_hop_sw_if_index;
430 u32 table_id;
431 u32 classify_table_index;
432 u32 next_hop_table_id;
433 u8 create_vrf_if_needed;
434 u8 is_add;
435 u8 is_drop;
436 u8 is_unreach;
437 u8 is_prohibit;
438 u8 is_ipv6;
439 u8 is_local;
440 u8 is_classify;
441 u8 is_multipath;
442 u8 is_resolve_host;
443 u8 is_resolve_attached;
444 /* Is last/not-last message in group of multiple add/del messages. */
445 u8 not_last;
446 u8 next_hop_weight;
447 u8 dst_address_length;
448 u8 dst_address[16];
449 u8 next_hop_address[16];
450 u8 next_hop_n_out_labels;
451 u32 next_hop_via_label;
452 u32 next_hop_out_label_stack[next_hop_n_out_labels];
453};
454
455/** \brief Reply for add / del route request
456 @param context - returned sender context, to match reply w/ request
457 @param retval - return code
458*/
459define ip_add_del_route_reply
460{
461 u32 context;
462 i32 retval;
463};
464
Neale Ranns32e1c012016-11-22 17:07:28 +0000465/** \brief Add / del route request
466 @param client_index - opaque cookie to identify the sender
467 @param context - sender context, to match reply w/ request
468 @param sw_if_index - software index of the new vlan's parent interface
469 @param vrf_id - fib table /vrf associated with the route
470
471 FIXME
472*/
473define ip_mroute_add_del
474{
475 u32 client_index;
476 u32 context;
477 u32 next_hop_sw_if_index;
478 u32 table_id;
479 u32 entry_flags;
480 u32 itf_flags;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800481 u32 rpf_id;
Neale Ranns32e1c012016-11-22 17:07:28 +0000482 u16 grp_address_length;
483 u8 create_vrf_if_needed;
484 u8 is_add;
485 u8 is_ipv6;
486 u8 is_local;
487 u8 grp_address[16];
488 u8 src_address[16];
489};
490
491/** \brief Reply for add / del mroute request
492 @param context - returned sender context, to match reply w/ request
493 @param retval - return code
494*/
495define ip_mroute_add_del_reply
496{
497 u32 context;
498 i32 retval;
499};
500
Neale Ranns5a8123b2017-01-26 01:18:23 -0800501/** \brief Dump IP multicast fib table
502 @param client_index - opaque cookie to identify the sender
503*/
504define ip_mfib_dump
505{
506 u32 client_index;
507 u32 context;
508};
509
510/** \brief IP Multicast FIB table response
511 @param table_id - IP fib table id
512 @address_length - mask length
513 @grp_address - Group address/prefix
514 @src_address - Source address
515 @param count - the number of fib_path in path
516 @param path - array of of fib_path structures
517*/
518manual_endian manual_print define ip_mfib_details
519{
520 u32 context;
521 u32 table_id;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800522 u32 entry_flags;
523 u32 rpf_id;
Neale Ranns5a8123b2017-01-26 01:18:23 -0800524 u8 address_length;
525 u8 grp_address[4];
526 u8 src_address[4];
527 u32 count;
528 vl_api_fib_path_t path[count];
529};
530
531/** \brief Dump IP6 multicast fib table
532 @param client_index - opaque cookie to identify the sender
533*/
534define ip6_mfib_dump
535{
536 u32 client_index;
537 u32 context;
538};
539
540/** \brief IP6 Multicast FIB table response
541 @param table_id - IP fib table id
542 @address_length - mask length
543 @grp_address - Group address/prefix
544 @src_address - Source address
545 @param count - the number of fib_path in path
546 @param path - array of of fib_path structures
547*/
548manual_endian manual_print define ip6_mfib_details
549{
550 u32 context;
551 u32 table_id;
552 u8 address_length;
553 u8 grp_address[16];
554 u8 src_address[16];
555 u32 count;
556 vl_api_fib_path_t path[count];
557};
558
Dave Barachb5e8a772016-12-06 12:04:42 -0500559define ip_address_details
560{
561 u32 client_index;
562 u32 context;
563 u8 ip[16];
564 u8 prefix_length;
Jon Loeliger466f0d42017-02-09 12:17:50 -0600565 u32 sw_if_index;
566 u8 is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500567};
568
569define ip_address_dump
570{
571 u32 client_index;
572 u32 context;
573 u32 sw_if_index;
574 u8 is_ipv6;
575};
576
577define ip_details
578{
579 u32 sw_if_index;
580 u32 context;
Jon Loeliger466f0d42017-02-09 12:17:50 -0600581 u8 is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500582};
583
584define ip_dump
585{
586 u32 client_index;
587 u32 context;
588 u8 is_ipv6;
589};
590
Neale Ranns32e1c012016-11-22 17:07:28 +0000591define mfib_signal_dump
592{
593 u32 client_index;
594 u32 context;
595};
596
597define mfib_signal_details
598{
599 u32 client_index;
600 u32 context;
601 u32 sw_if_index;
602 u32 table_id;
603 u16 grp_address_len;
604 u8 grp_address[16];
605 u8 src_address[16];
606 u16 ip_packet_len;
607 u8 ip_packet_data[256];
608};
Dave Barachb5e8a772016-12-06 12:04:42 -0500609
610/*
611 * Local Variables:
612 * eval: (c-set-style "gnu")
613 * End:
614 */