blob: db42d6351749e17e4b900648d131a7302e97a63c [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
Pavel Kotucek0f971d82017-01-03 10:48:54 +010039/** \brief l2 fib table entry structure
40 @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*/
47define l2_fib_table_entry
48{
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 Barif24991c2017-04-05 05:33:21 +030079/** \brief L2 FIB flush bridge domain entries
80 @param client_index - opaque cookie to identify the sender
81 @param context - sender context, to match reply w/ request
82 @param bd_id - the entry's bridge domain id
83*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040084autoreply define l2fib_flush_bd
Eyal Barif24991c2017-04-05 05:33:21 +030085{
86 u32 client_index;
87 u32 context;
88 u32 bd_id;
89};
90
Eyal Barif24991c2017-04-05 05:33:21 +030091/** \brief L2 FIB flush interface 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_int
Eyal Barif24991c2017-04-05 05:33:21 +030097{
98 u32 client_index;
99 u32 context;
100 u32 sw_if_index;
101};
102
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100103/** \brief L2 FIB add entry request
104 @param client_index - opaque cookie to identify the sender
105 @param context - sender context, to match reply w/ request
106 @param mac - the entry's mac address
107 @param bd_id - the entry's bridge domain id
108 @param sw_if_index - the interface
109 @param is_add - If non zero add the entry, else delete it
110 @param static_mac -
111 @param filter_mac -
112*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400113autoreply define l2fib_add_del
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100114{
115 u32 client_index;
116 u32 context;
117 u64 mac;
118 u32 bd_id;
119 u32 sw_if_index;
120 u8 is_add;
121 u8 static_mac;
122 u8 filter_mac;
123 u8 bvi_mac;
124};
125
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100126/** \brief Set L2 flags request !!! TODO - need more info, feature bits in l2_input.h
127 @param client_index - opaque cookie to identify the sender
128 @param context - sender context, to match reply w/ request
129 @param sw_if_index - interface
130 @param is_set - if non-zero, set the bits, else clear them
131 @param feature_bitmap - non-zero bits to set or clear
132*/
133define l2_flags
134{
135 u32 client_index;
136 u32 context;
137 u32 sw_if_index;
138 u8 is_set;
139 u32 feature_bitmap;
140};
141
142/** \brief Set L2 bits response
143 @param context - sender context, to match reply w/ request
144 @param retval - return code for the set l2 bits request
145*/
146define l2_flags_reply
147{
148 u32 context;
149 i32 retval;
150 u32 resulting_feature_bitmap;
151};
152
Eyal Barifead6702017-04-04 04:46:32 +0300153/** \brief L2 bridge domain set mac age
154 @param client_index - opaque cookie to identify the sender
155 @param context - sender context, to match reply w/ request
156 @param bd_id - the bridge domain to create
157 @param mac_age - mac aging time in min, 0 for disabled
158*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400159autoreply define bridge_domain_set_mac_age
Eyal Barifead6702017-04-04 04:46:32 +0300160{
161 u32 client_index;
162 u32 context;
163 u32 bd_id;
164 u8 mac_age;
165};
166
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100167/** \brief L2 bridge domain add or delete request
168 @param client_index - opaque cookie to identify the sender
169 @param context - sender context, to match reply w/ request
170 @param bd_id - the bridge domain to create
171 @param flood - enable/disable bcast/mcast flooding in the bd
172 @param uu_flood - enable/disable uknown unicast flood in the bd
173 @param forward - enable/disable forwarding on all interfaces in the bd
174 @param learn - enable/disable learning on all interfaces in the bd
175 @param arp_term - enable/disable arp termination in the bd
176 @param mac_age - mac aging time in min, 0 for disabled
177 @param is_add - add or delete flag
178*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400179autoreply define bridge_domain_add_del
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100180{
181 u32 client_index;
182 u32 context;
183 u32 bd_id;
184 u8 flood;
185 u8 uu_flood;
186 u8 forward;
187 u8 learn;
188 u8 arp_term;
189 u8 mac_age;
190 u8 is_add;
191};
192
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100193/** \brief L2 bridge domain request operational state details
194 @param client_index - opaque cookie to identify the sender
195 @param context - sender context, to match reply w/ request
196 @param bd_id - the bridge domain id desired or ~0 to request all bds
197*/
198define bridge_domain_dump
199{
200 u32 client_index;
201 u32 context;
202 u32 bd_id;
203};
204
205/** \brief L2 bridge domain operational state response
206 @param bd_id - the bridge domain id
207 @param flood - bcast/mcast flooding state on all interfaces in the bd
208 @param uu_flood - uknown unicast flooding state on all interfaces in the bd
209 @param forward - forwarding state on all interfaces in the bd
210 @param learn - learning state on all interfaces in the bd
211 @param arp_term - arp termination state on all interfaces in the bd
212 @param mac_age - mac aging time in min, 0 for disabled
213 @param n_sw_ifs - number of sw_if_index's in the domain
214*/
215define bridge_domain_details
216{
217 u32 context;
218 u32 bd_id;
219 u8 flood;
220 u8 uu_flood;
221 u8 forward;
222 u8 learn;
223 u8 arp_term;
224 u8 mac_age;
225 u32 bvi_sw_if_index;
226 u32 n_sw_ifs;
227};
228
229/** \brief L2 bridge domain sw interface operational state response
230 @param bd_id - the bridge domain id
231 @param sw_if_index - sw_if_index in the domain
232 @param shg - split horizon group for the interface
233*/
234define bridge_domain_sw_if_details
235{
236 u32 context;
237 u32 bd_id;
238 u32 sw_if_index;
239 u8 shg;
240};
241
242/** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD,
243 L2_UU_FLOOD, or L2_ARP_TERM) request
244 @param client_index - opaque cookie to identify the sender
245 @param context - sender context, to match reply w/ request
246 @param bd_id - the bridge domain to set the flags for
247 @param is_set - if non-zero, set the flags, else clear them
248 @param feature_bitmap - bits that are non-zero to set or clear
249*/
250define bridge_flags
251{
252 u32 client_index;
253 u32 context;
254 u32 bd_id;
255 u8 is_set;
256 u32 feature_bitmap;
257};
258
259/** \brief Set bridge flags response
260 @param context - sender context, to match reply w/ request
261 @param retval - return code for the set bridge flags request
262 @param resulting_feature_bitmap - the feature bitmap value after the request is implemented
263*/
264define bridge_flags_reply
265{
266 u32 context;
267 i32 retval;
268 u32 resulting_feature_bitmap;
269};
270
Pavel Kotucekadec5872017-01-25 08:50:53 +0100271/** \brief L2 interface vlan tag rewrite configure request
272 @param client_index - opaque cookie to identify the sender
273 @param context - sender context, to match reply w/ request
274 @param sw_if_index - interface the operation is applied to
275 @param vtr_op - Choose from l2_vtr_op_t enum values
276 @param push_dot1q - first pushed flag dot1q id set, else dot1ad
277 @param tag1 - Needed for any push or translate vtr op
278 @param tag2 - Needed for any push 2 or translate x-2 vtr ops
279*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400280autoreply define l2_interface_vlan_tag_rewrite
Pavel Kotucekadec5872017-01-25 08:50:53 +0100281{
282 u32 client_index;
283 u32 context;
284 u32 sw_if_index;
285 u32 vtr_op;
286 u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
287 u32 tag1; // first pushed tag
288 u32 tag2; // second pushed tag
289};
290
Pavel Kotucekadec5872017-01-25 08:50:53 +0100291/** \brief L2 interface pbb tag rewrite configure request
292 @param client_index - opaque cookie to identify the sender
293 @param context - sender context, to match reply w/ request
294 @param sw_if_index - interface the operation is applied to
295 @param vtr_op - Choose from l2_vtr_op_t enum values
296 @param inner_tag - needed for translate_qinq vtr op only
297 @param outer_tag - needed for translate_qinq vtr op only
298 @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
299 @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
300 @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
301 @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
302*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400303autoreply define l2_interface_pbb_tag_rewrite
Pavel Kotucekadec5872017-01-25 08:50:53 +0100304{
305 u32 client_index;
306 u32 context;
307 u32 sw_if_index;
308 u32 vtr_op;
309 u16 outer_tag;
310 u8 b_dmac[6];
311 u8 b_smac[6];
312 u16 b_vlanid;
313 u32 i_sid;
314};
315
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100316/*
317 * Local Variables:
318 * eval: (c-set-style "gnu")
319 * End:
320 */