blob: 0ff4a2d75e40495e308fefdcb74a1a4e7148dee3 [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
John Loe23c99e2018-03-13 21:53:18 -040017option version = "2.0.1";
Dave Barach0d056e52017-09-28 15:11:16 -040018
Matus Fabianf468e232016-12-02 06:00:53 -080019/** \brief Reply to l2_xconnect_dump
20 @param context - sender context which was passed in the request
21 @param rx_sw_if_index - Receive interface index
22 @param tx_sw_if_index - Transmit interface index
23 */
24define l2_xconnect_details
25{
26 u32 context;
27 u32 rx_sw_if_index;
28 u32 tx_sw_if_index;
29};
30
31/** \brief Dump L2 XConnects
32 @param client_index - opaque cookie to identify the sender
33 @param context - sender context, to match reply w/ request
34*/
35define l2_xconnect_dump
36{
37 u32 client_index;
38 u32 context;
39};
40
Ole Troan01384fe2017-05-12 11:55:35 +020041/** \brief l2 fib table details structure
Pavel Kotucek0f971d82017-01-03 10:48:54 +010042 @param bd_id - the l2 fib / bridge domain table id
43 @param mac - the entry's mac address
44 @param sw_if_index - index of the interface
45 @param static_mac - the entry is statically configured.
46 @param filter_mac - the entry is a mac filter entry.
47 @param bvi_mac - the mac address is a bridge virtual interface
48*/
Ole Troan01384fe2017-05-12 11:55:35 +020049define l2_fib_table_details
Pavel Kotucek0f971d82017-01-03 10:48:54 +010050{
51 u32 context;
52 u32 bd_id;
Mohsin Kazmi57938f62017-10-27 21:28:07 +020053 u8 mac[6];
Pavel Kotucek0f971d82017-01-03 10:48:54 +010054 u32 sw_if_index;
55 u8 static_mac;
56 u8 filter_mac;
57 u8 bvi_mac;
58};
59
60/** \brief Dump l2 fib (aka bridge domain) table
61 @param client_index - opaque cookie to identify the sender
62 @param bd_id - the l2 fib / bridge domain table identifier
63*/
64define l2_fib_table_dump
65{
66 u32 client_index;
67 u32 context;
68 u32 bd_id;
69};
70
71/** \brief L2 fib clear table request, clear all mac entries in the l2 fib
72 @param client_index - opaque cookie to identify the sender
73 @param context - sender context, to match reply w/ request
74*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040075autoreply define l2_fib_clear_table
Pavel Kotucek0f971d82017-01-03 10:48:54 +010076{
77 u32 client_index;
78 u32 context;
79};
80
Eyal Bari7537e712017-04-27 14:07:55 +030081/** \brief L2 FIB flush all entries
82 @param client_index - opaque cookie to identify the sender
83 @param context - sender context, to match reply w/ request
84*/
85autoreply define l2fib_flush_all
86{
87 u32 client_index;
88 u32 context;
89};
90
Eyal Barif24991c2017-04-05 05:33:21 +030091/** \brief L2 FIB flush bridge domain entries
92 @param client_index - opaque cookie to identify the sender
93 @param context - sender context, to match reply w/ request
94 @param bd_id - the entry's bridge domain id
95*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040096autoreply define l2fib_flush_bd
Eyal Barif24991c2017-04-05 05:33:21 +030097{
98 u32 client_index;
99 u32 context;
100 u32 bd_id;
101};
102
Eyal Barif24991c2017-04-05 05:33:21 +0300103/** \brief L2 FIB flush interface entries
104 @param client_index - opaque cookie to identify the sender
105 @param context - sender context, to match reply w/ request
106 @param bd_id - the entry's bridge domain id
107*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400108autoreply define l2fib_flush_int
Eyal Barif24991c2017-04-05 05:33:21 +0300109{
110 u32 client_index;
111 u32 context;
112 u32 sw_if_index;
113};
114
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100115/** \brief L2 FIB add entry request
116 @param client_index - opaque cookie to identify the sender
117 @param context - sender context, to match reply w/ request
118 @param mac - the entry's mac address
119 @param bd_id - the entry's bridge domain id
120 @param sw_if_index - the interface
121 @param is_add - If non zero add the entry, else delete it
122 @param static_mac -
123 @param filter_mac -
124*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400125autoreply define l2fib_add_del
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100126{
127 u32 client_index;
128 u32 context;
Mohsin Kazmi57938f62017-10-27 21:28:07 +0200129 u8 mac[6];
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100130 u32 bd_id;
131 u32 sw_if_index;
132 u8 is_add;
133 u8 static_mac;
134 u8 filter_mac;
135 u8 bvi_mac;
136};
137
John Lo8d00fff2017-08-03 00:35:36 -0400138/** \brief Register to recive L2 MAC events for leanred and aged MAC
John Lo8d00fff2017-08-03 00:35:36 -0400139 @param client_index - opaque cookie to identify the sender
140 @param context - sender context, to match reply w/ request
141 @param learn_limit - MAC learn limit, 0 => default to 1000
142 @param scan_delay - event scan delay in 10 msec unit, 0 => default to 100 msec
143 @param max_macs_in_event - in units of 10 mac entries, 0 => default to 100 entries
144 @param enable_disable - 1 => register for MAC events, 0 => cancel registration
145 @param pid - sender's pid
146*/
147autoreply define want_l2_macs_events
148{
149 u32 client_index;
150 u32 context;
151 u32 learn_limit;
152 u8 scan_delay;
153 u8 max_macs_in_event;
154 u8 enable_disable;
155 u32 pid;
156};
157
158/** \brief Entry for learned or aged MAC in L2 MAC Events
159 @param sw_if_index - sw_if_index in the domain
160 @param mac_addr - mac_address
John Loe23c99e2018-03-13 21:53:18 -0400161 @param action - 0 => newly learned MAC, 1 => MAC deleted by ager
162 3 => MAC move (sw_if_index changed)
163 @param flags - flag bits to provide other info, not yet used
John Lo8d00fff2017-08-03 00:35:36 -0400164*/
165typeonly define mac_entry
166{
167 u32 sw_if_index;
168 u8 mac_addr[6];
John Loe23c99e2018-03-13 21:53:18 -0400169 u8 action;
170 u8 flags;
John Lo8d00fff2017-08-03 00:35:36 -0400171};
172
173/** \brief L2 MAC event for a list of learned or aged MACs
174 @param client_index - opaque cookie to identify the sender
175 @param pid - client pid registered to receive notification
176 @param n_macs - number of learned/aged MAC enntries
177 @param mac - array of learned/aged MAC entries
178*/
179define l2_macs_event
180{
181 u32 client_index;
182 u32 pid;
183 u32 n_macs;
184 vl_api_mac_entry_t mac[n_macs];
185};
186
Marek Gradzki51e59682018-03-06 10:05:44 +0100187service {
188 rpc want_l2_macs_events returns want_l2_macs_events_reply
189 events l2_macs_event;
190};
191
John Lo8d00fff2017-08-03 00:35:36 -0400192/** \brief Set interface L2 flags (such as L2_LEARN, L2_FWD,
193 L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM bits). This can be used
194 to disable one or more of the features represented by the
195 flag bits on an interface to override what is set as default
196 for all interfaces in the bridge domain
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100197 @param client_index - opaque cookie to identify the sender
198 @param context - sender context, to match reply w/ request
199 @param sw_if_index - interface
200 @param is_set - if non-zero, set the bits, else clear them
John Lo8d00fff2017-08-03 00:35:36 -0400201 @param feature_bitmap - non-zero bits (as above) to set or clear
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100202*/
203define l2_flags
204{
205 u32 client_index;
206 u32 context;
207 u32 sw_if_index;
208 u8 is_set;
209 u32 feature_bitmap;
210};
211
John Lo8d00fff2017-08-03 00:35:36 -0400212/** \brief Set interface L2 flags response
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100213 @param context - sender context, to match reply w/ request
214 @param retval - return code for the set l2 bits request
John Lo8d00fff2017-08-03 00:35:36 -0400215 @param resulting_feature_bitmap - the internal l2 feature bitmap after the request is implemented
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100216*/
217define l2_flags_reply
218{
219 u32 context;
220 i32 retval;
221 u32 resulting_feature_bitmap;
222};
223
Eyal Barifead6702017-04-04 04:46:32 +0300224/** \brief L2 bridge domain set mac age
225 @param client_index - opaque cookie to identify the sender
226 @param context - sender context, to match reply w/ request
227 @param bd_id - the bridge domain to create
228 @param mac_age - mac aging time in min, 0 for disabled
229*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400230autoreply define bridge_domain_set_mac_age
Eyal Barifead6702017-04-04 04:46:32 +0300231{
232 u32 client_index;
233 u32 context;
234 u32 bd_id;
235 u8 mac_age;
236};
237
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100238/** \brief L2 bridge domain add or delete request
239 @param client_index - opaque cookie to identify the sender
240 @param context - sender context, to match reply w/ request
241 @param bd_id - the bridge domain to create
242 @param flood - enable/disable bcast/mcast flooding in the bd
243 @param uu_flood - enable/disable uknown unicast flood in the bd
244 @param forward - enable/disable forwarding on all interfaces in the bd
245 @param learn - enable/disable learning on all interfaces in the bd
246 @param arp_term - enable/disable arp termination in the bd
247 @param mac_age - mac aging time in min, 0 for disabled
248 @param is_add - add or delete flag
249*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400250autoreply define bridge_domain_add_del
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100251{
252 u32 client_index;
253 u32 context;
254 u32 bd_id;
255 u8 flood;
256 u8 uu_flood;
257 u8 forward;
258 u8 learn;
259 u8 arp_term;
260 u8 mac_age;
Jerome Tollet48304142017-09-05 12:13:22 +0100261 u8 bd_tag[64];
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100262 u8 is_add;
263};
264
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100265/** \brief L2 bridge domain request operational state details
266 @param client_index - opaque cookie to identify the sender
267 @param context - sender context, to match reply w/ request
268 @param bd_id - the bridge domain id desired or ~0 to request all bds
269*/
270define bridge_domain_dump
271{
272 u32 client_index;
273 u32 context;
274 u32 bd_id;
275};
276
Ole Troan01384fe2017-05-12 11:55:35 +0200277/** \brief L2 bridge domain sw interface operational state response
278 @param bd_id - the bridge domain id
279 @param sw_if_index - sw_if_index in the domain
280 @param shg - split horizon group for the interface
281*/
282typeonly manual_print manual_endian define bridge_domain_sw_if
283{
284 u32 context;
285 u32 sw_if_index;
286 u8 shg;
287};
288
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100289/** \brief L2 bridge domain operational state response
290 @param bd_id - the bridge domain id
291 @param flood - bcast/mcast flooding state on all interfaces in the bd
292 @param uu_flood - uknown unicast flooding state on all interfaces in the bd
293 @param forward - forwarding state on all interfaces in the bd
294 @param learn - learning state on all interfaces in the bd
295 @param arp_term - arp termination state on all interfaces in the bd
296 @param mac_age - mac aging time in min, 0 for disabled
Jerome Tollet50570ec2017-09-14 12:53:56 +0100297 @param bd_tag - optional textual tag for the bridge domain
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100298 @param n_sw_ifs - number of sw_if_index's in the domain
299*/
Ole Troan01384fe2017-05-12 11:55:35 +0200300manual_print manual_endian define bridge_domain_details
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100301{
302 u32 context;
303 u32 bd_id;
304 u8 flood;
305 u8 uu_flood;
306 u8 forward;
307 u8 learn;
308 u8 arp_term;
309 u8 mac_age;
Jerome Tollet48304142017-09-05 12:13:22 +0100310 u8 bd_tag[64];
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100311 u32 bvi_sw_if_index;
312 u32 n_sw_ifs;
Ole Troan01384fe2017-05-12 11:55:35 +0200313 vl_api_bridge_domain_sw_if_t sw_if_details[n_sw_ifs];
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100314};
315
316/** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD,
John Lo8d00fff2017-08-03 00:35:36 -0400317 L2_UU_FLOOD, or L2_ARP_TERM bits) request
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100318 @param client_index - opaque cookie to identify the sender
319 @param context - sender context, to match reply w/ request
320 @param bd_id - the bridge domain to set the flags for
321 @param is_set - if non-zero, set the flags, else clear them
John Lo8d00fff2017-08-03 00:35:36 -0400322 @param feature_bitmap - bits (as above) that are non-zero to set or clear
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100323*/
324define bridge_flags
325{
326 u32 client_index;
327 u32 context;
328 u32 bd_id;
329 u8 is_set;
330 u32 feature_bitmap;
331};
332
333/** \brief Set bridge flags response
334 @param context - sender context, to match reply w/ request
335 @param retval - return code for the set bridge flags request
John Lo8d00fff2017-08-03 00:35:36 -0400336 @param resulting_feature_bitmap - the internal L2 feature bitmap after the request is implemented
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100337*/
338define bridge_flags_reply
339{
340 u32 context;
341 i32 retval;
342 u32 resulting_feature_bitmap;
343};
344
Pavel Kotucekadec5872017-01-25 08:50:53 +0100345/** \brief L2 interface vlan tag rewrite configure request
346 @param client_index - opaque cookie to identify the sender
347 @param context - sender context, to match reply w/ request
348 @param sw_if_index - interface the operation is applied to
349 @param vtr_op - Choose from l2_vtr_op_t enum values
350 @param push_dot1q - first pushed flag dot1q id set, else dot1ad
351 @param tag1 - Needed for any push or translate vtr op
352 @param tag2 - Needed for any push 2 or translate x-2 vtr ops
353*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400354autoreply define l2_interface_vlan_tag_rewrite
Pavel Kotucekadec5872017-01-25 08:50:53 +0100355{
356 u32 client_index;
357 u32 context;
358 u32 sw_if_index;
359 u32 vtr_op;
360 u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
361 u32 tag1; // first pushed tag
362 u32 tag2; // second pushed tag
363};
364
Pavel Kotucekadec5872017-01-25 08:50:53 +0100365/** \brief L2 interface pbb 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 inner_tag - needed for translate_qinq vtr op only
371 @param outer_tag - needed for translate_qinq vtr op only
372 @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
373 @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
374 @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
375 @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
376*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400377autoreply define l2_interface_pbb_tag_rewrite
Pavel Kotucekadec5872017-01-25 08:50:53 +0100378{
379 u32 client_index;
380 u32 context;
381 u32 sw_if_index;
382 u32 vtr_op;
383 u16 outer_tag;
384 u8 b_dmac[6];
385 u8 b_smac[6];
386 u16 b_vlanid;
387 u32 i_sid;
388};
389
Neale Rannsb8d44812017-11-10 06:53:54 -0800390/** \brief L2 interface patch add / del request
391 @param client_index - opaque cookie to identify the sender
392 @param context - sender context, to match reply w/ request
393 @param rx_sw_if_index - receive side interface
394 @param tx_sw_if_index - transmit side interface
395 @param is_add - if non-zero set up the interface patch, else remove it
396*/
397autoreply define l2_patch_add_del
398{
399 u32 client_index;
400 u32 context;
401 u32 rx_sw_if_index;
402 u32 tx_sw_if_index;
403 u8 is_add;
404};
405
406/** \brief Set L2 XConnect between two interfaces request
407 @param client_index - opaque cookie to identify the sender
408 @param context - sender context, to match reply w/ request
409 @param rx_sw_if_index - Receive interface index
410 @param tx_sw_if_index - Transmit interface index
411 @param enable - enable xconnect if not 0, else set to L3 mode
412*/
413autoreply define sw_interface_set_l2_xconnect
414{
415 u32 client_index;
416 u32 context;
417 u32 rx_sw_if_index;
418 u32 tx_sw_if_index;
419 u8 enable;
420};
421
422/** \brief Interface bridge mode request
423 @param client_index - opaque cookie to identify the sender
424 @param context - sender context, to match reply w/ request
425 @param rx_sw_if_index - the interface
426 @param bd_id - bridge domain id
427 @param bvi - Setup interface as a bvi, bridge mode only
428 @param shg - Shared horizon group, for bridge mode only
429 @param enable - Enable beige mode if not 0, else set to L3 mode
430*/
431autoreply define sw_interface_set_l2_bridge
432{
433 u32 client_index;
434 u32 context;
435 u32 rx_sw_if_index;
436 u32 bd_id;
437 u8 shg;
438 u8 bvi;
439 u8 enable;
440};
441
442/** \brief Set bridge domain ip to mac entry request
443 @param client_index - opaque cookie to identify the sender
444 @param context - sender context, to match reply w/ request
445 @param bd_id - the bridge domain to set the flags for
446 @param is_add - if non-zero, add the entry, else clear it
447 @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
448 @param mac_address - MAC address
449 @param
450*/
451autoreply define bd_ip_mac_add_del
452{
453 u32 client_index;
454 u32 context;
455 u32 bd_id;
456 u8 is_add;
457 u8 is_ipv6;
458 u8 ip_address[16];
459 u8 mac_address[6];
460};
461
462/** \brief L2 interface ethernet flow point filtering enable/disable request
463 @param client_index - opaque cookie to identify the sender
464 @param context - sender context, to match reply w/ request
465 @param sw_if_index - interface to enable/disable filtering on
466 @param enable_disable - if non-zero enable filtering, else disable
467*/
468autoreply define l2_interface_efp_filter
469{
470 u32 client_index;
471 u32 context;
472 u32 sw_if_index;
473 u32 enable_disable;
474};
475
476/** \brief Interface set vpath request
477 @param client_index - opaque cookie to identify the sender
478 @param context - sender context, to match reply w/ request
479 @param sw_if_index - interface used to reach neighbor
480 @param enable - if non-zero enable, else disable
481*/
482autoreply define sw_interface_set_vpath
483{
484 u32 client_index;
485 u32 context;
486 u32 sw_if_index;
487 u8 enable;
488};
489
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100490/*
491 * Local Variables:
492 * eval: (c-set-style "gnu")
493 * End:
494 */