1 /* Hey Emacs use -*- mode: C -*- */
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:
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 option version = "2.0.0";
19 /** \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
24 define l2_xconnect_details
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
35 define l2_xconnect_dump
41 /** \brief l2 fib table details structure
42 @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
49 define l2_fib_table_details
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
64 define l2_fib_table_dump
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
75 autoreply define l2_fib_clear_table
81 /** \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
85 autoreply define l2fib_flush_all
91 /** \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
96 autoreply define l2fib_flush_bd
103 /** \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
108 autoreply define l2fib_flush_int
115 /** \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
125 autoreply define l2fib_add_del
138 /** \brief Register to recive L2 MAC events for leanred and aged MAC
139 @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
147 autoreply define want_l2_macs_events
153 u8 max_macs_in_event;
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
161 @is_del - 0 => newly learned MAC, 1 => aged out MAC
163 typeonly define mac_entry
171 /** \brief L2 MAC event for a list of learned or aged MACs
172 @param client_index - opaque cookie to identify the sender
173 @param pid - client pid registered to receive notification
174 @param n_macs - number of learned/aged MAC enntries
175 @param mac - array of learned/aged MAC entries
182 vl_api_mac_entry_t mac[n_macs];
186 rpc want_l2_macs_events returns want_l2_macs_events_reply
187 events l2_macs_event;
190 /** \brief Set interface L2 flags (such as L2_LEARN, L2_FWD,
191 L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM bits). This can be used
192 to disable one or more of the features represented by the
193 flag bits on an interface to override what is set as default
194 for all interfaces in the bridge domain
195 @param client_index - opaque cookie to identify the sender
196 @param context - sender context, to match reply w/ request
197 @param sw_if_index - interface
198 @param is_set - if non-zero, set the bits, else clear them
199 @param feature_bitmap - non-zero bits (as above) to set or clear
210 /** \brief Set interface L2 flags response
211 @param context - sender context, to match reply w/ request
212 @param retval - return code for the set l2 bits request
213 @param resulting_feature_bitmap - the internal l2 feature bitmap after the request is implemented
215 define l2_flags_reply
219 u32 resulting_feature_bitmap;
222 /** \brief L2 bridge domain set mac age
223 @param client_index - opaque cookie to identify the sender
224 @param context - sender context, to match reply w/ request
225 @param bd_id - the bridge domain to create
226 @param mac_age - mac aging time in min, 0 for disabled
228 autoreply define bridge_domain_set_mac_age
236 /** \brief L2 bridge domain add or delete request
237 @param client_index - opaque cookie to identify the sender
238 @param context - sender context, to match reply w/ request
239 @param bd_id - the bridge domain to create
240 @param flood - enable/disable bcast/mcast flooding in the bd
241 @param uu_flood - enable/disable uknown unicast flood in the bd
242 @param forward - enable/disable forwarding on all interfaces in the bd
243 @param learn - enable/disable learning on all interfaces in the bd
244 @param arp_term - enable/disable arp termination in the bd
245 @param mac_age - mac aging time in min, 0 for disabled
246 @param is_add - add or delete flag
248 autoreply define bridge_domain_add_del
263 /** \brief L2 bridge domain request operational state details
264 @param client_index - opaque cookie to identify the sender
265 @param context - sender context, to match reply w/ request
266 @param bd_id - the bridge domain id desired or ~0 to request all bds
268 define bridge_domain_dump
275 /** \brief L2 bridge domain sw interface operational state response
276 @param bd_id - the bridge domain id
277 @param sw_if_index - sw_if_index in the domain
278 @param shg - split horizon group for the interface
280 typeonly manual_print manual_endian define bridge_domain_sw_if
287 /** \brief L2 bridge domain operational state response
288 @param bd_id - the bridge domain id
289 @param flood - bcast/mcast flooding state on all interfaces in the bd
290 @param uu_flood - uknown unicast flooding state on all interfaces in the bd
291 @param forward - forwarding state on all interfaces in the bd
292 @param learn - learning state on all interfaces in the bd
293 @param arp_term - arp termination state on all interfaces in the bd
294 @param mac_age - mac aging time in min, 0 for disabled
295 @param bd_tag - optional textual tag for the bridge domain
296 @param n_sw_ifs - number of sw_if_index's in the domain
298 manual_print manual_endian define bridge_domain_details
311 vl_api_bridge_domain_sw_if_t sw_if_details[n_sw_ifs];
314 /** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD,
315 L2_UU_FLOOD, or L2_ARP_TERM bits) request
316 @param client_index - opaque cookie to identify the sender
317 @param context - sender context, to match reply w/ request
318 @param bd_id - the bridge domain to set the flags for
319 @param is_set - if non-zero, set the flags, else clear them
320 @param feature_bitmap - bits (as above) that are non-zero to set or clear
331 /** \brief Set bridge flags response
332 @param context - sender context, to match reply w/ request
333 @param retval - return code for the set bridge flags request
334 @param resulting_feature_bitmap - the internal L2 feature bitmap after the request is implemented
336 define bridge_flags_reply
340 u32 resulting_feature_bitmap;
343 /** \brief L2 interface vlan tag rewrite configure request
344 @param client_index - opaque cookie to identify the sender
345 @param context - sender context, to match reply w/ request
346 @param sw_if_index - interface the operation is applied to
347 @param vtr_op - Choose from l2_vtr_op_t enum values
348 @param push_dot1q - first pushed flag dot1q id set, else dot1ad
349 @param tag1 - Needed for any push or translate vtr op
350 @param tag2 - Needed for any push 2 or translate x-2 vtr ops
352 autoreply define l2_interface_vlan_tag_rewrite
358 u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
359 u32 tag1; // first pushed tag
360 u32 tag2; // second pushed tag
363 /** \brief L2 interface pbb tag rewrite configure request
364 @param client_index - opaque cookie to identify the sender
365 @param context - sender context, to match reply w/ request
366 @param sw_if_index - interface the operation is applied to
367 @param vtr_op - Choose from l2_vtr_op_t enum values
368 @param inner_tag - needed for translate_qinq vtr op only
369 @param outer_tag - needed for translate_qinq vtr op only
370 @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
371 @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
372 @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
373 @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
375 autoreply define l2_interface_pbb_tag_rewrite
388 /** \brief L2 interface patch add / del request
389 @param client_index - opaque cookie to identify the sender
390 @param context - sender context, to match reply w/ request
391 @param rx_sw_if_index - receive side interface
392 @param tx_sw_if_index - transmit side interface
393 @param is_add - if non-zero set up the interface patch, else remove it
395 autoreply define l2_patch_add_del
404 /** \brief Set L2 XConnect between two interfaces request
405 @param client_index - opaque cookie to identify the sender
406 @param context - sender context, to match reply w/ request
407 @param rx_sw_if_index - Receive interface index
408 @param tx_sw_if_index - Transmit interface index
409 @param enable - enable xconnect if not 0, else set to L3 mode
411 autoreply define sw_interface_set_l2_xconnect
420 /** \brief Interface bridge mode request
421 @param client_index - opaque cookie to identify the sender
422 @param context - sender context, to match reply w/ request
423 @param rx_sw_if_index - the interface
424 @param bd_id - bridge domain id
425 @param bvi - Setup interface as a bvi, bridge mode only
426 @param shg - Shared horizon group, for bridge mode only
427 @param enable - Enable beige mode if not 0, else set to L3 mode
429 autoreply define sw_interface_set_l2_bridge
440 /** \brief Set bridge domain ip to mac entry request
441 @param client_index - opaque cookie to identify the sender
442 @param context - sender context, to match reply w/ request
443 @param bd_id - the bridge domain to set the flags for
444 @param is_add - if non-zero, add the entry, else clear it
445 @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
446 @param mac_address - MAC address
449 autoreply define bd_ip_mac_add_del
460 /** \brief L2 interface ethernet flow point filtering enable/disable request
461 @param client_index - opaque cookie to identify the sender
462 @param context - sender context, to match reply w/ request
463 @param sw_if_index - interface to enable/disable filtering on
464 @param enable_disable - if non-zero enable filtering, else disable
466 autoreply define l2_interface_efp_filter
474 /** \brief Interface set vpath request
475 @param client_index - opaque cookie to identify the sender
476 @param context - sender context, to match reply w/ request
477 @param sw_if_index - interface used to reach neighbor
478 @param enable - if non-zero enable, else disable
480 autoreply define sw_interface_set_vpath
490 * eval: (c-set-style "gnu")