blob: 9f97ebbe2cab17ef9a30fd37b50602b423658d33 [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
17/** \brief Reply to l2_xconnect_dump
18 @param context - sender context which was passed in the request
19 @param rx_sw_if_index - Receive interface index
20 @param tx_sw_if_index - Transmit interface index
21 */
22define l2_xconnect_details
23{
24 u32 context;
25 u32 rx_sw_if_index;
26 u32 tx_sw_if_index;
27};
28
29/** \brief Dump L2 XConnects
30 @param client_index - opaque cookie to identify the sender
31 @param context - sender context, to match reply w/ request
32*/
33define l2_xconnect_dump
34{
35 u32 client_index;
36 u32 context;
37};
38
Ole Troan01384fe2017-05-12 11:55:35 +020039/** \brief l2 fib table details structure
Pavel Kotucek0f971d82017-01-03 10:48:54 +010040 @param bd_id - the l2 fib / bridge domain table id
41 @param mac - the entry's mac address
42 @param sw_if_index - index of the interface
43 @param static_mac - the entry is statically configured.
44 @param filter_mac - the entry is a mac filter entry.
45 @param bvi_mac - the mac address is a bridge virtual interface
46*/
Ole Troan01384fe2017-05-12 11:55:35 +020047define l2_fib_table_details
Pavel Kotucek0f971d82017-01-03 10:48:54 +010048{
49 u32 context;
50 u32 bd_id;
51 u64 mac;
52 u32 sw_if_index;
53 u8 static_mac;
54 u8 filter_mac;
55 u8 bvi_mac;
56};
57
58/** \brief Dump l2 fib (aka bridge domain) table
59 @param client_index - opaque cookie to identify the sender
60 @param bd_id - the l2 fib / bridge domain table identifier
61*/
62define l2_fib_table_dump
63{
64 u32 client_index;
65 u32 context;
66 u32 bd_id;
67};
68
69/** \brief L2 fib clear table request, clear all mac entries in the l2 fib
70 @param client_index - opaque cookie to identify the sender
71 @param context - sender context, to match reply w/ request
72*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040073autoreply define l2_fib_clear_table
Pavel Kotucek0f971d82017-01-03 10:48:54 +010074{
75 u32 client_index;
76 u32 context;
77};
78
Eyal Bari7537e712017-04-27 14:07:55 +030079/** \brief L2 FIB flush all entries
80 @param client_index - opaque cookie to identify the sender
81 @param context - sender context, to match reply w/ request
82*/
83autoreply define l2fib_flush_all
84{
85 u32 client_index;
86 u32 context;
87};
88
Eyal Barif24991c2017-04-05 05:33:21 +030089/** \brief L2 FIB flush bridge domain entries
90 @param client_index - opaque cookie to identify the sender
91 @param context - sender context, to match reply w/ request
92 @param bd_id - the entry's bridge domain id
93*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040094autoreply define l2fib_flush_bd
Eyal Barif24991c2017-04-05 05:33:21 +030095{
96 u32 client_index;
97 u32 context;
98 u32 bd_id;
99};
100
Eyal Barif24991c2017-04-05 05:33:21 +0300101/** \brief L2 FIB flush interface entries
102 @param client_index - opaque cookie to identify the sender
103 @param context - sender context, to match reply w/ request
104 @param bd_id - the entry's bridge domain id
105*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400106autoreply define l2fib_flush_int
Eyal Barif24991c2017-04-05 05:33:21 +0300107{
108 u32 client_index;
109 u32 context;
110 u32 sw_if_index;
111};
112
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100113/** \brief L2 FIB add entry request
114 @param client_index - opaque cookie to identify the sender
115 @param context - sender context, to match reply w/ request
116 @param mac - the entry's mac address
117 @param bd_id - the entry's bridge domain id
118 @param sw_if_index - the interface
119 @param is_add - If non zero add the entry, else delete it
120 @param static_mac -
121 @param filter_mac -
122*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400123autoreply define l2fib_add_del
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100124{
125 u32 client_index;
126 u32 context;
127 u64 mac;
128 u32 bd_id;
129 u32 sw_if_index;
130 u8 is_add;
131 u8 static_mac;
132 u8 filter_mac;
133 u8 bvi_mac;
134};
135
John Lo8d00fff2017-08-03 00:35:36 -0400136/** \brief Register to recive L2 MAC events for leanred and aged MAC
John Lo8d00fff2017-08-03 00:35:36 -0400137 @param client_index - opaque cookie to identify the sender
138 @param context - sender context, to match reply w/ request
139 @param learn_limit - MAC learn limit, 0 => default to 1000
140 @param scan_delay - event scan delay in 10 msec unit, 0 => default to 100 msec
141 @param max_macs_in_event - in units of 10 mac entries, 0 => default to 100 entries
142 @param enable_disable - 1 => register for MAC events, 0 => cancel registration
143 @param pid - sender's pid
144*/
145autoreply define want_l2_macs_events
146{
147 u32 client_index;
148 u32 context;
149 u32 learn_limit;
150 u8 scan_delay;
151 u8 max_macs_in_event;
152 u8 enable_disable;
153 u32 pid;
154};
155
156/** \brief Entry for learned or aged MAC in L2 MAC Events
157 @param sw_if_index - sw_if_index in the domain
158 @param mac_addr - mac_address
159 @is_del - 0 => newly learned MAC, 1 => aged out MAC
160*/
161typeonly define mac_entry
162{
163 u32 sw_if_index;
164 u8 mac_addr[6];
165 u8 is_del;
166 u8 spare;
167};
168
169/** \brief L2 MAC event for a list of learned or aged MACs
170 @param client_index - opaque cookie to identify the sender
171 @param pid - client pid registered to receive notification
172 @param n_macs - number of learned/aged MAC enntries
173 @param mac - array of learned/aged MAC entries
174*/
175define l2_macs_event
176{
177 u32 client_index;
178 u32 pid;
179 u32 n_macs;
180 vl_api_mac_entry_t mac[n_macs];
181};
182
183/** \brief Set interface L2 flags (such as L2_LEARN, L2_FWD,
184 L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM bits). This can be used
185 to disable one or more of the features represented by the
186 flag bits on an interface to override what is set as default
187 for all interfaces in the bridge domain
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100188 @param client_index - opaque cookie to identify the sender
189 @param context - sender context, to match reply w/ request
190 @param sw_if_index - interface
191 @param is_set - if non-zero, set the bits, else clear them
John Lo8d00fff2017-08-03 00:35:36 -0400192 @param feature_bitmap - non-zero bits (as above) to set or clear
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100193*/
194define l2_flags
195{
196 u32 client_index;
197 u32 context;
198 u32 sw_if_index;
199 u8 is_set;
200 u32 feature_bitmap;
201};
202
John Lo8d00fff2017-08-03 00:35:36 -0400203/** \brief Set interface L2 flags response
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100204 @param context - sender context, to match reply w/ request
205 @param retval - return code for the set l2 bits request
John Lo8d00fff2017-08-03 00:35:36 -0400206 @param resulting_feature_bitmap - the internal l2 feature bitmap after the request is implemented
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100207*/
208define l2_flags_reply
209{
210 u32 context;
211 i32 retval;
212 u32 resulting_feature_bitmap;
213};
214
Eyal Barifead6702017-04-04 04:46:32 +0300215/** \brief L2 bridge domain set mac age
216 @param client_index - opaque cookie to identify the sender
217 @param context - sender context, to match reply w/ request
218 @param bd_id - the bridge domain to create
219 @param mac_age - mac aging time in min, 0 for disabled
220*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400221autoreply define bridge_domain_set_mac_age
Eyal Barifead6702017-04-04 04:46:32 +0300222{
223 u32 client_index;
224 u32 context;
225 u32 bd_id;
226 u8 mac_age;
227};
228
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100229/** \brief L2 bridge domain add or delete request
230 @param client_index - opaque cookie to identify the sender
231 @param context - sender context, to match reply w/ request
232 @param bd_id - the bridge domain to create
233 @param flood - enable/disable bcast/mcast flooding in the bd
234 @param uu_flood - enable/disable uknown unicast flood in the bd
235 @param forward - enable/disable forwarding on all interfaces in the bd
236 @param learn - enable/disable learning on all interfaces in the bd
237 @param arp_term - enable/disable arp termination in the bd
238 @param mac_age - mac aging time in min, 0 for disabled
239 @param is_add - add or delete flag
240*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400241autoreply define bridge_domain_add_del
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100242{
243 u32 client_index;
244 u32 context;
245 u32 bd_id;
246 u8 flood;
247 u8 uu_flood;
248 u8 forward;
249 u8 learn;
250 u8 arp_term;
251 u8 mac_age;
252 u8 is_add;
253};
254
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100255/** \brief L2 bridge domain request operational state details
256 @param client_index - opaque cookie to identify the sender
257 @param context - sender context, to match reply w/ request
258 @param bd_id - the bridge domain id desired or ~0 to request all bds
259*/
260define bridge_domain_dump
261{
262 u32 client_index;
263 u32 context;
264 u32 bd_id;
265};
266
Ole Troan01384fe2017-05-12 11:55:35 +0200267/** \brief L2 bridge domain sw interface operational state response
268 @param bd_id - the bridge domain id
269 @param sw_if_index - sw_if_index in the domain
270 @param shg - split horizon group for the interface
271*/
272typeonly manual_print manual_endian define bridge_domain_sw_if
273{
274 u32 context;
275 u32 sw_if_index;
276 u8 shg;
277};
278
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100279/** \brief L2 bridge domain operational state response
280 @param bd_id - the bridge domain id
281 @param flood - bcast/mcast flooding state on all interfaces in the bd
282 @param uu_flood - uknown unicast flooding state on all interfaces in the bd
283 @param forward - forwarding state on all interfaces in the bd
284 @param learn - learning state on all interfaces in the bd
285 @param arp_term - arp termination state on all interfaces in the bd
286 @param mac_age - mac aging time in min, 0 for disabled
287 @param n_sw_ifs - number of sw_if_index's in the domain
288*/
Ole Troan01384fe2017-05-12 11:55:35 +0200289manual_print manual_endian define bridge_domain_details
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100290{
291 u32 context;
292 u32 bd_id;
293 u8 flood;
294 u8 uu_flood;
295 u8 forward;
296 u8 learn;
297 u8 arp_term;
298 u8 mac_age;
299 u32 bvi_sw_if_index;
300 u32 n_sw_ifs;
Ole Troan01384fe2017-05-12 11:55:35 +0200301 vl_api_bridge_domain_sw_if_t sw_if_details[n_sw_ifs];
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100302};
303
304/** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD,
John Lo8d00fff2017-08-03 00:35:36 -0400305 L2_UU_FLOOD, or L2_ARP_TERM bits) request
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100306 @param client_index - opaque cookie to identify the sender
307 @param context - sender context, to match reply w/ request
308 @param bd_id - the bridge domain to set the flags for
309 @param is_set - if non-zero, set the flags, else clear them
John Lo8d00fff2017-08-03 00:35:36 -0400310 @param feature_bitmap - bits (as above) that are non-zero to set or clear
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100311*/
312define bridge_flags
313{
314 u32 client_index;
315 u32 context;
316 u32 bd_id;
317 u8 is_set;
318 u32 feature_bitmap;
319};
320
321/** \brief Set bridge flags response
322 @param context - sender context, to match reply w/ request
323 @param retval - return code for the set bridge flags request
John Lo8d00fff2017-08-03 00:35:36 -0400324 @param resulting_feature_bitmap - the internal L2 feature bitmap after the request is implemented
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100325*/
326define bridge_flags_reply
327{
328 u32 context;
329 i32 retval;
330 u32 resulting_feature_bitmap;
331};
332
Pavel Kotucekadec5872017-01-25 08:50:53 +0100333/** \brief L2 interface vlan tag rewrite configure request
334 @param client_index - opaque cookie to identify the sender
335 @param context - sender context, to match reply w/ request
336 @param sw_if_index - interface the operation is applied to
337 @param vtr_op - Choose from l2_vtr_op_t enum values
338 @param push_dot1q - first pushed flag dot1q id set, else dot1ad
339 @param tag1 - Needed for any push or translate vtr op
340 @param tag2 - Needed for any push 2 or translate x-2 vtr ops
341*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400342autoreply define l2_interface_vlan_tag_rewrite
Pavel Kotucekadec5872017-01-25 08:50:53 +0100343{
344 u32 client_index;
345 u32 context;
346 u32 sw_if_index;
347 u32 vtr_op;
348 u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
349 u32 tag1; // first pushed tag
350 u32 tag2; // second pushed tag
351};
352
Pavel Kotucekadec5872017-01-25 08:50:53 +0100353/** \brief L2 interface pbb tag rewrite configure request
354 @param client_index - opaque cookie to identify the sender
355 @param context - sender context, to match reply w/ request
356 @param sw_if_index - interface the operation is applied to
357 @param vtr_op - Choose from l2_vtr_op_t enum values
358 @param inner_tag - needed for translate_qinq vtr op only
359 @param outer_tag - needed for translate_qinq vtr op only
360 @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
361 @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
362 @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
363 @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
364*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400365autoreply define l2_interface_pbb_tag_rewrite
Pavel Kotucekadec5872017-01-25 08:50:53 +0100366{
367 u32 client_index;
368 u32 context;
369 u32 sw_if_index;
370 u32 vtr_op;
371 u16 outer_tag;
372 u8 b_dmac[6];
373 u8 b_smac[6];
374 u16 b_vlanid;
375 u32 i_sid;
376};
377
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100378/*
379 * Local Variables:
380 * eval: (c-set-style "gnu")
381 * End:
382 */