blob: f26d79436a5c685117d58b0b357225135546bf06 [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
Neale Ranns28ab9cc2017-08-14 07:18:42 -070022/** \brief Add / del table request
23 A table can be added multiple times, but need be deleted only once.
24 @param client_index - opaque cookie to identify the sender
25 @param context - sender context, to match reply w/ request
26 @param is_ipv6 - V4 or V6 table
27 @param table_id - table ID associated with the route
28 This table ID will apply to both the unicats
29 and mlticast FIBs
Neale Ranns2297af02017-09-12 09:45:04 -070030 @param name - A client provided name/tag for the table. If this is
31 not set by the client, then VPP will generate something
32 meaningfull.
Neale Ranns28ab9cc2017-08-14 07:18:42 -070033*/
34autoreply define ip_table_add_del
35{
36 u32 client_index;
37 u32 context;
38 u32 table_id;
39 u8 is_ipv6;
40 u8 is_add;
Neale Ranns2297af02017-09-12 09:45:04 -070041 u8 name[64];
Neale Ranns28ab9cc2017-08-14 07:18:42 -070042};
43
Dave Barachb5e8a772016-12-06 12:04:42 -050044/** \brief Dump IP fib table
45 @param client_index - opaque cookie to identify the sender
46*/
47define ip_fib_dump
48{
49 u32 client_index;
50 u32 context;
51};
52
53/** \brief FIB path
54 @param sw_if_index - index of the interface
55 @param weight - The weight, for UCMP
Neale Ranns57b58602017-07-15 07:37:25 -070056 @param preference - The preference of the path. lowest preference is prefered
Dave Barachb5e8a772016-12-06 12:04:42 -050057 @param is_local - local if non-zero, else remote
58 @param is_drop - Drop the packet
59 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
60 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
61 @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
62 @param next_hop[16] - the next hop address
63
64 WARNING: this type is replicated, pending cleanup completion
65*/
66typeonly manual_print manual_endian define fib_path
67{
68 u32 sw_if_index;
Neale Ranns57b58602017-07-15 07:37:25 -070069 u8 weight;
70 u8 preference;
Dave Barachb5e8a772016-12-06 12:04:42 -050071 u8 is_local;
72 u8 is_drop;
73 u8 is_unreach;
74 u8 is_prohibit;
75 u8 afi;
76 u8 next_hop[16];
77};
78
79/** \brief IP FIB table response
80 @param table_id - IP fib table id
81 @address_length - mask length
82 @address - ip4 prefix
83 @param count - the number of fib_path in path
84 @param path - array of of fib_path structures
85*/
86manual_endian manual_print define ip_fib_details
87{
88 u32 context;
89 u32 table_id;
Neale Ranns2297af02017-09-12 09:45:04 -070090 u8 table_name[64];
Dave Barachb5e8a772016-12-06 12:04:42 -050091 u8 address_length;
92 u8 address[4];
93 u32 count;
94 vl_api_fib_path_t path[count];
95};
96
97/** \brief Dump IP6 fib table
98 @param client_index - opaque cookie to identify the sender
99*/
100define ip6_fib_dump
101{
102 u32 client_index;
103 u32 context;
104};
105
Neale Ranns2297af02017-09-12 09:45:04 -0700106/** \brief IP6 FIB table entry response
Dave Barachb5e8a772016-12-06 12:04:42 -0500107 @param table_id - IP6 fib table id
Neale Ranns2297af02017-09-12 09:45:04 -0700108 @param address_length - mask length
109 @param address - ip6 prefix
Dave Barachb5e8a772016-12-06 12:04:42 -0500110 @param count - the number of fib_path in path
111 @param path - array of of fib_path structures
112*/
113manual_endian manual_print define ip6_fib_details
114{
115 u32 context;
116 u32 table_id;
Neale Ranns2297af02017-09-12 09:45:04 -0700117 u8 table_name[64];
Dave Barachb5e8a772016-12-06 12:04:42 -0500118 u8 address_length;
119 u8 address[16];
120 u32 count;
121 vl_api_fib_path_t path[count];
122};
123
124/** \brief Dump IP neighboors
125 @param client_index - opaque cookie to identify the sender
126 @param context - sender context, to match reply w/ request
127 @param sw_if_index - the interface to dump neighboors
128 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
129*/
130define ip_neighbor_dump
131{
132 u32 client_index;
133 u32 context;
134 u32 sw_if_index;
135 u8 is_ipv6;
136};
137
138/** \brief IP neighboors dump response
139 @param context - sender context which was passed in the request
140 @param is_static - [1|0] to indicate if neighbor is statically configured
141 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
142*/
143define ip_neighbor_details {
144 u32 context;
Pavel Kotucek8cb07c92017-01-11 10:13:54 +0100145 u8 is_static;
Dave Barachb5e8a772016-12-06 12:04:42 -0500146 u8 is_ipv6;
147 u8 mac_address[6];
148 u8 ip_address[16];
149};
150
151/** \brief IP neighbor add / del request
152 @param client_index - opaque cookie to identify the sender
153 @param context - sender context, to match reply w/ request
Dave Barachb5e8a772016-12-06 12:04:42 -0500154 @param sw_if_index - interface used to reach neighbor
155 @param is_add - 1 to add neighbor, 0 to delete
156 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
Neale Ranns239d3fe2017-03-08 08:56:58 -0800157 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
158 @param is_static - A static neighbor Entry - there are not flushed
159 If the interface goes down.
160 @param is_no_adj_fib - Do not create a corresponding entry in the FIB
161 table for the neighbor.
Dave Barachb5e8a772016-12-06 12:04:42 -0500162 @param mac_address - l2 address of the neighbor
163 @param dst_address - ip4 or ip6 address of the neighbor
164*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400165autoreply define ip_neighbor_add_del
Dave Barachb5e8a772016-12-06 12:04:42 -0500166{
167 u32 client_index;
168 u32 context;
Dave Barachb5e8a772016-12-06 12:04:42 -0500169 u32 sw_if_index;
170 /* 1 = add, 0 = delete */
171 u8 is_add;
172 u8 is_ipv6;
173 u8 is_static;
Neale Ranns239d3fe2017-03-08 08:56:58 -0800174 u8 is_no_adj_fib;
Dave Barachb5e8a772016-12-06 12:04:42 -0500175 u8 mac_address[6];
176 u8 dst_address[16];
177};
178
Dave Barachb5e8a772016-12-06 12:04:42 -0500179/** \brief Set the ip flow hash config for a fib request
180 @param client_index - opaque cookie to identify the sender
181 @param context - sender context, to match reply w/ request
182 @param vrf_id - vrf/fib id
183 @param is_ipv6 - if non-zero the fib is ip6, else ip4
184 @param src - if non-zero include src in flow hash
185 @param dst - if non-zero include dst in flow hash
186 @param sport - if non-zero include sport in flow hash
187 @param dport - if non-zero include dport in flow hash
188 @param proto -if non-zero include proto in flow hash
189 @param reverse - if non-zero include reverse in flow hash
190*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400191autoreply define set_ip_flow_hash
Dave Barachb5e8a772016-12-06 12:04:42 -0500192{
193 u32 client_index;
194 u32 context;
195 u32 vrf_id;
196 u8 is_ipv6;
197 u8 src;
198 u8 dst;
199 u8 sport;
200 u8 dport;
201 u8 proto;
202 u8 reverse;
203};
204
Dave Barachb5e8a772016-12-06 12:04:42 -0500205/** \brief IPv6 router advertisement config request
206 @param client_index - opaque cookie to identify the sender
207 @param context - sender context, to match reply w/ request
208 @param suppress -
209 @param managed -
210 @param other -
211 @param ll_option -
212 @param send_unicast -
213 @param cease -
214 @param is_no -
215 @param default_router -
216 @param max_interval -
217 @param min_interval -
218 @param lifetime -
219 @param initial_count -
220 @param initial_interval -
221*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400222autoreply define sw_interface_ip6nd_ra_config
Dave Barachb5e8a772016-12-06 12:04:42 -0500223{
224 u32 client_index;
225 u32 context;
226 u32 sw_if_index;
227 u8 suppress;
228 u8 managed;
229 u8 other;
230 u8 ll_option;
231 u8 send_unicast;
232 u8 cease;
233 u8 is_no;
234 u8 default_router;
235 u32 max_interval;
236 u32 min_interval;
237 u32 lifetime;
238 u32 initial_count;
239 u32 initial_interval;
240};
241
Dave Barachb5e8a772016-12-06 12:04:42 -0500242/** \brief IPv6 router advertisement prefix config request
243 @param client_index - opaque cookie to identify the sender
244 @param context - sender context, to match reply w/ request
Neale Ranns87df12d2017-02-18 08:16:41 -0800245 @param sw_if_index - The interface the RA prefix information is for
246 @param address[] - The prefix to advertise
247 @param address_length - the prefix length
248 @param use_default - Revert to default settings
249 @param no_advertise - Do not advertise this prefix
250 @param off_link - The prefix is off link (it is not configured on the interface)
251 Configures the L-flag, When set, indicates that this
252 prefix can be used for on-link determination.
253 @param no_autoconfig - Setting for the A-flag. When
254 set indicates that this prefix can be used for
255 stateless address configuration.
256 @param no_onlink - The prefix is not on link. Make sure this is consistent
257 with the off_link parameter else YMMV
258 @param is_no - add/delete
259 @param val_lifetime - The length of time in
260 seconds (relative to the time the packet is sent)
261 that the prefix is valid for the purpose of on-link
262 determination. A value of all one bits
263 (0xffffffff) represents infinity
264 @param pref_lifetime - The length of time in
265 seconds (relative to the time the packet is sent)
266 that addresses generated from the prefix via
267 stateless address autoconfiguration remain
268 preferred [ADDRCONF]. A value of all one bits
269 (0xffffffff) represents infinity.
Dave Barachb5e8a772016-12-06 12:04:42 -0500270*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400271autoreply define sw_interface_ip6nd_ra_prefix
Dave Barachb5e8a772016-12-06 12:04:42 -0500272{
273 u32 client_index;
274 u32 context;
275 u32 sw_if_index;
276 u8 address[16];
277 u8 address_length;
278 u8 use_default;
279 u8 no_advertise;
280 u8 off_link;
281 u8 no_autoconfig;
282 u8 no_onlink;
283 u8 is_no;
284 u32 val_lifetime;
285 u32 pref_lifetime;
286};
287
Neale Ranns3f844d02017-02-18 00:03:54 -0800288/** \brief IPv6 ND proxy config
289 @param client_index - opaque cookie to identify the sender
290 @param context - sender context, to match reply w/ request
291 @param sw_if_index - The interface the host is on
292 @param address - The address of the host for which to proxy for
293 @param is_add - Adding or deleting
294*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400295autoreply define ip6nd_proxy_add_del
Neale Ranns3f844d02017-02-18 00:03:54 -0800296{
297 u32 client_index;
298 u32 context;
299 u32 sw_if_index;
300 u8 is_del;
301 u8 address[16];
302};
303
Neale Ranns3f844d02017-02-18 00:03:54 -0800304/** \brief IPv6 ND proxy details returned after request
305 @param context - sender context, to match reply w/ request
306 @param retval - return code for the request
307*/
308define ip6nd_proxy_details
309{
310 u32 client_index;
311 u32 context;
312 u32 sw_if_index;
313 u8 address[16];
314};
315
316/** \brief IPv6 ND proxy dump request
317 @param context - sender context, to match reply w/ request
318 @param retval - return code for the request
319 @param sw_if_index - The interface the host is on
320 @param address - The address of the host for which to proxy for
321*/
322define ip6nd_proxy_dump
323{
324 u32 client_index;
325 u32 context;
326};
327
Dave Barachb5e8a772016-12-06 12:04:42 -0500328/** \brief IPv6 interface enable / disable request
329 @param client_index - opaque cookie to identify the sender
330 @param context - sender context, to match reply w/ request
331 @param sw_if_index - interface used to reach neighbor
332 @param enable - if non-zero enable ip6 on interface, else disable
333*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400334autoreply define sw_interface_ip6_enable_disable
Dave Barachb5e8a772016-12-06 12:04:42 -0500335{
336 u32 client_index;
337 u32 context;
338 u32 sw_if_index;
339 u8 enable; /* set to true if enable */
340};
341
Dave Barachb5e8a772016-12-06 12:04:42 -0500342/** \brief IPv6 set link local address on interface request
343 @param client_index - opaque cookie to identify the sender
344 @param context - sender context, to match reply w/ request
345 @param sw_if_index - interface to set link local on
346 @param address[] - the new link local address
Dave Barachb5e8a772016-12-06 12:04:42 -0500347*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400348autoreply define sw_interface_ip6_set_link_local_address
Dave Barachb5e8a772016-12-06 12:04:42 -0500349{
350 u32 client_index;
351 u32 context;
352 u32 sw_if_index;
353 u8 address[16];
Dave Barachb5e8a772016-12-06 12:04:42 -0500354};
355
Dave Barachb5e8a772016-12-06 12:04:42 -0500356/** \brief Add / del route request
357 @param client_index - opaque cookie to identify the sender
358 @param context - sender context, to match reply w/ request
359 @param sw_if_index - software index of the new vlan's parent interface
360 @param vrf_id - fib table /vrf associated with the route
361 @param lookup_in_vrf -
362 @param classify_table_index -
363 @param create_vrf_if_needed -
364 @param is_add - 1 if adding the route, 0 if deleting
365 @param is_drop - Drop the packet
366 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
367 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
368 @param is_ipv6 - 0 if an ip4 route, else ip6
369 @param is_local -
370 @param is_classify -
371 @param is_multipath - Set to 1 if this is a multipath route, else 0
372 @param not_last - Is last or not last msg in group of multiple add/del msgs
373 @param next_hop_weight -
374 @param dst_address_length -
375 @param dst_address[16] -
376 @param next_hop_address[16] -
377 @param next_hop_n_out_labels - the number of labels in the label stack
378 @param next_hop_out_label_stack - the next-hop output label stack, outer most first
379 @param next_hop_via_label - The next-hop is a resolved via a local label
380*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400381autoreply define ip_add_del_route
Dave Barachb5e8a772016-12-06 12:04:42 -0500382{
383 u32 client_index;
384 u32 context;
385 u32 next_hop_sw_if_index;
386 u32 table_id;
387 u32 classify_table_index;
388 u32 next_hop_table_id;
389 u8 create_vrf_if_needed;
390 u8 is_add;
391 u8 is_drop;
392 u8 is_unreach;
393 u8 is_prohibit;
394 u8 is_ipv6;
395 u8 is_local;
396 u8 is_classify;
397 u8 is_multipath;
398 u8 is_resolve_host;
399 u8 is_resolve_attached;
400 /* Is last/not-last message in group of multiple add/del messages. */
401 u8 not_last;
402 u8 next_hop_weight;
Neale Ranns57b58602017-07-15 07:37:25 -0700403 u8 next_hop_preference;
Dave Barachb5e8a772016-12-06 12:04:42 -0500404 u8 dst_address_length;
405 u8 dst_address[16];
406 u8 next_hop_address[16];
407 u8 next_hop_n_out_labels;
408 u32 next_hop_via_label;
409 u32 next_hop_out_label_stack[next_hop_n_out_labels];
410};
411
Neale Ranns32e1c012016-11-22 17:07:28 +0000412/** \brief Add / del route request
413 @param client_index - opaque cookie to identify the sender
414 @param context - sender context, to match reply w/ request
415 @param sw_if_index - software index of the new vlan's parent interface
416 @param vrf_id - fib table /vrf associated with the route
417
418 FIXME
419*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400420autoreply define ip_mroute_add_del
Neale Ranns32e1c012016-11-22 17:07:28 +0000421{
422 u32 client_index;
423 u32 context;
424 u32 next_hop_sw_if_index;
425 u32 table_id;
426 u32 entry_flags;
427 u32 itf_flags;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800428 u32 rpf_id;
Neale Ranns32e1c012016-11-22 17:07:28 +0000429 u16 grp_address_length;
430 u8 create_vrf_if_needed;
431 u8 is_add;
432 u8 is_ipv6;
433 u8 is_local;
434 u8 grp_address[16];
435 u8 src_address[16];
436};
437
Neale Ranns5a8123b2017-01-26 01:18:23 -0800438/** \brief Dump IP multicast fib table
439 @param client_index - opaque cookie to identify the sender
440*/
441define ip_mfib_dump
442{
443 u32 client_index;
444 u32 context;
445};
446
447/** \brief IP Multicast FIB table response
448 @param table_id - IP fib table id
449 @address_length - mask length
450 @grp_address - Group address/prefix
451 @src_address - Source address
452 @param count - the number of fib_path in path
453 @param path - array of of fib_path structures
454*/
455manual_endian manual_print define ip_mfib_details
456{
457 u32 context;
458 u32 table_id;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800459 u32 entry_flags;
460 u32 rpf_id;
Neale Ranns5a8123b2017-01-26 01:18:23 -0800461 u8 address_length;
462 u8 grp_address[4];
463 u8 src_address[4];
464 u32 count;
465 vl_api_fib_path_t path[count];
466};
467
468/** \brief Dump IP6 multicast fib table
469 @param client_index - opaque cookie to identify the sender
470*/
471define ip6_mfib_dump
472{
473 u32 client_index;
474 u32 context;
475};
476
477/** \brief IP6 Multicast FIB table response
478 @param table_id - IP fib table id
479 @address_length - mask length
480 @grp_address - Group address/prefix
481 @src_address - Source address
482 @param count - the number of fib_path in path
483 @param path - array of of fib_path structures
484*/
485manual_endian manual_print define ip6_mfib_details
486{
487 u32 context;
488 u32 table_id;
489 u8 address_length;
490 u8 grp_address[16];
491 u8 src_address[16];
492 u32 count;
493 vl_api_fib_path_t path[count];
494};
495
Dave Barachb5e8a772016-12-06 12:04:42 -0500496define ip_address_details
497{
498 u32 client_index;
499 u32 context;
500 u8 ip[16];
501 u8 prefix_length;
Jon Loeliger466f0d42017-02-09 12:17:50 -0600502 u32 sw_if_index;
503 u8 is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500504};
505
506define ip_address_dump
507{
508 u32 client_index;
509 u32 context;
510 u32 sw_if_index;
511 u8 is_ipv6;
512};
513
514define ip_details
515{
516 u32 sw_if_index;
517 u32 context;
Jon Loeliger466f0d42017-02-09 12:17:50 -0600518 u8 is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500519};
520
521define ip_dump
522{
523 u32 client_index;
524 u32 context;
525 u8 is_ipv6;
526};
527
Neale Ranns32e1c012016-11-22 17:07:28 +0000528define mfib_signal_dump
529{
530 u32 client_index;
531 u32 context;
532};
533
534define mfib_signal_details
535{
536 u32 client_index;
537 u32 context;
538 u32 sw_if_index;
539 u32 table_id;
540 u16 grp_address_len;
541 u8 grp_address[16];
542 u8 src_address[16];
543 u16 ip_packet_len;
544 u8 ip_packet_data[256];
545};
Dave Barachb5e8a772016-12-06 12:04:42 -0500546
547/*
548 * Local Variables:
549 * eval: (c-set-style "gnu")
550 * End:
551 */