FD.io VPP  v17.04.2-2-ga8f93f8
Vector Packet Processing
l2.api
Go to the documentation of this file.
1 /* 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  */
22 define l2_xconnect_details
23 {
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 */
33 define l2_xconnect_dump
34 {
37 };
38 
39 /** \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 */
47 define l2_fib_table_entry
48 {
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 */
62 define l2_fib_table_dump
63 {
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 */
73 define l2_fib_clear_table
74 {
77 };
78 
79 /** \brief L2 fib clear table response
80  @param context - sender context, to match reply w/ request
81  @param retval - return code for the request
82 */
83 define l2_fib_clear_table_reply
84 {
87 };
88 
89 /** \brief L2 FIB add entry request
90  @param client_index - opaque cookie to identify the sender
91  @param context - sender context, to match reply w/ request
92  @param mac - the entry's mac address
93  @param bd_id - the entry's bridge domain id
94  @param sw_if_index - the interface
95  @param is_add - If non zero add the entry, else delete it
96  @param static_mac -
97  @param filter_mac -
98 */
99 define l2fib_add_del
100 {
110 };
111 
112 /** \brief L2 FIB add entry response
113  @param context - sender context, to match reply w/ request
114  @param retval - return code for the add l2fib entry request
115 */
116 define l2fib_add_del_reply
117 {
120 };
121 
122 /** \brief Set L2 flags request !!! TODO - need more info, feature bits in l2_input.h
123  @param client_index - opaque cookie to identify the sender
124  @param context - sender context, to match reply w/ request
125  @param sw_if_index - interface
126  @param is_set - if non-zero, set the bits, else clear them
127  @param feature_bitmap - non-zero bits to set or clear
128 */
129 define l2_flags
130 {
136 };
137 
138 /** \brief Set L2 bits response
139  @param context - sender context, to match reply w/ request
140  @param retval - return code for the set l2 bits request
141 */
142 define l2_flags_reply
143 {
147 };
148 
149 /** \brief L2 bridge domain add or delete request
150  @param client_index - opaque cookie to identify the sender
151  @param context - sender context, to match reply w/ request
152  @param bd_id - the bridge domain to create
153  @param flood - enable/disable bcast/mcast flooding in the bd
154  @param uu_flood - enable/disable uknown unicast flood in the bd
155  @param forward - enable/disable forwarding on all interfaces in the bd
156  @param learn - enable/disable learning on all interfaces in the bd
157  @param arp_term - enable/disable arp termination in the bd
158  @param mac_age - mac aging time in min, 0 for disabled
159  @param is_add - add or delete flag
160 */
161 define bridge_domain_add_del
162 {
173 };
174 
175 /** \brief L2 bridge domain add or delete response
176  @param context - sender context, to match reply w/ request
177  @param retval - return code for the set bridge flags request
178 */
179 define bridge_domain_add_del_reply
180 {
183 };
184 
185 /** \brief L2 bridge domain request operational state details
186  @param client_index - opaque cookie to identify the sender
187  @param context - sender context, to match reply w/ request
188  @param bd_id - the bridge domain id desired or ~0 to request all bds
189 */
190 define bridge_domain_dump
191 {
195 };
196 
197 /** \brief L2 bridge domain operational state response
198  @param bd_id - the bridge domain id
199  @param flood - bcast/mcast flooding state on all interfaces in the bd
200  @param uu_flood - uknown unicast flooding state on all interfaces in the bd
201  @param forward - forwarding state on all interfaces in the bd
202  @param learn - learning state on all interfaces in the bd
203  @param arp_term - arp termination state on all interfaces in the bd
204  @param mac_age - mac aging time in min, 0 for disabled
205  @param n_sw_ifs - number of sw_if_index's in the domain
206 */
207 define bridge_domain_details
208 {
219 };
220 
221 /** \brief L2 bridge domain sw interface operational state response
222  @param bd_id - the bridge domain id
223  @param sw_if_index - sw_if_index in the domain
224  @param shg - split horizon group for the interface
225 */
226 define bridge_domain_sw_if_details
227 {
232 };
233 
234 /** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD,
235  L2_UU_FLOOD, or L2_ARP_TERM) request
236  @param client_index - opaque cookie to identify the sender
237  @param context - sender context, to match reply w/ request
238  @param bd_id - the bridge domain to set the flags for
239  @param is_set - if non-zero, set the flags, else clear them
240  @param feature_bitmap - bits that are non-zero to set or clear
241 */
242 define bridge_flags
243 {
249 };
250 
251 /** \brief Set bridge flags response
252  @param context - sender context, to match reply w/ request
253  @param retval - return code for the set bridge flags request
254  @param resulting_feature_bitmap - the feature bitmap value after the request is implemented
255 */
256 define bridge_flags_reply
257 {
261 };
262 
263 /** \brief L2 interface vlan tag rewrite configure request
264  @param client_index - opaque cookie to identify the sender
265  @param context - sender context, to match reply w/ request
266  @param sw_if_index - interface the operation is applied to
267  @param vtr_op - Choose from l2_vtr_op_t enum values
268  @param push_dot1q - first pushed flag dot1q id set, else dot1ad
269  @param tag1 - Needed for any push or translate vtr op
270  @param tag2 - Needed for any push 2 or translate x-2 vtr ops
271 */
272 define l2_interface_vlan_tag_rewrite
273 {
278  u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
279  u32 tag1; // first pushed tag
280  u32 tag2; // second pushed tag
281 };
282 
283 /** \brief L2 interface vlan tag rewrite response
284  @param context - sender context, to match reply w/ request
285  @param retval - return code for the request
286 */
287 define l2_interface_vlan_tag_rewrite_reply
288 {
291 };
292 
293 /** \brief L2 interface pbb tag rewrite configure request
294  @param client_index - opaque cookie to identify the sender
295  @param context - sender context, to match reply w/ request
296  @param sw_if_index - interface the operation is applied to
297  @param vtr_op - Choose from l2_vtr_op_t enum values
298  @param inner_tag - needed for translate_qinq vtr op only
299  @param outer_tag - needed for translate_qinq vtr op only
300  @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
301  @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
302  @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
303  @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
304 */
305 define l2_interface_pbb_tag_rewrite
306 {
312  u8 b_dmac[6];
313  u8 b_smac[6];
316 };
317 
318 /** \brief L2 interface pbb tag rewrite response
319  @param context - sender context, to match reply w/ request
320  @param retval - return code for the request
321 */
322 define l2_interface_pbb_tag_rewrite_reply
323 {
326 };
327 
328 /*
329  * Local Variables:
330  * eval: (c-set-style "gnu")
331  * End:
332  */
u32 bd_id
Definition: l2.api:50
u32 context
Definition: l2.api:49
int i32
Definition: types.h:81
u32 feature_bitmap
Definition: l2.api:135
unsigned long u64
Definition: types.h:89
u64 mac
Definition: l2.api:51
u32 client_index
Definition: l2.api:131
u8 bvi_mac
Definition: l2.api:55
u32 sw_if_index
Definition: l2.api:52
unsigned int u32
Definition: types.h:88
u32 resulting_feature_bitmap
Definition: l2.api:146
u8 static_mac
Definition: l2.api:53
unsigned short u16
Definition: types.h:57
unsigned char u8
Definition: types.h:56
u32 sw_if_index
Definition: l2.api:133
u8 filter_mac
Definition: l2.api:54