blob: 8b18c1e764af0836addf571e18a8588db6a6d3fb [file] [log] [blame]
Neale Ranns008dbe12018-09-07 09:32:36 -07001/* Hey Emacs use -*- mode: C -*- */
Dave Barachb5e8a772016-12-06 12:04:42 -05002/*
Neale Ranns008dbe12018-09-07 09:32:36 -07003 * Copyright (c) 2018 Cisco and/or its affiliates.
Dave Barachb5e8a772016-12-06 12:04:42 -05004 * 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:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17/** \file
18
19 This file defines vpp IP control-plane API messages which are generally
Jakub Grajciar58989a32019-10-08 14:05:18 +020020 called through a shared memory interface.
Dave Barachb5e8a772016-12-06 12:04:42 -050021*/
22
Jakub Grajciar58989a32019-10-08 14:05:18 +020023option version = "3.0.1";
Neale Ranns097fa662018-05-01 05:17:55 -070024
Jakub Grajciar58989a32019-10-08 14:05:18 +020025import "vnet/interface_types.api";
Neale Ranns31ed7442018-02-23 05:29:09 -080026import "vnet/fib/fib_types.api";
Neale Rannsde5b08f2018-08-29 06:37:18 -070027import "vnet/ethernet/ethernet_types.api";
Neale Ranns097fa662018-05-01 05:17:55 -070028import "vnet/mfib/mfib_types.api";
Ole Troan668605f2019-12-09 16:08:27 +010029import "vnet/interface_types.api";
Dave Barach0d056e52017-09-28 15:11:16 -040030
Neale Ranns097fa662018-05-01 05:17:55 -070031/** \brief An IP table
Neale Ranns28ab9cc2017-08-14 07:18:42 -070032 @param is_ipv6 - V4 or V6 table
33 @param table_id - table ID associated with the route
Paul Vinciguerrac0e94412020-04-28 01:12:04 -040034 This table ID will apply to both the unicast
35 and multicast FIBs
Neale Ranns2297af02017-09-12 09:45:04 -070036 @param name - A client provided name/tag for the table. If this is
37 not set by the client, then VPP will generate something
Paul Vinciguerrac0e94412020-04-28 01:12:04 -040038 meaningful.
Neale Ranns28ab9cc2017-08-14 07:18:42 -070039*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -040040typedef ip_table
Neale Ranns097fa662018-05-01 05:17:55 -070041{
42 u32 table_id;
Ole Troan668605f2019-12-09 16:08:27 +010043 bool is_ip6;
44 string name[64];
Neale Ranns097fa662018-05-01 05:17:55 -070045};
46
47/** \brief Add / del table request
48 A table can be added multiple times, but need be deleted only once.
49 @param client_index - opaque cookie to identify the sender
50 @param context - sender context, to match reply w/ request
51*/
Neale Ranns28ab9cc2017-08-14 07:18:42 -070052autoreply define ip_table_add_del
53{
54 u32 client_index;
55 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +020056 bool is_add [default=true];
Neale Ranns097fa662018-05-01 05:17:55 -070057 vl_api_ip_table_t table;
Neale Ranns28ab9cc2017-08-14 07:18:42 -070058};
59
Neale Ranns097fa662018-05-01 05:17:55 -070060/** \brief Dump IP all fib tables
Dave Barachb5e8a772016-12-06 12:04:42 -050061 @param client_index - opaque cookie to identify the sender
Neale Ranns097fa662018-05-01 05:17:55 -070062 @param context - sender context, to match reply w/ request
Dave Barachb5e8a772016-12-06 12:04:42 -050063*/
Neale Ranns097fa662018-05-01 05:17:55 -070064define ip_table_dump
Dave Barachb5e8a772016-12-06 12:04:42 -050065{
66 u32 client_index;
67 u32 context;
68};
69
Neale Ranns9db6ada2019-11-08 12:42:31 +000070/** \brief IP table replace being
71
72 The use-case is that, for some unspecified reason, the control plane
73 has a very different set of entries it wants in the table than VPP
74 currently has. The CP would thus like to 'replace' VPP's current table
75 only by specifying what the new set of entries shall be, i.e. it is not
Paul Vinciguerrac0e94412020-04-28 01:12:04 -040076 going to delete anything that already exists.
77 the CP declares the start of this procedure with this begin_replace
Neale Ranns9db6ada2019-11-08 12:42:31 +000078 API Call, and when it has populated all the entries it wants, it calls
Paul Vinciguerrac0e94412020-04-28 01:12:04 -040079 the below end_replace API. From this point on it is of course free
Neale Ranns9db6ada2019-11-08 12:42:31 +000080 to add and delete entries as usual.
81 The underlying mechanism by which VPP implements this replace is
82 purposefully left unspecified.
83
84 @param client_index - opaque cookie to identify the sender
85 @param context - sender context, to match reply w/ request
86 @param table - The table to resync
87*/
88autoreply define ip_table_replace_begin
89{
90 u32 client_index;
91 u32 context;
92 vl_api_ip_table_t table;
93};
94
95/** \brief IP table replace end
96
97 see replace start/
98
99 @param client_index - opaque cookie to identify the sender
100 @param context - sender context, to match reply w/ request
101 @param table - The table that has converged
102*/
103autoreply define ip_table_replace_end
104{
105 u32 client_index;
106 u32 context;
107 vl_api_ip_table_t table;
108};
109
110/** \brief IP table flush
111 Flush a table of all routes
112 @param client_index - opaque cookie to identify the sender
113 @param context - sender context, to match reply w/ request
114 @param table - The table to flush
115*/
116autoreply define ip_table_flush
117{
118 u32 client_index;
119 u32 context;
120 vl_api_ip_table_t table;
121};
122
Dave Barachb5e8a772016-12-06 12:04:42 -0500123/** \brief IP FIB table response
Neale Ranns097fa662018-05-01 05:17:55 -0700124 @param context - sender context
125 @param table - description of the table
Dave Barachb5e8a772016-12-06 12:04:42 -0500126*/
Ole Troandf87f802020-11-18 19:17:48 +0100127define ip_table_details
Dave Barachb5e8a772016-12-06 12:04:42 -0500128{
129 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700130 vl_api_ip_table_t table;
Dave Barachb5e8a772016-12-06 12:04:42 -0500131};
132
Neale Ranns097fa662018-05-01 05:17:55 -0700133/** \brief An IP route
134 @param table_id The IP table the route is in
135 @param stats_index The index of the route in the stats segment
136 @param prefix the prefix for the route
137 @param n_paths The number of paths the route has
138 @param paths The paths of the route
Dave Barachb5e8a772016-12-06 12:04:42 -0500139*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400140typedef ip_route
Neale Ranns097fa662018-05-01 05:17:55 -0700141{
142 u32 table_id;
143 u32 stats_index;
144 vl_api_prefix_t prefix;
145 u8 n_paths;
146 vl_api_fib_path_t paths[n_paths];
147};
148
149/** \brief Add / del route request
150 @param client_index - opaque cookie to identify the sender
151 @param context - sender context, to match reply w/ request
152 @param is_multipath - Set to 1 if these paths will be added/removed
153 to/from the existing set, or 0 to replace
154 the existing set.
155 is_add=0 & is_multipath=0 implies delete all paths
156 @param is_add - Are the paths being added or removed
157*/
158define ip_route_add_del
Dave Barachb5e8a772016-12-06 12:04:42 -0500159{
160 u32 client_index;
161 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200162 bool is_add [default=true];
Ole Troan668605f2019-12-09 16:08:27 +0100163 bool is_multipath;
Neale Ranns097fa662018-05-01 05:17:55 -0700164 vl_api_ip_route_t route;
Dave Barachb5e8a772016-12-06 12:04:42 -0500165};
Neale Ranns097fa662018-05-01 05:17:55 -0700166define ip_route_add_del_reply
Dave Barachb5e8a772016-12-06 12:04:42 -0500167{
168 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700169 i32 retval;
Neale Ranns008dbe12018-09-07 09:32:36 -0700170 u32 stats_index;
Neale Ranns097fa662018-05-01 05:17:55 -0700171};
172
173/** \brief Dump IP routes from a table
174 @param client_index - opaque cookie to identify the sender
175 @param table - The table from which to dump routes (ony ID an AF are needed)
176*/
177define ip_route_dump
178{
179 u32 client_index;
180 u32 context;
181 vl_api_ip_table_t table;
182};
183
184/** \brief IP FIB table entry response
185 @param route The route entry in the table
186*/
Ole Troandf87f802020-11-18 19:17:48 +0100187define ip_route_details
Neale Ranns097fa662018-05-01 05:17:55 -0700188{
189 u32 context;
190 vl_api_ip_route_t route;
Dave Barachb5e8a772016-12-06 12:04:42 -0500191};
192
Christian Hoppsf5d38e02020-05-04 10:28:03 -0400193/** \brief Lookup IP route from a table
194 @param client_index - opaque cookie to identify the sender
195 @param table_id - The IP table to look the route up in
196 @param exact - 0 for normal route lookup, 1 for exact match only
197 @param prefix - The prefix (or host) for route lookup.
198*/
199define ip_route_lookup
200{
201 u32 client_index;
202 u32 context;
203 u32 table_id;
204 u8 exact;
205 vl_api_prefix_t prefix;
206};
207
208/** \brief IP FIB table lookup response
209 @param retval - return code of the lookup
210 @param route - The route entry in the table if found
211*/
212define ip_route_lookup_reply
213{
214 u32 context;
215 i32 retval;
216 vl_api_ip_route_t route;
217};
218
Dave Barachb5e8a772016-12-06 12:04:42 -0500219/** \brief Set the ip flow hash config for a fib request
220 @param client_index - opaque cookie to identify the sender
221 @param context - sender context, to match reply w/ request
222 @param vrf_id - vrf/fib id
223 @param is_ipv6 - if non-zero the fib is ip6, else ip4
224 @param src - if non-zero include src in flow hash
225 @param dst - if non-zero include dst in flow hash
226 @param sport - if non-zero include sport in flow hash
227 @param dport - if non-zero include dport in flow hash
228 @param proto -if non-zero include proto in flow hash
229 @param reverse - if non-zero include reverse in flow hash
Mohsin Kazmi2af0e3a2018-11-20 11:11:12 +0100230 @param symmetric - if non-zero include symmetry in flow hash
Dave Barachb5e8a772016-12-06 12:04:42 -0500231*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400232autoreply define set_ip_flow_hash
Dave Barachb5e8a772016-12-06 12:04:42 -0500233{
234 u32 client_index;
235 u32 context;
236 u32 vrf_id;
Ole Troan668605f2019-12-09 16:08:27 +0100237 bool is_ipv6;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200238 bool src;
239 bool dst;
240 bool sport;
241 bool dport;
242 bool proto;
243 bool reverse;
244 bool symmetric;
Dave Barachb5e8a772016-12-06 12:04:42 -0500245};
246
Dave Barachb5e8a772016-12-06 12:04:42 -0500247/** \brief IPv6 interface enable / disable request
248 @param client_index - opaque cookie to identify the sender
249 @param context - sender context, to match reply w/ request
250 @param sw_if_index - interface used to reach neighbor
251 @param enable - if non-zero enable ip6 on interface, else disable
252*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400253autoreply define sw_interface_ip6_enable_disable
Dave Barachb5e8a772016-12-06 12:04:42 -0500254{
255 u32 client_index;
256 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100257 vl_api_interface_index_t sw_if_index;
258 bool enable; /* set to true if enable */
Dave Barachb5e8a772016-12-06 12:04:42 -0500259};
260
Neale Ranns097fa662018-05-01 05:17:55 -0700261/** \brief Dump IP multicast fib table
262 @param client_index - opaque cookie to identify the sender
263*/
264define ip_mtable_dump
Neale Ranns008dbe12018-09-07 09:32:36 -0700265{
Neale Ranns097fa662018-05-01 05:17:55 -0700266 u32 client_index;
Neale Ranns008dbe12018-09-07 09:32:36 -0700267 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700268};
269define ip_mtable_details
270{
271 u32 client_index;
272 u32 context;
273 vl_api_ip_table_t table;
Neale Ranns008dbe12018-09-07 09:32:36 -0700274};
275
Neale Ranns32e1c012016-11-22 17:07:28 +0000276/** \brief Add / del route request
Ian Wells412ecd32018-10-04 12:31:11 -0700277
278 Adds a route, consisting both of the MFIB entry to match packets
279 (which may already exist) and a path to send those packets down.
280 Routes can be entered repeatedly to add multiple paths. Deletions are
281 per-path.
282
Neale Ranns32e1c012016-11-22 17:07:28 +0000283 @param client_index - opaque cookie to identify the sender
284 @param context - sender context, to match reply w/ request
Ian Wells412ecd32018-10-04 12:31:11 -0700285 @param table_id - fib table /vrf associated with the route
286 @param is_add - true if adding a route; false if deleting one
287 @param is_ipv6 - true iff all the addresses are v6
288 @param entry_flags - see fib_entry_flag_t
289 @param itf_flags - see mfib_entry_flags_t
290 @param next_hop_afi - see dpo_proto_t; the type of destination description
291 @param src_address - the source of the packet
292 @param grp_address - the group the packet is destined to
293 @param nh_address - the nexthop to forward the packet to
294 @param next_hop_sw_if_index - interface to emit packet on
295
296 BIER AFIs use the BIER imposition ID. v4 and v6 AFIs use either the
297 interface or the nexthop address.
298
299 Note that if the route is source-specific (S is supplied, not all 0s),
300 the prefix match is treated as exact (prefixlen /32 or /128).
301
302 FIXME not complete yet
Neale Ranns32e1c012016-11-22 17:07:28 +0000303*/
Neale Ranns097fa662018-05-01 05:17:55 -0700304typedef ip_mroute
305{
306 u32 table_id;
Neale Ranns990f6942020-10-20 07:20:17 +0000307 vl_api_mfib_entry_flags_t entry_flags;
Neale Ranns097fa662018-05-01 05:17:55 -0700308 u32 rpf_id;
309 vl_api_mprefix_t prefix;
310 u8 n_paths;
311 vl_api_mfib_path_t paths[n_paths];
312};
313
Neale Ranns28c142e2018-09-07 09:37:07 -0700314define ip_mroute_add_del
Neale Ranns32e1c012016-11-22 17:07:28 +0000315{
316 u32 client_index;
317 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200318 bool is_add [default=true];
Ole Troan668605f2019-12-09 16:08:27 +0100319 bool is_multipath;
Neale Ranns097fa662018-05-01 05:17:55 -0700320 vl_api_ip_mroute_t route;
Neale Ranns32e1c012016-11-22 17:07:28 +0000321};
Neale Ranns28c142e2018-09-07 09:37:07 -0700322define ip_mroute_add_del_reply
323{
324 u32 context;
325 i32 retval;
326 u32 stats_index;
327};
328
Neale Ranns5a8123b2017-01-26 01:18:23 -0800329/** \brief Dump IP multicast fib table
Neale Ranns097fa662018-05-01 05:17:55 -0700330 @param table - The table from which to dump routes (ony ID an AF are needed)
Neale Ranns5a8123b2017-01-26 01:18:23 -0800331*/
Neale Ranns097fa662018-05-01 05:17:55 -0700332define ip_mroute_dump
Neale Ranns5a8123b2017-01-26 01:18:23 -0800333{
334 u32 client_index;
335 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700336 vl_api_ip_table_t table;
Neale Ranns5a8123b2017-01-26 01:18:23 -0800337};
338
Neale Ranns097fa662018-05-01 05:17:55 -0700339/** \brief IP Multicast Route Details
340 @param route - Details of the route
Neale Ranns5a8123b2017-01-26 01:18:23 -0800341*/
Ole Troandf87f802020-11-18 19:17:48 +0100342define ip_mroute_details
Neale Ranns5a8123b2017-01-26 01:18:23 -0800343{
344 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700345 vl_api_ip_mroute_t route;
Neale Ranns5a8123b2017-01-26 01:18:23 -0800346};
347
Dave Barachb5e8a772016-12-06 12:04:42 -0500348define ip_address_details
349{
Dave Barachb5e8a772016-12-06 12:04:42 -0500350 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100351 vl_api_interface_index_t sw_if_index;
Ole Troan75761b92019-09-11 17:49:08 +0200352 vl_api_address_with_prefix_t prefix;
Dave Barachb5e8a772016-12-06 12:04:42 -0500353};
354
355define ip_address_dump
356{
357 u32 client_index;
358 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100359 vl_api_interface_index_t sw_if_index;
360 bool is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500361};
362
Neale Ranns9e2f9152018-05-18 02:27:10 -0700363/** \brief IP unnumbered configurations
364 @param sw_if_index The interface that has unnumbered configuration
Paul Vinciguerrac0e94412020-04-28 01:12:04 -0400365 @param ip_sw_if_index The IP interface that it is unnumbered to
Neale Ranns9e2f9152018-05-18 02:27:10 -0700366*/
367define ip_unnumbered_details
368{
Neale Ranns9e2f9152018-05-18 02:27:10 -0700369 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100370 vl_api_interface_index_t sw_if_index;
371 vl_api_interface_index_t ip_sw_if_index;
Neale Ranns9e2f9152018-05-18 02:27:10 -0700372};
373
374/** \brief Dump IP unnumbered configurations
375 @param sw_if_index ~0 for all interfaces, else the interface desired
376*/
377define ip_unnumbered_dump
378{
379 u32 client_index;
380 u32 context;
Paul Vinciguerrac0e94412020-04-28 01:12:04 -0400381 vl_api_interface_index_t sw_if_index [default=0xffffffff];
Neale Ranns9e2f9152018-05-18 02:27:10 -0700382};
383
Dave Barachb5e8a772016-12-06 12:04:42 -0500384define ip_details
385{
Dave Barachb5e8a772016-12-06 12:04:42 -0500386 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100387 vl_api_interface_index_t sw_if_index;
388 bool is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500389};
390
391define ip_dump
392{
393 u32 client_index;
394 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100395 bool is_ipv6;
Dave Barachb5e8a772016-12-06 12:04:42 -0500396};
397
Neale Ranns32e1c012016-11-22 17:07:28 +0000398define mfib_signal_dump
399{
400 u32 client_index;
401 u32 context;
402};
403
404define mfib_signal_details
405{
Neale Ranns32e1c012016-11-22 17:07:28 +0000406 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100407 vl_api_interface_index_t sw_if_index;
Neale Ranns32e1c012016-11-22 17:07:28 +0000408 u32 table_id;
Neale Ranns097fa662018-05-01 05:17:55 -0700409 vl_api_mprefix_t prefix;
Neale Ranns32e1c012016-11-22 17:07:28 +0000410 u16 ip_packet_len;
411 u8 ip_packet_data[256];
412};
Dave Barachb5e8a772016-12-06 12:04:42 -0500413
Neale Rannsd91c1db2017-07-31 02:30:50 -0700414/** \brief IP punt policer
415 @param client_index - opaque cookie to identify the sender
416 @param context - sender context, to match reply w/ request
417 @param is_add - 1 to add neighbor, 0 to delete
418 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
419 @param policer_index - Index of policer to use
420*/
421autoreply define ip_punt_police
422{
423 u32 client_index;
424 u32 context;
425 u32 policer_index;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200426 bool is_add [default=true];
Ole Troan668605f2019-12-09 16:08:27 +0100427 bool is_ip6;
Neale Rannsd91c1db2017-07-31 02:30:50 -0700428};
429
Pavel Kotucek609e1212018-11-27 09:59:44 +0100430/** \brief Punt redirect type
Neale Ranns47527b22018-11-16 00:53:53 -0800431 @param rx_sw_if_index - specify the original RX interface of traffic
432 that should be redirected. ~0 means any interface.
Paul Vinciguerrac0e94412020-04-28 01:12:04 -0400433 @param tx_sw_if_index - the TX interface to which traffic should be
Neale Rannsd91c1db2017-07-31 02:30:50 -0700434 redirected.
Pavel Kotucek609e1212018-11-27 09:59:44 +0100435 @param nh - the next-hop to redirect the traffic to.
436 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
437*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400438typedef punt_redirect
Pavel Kotucek609e1212018-11-27 09:59:44 +0100439{
Ole Troan668605f2019-12-09 16:08:27 +0100440 vl_api_interface_index_t rx_sw_if_index;
441 vl_api_interface_index_t tx_sw_if_index;
Pavel Kotucek609e1212018-11-27 09:59:44 +0100442 vl_api_address_t nh;
443};
444
445/** \brief IP punt redirect
446 @param client_index - opaque cookie to identify the sender
447 @param context - sender context, to match reply w/ request
448 @param punt - punt definition
449 @param is_add - 1 to add neighbor, 0 to delete
Neale Rannsd91c1db2017-07-31 02:30:50 -0700450*/
451autoreply define ip_punt_redirect
452{
453 u32 client_index;
454 u32 context;
Pavel Kotucek609e1212018-11-27 09:59:44 +0100455 vl_api_punt_redirect_t punt;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200456 bool is_add [default=true];
Pavel Kotucek609e1212018-11-27 09:59:44 +0100457};
458
459define ip_punt_redirect_dump
460{
461 u32 client_index;
462 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100463 vl_api_interface_index_t sw_if_index;
464 bool is_ipv6;
Pavel Kotucek609e1212018-11-27 09:59:44 +0100465};
466
467define ip_punt_redirect_details
468{
469 u32 context;
470 vl_api_punt_redirect_t punt;
Neale Rannsd91c1db2017-07-31 02:30:50 -0700471};
472
Florin Coras595992c2017-11-06 17:17:08 -0800473autoreply define ip_container_proxy_add_del
474{
475 u32 client_index;
476 u32 context;
Neale Ranns37029302018-08-10 05:30:06 -0700477 vl_api_prefix_t pfx;
Ole Troan668605f2019-12-09 16:08:27 +0100478 vl_api_interface_index_t sw_if_index;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200479 bool is_add [default=true];
Florin Coras595992c2017-11-06 17:17:08 -0800480};
481
Matus Fabian75b9f452018-10-02 23:27:21 -0700482define ip_container_proxy_dump
483{
484 u32 client_index;
485 u32 context;
486};
487
488define ip_container_proxy_details
489{
490 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100491 vl_api_interface_index_t sw_if_index;
Matus Fabian75b9f452018-10-02 23:27:21 -0700492 vl_api_prefix_t prefix;
493};
494
Neale Rannsb8d44812017-11-10 06:53:54 -0800495/** \brief Configure IP source and L4 port-range check
496 @param client_index - opaque cookie to identify the sender
497 @param context - sender context, to match reply w/ request
498 @param is_ip6 - 1 if source address type is IPv6
499 @param is_add - 1 if add, 0 if delete
Neale Ranns37029302018-08-10 05:30:06 -0700500 @param ip - prefix to match
Neale Rannsb8d44812017-11-10 06:53:54 -0800501 @param number_of_ranges - length of low_port and high_port arrays (must match)
502 @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
503 @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
504 @param vrf_id - fib table/vrf id to associate the source and port-range check with
505 @note To specify a single port set low_port and high_port entry the same
506*/
507autoreply define ip_source_and_port_range_check_add_del
508{
509 u32 client_index;
510 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200511 bool is_add [default=true];
Neale Ranns37029302018-08-10 05:30:06 -0700512 vl_api_prefix_t prefix;
Neale Rannsb8d44812017-11-10 06:53:54 -0800513 u8 number_of_ranges;
514 u16 low_ports[32];
515 u16 high_ports[32];
516 u32 vrf_id;
517};
518
519/** \brief Set interface source and L4 port-range request
520 @param client_index - opaque cookie to identify the sender
521 @param context - sender context, to match reply w/ request
522 @param interface_id - interface index
523 @param tcp_vrf_id - VRF associated with source and TCP port-range check
524 @param udp_vrf_id - VRF associated with source and TCP port-range check
525*/
526autoreply define ip_source_and_port_range_check_interface_add_del
527{
528 u32 client_index;
529 u32 context;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200530 bool is_add [default=true];
Ole Troan668605f2019-12-09 16:08:27 +0100531 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800532 u32 tcp_in_vrf_id;
533 u32 tcp_out_vrf_id;
534 u32 udp_in_vrf_id;
535 u32 udp_out_vrf_id;
536};
537
Neale Rannscbe25aa2019-09-30 10:53:31 +0000538/** \brief IPv6 set link local address on interface request
John Lo7f358b32018-04-28 01:19:24 -0400539 @param client_index - opaque cookie to identify the sender
540 @param context - sender context, to match reply w/ request
Neale Rannscbe25aa2019-09-30 10:53:31 +0000541 @param sw_if_index - interface to set link local on
542 @param ip - the new link local address
John Lo7f358b32018-04-28 01:19:24 -0400543*/
Neale Rannscbe25aa2019-09-30 10:53:31 +0000544autoreply define sw_interface_ip6_set_link_local_address
Neale Rannsb8d44812017-11-10 06:53:54 -0800545{
546 u32 client_index;
547 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100548 vl_api_interface_index_t sw_if_index;
Neale Rannscbe25aa2019-09-30 10:53:31 +0000549 vl_api_ip6_address_t ip;
Neale Rannsb8d44812017-11-10 06:53:54 -0800550};
551
552/** \brief IOAM enable : Enable in-band OAM
553 @param id - profile id
554 @param seqno - To enable Seqno Processing
Jakub Grajciar58989a32019-10-08 14:05:18 +0200555 @param analyse - Enabling analysis of iOAM at decap node
556 @param pow_enable - Proof of Work enabled or not flag
Neale Rannsb8d44812017-11-10 06:53:54 -0800557 @param trace_enable - iOAM Trace enabled or not flag
558*/
559autoreply define ioam_enable
560{
561 u32 client_index;
562 u32 context;
563 u16 id;
Jakub Grajciar58989a32019-10-08 14:05:18 +0200564 bool seqno;
565 bool analyse;
566 bool pot_enable;
567 bool trace_enable;
Neale Rannsb8d44812017-11-10 06:53:54 -0800568 u32 node_id;
569};
570
571/** \brief iOAM disable
572 @param client_index - opaque cookie to identify the sender
573 @param context - sender context, to match reply w/ request
574 @param index - MAP Domain index
575*/
576autoreply define ioam_disable
577{
578 u32 client_index;
579 u32 context;
580 u16 id;
581};
582
Klement Sekerade34c352019-06-25 11:19:22 +0000583enum ip_reass_type
584{
585 IP_REASS_TYPE_FULL = 0,
586 IP_REASS_TYPE_SHALLOW_VIRTUAL = 0x1,
587};
588
Klement Sekera75e7d132017-09-20 08:26:30 +0200589autoreply define ip_reassembly_set
590{
591 u32 client_index;
592 u32 context;
593 u32 timeout_ms;
594 u32 max_reassemblies;
Klement Sekera3a343d42019-05-16 14:35:46 +0200595 u32 max_reassembly_length;
Klement Sekera75e7d132017-09-20 08:26:30 +0200596 u32 expire_walk_interval_ms;
Ole Troan668605f2019-12-09 16:08:27 +0100597 bool is_ip6;
Klement Sekerade34c352019-06-25 11:19:22 +0000598 vl_api_ip_reass_type_t type;
Klement Sekera75e7d132017-09-20 08:26:30 +0200599};
600
601define ip_reassembly_get
602{
603 u32 client_index;
604 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100605 bool is_ip6;
Klement Sekerade34c352019-06-25 11:19:22 +0000606 vl_api_ip_reass_type_t type;
Klement Sekera75e7d132017-09-20 08:26:30 +0200607};
608
609define ip_reassembly_get_reply
610{
Klement Sekera75e7d132017-09-20 08:26:30 +0200611 u32 context;
612 i32 retval;
613 u32 timeout_ms;
614 u32 max_reassemblies;
Klement Sekera3a343d42019-05-16 14:35:46 +0200615 u32 max_reassembly_length;
Klement Sekera75e7d132017-09-20 08:26:30 +0200616 u32 expire_walk_interval_ms;
Ole Troan668605f2019-12-09 16:08:27 +0100617 bool is_ip6;
Klement Sekera75e7d132017-09-20 08:26:30 +0200618};
619
Klement Sekera4c533132018-02-22 11:41:12 +0100620/** \brief Enable/disable reassembly feature
621 @param client_index - opaque cookie to identify the sender
622 @param context - sender context, to match reply w/ request
623 @param sw_if_index - interface to enable/disable feature on
624 @param enable_ip4 - enable ip4 reassembly if non-zero, disable if 0
625 @param enable_ip6 - enable ip6 reassembly if non-zero, disable if 0
626*/
627autoreply define ip_reassembly_enable_disable
628{
629 u32 client_index;
630 u32 context;
Ole Troan668605f2019-12-09 16:08:27 +0100631 vl_api_interface_index_t sw_if_index;
632 bool enable_ip4;
633 bool enable_ip6;
Klement Sekerade34c352019-06-25 11:19:22 +0000634 vl_api_ip_reass_type_t type;
Klement Sekera4c533132018-02-22 11:41:12 +0100635};
636
Dave Barachb5e8a772016-12-06 12:04:42 -0500637/*
638 * Local Variables:
639 * eval: (c-set-style "gnu")
640 * End:
641 */