FD.io VPP  v17.10-9-gd594711
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 details 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_details
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 autoreply define l2_fib_clear_table
74 {
77 };
78 
79 /** \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 */
83 autoreply define l2fib_flush_all
84 {
87 };
88 
89 /** \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 */
94 autoreply define l2fib_flush_bd
95 {
99 };
100 
101 /** \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 */
106 autoreply define l2fib_flush_int
107 {
111 };
112 
113 /** \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 */
123 autoreply define l2fib_add_del
124 {
134 };
135 
136 /** \brief Register to recive L2 MAC events for leanred and aged MAC
137  @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 */
145 autoreply define want_l2_macs_events
146 {
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 */
161 typeonly define mac_entry
162 {
164  u8 mac_addr[6];
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 */
175 define l2_macs_event
176 {
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
188  @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
192  @param feature_bitmap - non-zero bits (as above) to set or clear
193 */
194 define l2_flags
195 {
201 };
202 
203 /** \brief Set interface L2 flags response
204  @param context - sender context, to match reply w/ request
205  @param retval - return code for the set l2 bits request
206  @param resulting_feature_bitmap - the internal l2 feature bitmap after the request is implemented
207 */
208 define l2_flags_reply
209 {
213 };
214 
215 /** \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 */
221 autoreply define bridge_domain_set_mac_age
222 {
227 };
228 
229 /** \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 */
241 autoreply define bridge_domain_add_del
242 {
252  u8 bd_tag[64];
254 };
255 
256 /** \brief L2 bridge domain request operational state details
257  @param client_index - opaque cookie to identify the sender
258  @param context - sender context, to match reply w/ request
259  @param bd_id - the bridge domain id desired or ~0 to request all bds
260 */
261 define bridge_domain_dump
262 {
266 };
267 
268 /** \brief L2 bridge domain sw interface operational state response
269  @param bd_id - the bridge domain id
270  @param sw_if_index - sw_if_index in the domain
271  @param shg - split horizon group for the interface
272 */
273 typeonly manual_print manual_endian define bridge_domain_sw_if
274 {
278 };
279 
280 /** \brief L2 bridge domain operational state response
281  @param bd_id - the bridge domain id
282  @param flood - bcast/mcast flooding state on all interfaces in the bd
283  @param uu_flood - uknown unicast flooding state on all interfaces in the bd
284  @param forward - forwarding state on all interfaces in the bd
285  @param learn - learning state on all interfaces in the bd
286  @param arp_term - arp termination state on all interfaces in the bd
287  @param mac_age - mac aging time in min, 0 for disabled
288  @param bd_tag - optional textual tag for the bridge domain
289  @param n_sw_ifs - number of sw_if_index's in the domain
290 */
291 manual_print manual_endian define bridge_domain_details
292 {
301  u8 bd_tag[64];
304  vl_api_bridge_domain_sw_if_t sw_if_details[n_sw_ifs];
305 };
306 
307 /** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD,
308  L2_UU_FLOOD, or L2_ARP_TERM bits) request
309  @param client_index - opaque cookie to identify the sender
310  @param context - sender context, to match reply w/ request
311  @param bd_id - the bridge domain to set the flags for
312  @param is_set - if non-zero, set the flags, else clear them
313  @param feature_bitmap - bits (as above) that are non-zero to set or clear
314 */
315 define bridge_flags
316 {
322 };
323 
324 /** \brief Set bridge flags response
325  @param context - sender context, to match reply w/ request
326  @param retval - return code for the set bridge flags request
327  @param resulting_feature_bitmap - the internal L2 feature bitmap after the request is implemented
328 */
329 define bridge_flags_reply
330 {
334 };
335 
336 /** \brief L2 interface vlan tag rewrite configure request
337  @param client_index - opaque cookie to identify the sender
338  @param context - sender context, to match reply w/ request
339  @param sw_if_index - interface the operation is applied to
340  @param vtr_op - Choose from l2_vtr_op_t enum values
341  @param push_dot1q - first pushed flag dot1q id set, else dot1ad
342  @param tag1 - Needed for any push or translate vtr op
343  @param tag2 - Needed for any push 2 or translate x-2 vtr ops
344 */
345 autoreply define l2_interface_vlan_tag_rewrite
346 {
351  u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
352  u32 tag1; // first pushed tag
353  u32 tag2; // second pushed tag
354 };
355 
356 /** \brief L2 interface pbb tag rewrite configure request
357  @param client_index - opaque cookie to identify the sender
358  @param context - sender context, to match reply w/ request
359  @param sw_if_index - interface the operation is applied to
360  @param vtr_op - Choose from l2_vtr_op_t enum values
361  @param inner_tag - needed for translate_qinq vtr op only
362  @param outer_tag - needed for translate_qinq vtr op only
363  @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
364  @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
365  @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
366  @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
367 */
368 autoreply define l2_interface_pbb_tag_rewrite
369 {
375  u8 b_dmac[6];
376  u8 b_smac[6];
379 };
380 
381 /*
382  * Local Variables:
383  * eval: (c-set-style "gnu")
384  * End:
385  */
Entry for learned or aged MAC in L2 MAC Events.
Definition: l2.api:161
L2 bridge domain sw interface operational state response.
Definition: l2.api:273
int i32
Definition: types.h:81
u32 feature_bitmap
Definition: l2.api:200
unsigned long u64
Definition: types.h:89
u32 sw_if_index
Definition: l2.api:163
u8 is_del
Definition: l2.api:165
u32 client_index
Definition: l2.api:196
u8 spare
Definition: l2.api:166
unsigned int u32
Definition: types.h:88
u32 resulting_feature_bitmap
Definition: l2.api:212
unsigned short u16
Definition: types.h:57
unsigned char u8
Definition: types.h:56
u32 sw_if_index
Definition: l2.api:198