blob: 06663595cf73cad5afb86a773b2f1b5bcdf370a5 [file] [log] [blame]
Matus Fabianf468e232016-12-02 06:00:53 -08001/* Hey Emacs use -*- mode: C -*- */
2/*
3 * Copyright (c) 2016 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:
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
Mohsin Kazmi5e6f7342019-04-05 17:40:20 +020017option version = "2.2.2";
Neale Ranns4d5b9172018-10-24 02:57:49 -070018
19import "vnet/ip/ip_types.api";
20import "vnet/ethernet/ethernet_types.api";
Neale Rannscbe25aa2019-09-30 10:53:31 +000021import "vnet/interface_types.api";
Dave Barach0d056e52017-09-28 15:11:16 -040022
Matus Fabianf468e232016-12-02 06:00:53 -080023/** \brief Reply to l2_xconnect_dump
24 @param context - sender context which was passed in the request
25 @param rx_sw_if_index - Receive interface index
26 @param tx_sw_if_index - Transmit interface index
27 */
28define l2_xconnect_details
29{
30 u32 context;
31 u32 rx_sw_if_index;
32 u32 tx_sw_if_index;
33};
34
35/** \brief Dump L2 XConnects
36 @param client_index - opaque cookie to identify the sender
37 @param context - sender context, to match reply w/ request
38*/
39define l2_xconnect_dump
40{
41 u32 client_index;
42 u32 context;
43};
44
Ole Troan01384fe2017-05-12 11:55:35 +020045/** \brief l2 fib table details structure
Pavel Kotucek0f971d82017-01-03 10:48:54 +010046 @param bd_id - the l2 fib / bridge domain table id
47 @param mac - the entry's mac address
48 @param sw_if_index - index of the interface
49 @param static_mac - the entry is statically configured.
50 @param filter_mac - the entry is a mac filter entry.
51 @param bvi_mac - the mac address is a bridge virtual interface
52*/
Ole Troan01384fe2017-05-12 11:55:35 +020053define l2_fib_table_details
Pavel Kotucek0f971d82017-01-03 10:48:54 +010054{
55 u32 context;
56 u32 bd_id;
Mohsin Kazmi57938f62017-10-27 21:28:07 +020057 u8 mac[6];
Pavel Kotucek0f971d82017-01-03 10:48:54 +010058 u32 sw_if_index;
59 u8 static_mac;
60 u8 filter_mac;
61 u8 bvi_mac;
62};
63
64/** \brief Dump l2 fib (aka bridge domain) table
65 @param client_index - opaque cookie to identify the sender
66 @param bd_id - the l2 fib / bridge domain table identifier
67*/
68define l2_fib_table_dump
69{
70 u32 client_index;
71 u32 context;
72 u32 bd_id;
73};
74
75/** \brief L2 fib clear table request, clear all mac entries in the l2 fib
76 @param client_index - opaque cookie to identify the sender
77 @param context - sender context, to match reply w/ request
78*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040079autoreply define l2_fib_clear_table
Pavel Kotucek0f971d82017-01-03 10:48:54 +010080{
81 u32 client_index;
82 u32 context;
83};
84
Eyal Bari7537e712017-04-27 14:07:55 +030085/** \brief L2 FIB flush all entries
86 @param client_index - opaque cookie to identify the sender
87 @param context - sender context, to match reply w/ request
88*/
89autoreply define l2fib_flush_all
90{
91 u32 client_index;
92 u32 context;
93};
94
Eyal Barif24991c2017-04-05 05:33:21 +030095/** \brief L2 FIB flush bridge domain entries
96 @param client_index - opaque cookie to identify the sender
97 @param context - sender context, to match reply w/ request
98 @param bd_id - the entry's bridge domain id
99*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400100autoreply define l2fib_flush_bd
Eyal Barif24991c2017-04-05 05:33:21 +0300101{
102 u32 client_index;
103 u32 context;
104 u32 bd_id;
105};
106
Eyal Barif24991c2017-04-05 05:33:21 +0300107/** \brief L2 FIB flush interface entries
108 @param client_index - opaque cookie to identify the sender
109 @param context - sender context, to match reply w/ request
110 @param bd_id - the entry's bridge domain id
111*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400112autoreply define l2fib_flush_int
Eyal Barif24991c2017-04-05 05:33:21 +0300113{
114 u32 client_index;
115 u32 context;
116 u32 sw_if_index;
117};
118
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100119/** \brief L2 FIB add entry request
120 @param client_index - opaque cookie to identify the sender
121 @param context - sender context, to match reply w/ request
122 @param mac - the entry's mac address
123 @param bd_id - the entry's bridge domain id
124 @param sw_if_index - the interface
125 @param is_add - If non zero add the entry, else delete it
126 @param static_mac -
127 @param filter_mac -
128*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400129autoreply define l2fib_add_del
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100130{
131 u32 client_index;
132 u32 context;
Mohsin Kazmi57938f62017-10-27 21:28:07 +0200133 u8 mac[6];
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100134 u32 bd_id;
135 u32 sw_if_index;
136 u8 is_add;
137 u8 static_mac;
138 u8 filter_mac;
139 u8 bvi_mac;
140};
141
Paul Vinciguerrabdc0e6b2018-09-22 05:32:50 -0700142/** \brief Register to receive L2 MAC events for learned and aged MAC
John Lo8d00fff2017-08-03 00:35:36 -0400143 @param client_index - opaque cookie to identify the sender
144 @param context - sender context, to match reply w/ request
145 @param learn_limit - MAC learn limit, 0 => default to 1000
146 @param scan_delay - event scan delay in 10 msec unit, 0 => default to 100 msec
147 @param max_macs_in_event - in units of 10 mac entries, 0 => default to 100 entries
148 @param enable_disable - 1 => register for MAC events, 0 => cancel registration
149 @param pid - sender's pid
150*/
151autoreply define want_l2_macs_events
152{
153 u32 client_index;
154 u32 context;
155 u32 learn_limit;
156 u8 scan_delay;
157 u8 max_macs_in_event;
Neale Rannscbe25aa2019-09-30 10:53:31 +0000158 bool enable_disable;
John Lo8d00fff2017-08-03 00:35:36 -0400159 u32 pid;
160};
161
162/** \brief Entry for learned or aged MAC in L2 MAC Events
163 @param sw_if_index - sw_if_index in the domain
164 @param mac_addr - mac_address
John Loe23c99e2018-03-13 21:53:18 -0400165 @param action - 0 => newly learned MAC, 1 => MAC deleted by ager
166 3 => MAC move (sw_if_index changed)
167 @param flags - flag bits to provide other info, not yet used
John Lo8d00fff2017-08-03 00:35:36 -0400168*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400169typedef mac_entry
John Lo8d00fff2017-08-03 00:35:36 -0400170{
171 u32 sw_if_index;
172 u8 mac_addr[6];
John Loe23c99e2018-03-13 21:53:18 -0400173 u8 action;
174 u8 flags;
John Lo8d00fff2017-08-03 00:35:36 -0400175};
176
177/** \brief L2 MAC event for a list of learned or aged MACs
178 @param client_index - opaque cookie to identify the sender
179 @param pid - client pid registered to receive notification
Paul Vinciguerrabdc0e6b2018-09-22 05:32:50 -0700180 @param n_macs - number of learned/aged MAC entries
John Lo8d00fff2017-08-03 00:35:36 -0400181 @param mac - array of learned/aged MAC entries
182*/
183define l2_macs_event
184{
185 u32 client_index;
186 u32 pid;
187 u32 n_macs;
188 vl_api_mac_entry_t mac[n_macs];
189};
190
Marek Gradzki51e59682018-03-06 10:05:44 +0100191service {
192 rpc want_l2_macs_events returns want_l2_macs_events_reply
193 events l2_macs_event;
194};
195
John Lo8d00fff2017-08-03 00:35:36 -0400196/** \brief Set interface L2 flags (such as L2_LEARN, L2_FWD,
197 L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM bits). This can be used
198 to disable one or more of the features represented by the
199 flag bits on an interface to override what is set as default
200 for all interfaces in the bridge domain
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100201 @param client_index - opaque cookie to identify the sender
202 @param context - sender context, to match reply w/ request
203 @param sw_if_index - interface
204 @param is_set - if non-zero, set the bits, else clear them
John Lo8d00fff2017-08-03 00:35:36 -0400205 @param feature_bitmap - non-zero bits (as above) to set or clear
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100206*/
207define l2_flags
208{
209 u32 client_index;
210 u32 context;
211 u32 sw_if_index;
212 u8 is_set;
213 u32 feature_bitmap;
214};
215
John Lo8d00fff2017-08-03 00:35:36 -0400216/** \brief Set interface L2 flags response
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100217 @param context - sender context, to match reply w/ request
218 @param retval - return code for the set l2 bits request
John Lo8d00fff2017-08-03 00:35:36 -0400219 @param resulting_feature_bitmap - the internal l2 feature bitmap after the request is implemented
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100220*/
221define l2_flags_reply
222{
223 u32 context;
224 i32 retval;
225 u32 resulting_feature_bitmap;
226};
227
Eyal Barifead6702017-04-04 04:46:32 +0300228/** \brief L2 bridge domain set mac age
229 @param client_index - opaque cookie to identify the sender
230 @param context - sender context, to match reply w/ request
231 @param bd_id - the bridge domain to create
232 @param mac_age - mac aging time in min, 0 for disabled
233*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400234autoreply define bridge_domain_set_mac_age
Eyal Barifead6702017-04-04 04:46:32 +0300235{
236 u32 client_index;
237 u32 context;
238 u32 bd_id;
239 u8 mac_age;
240};
241
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100242/** \brief L2 bridge domain add or delete request
243 @param client_index - opaque cookie to identify the sender
244 @param context - sender context, to match reply w/ request
245 @param bd_id - the bridge domain to create
246 @param flood - enable/disable bcast/mcast flooding in the bd
Paul Vinciguerrabdc0e6b2018-09-22 05:32:50 -0700247 @param uu_flood - enable/disable unknown unicast flood in the bd
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100248 @param forward - enable/disable forwarding on all interfaces in the bd
249 @param learn - enable/disable learning on all interfaces in the bd
250 @param arp_term - enable/disable arp termination in the bd
Mohsin Kazmi5e6f7342019-04-05 17:40:20 +0200251 @param arp_ufwd - enable/disable arp unicast forwarding in the bd
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100252 @param mac_age - mac aging time in min, 0 for disabled
253 @param is_add - add or delete flag
254*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400255autoreply define bridge_domain_add_del
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100256{
257 u32 client_index;
258 u32 context;
259 u32 bd_id;
260 u8 flood;
261 u8 uu_flood;
262 u8 forward;
263 u8 learn;
264 u8 arp_term;
Mohsin Kazmi5e6f7342019-04-05 17:40:20 +0200265 u8 arp_ufwd;
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100266 u8 mac_age;
Jerome Tollet48304142017-09-05 12:13:22 +0100267 u8 bd_tag[64];
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100268 u8 is_add;
269};
270
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100271/** \brief L2 bridge domain request operational state details
272 @param client_index - opaque cookie to identify the sender
273 @param context - sender context, to match reply w/ request
274 @param bd_id - the bridge domain id desired or ~0 to request all bds
275*/
276define bridge_domain_dump
277{
278 u32 client_index;
279 u32 context;
280 u32 bd_id;
281};
282
Ole Troan01384fe2017-05-12 11:55:35 +0200283/** \brief L2 bridge domain sw interface operational state response
284 @param bd_id - the bridge domain id
285 @param sw_if_index - sw_if_index in the domain
286 @param shg - split horizon group for the interface
287*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400288typedef bridge_domain_sw_if
Ole Troan01384fe2017-05-12 11:55:35 +0200289{
290 u32 context;
291 u32 sw_if_index;
292 u8 shg;
293};
294
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100295/** \brief L2 bridge domain operational state response
296 @param bd_id - the bridge domain id
297 @param flood - bcast/mcast flooding state on all interfaces in the bd
Paul Vinciguerrabdc0e6b2018-09-22 05:32:50 -0700298 @param uu_flood - unknown unicast flooding state on all interfaces in the bd
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100299 @param forward - forwarding state on all interfaces in the bd
300 @param learn - learning state on all interfaces in the bd
301 @param arp_term - arp termination state on all interfaces in the bd
Mohsin Kazmi5e6f7342019-04-05 17:40:20 +0200302 @param arp_ufwd - arp unicast forwarding state on all interfaces in the bd
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100303 @param mac_age - mac aging time in min, 0 for disabled
Jerome Tollet50570ec2017-09-14 12:53:56 +0100304 @param bd_tag - optional textual tag for the bridge domain
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100305 @param n_sw_ifs - number of sw_if_index's in the domain
306*/
Ole Troan01384fe2017-05-12 11:55:35 +0200307manual_print manual_endian define bridge_domain_details
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100308{
309 u32 context;
310 u32 bd_id;
311 u8 flood;
312 u8 uu_flood;
313 u8 forward;
314 u8 learn;
315 u8 arp_term;
Mohsin Kazmi5e6f7342019-04-05 17:40:20 +0200316 u8 arp_ufwd;
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100317 u8 mac_age;
Jerome Tollet48304142017-09-05 12:13:22 +0100318 u8 bd_tag[64];
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100319 u32 bvi_sw_if_index;
Neale Rannsb4743802018-09-05 09:13:57 -0700320 u32 uu_fwd_sw_if_index;
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100321 u32 n_sw_ifs;
Ole Troan01384fe2017-05-12 11:55:35 +0200322 vl_api_bridge_domain_sw_if_t sw_if_details[n_sw_ifs];
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100323};
324
Neale Rannsb4743802018-09-05 09:13:57 -0700325/** \brief Flags that can be changed on a bridge domain */
326enum bd_flags
327{
Michal Cmarada5daf0c52019-03-15 10:46:07 +0100328 BRIDGE_API_FLAG_NONE = 0x0,
Neale Rannsb4743802018-09-05 09:13:57 -0700329 BRIDGE_API_FLAG_LEARN = 0x1,
330 BRIDGE_API_FLAG_FWD = 0x2,
331 BRIDGE_API_FLAG_FLOOD = 0x4,
332 BRIDGE_API_FLAG_UU_FLOOD = 0x8,
333 BRIDGE_API_FLAG_ARP_TERM = 0x10,
Mohsin Kazmi5e6f7342019-04-05 17:40:20 +0200334 BRIDGE_API_FLAG_ARP_UFWD = 0x20,
Neale Rannsb4743802018-09-05 09:13:57 -0700335};
336
337/** \brief Set bridge flags request
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100338 @param client_index - opaque cookie to identify the sender
339 @param context - sender context, to match reply w/ request
340 @param bd_id - the bridge domain to set the flags for
341 @param is_set - if non-zero, set the flags, else clear them
Neale Rannsb4743802018-09-05 09:13:57 -0700342 @param flags - flags that are non-zero to set or clear
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100343*/
344define bridge_flags
345{
346 u32 client_index;
347 u32 context;
348 u32 bd_id;
349 u8 is_set;
Neale Rannsb4743802018-09-05 09:13:57 -0700350 vl_api_bd_flags_t flags;
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100351};
352
353/** \brief Set bridge flags response
354 @param context - sender context, to match reply w/ request
355 @param retval - return code for the set bridge flags request
John Lo8d00fff2017-08-03 00:35:36 -0400356 @param resulting_feature_bitmap - the internal L2 feature bitmap after the request is implemented
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100357*/
358define bridge_flags_reply
359{
360 u32 context;
361 i32 retval;
362 u32 resulting_feature_bitmap;
363};
364
Pavel Kotucekadec5872017-01-25 08:50:53 +0100365/** \brief L2 interface vlan tag rewrite configure request
366 @param client_index - opaque cookie to identify the sender
367 @param context - sender context, to match reply w/ request
368 @param sw_if_index - interface the operation is applied to
369 @param vtr_op - Choose from l2_vtr_op_t enum values
370 @param push_dot1q - first pushed flag dot1q id set, else dot1ad
371 @param tag1 - Needed for any push or translate vtr op
372 @param tag2 - Needed for any push 2 or translate x-2 vtr ops
373*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400374autoreply define l2_interface_vlan_tag_rewrite
Pavel Kotucekadec5872017-01-25 08:50:53 +0100375{
376 u32 client_index;
377 u32 context;
378 u32 sw_if_index;
379 u32 vtr_op;
380 u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
381 u32 tag1; // first pushed tag
382 u32 tag2; // second pushed tag
383};
384
Pavel Kotucekadec5872017-01-25 08:50:53 +0100385/** \brief L2 interface pbb tag rewrite configure request
386 @param client_index - opaque cookie to identify the sender
387 @param context - sender context, to match reply w/ request
388 @param sw_if_index - interface the operation is applied to
389 @param vtr_op - Choose from l2_vtr_op_t enum values
390 @param inner_tag - needed for translate_qinq vtr op only
391 @param outer_tag - needed for translate_qinq vtr op only
392 @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
393 @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
394 @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
395 @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
396*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400397autoreply define l2_interface_pbb_tag_rewrite
Pavel Kotucekadec5872017-01-25 08:50:53 +0100398{
399 u32 client_index;
400 u32 context;
401 u32 sw_if_index;
402 u32 vtr_op;
403 u16 outer_tag;
404 u8 b_dmac[6];
405 u8 b_smac[6];
406 u16 b_vlanid;
407 u32 i_sid;
408};
409
Neale Rannsb8d44812017-11-10 06:53:54 -0800410/** \brief L2 interface patch add / del request
411 @param client_index - opaque cookie to identify the sender
412 @param context - sender context, to match reply w/ request
413 @param rx_sw_if_index - receive side interface
414 @param tx_sw_if_index - transmit side interface
415 @param is_add - if non-zero set up the interface patch, else remove it
416*/
417autoreply define l2_patch_add_del
418{
419 u32 client_index;
420 u32 context;
421 u32 rx_sw_if_index;
422 u32 tx_sw_if_index;
423 u8 is_add;
424};
425
426/** \brief Set L2 XConnect between two interfaces request
427 @param client_index - opaque cookie to identify the sender
428 @param context - sender context, to match reply w/ request
429 @param rx_sw_if_index - Receive interface index
430 @param tx_sw_if_index - Transmit interface index
431 @param enable - enable xconnect if not 0, else set to L3 mode
432*/
433autoreply define sw_interface_set_l2_xconnect
434{
435 u32 client_index;
436 u32 context;
437 u32 rx_sw_if_index;
438 u32 tx_sw_if_index;
439 u8 enable;
440};
441
Neale Rannsb4743802018-09-05 09:13:57 -0700442/**
443 * @brief An enumeration of the type of ports that can be added
444 * to a bridge domain
445 */
446enum l2_port_type
447{
448 /* a 'normal' interface, i.e. not BVI or UU-Flood */
449 L2_API_PORT_TYPE_NORMAL = 0,
450 /* a BVI interface in the BD */
451 L2_API_PORT_TYPE_BVI = 1,
452 /* The interface on which to forward unknown unicast packets
453 * If this is not set for a BD then UU is flooded */
454 L2_API_PORT_TYPE_UU_FWD = 2,
455};
456
Neale Rannsb8d44812017-11-10 06:53:54 -0800457/** \brief Interface bridge mode request
458 @param client_index - opaque cookie to identify the sender
459 @param context - sender context, to match reply w/ request
460 @param rx_sw_if_index - the interface
461 @param bd_id - bridge domain id
Yichen Wang0a4e0062018-10-01 11:15:25 -0700462 @param port_type - port_mode, see #l2_port_type
Yichen Wang5c7c49d2018-09-18 17:32:29 -0700463 @param shg - Split horizon group, for bridge mode only
Neale Rannsb8d44812017-11-10 06:53:54 -0800464 @param enable - Enable beige mode if not 0, else set to L3 mode
465*/
Neale Rannsb4743802018-09-05 09:13:57 -0700466
Neale Rannsb8d44812017-11-10 06:53:54 -0800467autoreply define sw_interface_set_l2_bridge
468{
469 u32 client_index;
470 u32 context;
471 u32 rx_sw_if_index;
472 u32 bd_id;
Neale Rannsb4743802018-09-05 09:13:57 -0700473 vl_api_l2_port_type_t port_type;
Neale Rannsb8d44812017-11-10 06:53:54 -0800474 u8 shg;
Neale Rannsb8d44812017-11-10 06:53:54 -0800475 u8 enable;
476};
477
478/** \brief Set bridge domain ip to mac entry request
479 @param client_index - opaque cookie to identify the sender
480 @param context - sender context, to match reply w/ request
481 @param bd_id - the bridge domain to set the flags for
482 @param is_add - if non-zero, add the entry, else clear it
Igor Mikhailov (imichail)54bc5e42019-05-08 16:01:01 -0700483 @param ip - ipv4 or ipv6 address
484 @param mac - MAC address
Neale Rannsb8d44812017-11-10 06:53:54 -0800485*/
Neale Rannsbc764c82019-06-19 07:07:13 -0700486
487typedef bd_ip_mac
488{
489 u32 bd_id;
490 vl_api_address_t ip;
491 vl_api_mac_address_t mac;
492};
493
Neale Rannsb8d44812017-11-10 06:53:54 -0800494autoreply define bd_ip_mac_add_del
495{
496 u32 client_index;
497 u32 context;
Neale Rannsb8d44812017-11-10 06:53:54 -0800498 u8 is_add;
Neale Rannsbc764c82019-06-19 07:07:13 -0700499 vl_api_bd_ip_mac_t entry;
Neale Rannsb8d44812017-11-10 06:53:54 -0800500};
501
John Loe26c81f2019-01-07 15:16:33 -0500502/** \brief Flush bridge domain IP to MAC entries
503 @param client_index - opaque cookie to identify the sender
504 @param bd_id - bridge domain identifier
505*/
506autoreply define bd_ip_mac_flush
507{
508 u32 client_index;
509 u32 context;
510 u32 bd_id;
511};
512
Mohsin Kazmi5d82d2f2018-08-13 19:17:54 +0200513/** \brief bridge domain IP to MAC entry details structure
514 @param bd_id - bridge domain table id
515 @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
516 @param ip_address - ipv4 or ipv6 address
517 @param mac_address - MAC address
518*/
519define bd_ip_mac_details
520{
521 u32 context;
Neale Rannsbc764c82019-06-19 07:07:13 -0700522 vl_api_bd_ip_mac_t entry;
Mohsin Kazmi5d82d2f2018-08-13 19:17:54 +0200523};
524
525/** \brief Dump bridge domain IP to MAC entries
526 @param client_index - opaque cookie to identify the sender
527 @param bd_id - bridge domain identifier
528*/
529define bd_ip_mac_dump
530{
531 u32 client_index;
532 u32 context;
533 u32 bd_id;
534};
535
Neale Rannsb8d44812017-11-10 06:53:54 -0800536/** \brief L2 interface ethernet flow point filtering enable/disable request
537 @param client_index - opaque cookie to identify the sender
538 @param context - sender context, to match reply w/ request
539 @param sw_if_index - interface to enable/disable filtering on
540 @param enable_disable - if non-zero enable filtering, else disable
541*/
542autoreply define l2_interface_efp_filter
543{
544 u32 client_index;
545 u32 context;
546 u32 sw_if_index;
Neale Ranns6b9b41c2018-07-23 05:47:09 -0400547 u8 enable_disable;
Neale Rannsb8d44812017-11-10 06:53:54 -0800548};
549
550/** \brief Interface set vpath request
551 @param client_index - opaque cookie to identify the sender
552 @param context - sender context, to match reply w/ request
553 @param sw_if_index - interface used to reach neighbor
554 @param enable - if non-zero enable, else disable
555*/
556autoreply define sw_interface_set_vpath
557{
558 u32 client_index;
559 u32 context;
560 u32 sw_if_index;
561 u8 enable;
562};
563
Neale Ranns192b13f2019-03-15 02:16:20 -0700564/** \brief Create BVI interface instance request
565 @param client_index - opaque cookie to identify the sender
566 @param context - sender context, to match reply w/ request
567 @param mac_address - mac addr to assign to the interface if none-zero
568 @param user_instance - requested instance, ~0 => dynamically allocate
569*/
570define bvi_create
571{
572 u32 client_index;
573 u32 context;
574 vl_api_mac_address_t mac;
575 u32 user_instance;
576};
577
578/** \brief Create BVI interface instance response
579 @param context - sender context, to match reply w/ request
580 @param sw_if_index - sw index of the interface that was created
581 @param retval - return code for the request
582*/
583define bvi_create_reply
584{
585 u32 context;
586 i32 retval;
587 u32 sw_if_index;
588};
589
590/** \brief Delete BVI interface request
591 @param client_index - opaque cookie to identify the sender
592 @param context - sender context, to match reply w/ request
593 @param sw_if_index - sw index of the interface that was created
594*/
595autoreply define bvi_delete
596{
597 u32 client_index;
598 u32 context;
599 u32 sw_if_index;
600};
601
Neale Rannscbe25aa2019-09-30 10:53:31 +0000602/** \brief Register for IP4 ARP resolution event on receing ARP reply or
603 MAC/IP info from ARP requests in L2 BDs
604 @param client_index - opaque cookie to identify the sender
605 @param context - sender context, to match reply w/ request
606 @param enable - 1 => register for events, 0 => cancel registration
607 @param pid - sender's pid
608*/
609autoreply define want_l2_arp_term_events
610{
611 u32 client_index;
612 u32 context;
613 bool enable;
614 u32 pid;
615};
616
617/** \brief Tell client about an IP4 ARP resolution event or
618 MAC/IP info from ARP requests in L2 BDs
619 @param client_index - opaque cookie to identify the sender
620 @param pid - client pid registered to receive notification
621 @param ip - IP address of new ARP term entry
622 @param sw_if_index - interface of new ARP term entry
623 @param mac - MAC address of new ARP term entry
624*/
625define l2_arp_term_event
626{
627 u32 client_index;
628 u32 pid;
629 vl_api_address_t ip;
630 vl_api_interface_index_t sw_if_index;
631 vl_api_mac_address_t mac;
632};
633
634service {
635 rpc want_l2_arp_term_events returns want_l2_arp_term_events_reply
636 events l2_arp_term_event;
637};
638
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100639/*
640 * Local Variables:
641 * eval: (c-set-style "gnu")
642 * End:
643 */