Matus Fabian | f468e23 | 2016-12-02 06:00:53 -0800 | [diff] [blame] | 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 | |
Mohsin Kazmi | 5e6f734 | 2019-04-05 17:40:20 +0200 | [diff] [blame] | 17 | option version = "2.2.2"; |
Neale Ranns | 4d5b917 | 2018-10-24 02:57:49 -0700 | [diff] [blame] | 18 | |
| 19 | import "vnet/ip/ip_types.api"; |
| 20 | import "vnet/ethernet/ethernet_types.api"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 21 | |
Matus Fabian | f468e23 | 2016-12-02 06:00:53 -0800 | [diff] [blame] | 22 | /** \brief Reply to l2_xconnect_dump |
| 23 | @param context - sender context which was passed in the request |
| 24 | @param rx_sw_if_index - Receive interface index |
| 25 | @param tx_sw_if_index - Transmit interface index |
| 26 | */ |
| 27 | define l2_xconnect_details |
| 28 | { |
| 29 | u32 context; |
| 30 | u32 rx_sw_if_index; |
| 31 | u32 tx_sw_if_index; |
| 32 | }; |
| 33 | |
| 34 | /** \brief Dump L2 XConnects |
| 35 | @param client_index - opaque cookie to identify the sender |
| 36 | @param context - sender context, to match reply w/ request |
| 37 | */ |
| 38 | define l2_xconnect_dump |
| 39 | { |
| 40 | u32 client_index; |
| 41 | u32 context; |
| 42 | }; |
| 43 | |
Ole Troan | 01384fe | 2017-05-12 11:55:35 +0200 | [diff] [blame] | 44 | /** \brief l2 fib table details structure |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 45 | @param bd_id - the l2 fib / bridge domain table id |
| 46 | @param mac - the entry's mac address |
| 47 | @param sw_if_index - index of the interface |
| 48 | @param static_mac - the entry is statically configured. |
| 49 | @param filter_mac - the entry is a mac filter entry. |
| 50 | @param bvi_mac - the mac address is a bridge virtual interface |
| 51 | */ |
Ole Troan | 01384fe | 2017-05-12 11:55:35 +0200 | [diff] [blame] | 52 | define l2_fib_table_details |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 53 | { |
| 54 | u32 context; |
| 55 | u32 bd_id; |
Mohsin Kazmi | 57938f6 | 2017-10-27 21:28:07 +0200 | [diff] [blame] | 56 | u8 mac[6]; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 57 | u32 sw_if_index; |
| 58 | u8 static_mac; |
| 59 | u8 filter_mac; |
| 60 | u8 bvi_mac; |
| 61 | }; |
| 62 | |
| 63 | /** \brief Dump l2 fib (aka bridge domain) table |
| 64 | @param client_index - opaque cookie to identify the sender |
| 65 | @param bd_id - the l2 fib / bridge domain table identifier |
| 66 | */ |
| 67 | define l2_fib_table_dump |
| 68 | { |
| 69 | u32 client_index; |
| 70 | u32 context; |
| 71 | u32 bd_id; |
| 72 | }; |
| 73 | |
| 74 | /** \brief L2 fib clear table request, clear all mac entries in the l2 fib |
| 75 | @param client_index - opaque cookie to identify the sender |
| 76 | @param context - sender context, to match reply w/ request |
| 77 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 78 | autoreply define l2_fib_clear_table |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 79 | { |
| 80 | u32 client_index; |
| 81 | u32 context; |
| 82 | }; |
| 83 | |
Eyal Bari | 7537e71 | 2017-04-27 14:07:55 +0300 | [diff] [blame] | 84 | /** \brief L2 FIB flush all entries |
| 85 | @param client_index - opaque cookie to identify the sender |
| 86 | @param context - sender context, to match reply w/ request |
| 87 | */ |
| 88 | autoreply define l2fib_flush_all |
| 89 | { |
| 90 | u32 client_index; |
| 91 | u32 context; |
| 92 | }; |
| 93 | |
Eyal Bari | f24991c | 2017-04-05 05:33:21 +0300 | [diff] [blame] | 94 | /** \brief L2 FIB flush bridge domain entries |
| 95 | @param client_index - opaque cookie to identify the sender |
| 96 | @param context - sender context, to match reply w/ request |
| 97 | @param bd_id - the entry's bridge domain id |
| 98 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 99 | autoreply define l2fib_flush_bd |
Eyal Bari | f24991c | 2017-04-05 05:33:21 +0300 | [diff] [blame] | 100 | { |
| 101 | u32 client_index; |
| 102 | u32 context; |
| 103 | u32 bd_id; |
| 104 | }; |
| 105 | |
Eyal Bari | f24991c | 2017-04-05 05:33:21 +0300 | [diff] [blame] | 106 | /** \brief L2 FIB flush interface entries |
| 107 | @param client_index - opaque cookie to identify the sender |
| 108 | @param context - sender context, to match reply w/ request |
| 109 | @param bd_id - the entry's bridge domain id |
| 110 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 111 | autoreply define l2fib_flush_int |
Eyal Bari | f24991c | 2017-04-05 05:33:21 +0300 | [diff] [blame] | 112 | { |
| 113 | u32 client_index; |
| 114 | u32 context; |
| 115 | u32 sw_if_index; |
| 116 | }; |
| 117 | |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 118 | /** \brief L2 FIB add entry request |
| 119 | @param client_index - opaque cookie to identify the sender |
| 120 | @param context - sender context, to match reply w/ request |
| 121 | @param mac - the entry's mac address |
| 122 | @param bd_id - the entry's bridge domain id |
| 123 | @param sw_if_index - the interface |
| 124 | @param is_add - If non zero add the entry, else delete it |
| 125 | @param static_mac - |
| 126 | @param filter_mac - |
| 127 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 128 | autoreply define l2fib_add_del |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 129 | { |
| 130 | u32 client_index; |
| 131 | u32 context; |
Mohsin Kazmi | 57938f6 | 2017-10-27 21:28:07 +0200 | [diff] [blame] | 132 | u8 mac[6]; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 133 | u32 bd_id; |
| 134 | u32 sw_if_index; |
| 135 | u8 is_add; |
| 136 | u8 static_mac; |
| 137 | u8 filter_mac; |
| 138 | u8 bvi_mac; |
| 139 | }; |
| 140 | |
Paul Vinciguerra | bdc0e6b | 2018-09-22 05:32:50 -0700 | [diff] [blame] | 141 | /** \brief Register to receive L2 MAC events for learned and aged MAC |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 142 | @param client_index - opaque cookie to identify the sender |
| 143 | @param context - sender context, to match reply w/ request |
| 144 | @param learn_limit - MAC learn limit, 0 => default to 1000 |
| 145 | @param scan_delay - event scan delay in 10 msec unit, 0 => default to 100 msec |
| 146 | @param max_macs_in_event - in units of 10 mac entries, 0 => default to 100 entries |
| 147 | @param enable_disable - 1 => register for MAC events, 0 => cancel registration |
| 148 | @param pid - sender's pid |
| 149 | */ |
| 150 | autoreply define want_l2_macs_events |
| 151 | { |
| 152 | u32 client_index; |
| 153 | u32 context; |
| 154 | u32 learn_limit; |
| 155 | u8 scan_delay; |
| 156 | u8 max_macs_in_event; |
| 157 | u8 enable_disable; |
| 158 | u32 pid; |
| 159 | }; |
| 160 | |
| 161 | /** \brief Entry for learned or aged MAC in L2 MAC Events |
| 162 | @param sw_if_index - sw_if_index in the domain |
| 163 | @param mac_addr - mac_address |
John Lo | e23c99e | 2018-03-13 21:53:18 -0400 | [diff] [blame] | 164 | @param action - 0 => newly learned MAC, 1 => MAC deleted by ager |
| 165 | 3 => MAC move (sw_if_index changed) |
| 166 | @param flags - flag bits to provide other info, not yet used |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 167 | */ |
| 168 | typeonly define mac_entry |
| 169 | { |
| 170 | u32 sw_if_index; |
| 171 | u8 mac_addr[6]; |
John Lo | e23c99e | 2018-03-13 21:53:18 -0400 | [diff] [blame] | 172 | u8 action; |
| 173 | u8 flags; |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 174 | }; |
| 175 | |
| 176 | /** \brief L2 MAC event for a list of learned or aged MACs |
| 177 | @param client_index - opaque cookie to identify the sender |
| 178 | @param pid - client pid registered to receive notification |
Paul Vinciguerra | bdc0e6b | 2018-09-22 05:32:50 -0700 | [diff] [blame] | 179 | @param n_macs - number of learned/aged MAC entries |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 180 | @param mac - array of learned/aged MAC entries |
| 181 | */ |
| 182 | define l2_macs_event |
| 183 | { |
| 184 | u32 client_index; |
| 185 | u32 pid; |
| 186 | u32 n_macs; |
| 187 | vl_api_mac_entry_t mac[n_macs]; |
| 188 | }; |
| 189 | |
Marek Gradzki | 51e5968 | 2018-03-06 10:05:44 +0100 | [diff] [blame] | 190 | service { |
| 191 | rpc want_l2_macs_events returns want_l2_macs_events_reply |
| 192 | events l2_macs_event; |
| 193 | }; |
| 194 | |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 195 | /** \brief Set interface L2 flags (such as L2_LEARN, L2_FWD, |
| 196 | L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM bits). This can be used |
| 197 | to disable one or more of the features represented by the |
| 198 | flag bits on an interface to override what is set as default |
| 199 | for all interfaces in the bridge domain |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 200 | @param client_index - opaque cookie to identify the sender |
| 201 | @param context - sender context, to match reply w/ request |
| 202 | @param sw_if_index - interface |
| 203 | @param is_set - if non-zero, set the bits, else clear them |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 204 | @param feature_bitmap - non-zero bits (as above) to set or clear |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 205 | */ |
| 206 | define l2_flags |
| 207 | { |
| 208 | u32 client_index; |
| 209 | u32 context; |
| 210 | u32 sw_if_index; |
| 211 | u8 is_set; |
| 212 | u32 feature_bitmap; |
| 213 | }; |
| 214 | |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 215 | /** \brief Set interface L2 flags response |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 216 | @param context - sender context, to match reply w/ request |
| 217 | @param retval - return code for the set l2 bits request |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 218 | @param resulting_feature_bitmap - the internal l2 feature bitmap after the request is implemented |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 219 | */ |
| 220 | define l2_flags_reply |
| 221 | { |
| 222 | u32 context; |
| 223 | i32 retval; |
| 224 | u32 resulting_feature_bitmap; |
| 225 | }; |
| 226 | |
Eyal Bari | fead670 | 2017-04-04 04:46:32 +0300 | [diff] [blame] | 227 | /** \brief L2 bridge domain set mac age |
| 228 | @param client_index - opaque cookie to identify the sender |
| 229 | @param context - sender context, to match reply w/ request |
| 230 | @param bd_id - the bridge domain to create |
| 231 | @param mac_age - mac aging time in min, 0 for disabled |
| 232 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 233 | autoreply define bridge_domain_set_mac_age |
Eyal Bari | fead670 | 2017-04-04 04:46:32 +0300 | [diff] [blame] | 234 | { |
| 235 | u32 client_index; |
| 236 | u32 context; |
| 237 | u32 bd_id; |
| 238 | u8 mac_age; |
| 239 | }; |
| 240 | |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 241 | /** \brief L2 bridge domain add or delete request |
| 242 | @param client_index - opaque cookie to identify the sender |
| 243 | @param context - sender context, to match reply w/ request |
| 244 | @param bd_id - the bridge domain to create |
| 245 | @param flood - enable/disable bcast/mcast flooding in the bd |
Paul Vinciguerra | bdc0e6b | 2018-09-22 05:32:50 -0700 | [diff] [blame] | 246 | @param uu_flood - enable/disable unknown unicast flood in the bd |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 247 | @param forward - enable/disable forwarding on all interfaces in the bd |
| 248 | @param learn - enable/disable learning on all interfaces in the bd |
| 249 | @param arp_term - enable/disable arp termination in the bd |
Mohsin Kazmi | 5e6f734 | 2019-04-05 17:40:20 +0200 | [diff] [blame] | 250 | @param arp_ufwd - enable/disable arp unicast forwarding in the bd |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 251 | @param mac_age - mac aging time in min, 0 for disabled |
| 252 | @param is_add - add or delete flag |
| 253 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 254 | autoreply define bridge_domain_add_del |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 255 | { |
| 256 | u32 client_index; |
| 257 | u32 context; |
| 258 | u32 bd_id; |
| 259 | u8 flood; |
| 260 | u8 uu_flood; |
| 261 | u8 forward; |
| 262 | u8 learn; |
| 263 | u8 arp_term; |
Mohsin Kazmi | 5e6f734 | 2019-04-05 17:40:20 +0200 | [diff] [blame] | 264 | u8 arp_ufwd; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 265 | u8 mac_age; |
Jerome Tollet | 4830414 | 2017-09-05 12:13:22 +0100 | [diff] [blame] | 266 | u8 bd_tag[64]; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 267 | u8 is_add; |
| 268 | }; |
| 269 | |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 270 | /** \brief L2 bridge domain request operational state details |
| 271 | @param client_index - opaque cookie to identify the sender |
| 272 | @param context - sender context, to match reply w/ request |
| 273 | @param bd_id - the bridge domain id desired or ~0 to request all bds |
| 274 | */ |
| 275 | define bridge_domain_dump |
| 276 | { |
| 277 | u32 client_index; |
| 278 | u32 context; |
| 279 | u32 bd_id; |
| 280 | }; |
| 281 | |
Ole Troan | 01384fe | 2017-05-12 11:55:35 +0200 | [diff] [blame] | 282 | /** \brief L2 bridge domain sw interface operational state response |
| 283 | @param bd_id - the bridge domain id |
| 284 | @param sw_if_index - sw_if_index in the domain |
| 285 | @param shg - split horizon group for the interface |
| 286 | */ |
| 287 | typeonly manual_print manual_endian define bridge_domain_sw_if |
| 288 | { |
| 289 | u32 context; |
| 290 | u32 sw_if_index; |
| 291 | u8 shg; |
| 292 | }; |
| 293 | |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 294 | /** \brief L2 bridge domain operational state response |
| 295 | @param bd_id - the bridge domain id |
| 296 | @param flood - bcast/mcast flooding state on all interfaces in the bd |
Paul Vinciguerra | bdc0e6b | 2018-09-22 05:32:50 -0700 | [diff] [blame] | 297 | @param uu_flood - unknown unicast flooding state on all interfaces in the bd |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 298 | @param forward - forwarding state on all interfaces in the bd |
| 299 | @param learn - learning state on all interfaces in the bd |
| 300 | @param arp_term - arp termination state on all interfaces in the bd |
Mohsin Kazmi | 5e6f734 | 2019-04-05 17:40:20 +0200 | [diff] [blame] | 301 | @param arp_ufwd - arp unicast forwarding state on all interfaces in the bd |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 302 | @param mac_age - mac aging time in min, 0 for disabled |
Jerome Tollet | 50570ec | 2017-09-14 12:53:56 +0100 | [diff] [blame] | 303 | @param bd_tag - optional textual tag for the bridge domain |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 304 | @param n_sw_ifs - number of sw_if_index's in the domain |
| 305 | */ |
Ole Troan | 01384fe | 2017-05-12 11:55:35 +0200 | [diff] [blame] | 306 | manual_print manual_endian define bridge_domain_details |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 307 | { |
| 308 | u32 context; |
| 309 | u32 bd_id; |
| 310 | u8 flood; |
| 311 | u8 uu_flood; |
| 312 | u8 forward; |
| 313 | u8 learn; |
| 314 | u8 arp_term; |
Mohsin Kazmi | 5e6f734 | 2019-04-05 17:40:20 +0200 | [diff] [blame] | 315 | u8 arp_ufwd; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 316 | u8 mac_age; |
Jerome Tollet | 4830414 | 2017-09-05 12:13:22 +0100 | [diff] [blame] | 317 | u8 bd_tag[64]; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 318 | u32 bvi_sw_if_index; |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 319 | u32 uu_fwd_sw_if_index; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 320 | u32 n_sw_ifs; |
Ole Troan | 01384fe | 2017-05-12 11:55:35 +0200 | [diff] [blame] | 321 | vl_api_bridge_domain_sw_if_t sw_if_details[n_sw_ifs]; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 322 | }; |
| 323 | |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 324 | /** \brief Flags that can be changed on a bridge domain */ |
| 325 | enum bd_flags |
| 326 | { |
Michal Cmarada | 5daf0c5 | 2019-03-15 10:46:07 +0100 | [diff] [blame] | 327 | BRIDGE_API_FLAG_NONE = 0x0, |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 328 | BRIDGE_API_FLAG_LEARN = 0x1, |
| 329 | BRIDGE_API_FLAG_FWD = 0x2, |
| 330 | BRIDGE_API_FLAG_FLOOD = 0x4, |
| 331 | BRIDGE_API_FLAG_UU_FLOOD = 0x8, |
| 332 | BRIDGE_API_FLAG_ARP_TERM = 0x10, |
Mohsin Kazmi | 5e6f734 | 2019-04-05 17:40:20 +0200 | [diff] [blame] | 333 | BRIDGE_API_FLAG_ARP_UFWD = 0x20, |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 334 | }; |
| 335 | |
| 336 | /** \brief Set bridge flags request |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 337 | @param client_index - opaque cookie to identify the sender |
| 338 | @param context - sender context, to match reply w/ request |
| 339 | @param bd_id - the bridge domain to set the flags for |
| 340 | @param is_set - if non-zero, set the flags, else clear them |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 341 | @param flags - flags that are non-zero to set or clear |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 342 | */ |
| 343 | define bridge_flags |
| 344 | { |
| 345 | u32 client_index; |
| 346 | u32 context; |
| 347 | u32 bd_id; |
| 348 | u8 is_set; |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 349 | vl_api_bd_flags_t flags; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 350 | }; |
| 351 | |
| 352 | /** \brief Set bridge flags response |
| 353 | @param context - sender context, to match reply w/ request |
| 354 | @param retval - return code for the set bridge flags request |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 355 | @param resulting_feature_bitmap - the internal L2 feature bitmap after the request is implemented |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 356 | */ |
| 357 | define bridge_flags_reply |
| 358 | { |
| 359 | u32 context; |
| 360 | i32 retval; |
| 361 | u32 resulting_feature_bitmap; |
| 362 | }; |
| 363 | |
Pavel Kotucek | adec587 | 2017-01-25 08:50:53 +0100 | [diff] [blame] | 364 | /** \brief L2 interface vlan tag rewrite configure request |
| 365 | @param client_index - opaque cookie to identify the sender |
| 366 | @param context - sender context, to match reply w/ request |
| 367 | @param sw_if_index - interface the operation is applied to |
| 368 | @param vtr_op - Choose from l2_vtr_op_t enum values |
| 369 | @param push_dot1q - first pushed flag dot1q id set, else dot1ad |
| 370 | @param tag1 - Needed for any push or translate vtr op |
| 371 | @param tag2 - Needed for any push 2 or translate x-2 vtr ops |
| 372 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 373 | autoreply define l2_interface_vlan_tag_rewrite |
Pavel Kotucek | adec587 | 2017-01-25 08:50:53 +0100 | [diff] [blame] | 374 | { |
| 375 | u32 client_index; |
| 376 | u32 context; |
| 377 | u32 sw_if_index; |
| 378 | u32 vtr_op; |
| 379 | u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad |
| 380 | u32 tag1; // first pushed tag |
| 381 | u32 tag2; // second pushed tag |
| 382 | }; |
| 383 | |
Pavel Kotucek | adec587 | 2017-01-25 08:50:53 +0100 | [diff] [blame] | 384 | /** \brief L2 interface pbb tag rewrite configure request |
| 385 | @param client_index - opaque cookie to identify the sender |
| 386 | @param context - sender context, to match reply w/ request |
| 387 | @param sw_if_index - interface the operation is applied to |
| 388 | @param vtr_op - Choose from l2_vtr_op_t enum values |
| 389 | @param inner_tag - needed for translate_qinq vtr op only |
| 390 | @param outer_tag - needed for translate_qinq vtr op only |
| 391 | @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op |
| 392 | @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op |
| 393 | @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op |
| 394 | @param i_sid - I-tag service id, needed for any push or translate qinq vtr op |
| 395 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 396 | autoreply define l2_interface_pbb_tag_rewrite |
Pavel Kotucek | adec587 | 2017-01-25 08:50:53 +0100 | [diff] [blame] | 397 | { |
| 398 | u32 client_index; |
| 399 | u32 context; |
| 400 | u32 sw_if_index; |
| 401 | u32 vtr_op; |
| 402 | u16 outer_tag; |
| 403 | u8 b_dmac[6]; |
| 404 | u8 b_smac[6]; |
| 405 | u16 b_vlanid; |
| 406 | u32 i_sid; |
| 407 | }; |
| 408 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 409 | /** \brief L2 interface patch add / del request |
| 410 | @param client_index - opaque cookie to identify the sender |
| 411 | @param context - sender context, to match reply w/ request |
| 412 | @param rx_sw_if_index - receive side interface |
| 413 | @param tx_sw_if_index - transmit side interface |
| 414 | @param is_add - if non-zero set up the interface patch, else remove it |
| 415 | */ |
| 416 | autoreply define l2_patch_add_del |
| 417 | { |
| 418 | u32 client_index; |
| 419 | u32 context; |
| 420 | u32 rx_sw_if_index; |
| 421 | u32 tx_sw_if_index; |
| 422 | u8 is_add; |
| 423 | }; |
| 424 | |
| 425 | /** \brief Set L2 XConnect between two interfaces request |
| 426 | @param client_index - opaque cookie to identify the sender |
| 427 | @param context - sender context, to match reply w/ request |
| 428 | @param rx_sw_if_index - Receive interface index |
| 429 | @param tx_sw_if_index - Transmit interface index |
| 430 | @param enable - enable xconnect if not 0, else set to L3 mode |
| 431 | */ |
| 432 | autoreply define sw_interface_set_l2_xconnect |
| 433 | { |
| 434 | u32 client_index; |
| 435 | u32 context; |
| 436 | u32 rx_sw_if_index; |
| 437 | u32 tx_sw_if_index; |
| 438 | u8 enable; |
| 439 | }; |
| 440 | |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 441 | /** |
| 442 | * @brief An enumeration of the type of ports that can be added |
| 443 | * to a bridge domain |
| 444 | */ |
| 445 | enum l2_port_type |
| 446 | { |
| 447 | /* a 'normal' interface, i.e. not BVI or UU-Flood */ |
| 448 | L2_API_PORT_TYPE_NORMAL = 0, |
| 449 | /* a BVI interface in the BD */ |
| 450 | L2_API_PORT_TYPE_BVI = 1, |
| 451 | /* The interface on which to forward unknown unicast packets |
| 452 | * If this is not set for a BD then UU is flooded */ |
| 453 | L2_API_PORT_TYPE_UU_FWD = 2, |
| 454 | }; |
| 455 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 456 | /** \brief Interface bridge mode request |
| 457 | @param client_index - opaque cookie to identify the sender |
| 458 | @param context - sender context, to match reply w/ request |
| 459 | @param rx_sw_if_index - the interface |
| 460 | @param bd_id - bridge domain id |
Yichen Wang | 0a4e006 | 2018-10-01 11:15:25 -0700 | [diff] [blame] | 461 | @param port_type - port_mode, see #l2_port_type |
Yichen Wang | 5c7c49d | 2018-09-18 17:32:29 -0700 | [diff] [blame] | 462 | @param shg - Split horizon group, for bridge mode only |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 463 | @param enable - Enable beige mode if not 0, else set to L3 mode |
| 464 | */ |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 465 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 466 | autoreply define sw_interface_set_l2_bridge |
| 467 | { |
| 468 | u32 client_index; |
| 469 | u32 context; |
| 470 | u32 rx_sw_if_index; |
| 471 | u32 bd_id; |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 472 | vl_api_l2_port_type_t port_type; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 473 | u8 shg; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 474 | u8 enable; |
| 475 | }; |
| 476 | |
| 477 | /** \brief Set bridge domain ip to mac entry request |
| 478 | @param client_index - opaque cookie to identify the sender |
| 479 | @param context - sender context, to match reply w/ request |
| 480 | @param bd_id - the bridge domain to set the flags for |
| 481 | @param is_add - if non-zero, add the entry, else clear it |
Igor Mikhailov (imichail) | 54bc5e4 | 2019-05-08 16:01:01 -0700 | [diff] [blame] | 482 | @param ip - ipv4 or ipv6 address |
| 483 | @param mac - MAC address |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 484 | */ |
Neale Ranns | bc764c8 | 2019-06-19 07:07:13 -0700 | [diff] [blame^] | 485 | |
| 486 | typedef bd_ip_mac |
| 487 | { |
| 488 | u32 bd_id; |
| 489 | vl_api_address_t ip; |
| 490 | vl_api_mac_address_t mac; |
| 491 | }; |
| 492 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 493 | autoreply define bd_ip_mac_add_del |
| 494 | { |
| 495 | u32 client_index; |
| 496 | u32 context; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 497 | u8 is_add; |
Neale Ranns | bc764c8 | 2019-06-19 07:07:13 -0700 | [diff] [blame^] | 498 | vl_api_bd_ip_mac_t entry; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 499 | }; |
| 500 | |
John Lo | e26c81f | 2019-01-07 15:16:33 -0500 | [diff] [blame] | 501 | /** \brief Flush bridge domain IP to MAC entries |
| 502 | @param client_index - opaque cookie to identify the sender |
| 503 | @param bd_id - bridge domain identifier |
| 504 | */ |
| 505 | autoreply define bd_ip_mac_flush |
| 506 | { |
| 507 | u32 client_index; |
| 508 | u32 context; |
| 509 | u32 bd_id; |
| 510 | }; |
| 511 | |
Mohsin Kazmi | 5d82d2f | 2018-08-13 19:17:54 +0200 | [diff] [blame] | 512 | /** \brief bridge domain IP to MAC entry details structure |
| 513 | @param bd_id - bridge domain table id |
| 514 | @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address |
| 515 | @param ip_address - ipv4 or ipv6 address |
| 516 | @param mac_address - MAC address |
| 517 | */ |
| 518 | define bd_ip_mac_details |
| 519 | { |
| 520 | u32 context; |
Neale Ranns | bc764c8 | 2019-06-19 07:07:13 -0700 | [diff] [blame^] | 521 | vl_api_bd_ip_mac_t entry; |
Mohsin Kazmi | 5d82d2f | 2018-08-13 19:17:54 +0200 | [diff] [blame] | 522 | }; |
| 523 | |
| 524 | /** \brief Dump bridge domain IP to MAC entries |
| 525 | @param client_index - opaque cookie to identify the sender |
| 526 | @param bd_id - bridge domain identifier |
| 527 | */ |
| 528 | define bd_ip_mac_dump |
| 529 | { |
| 530 | u32 client_index; |
| 531 | u32 context; |
| 532 | u32 bd_id; |
| 533 | }; |
| 534 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 535 | /** \brief L2 interface ethernet flow point filtering enable/disable request |
| 536 | @param client_index - opaque cookie to identify the sender |
| 537 | @param context - sender context, to match reply w/ request |
| 538 | @param sw_if_index - interface to enable/disable filtering on |
| 539 | @param enable_disable - if non-zero enable filtering, else disable |
| 540 | */ |
| 541 | autoreply define l2_interface_efp_filter |
| 542 | { |
| 543 | u32 client_index; |
| 544 | u32 context; |
| 545 | u32 sw_if_index; |
Neale Ranns | 6b9b41c | 2018-07-23 05:47:09 -0400 | [diff] [blame] | 546 | u8 enable_disable; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 547 | }; |
| 548 | |
| 549 | /** \brief Interface set vpath request |
| 550 | @param client_index - opaque cookie to identify the sender |
| 551 | @param context - sender context, to match reply w/ request |
| 552 | @param sw_if_index - interface used to reach neighbor |
| 553 | @param enable - if non-zero enable, else disable |
| 554 | */ |
| 555 | autoreply define sw_interface_set_vpath |
| 556 | { |
| 557 | u32 client_index; |
| 558 | u32 context; |
| 559 | u32 sw_if_index; |
| 560 | u8 enable; |
| 561 | }; |
| 562 | |
Neale Ranns | 192b13f | 2019-03-15 02:16:20 -0700 | [diff] [blame] | 563 | /** \brief Create BVI interface instance request |
| 564 | @param client_index - opaque cookie to identify the sender |
| 565 | @param context - sender context, to match reply w/ request |
| 566 | @param mac_address - mac addr to assign to the interface if none-zero |
| 567 | @param user_instance - requested instance, ~0 => dynamically allocate |
| 568 | */ |
| 569 | define bvi_create |
| 570 | { |
| 571 | u32 client_index; |
| 572 | u32 context; |
| 573 | vl_api_mac_address_t mac; |
| 574 | u32 user_instance; |
| 575 | }; |
| 576 | |
| 577 | /** \brief Create BVI interface instance response |
| 578 | @param context - sender context, to match reply w/ request |
| 579 | @param sw_if_index - sw index of the interface that was created |
| 580 | @param retval - return code for the request |
| 581 | */ |
| 582 | define bvi_create_reply |
| 583 | { |
| 584 | u32 context; |
| 585 | i32 retval; |
| 586 | u32 sw_if_index; |
| 587 | }; |
| 588 | |
| 589 | /** \brief Delete BVI interface request |
| 590 | @param client_index - opaque cookie to identify the sender |
| 591 | @param context - sender context, to match reply w/ request |
| 592 | @param sw_if_index - sw index of the interface that was created |
| 593 | */ |
| 594 | autoreply define bvi_delete |
| 595 | { |
| 596 | u32 client_index; |
| 597 | u32 context; |
| 598 | u32 sw_if_index; |
| 599 | }; |
| 600 | |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 601 | /* |
| 602 | * Local Variables: |
| 603 | * eval: (c-set-style "gnu") |
| 604 | * End: |
| 605 | */ |