1 /* Hey Emacs use -*- mode: C -*- */
3 * Copyright (c) 2018 Cisco and/or its affiliates.
4 * 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:
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 This file defines vpp IP control-plane API messages which are generally
20 called through a shared memory interface.
23 option version = "3.0.0";
25 import "vnet/fib/fib_types.api";
26 import "vnet/ethernet/ethernet_types.api";
27 import "vnet/mfib/mfib_types.api";
28 import "vnet/interface_types.api";
30 /** \brief An IP table
31 @param is_ipv6 - V4 or V6 table
32 @param table_id - table ID associated with the route
33 This table ID will apply to both the unicats
35 @param name - A client provided name/tag for the table. If this is
36 not set by the client, then VPP will generate something
46 /** \brief Add / del table request
47 A table can be added multiple times, but need be deleted only once.
48 @param client_index - opaque cookie to identify the sender
49 @param context - sender context, to match reply w/ request
51 autoreply define ip_table_add_del
56 vl_api_ip_table_t table;
59 /** \brief Dump IP all fib tables
60 @param client_index - opaque cookie to identify the sender
61 @param context - sender context, to match reply w/ request
69 /** \brief IP table replace being
71 The use-case is that, for some unspecified reason, the control plane
72 has a very different set of entries it wants in the table than VPP
73 currently has. The CP would thus like to 'replace' VPP's current table
74 only by specifying what the new set of entries shall be, i.e. it is not
75 going to delete anything that already eixts.
76 the CP delcartes the start of this procedure with this begin_replace
77 API Call, and when it has populated all the entries it wants, it calls
78 the below end_replace API. From this point on it is of coursce free
79 to add and delete entries as usual.
80 The underlying mechanism by which VPP implements this replace is
81 purposefully left unspecified.
83 @param client_index - opaque cookie to identify the sender
84 @param context - sender context, to match reply w/ request
85 @param table - The table to resync
87 autoreply define ip_table_replace_begin
91 vl_api_ip_table_t table;
94 /** \brief IP table replace end
98 @param client_index - opaque cookie to identify the sender
99 @param context - sender context, to match reply w/ request
100 @param table - The table that has converged
102 autoreply define ip_table_replace_end
106 vl_api_ip_table_t table;
109 /** \brief IP table flush
110 Flush a table of all routes
111 @param client_index - opaque cookie to identify the sender
112 @param context - sender context, to match reply w/ request
113 @param table - The table to flush
115 autoreply define ip_table_flush
119 vl_api_ip_table_t table;
122 /** \brief IP FIB table response
123 @param context - sender context
124 @param table - description of the table
126 manual_endian manual_print define ip_table_details
129 vl_api_ip_table_t table;
132 /** \brief An IP route
133 @param table_id The IP table the route is in
134 @param stats_index The index of the route in the stats segment
135 @param prefix the prefix for the route
136 @param n_paths The number of paths the route has
137 @param paths The paths of the route
143 vl_api_prefix_t prefix;
145 vl_api_fib_path_t paths[n_paths];
148 /** \brief Add / del route request
149 @param client_index - opaque cookie to identify the sender
150 @param context - sender context, to match reply w/ request
151 @param is_multipath - Set to 1 if these paths will be added/removed
152 to/from the existing set, or 0 to replace
154 is_add=0 & is_multipath=0 implies delete all paths
155 @param is_add - Are the paths being added or removed
157 define ip_route_add_del
163 vl_api_ip_route_t route;
165 define ip_route_add_del_reply
172 /** \brief Dump IP routes from a table
173 @param client_index - opaque cookie to identify the sender
174 @param table - The table from which to dump routes (ony ID an AF are needed)
180 vl_api_ip_table_t table;
183 /** \brief IP FIB table entry response
184 @param route The route entry in the table
186 manual_endian manual_print define ip_route_details
189 vl_api_ip_route_t route;
192 /** \brief Set the ip flow hash config for a fib request
193 @param client_index - opaque cookie to identify the sender
194 @param context - sender context, to match reply w/ request
195 @param vrf_id - vrf/fib id
196 @param is_ipv6 - if non-zero the fib is ip6, else ip4
197 @param src - if non-zero include src in flow hash
198 @param dst - if non-zero include dst in flow hash
199 @param sport - if non-zero include sport in flow hash
200 @param dport - if non-zero include dport in flow hash
201 @param proto -if non-zero include proto in flow hash
202 @param reverse - if non-zero include reverse in flow hash
203 @param symmetric - if non-zero include symmetry in flow hash
205 autoreply define set_ip_flow_hash
220 /** \brief IPv6 interface enable / disable request
221 @param client_index - opaque cookie to identify the sender
222 @param context - sender context, to match reply w/ request
223 @param sw_if_index - interface used to reach neighbor
224 @param enable - if non-zero enable ip6 on interface, else disable
226 autoreply define sw_interface_ip6_enable_disable
230 vl_api_interface_index_t sw_if_index;
231 bool enable; /* set to true if enable */
234 /** \brief Dump IP multicast fib table
235 @param client_index - opaque cookie to identify the sender
237 define ip_mtable_dump
242 define ip_mtable_details
246 vl_api_ip_table_t table;
249 /** \brief Add / del route request
251 Adds a route, consisting both of the MFIB entry to match packets
252 (which may already exist) and a path to send those packets down.
253 Routes can be entered repeatedly to add multiple paths. Deletions are
256 @param client_index - opaque cookie to identify the sender
257 @param context - sender context, to match reply w/ request
258 @param table_id - fib table /vrf associated with the route
259 @param is_add - true if adding a route; false if deleting one
260 @param is_ipv6 - true iff all the addresses are v6
261 @param entry_flags - see fib_entry_flag_t
262 @param itf_flags - see mfib_entry_flags_t
263 @param next_hop_afi - see dpo_proto_t; the type of destination description
264 @param src_address - the source of the packet
265 @param grp_address - the group the packet is destined to
266 @param nh_address - the nexthop to forward the packet to
267 @param next_hop_sw_if_index - interface to emit packet on
269 BIER AFIs use the BIER imposition ID. v4 and v6 AFIs use either the
270 interface or the nexthop address.
272 Note that if the route is source-specific (S is supplied, not all 0s),
273 the prefix match is treated as exact (prefixlen /32 or /128).
275 FIXME not complete yet
282 vl_api_mprefix_t prefix;
284 vl_api_mfib_path_t paths[n_paths];
287 define ip_mroute_add_del
293 vl_api_ip_mroute_t route;
295 define ip_mroute_add_del_reply
302 /** \brief Dump IP multicast fib table
303 @param table - The table from which to dump routes (ony ID an AF are needed)
305 define ip_mroute_dump
309 vl_api_ip_table_t table;
312 /** \brief IP Multicast Route Details
313 @param route - Details of the route
315 manual_endian manual_print define ip_mroute_details
318 vl_api_ip_mroute_t route;
321 define ip_address_details
324 vl_api_interface_index_t sw_if_index;
325 vl_api_address_with_prefix_t prefix;
328 define ip_address_dump
332 vl_api_interface_index_t sw_if_index;
336 /** \brief IP unnumbered configurations
337 @param sw_if_index The interface that has unnumbered configuration
338 @param ip_sw_if_index The IP interface that it is unnnumbered to
340 define ip_unnumbered_details
343 vl_api_interface_index_t sw_if_index;
344 vl_api_interface_index_t ip_sw_if_index;
347 /** \brief Dump IP unnumbered configurations
348 @param sw_if_index ~0 for all interfaces, else the interface desired
350 define ip_unnumbered_dump
354 vl_api_interface_index_t sw_if_index;
360 vl_api_interface_index_t sw_if_index;
371 define mfib_signal_dump
377 define mfib_signal_details
380 vl_api_interface_index_t sw_if_index;
382 vl_api_mprefix_t prefix;
384 u8 ip_packet_data[256];
387 /** \brief IP punt policer
388 @param client_index - opaque cookie to identify the sender
389 @param context - sender context, to match reply w/ request
390 @param is_add - 1 to add neighbor, 0 to delete
391 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
392 @param policer_index - Index of policer to use
394 autoreply define ip_punt_police
403 /** \brief Punt redirect type
404 @param rx_sw_if_index - specify the original RX interface of traffic
405 that should be redirected. ~0 means any interface.
406 @param tx_sw_if_index - the TX interface to which traffic shoulde be
408 @param nh - the next-hop to redirect the traffic to.
409 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
411 typedef punt_redirect
413 vl_api_interface_index_t rx_sw_if_index;
414 vl_api_interface_index_t tx_sw_if_index;
418 /** \brief IP punt redirect
419 @param client_index - opaque cookie to identify the sender
420 @param context - sender context, to match reply w/ request
421 @param punt - punt definition
422 @param is_add - 1 to add neighbor, 0 to delete
424 autoreply define ip_punt_redirect
428 vl_api_punt_redirect_t punt;
432 define ip_punt_redirect_dump
436 vl_api_interface_index_t sw_if_index;
440 define ip_punt_redirect_details
443 vl_api_punt_redirect_t punt;
446 autoreply define ip_container_proxy_add_del
451 vl_api_interface_index_t sw_if_index;
455 define ip_container_proxy_dump
461 define ip_container_proxy_details
464 vl_api_interface_index_t sw_if_index;
465 vl_api_prefix_t prefix;
468 /** \brief Configure IP source and L4 port-range check
469 @param client_index - opaque cookie to identify the sender
470 @param context - sender context, to match reply w/ request
471 @param is_ip6 - 1 if source address type is IPv6
472 @param is_add - 1 if add, 0 if delete
473 @param ip - prefix to match
474 @param number_of_ranges - length of low_port and high_port arrays (must match)
475 @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
476 @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
477 @param vrf_id - fib table/vrf id to associate the source and port-range check with
478 @note To specify a single port set low_port and high_port entry the same
480 autoreply define ip_source_and_port_range_check_add_del
485 vl_api_prefix_t prefix;
492 /** \brief Set interface source and L4 port-range request
493 @param client_index - opaque cookie to identify the sender
494 @param context - sender context, to match reply w/ request
495 @param interface_id - interface index
496 @param tcp_vrf_id - VRF associated with source and TCP port-range check
497 @param udp_vrf_id - VRF associated with source and TCP port-range check
499 autoreply define ip_source_and_port_range_check_interface_add_del
504 vl_api_interface_index_t sw_if_index;
511 /** \brief Set interface source check request
512 @param client_index - opaque cookie to identify the sender
513 @param context - sender context, to match reply w/ request
514 @param is_add - add or del
515 @param loose - strict or loose
516 @param sw_if_index - interface index
518 autoreply define ip_source_check_interface_add_del
524 vl_api_interface_index_t sw_if_index;
527 /** \brief IPv6 set link local address on interface request
528 @param client_index - opaque cookie to identify the sender
529 @param context - sender context, to match reply w/ request
530 @param sw_if_index - interface to set link local on
531 @param ip - the new link local address
533 autoreply define sw_interface_ip6_set_link_local_address
537 vl_api_interface_index_t sw_if_index;
538 vl_api_ip6_address_t ip;
541 /** \brief IOAM enable : Enable in-band OAM
542 @param id - profile id
543 @param seqno - To enable Seqno Processing
544 @param analyse - Enabling analysis of iOAM at decap node
545 @param pot_enable - Proof of Work enabled or not flag
546 @param trace_enable - iOAM Trace enabled or not flag
548 autoreply define ioam_enable
560 /** \brief iOAM disable
561 @param client_index - opaque cookie to identify the sender
562 @param context - sender context, to match reply w/ request
563 @param index - MAP Domain index
565 autoreply define ioam_disable
574 IP_REASS_TYPE_FULL = 0,
575 IP_REASS_TYPE_SHALLOW_VIRTUAL = 0x1,
578 autoreply define ip_reassembly_set
583 u32 max_reassemblies;
584 u32 max_reassembly_length;
585 u32 expire_walk_interval_ms;
587 vl_api_ip_reass_type_t type;
590 define ip_reassembly_get
595 vl_api_ip_reass_type_t type;
598 define ip_reassembly_get_reply
603 u32 max_reassemblies;
604 u32 max_reassembly_length;
605 u32 expire_walk_interval_ms;
609 /** \brief Enable/disable reassembly feature
610 @param client_index - opaque cookie to identify the sender
611 @param context - sender context, to match reply w/ request
612 @param sw_if_index - interface to enable/disable feature on
613 @param enable_ip4 - enable ip4 reassembly if non-zero, disable if 0
614 @param enable_ip6 - enable ip6 reassembly if non-zero, disable if 0
616 autoreply define ip_reassembly_enable_disable
620 vl_api_interface_index_t sw_if_index;
623 vl_api_ip_reass_type_t type;
628 * eval: (c-set-style "gnu")