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. |
Laszlo Kiraly | 0f8f435 | 2022-09-16 13:20:07 +0200 | [diff] [blame] | 4 | * Copyright (c) 2022 Nordix Foundation. |
Matus Fabian | f468e23 | 2016-12-02 06:00:53 -0800 | [diff] [blame] | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at: |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | |
Laszlo Kiraly | 0f8f435 | 2022-09-16 13:20:07 +0200 | [diff] [blame] | 18 | option version = "3.2.0"; |
Neale Ranns | 4d5b917 | 2018-10-24 02:57:49 -0700 | [diff] [blame] | 19 | |
| 20 | import "vnet/ip/ip_types.api"; |
| 21 | import "vnet/ethernet/ethernet_types.api"; |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 22 | import "vnet/interface_types.api"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 23 | |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 24 | /** \brief Reply to l2_xconnect_dump |
Matus Fabian | f468e23 | 2016-12-02 06:00:53 -0800 | [diff] [blame] | 25 | @param context - sender context which was passed in the request |
| 26 | @param rx_sw_if_index - Receive interface index |
| 27 | @param tx_sw_if_index - Transmit interface index |
| 28 | */ |
| 29 | define l2_xconnect_details |
| 30 | { |
| 31 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 32 | vl_api_interface_index_t rx_sw_if_index; |
| 33 | vl_api_interface_index_t tx_sw_if_index; |
Matus Fabian | f468e23 | 2016-12-02 06:00:53 -0800 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | /** \brief Dump L2 XConnects |
| 37 | @param client_index - opaque cookie to identify the sender |
| 38 | @param context - sender context, to match reply w/ request |
| 39 | */ |
| 40 | define l2_xconnect_dump |
| 41 | { |
| 42 | u32 client_index; |
| 43 | u32 context; |
| 44 | }; |
| 45 | |
Ole Troan | 01384fe | 2017-05-12 11:55:35 +0200 | [diff] [blame] | 46 | /** \brief l2 fib table details structure |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 47 | @param bd_id - the l2 fib / bridge domain table id |
| 48 | @param mac - the entry's mac address |
| 49 | @param sw_if_index - index of the interface |
| 50 | @param static_mac - the entry is statically configured. |
| 51 | @param filter_mac - the entry is a mac filter entry. |
| 52 | @param bvi_mac - the mac address is a bridge virtual interface |
| 53 | */ |
Ole Troan | 01384fe | 2017-05-12 11:55:35 +0200 | [diff] [blame] | 54 | define l2_fib_table_details |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 55 | { |
| 56 | u32 context; |
| 57 | u32 bd_id; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 58 | vl_api_mac_address_t mac; |
| 59 | vl_api_interface_index_t sw_if_index; |
| 60 | bool static_mac; |
| 61 | bool filter_mac; |
| 62 | bool bvi_mac; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 63 | }; |
| 64 | |
| 65 | /** \brief Dump l2 fib (aka bridge domain) table |
| 66 | @param client_index - opaque cookie to identify the sender |
| 67 | @param bd_id - the l2 fib / bridge domain table identifier |
| 68 | */ |
| 69 | define l2_fib_table_dump |
| 70 | { |
| 71 | u32 client_index; |
| 72 | u32 context; |
| 73 | u32 bd_id; |
| 74 | }; |
| 75 | |
| 76 | /** \brief L2 fib clear table request, clear all mac entries in the l2 fib |
| 77 | @param client_index - opaque cookie to identify the sender |
| 78 | @param context - sender context, to match reply w/ request |
| 79 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 80 | autoreply define l2_fib_clear_table |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 81 | { |
| 82 | u32 client_index; |
| 83 | u32 context; |
| 84 | }; |
| 85 | |
Eyal Bari | 7537e71 | 2017-04-27 14:07:55 +0300 | [diff] [blame] | 86 | /** \brief L2 FIB flush all entries |
| 87 | @param client_index - opaque cookie to identify the sender |
| 88 | @param context - sender context, to match reply w/ request |
| 89 | */ |
| 90 | autoreply define l2fib_flush_all |
| 91 | { |
| 92 | u32 client_index; |
| 93 | u32 context; |
| 94 | }; |
| 95 | |
Eyal Bari | f24991c | 2017-04-05 05:33:21 +0300 | [diff] [blame] | 96 | /** \brief L2 FIB flush bridge domain entries |
| 97 | @param client_index - opaque cookie to identify the sender |
| 98 | @param context - sender context, to match reply w/ request |
| 99 | @param bd_id - the entry's bridge domain id |
| 100 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 101 | autoreply define l2fib_flush_bd |
Eyal Bari | f24991c | 2017-04-05 05:33:21 +0300 | [diff] [blame] | 102 | { |
| 103 | u32 client_index; |
| 104 | u32 context; |
| 105 | u32 bd_id; |
| 106 | }; |
| 107 | |
Eyal Bari | f24991c | 2017-04-05 05:33:21 +0300 | [diff] [blame] | 108 | /** \brief L2 FIB flush interface entries |
| 109 | @param client_index - opaque cookie to identify the sender |
| 110 | @param context - sender context, to match reply w/ request |
| 111 | @param bd_id - the entry's bridge domain id |
| 112 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 113 | autoreply define l2fib_flush_int |
Eyal Bari | f24991c | 2017-04-05 05:33:21 +0300 | [diff] [blame] | 114 | { |
| 115 | u32 client_index; |
| 116 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 117 | vl_api_interface_index_t sw_if_index; |
Eyal Bari | f24991c | 2017-04-05 05:33:21 +0300 | [diff] [blame] | 118 | }; |
| 119 | |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 120 | /** \brief L2 FIB add entry request |
| 121 | @param client_index - opaque cookie to identify the sender |
| 122 | @param context - sender context, to match reply w/ request |
| 123 | @param mac - the entry's mac address |
| 124 | @param bd_id - the entry's bridge domain id |
| 125 | @param sw_if_index - the interface |
| 126 | @param is_add - If non zero add the entry, else delete it |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 127 | @param static_mac - |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 128 | @param filter_mac - |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 129 | @param bvi_mac - |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 130 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 131 | autoreply define l2fib_add_del |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 132 | { |
| 133 | u32 client_index; |
| 134 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 135 | vl_api_mac_address_t mac; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 136 | u32 bd_id; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 137 | vl_api_interface_index_t sw_if_index; |
| 138 | bool is_add [default=true]; |
| 139 | bool static_mac; |
| 140 | bool filter_mac; |
| 141 | bool bvi_mac; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 142 | }; |
| 143 | |
Paul Vinciguerra | bdc0e6b | 2018-09-22 05:32:50 -0700 | [diff] [blame] | 144 | /** \brief Register to receive L2 MAC events for learned and aged MAC |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 145 | @param client_index - opaque cookie to identify the sender |
| 146 | @param context - sender context, to match reply w/ request |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 147 | @param learn_limit - MAC learn limit |
| 148 | @param scan_delay - event scan delay in 10 msec unit |
| 149 | @param max_macs_in_event - in units of 10 mac entries |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 150 | @param enable_disable - 1 => register for MAC events, 0 => cancel registration |
| 151 | @param pid - sender's pid |
| 152 | */ |
| 153 | autoreply define want_l2_macs_events |
| 154 | { |
Jerome Tollet | 0f8d100 | 2021-01-07 12:44:17 +0100 | [diff] [blame] | 155 | option deprecated; |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 156 | u32 client_index; |
| 157 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 158 | u32 learn_limit [default=1000]; |
| 159 | u8 scan_delay [default=10]; |
| 160 | u8 max_macs_in_event [default=10]; |
| 161 | bool enable_disable [default=true]; |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 162 | u32 pid; |
| 163 | }; |
| 164 | |
Jerome Tollet | 0f8d100 | 2021-01-07 12:44:17 +0100 | [diff] [blame] | 165 | /** \brief Register to receive L2 MAC events for learned and aged MAC |
| 166 | @param client_index - opaque cookie to identify the sender |
| 167 | @param context - sender context, to match reply w/ request |
| 168 | @param max_macs_in_event - in units of 10 mac entries |
| 169 | @param enable_disable - 1 => register for MAC events, 0 => cancel registration |
| 170 | @param pid - sender's pid |
| 171 | */ |
| 172 | autoreply define want_l2_macs_events2 |
| 173 | { |
| 174 | u32 client_index; |
| 175 | u32 context; |
| 176 | u8 max_macs_in_event [default=10]; |
| 177 | bool enable_disable [default=true]; |
| 178 | u32 pid; |
| 179 | }; |
| 180 | |
| 181 | /** \brief set l2 table scan delay |
| 182 | @param client_index - opaque cookie to identify the sender |
| 183 | @param context - sender context, to match reply w/ request |
| 184 | @param scan_delay - event scan delay in 10 msec unit |
| 185 | */ |
| 186 | autoreply define l2fib_set_scan_delay |
| 187 | { |
| 188 | u32 client_index; |
| 189 | u32 context; |
| 190 | u16 scan_delay [default=10]; |
| 191 | }; |
| 192 | |
| 193 | |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 194 | enum mac_event_action |
| 195 | { |
| 196 | MAC_EVENT_ACTION_API_ADD = 0, |
| 197 | MAC_EVENT_ACTION_API_DELETE = 1, |
| 198 | MAC_EVENT_ACTION_API_MOVE = 2, |
| 199 | }; |
| 200 | |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 201 | /** \brief Entry for learned or aged MAC in L2 MAC Events |
| 202 | @param sw_if_index - sw_if_index in the domain |
| 203 | @param mac_addr - mac_address |
John Lo | e23c99e | 2018-03-13 21:53:18 -0400 | [diff] [blame] | 204 | @param action - 0 => newly learned MAC, 1 => MAC deleted by ager |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 205 | 2 => MAC move (sw_if_index changed) |
John Lo | e23c99e | 2018-03-13 21:53:18 -0400 | [diff] [blame] | 206 | @param flags - flag bits to provide other info, not yet used |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 207 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 208 | typedef mac_entry |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 209 | { |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 210 | vl_api_interface_index_t sw_if_index; |
| 211 | vl_api_mac_address_t mac_addr; |
| 212 | vl_api_mac_event_action_t action; |
| 213 | u8 flags; |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 214 | }; |
| 215 | |
| 216 | /** \brief L2 MAC event for a list of learned or aged MACs |
| 217 | @param client_index - opaque cookie to identify the sender |
| 218 | @param pid - client pid registered to receive notification |
Paul Vinciguerra | bdc0e6b | 2018-09-22 05:32:50 -0700 | [diff] [blame] | 219 | @param n_macs - number of learned/aged MAC entries |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 220 | @param mac - array of learned/aged MAC entries |
| 221 | */ |
| 222 | define l2_macs_event |
| 223 | { |
| 224 | u32 client_index; |
| 225 | u32 pid; |
| 226 | u32 n_macs; |
| 227 | vl_api_mac_entry_t mac[n_macs]; |
| 228 | }; |
| 229 | |
Marek Gradzki | 51e5968 | 2018-03-06 10:05:44 +0100 | [diff] [blame] | 230 | service { |
| 231 | rpc want_l2_macs_events returns want_l2_macs_events_reply |
| 232 | events l2_macs_event; |
| 233 | }; |
| 234 | |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 235 | /** \brief Set interface L2 flags (such as L2_LEARN, L2_FWD, |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 236 | L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM bits). This can be used |
| 237 | to disable one or more of the features represented by the |
| 238 | flag bits on an interface to override what is set as default |
| 239 | for all interfaces in the bridge domain |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 240 | @param client_index - opaque cookie to identify the sender |
| 241 | @param context - sender context, to match reply w/ request |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 242 | @param sw_if_index - interface |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 243 | @param is_set - if non-zero, set the bits, else clear them |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 244 | @param feature_bitmap - non-zero bits (as above) to set or clear |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 245 | */ |
| 246 | define l2_flags |
| 247 | { |
| 248 | u32 client_index; |
| 249 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 250 | vl_api_interface_index_t sw_if_index; |
| 251 | bool is_set; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 252 | u32 feature_bitmap; |
| 253 | }; |
| 254 | |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 255 | /** \brief Set interface L2 flags response |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 256 | @param context - sender context, to match reply w/ request |
| 257 | @param retval - return code for the set l2 bits request |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 258 | @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] | 259 | */ |
| 260 | define l2_flags_reply |
| 261 | { |
| 262 | u32 context; |
| 263 | i32 retval; |
| 264 | u32 resulting_feature_bitmap; |
| 265 | }; |
| 266 | |
Eyal Bari | fead670 | 2017-04-04 04:46:32 +0300 | [diff] [blame] | 267 | /** \brief L2 bridge domain set mac age |
| 268 | @param client_index - opaque cookie to identify the sender |
| 269 | @param context - sender context, to match reply w/ request |
| 270 | @param bd_id - the bridge domain to create |
| 271 | @param mac_age - mac aging time in min, 0 for disabled |
| 272 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 273 | autoreply define bridge_domain_set_mac_age |
Eyal Bari | fead670 | 2017-04-04 04:46:32 +0300 | [diff] [blame] | 274 | { |
| 275 | u32 client_index; |
| 276 | u32 context; |
| 277 | u32 bd_id; |
| 278 | u8 mac_age; |
| 279 | }; |
| 280 | |
Jerome Tollet | 5f93e3b | 2020-12-18 09:44:24 +0100 | [diff] [blame] | 281 | /** \brief L2 bridge domain set default learn limit |
| 282 | @param client_index - opaque cookie to identify the sender |
| 283 | @param context - sender context, to match reply w/ request |
| 284 | @param learn limit - maximum number of entries by default for bridge domains |
| 285 | */ |
| 286 | autoreply define bridge_domain_set_default_learn_limit |
| 287 | { |
| 288 | u32 client_index; |
| 289 | u32 context; |
| 290 | u32 learn_limit; |
| 291 | }; |
| 292 | |
| 293 | |
| 294 | /** \brief L2 bridge domain set learn limit |
| 295 | @param client_index - opaque cookie to identify the sender |
| 296 | @param context - sender context, to match reply w/ request |
| 297 | @param bd_id - the bridge domain idenntifier |
| 298 | @param learn limit - maximum number of entries for this bd |
| 299 | */ |
| 300 | autoreply define bridge_domain_set_learn_limit |
| 301 | { |
| 302 | u32 client_index; |
| 303 | u32 context; |
| 304 | u32 bd_id; |
| 305 | u32 learn_limit; |
| 306 | }; |
| 307 | |
Laszlo Kiraly | 0f8f435 | 2022-09-16 13:20:07 +0200 | [diff] [blame] | 308 | /** \brief L2 bridge domain add or delete request - will be deprecated |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 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 create |
| 312 | @param flood - enable/disable bcast/mcast flooding in the bd |
Paul Vinciguerra | bdc0e6b | 2018-09-22 05:32:50 -0700 | [diff] [blame] | 313 | @param uu_flood - enable/disable unknown unicast flood in the bd |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 314 | @param forward - enable/disable forwarding on all interfaces in the bd |
| 315 | @param learn - enable/disable learning on all interfaces in the bd |
| 316 | @param arp_term - enable/disable arp termination in the bd |
Mohsin Kazmi | 5e6f734 | 2019-04-05 17:40:20 +0200 | [diff] [blame] | 317 | @param arp_ufwd - enable/disable arp unicast forwarding in the bd |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 318 | @param mac_age - mac aging time in min, 0 for disabled |
| 319 | @param is_add - add or delete flag |
| 320 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 321 | autoreply define bridge_domain_add_del |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 322 | { |
Laszlo Kiraly | 0f8f435 | 2022-09-16 13:20:07 +0200 | [diff] [blame] | 323 | option deprecated; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 324 | u32 client_index; |
| 325 | u32 context; |
| 326 | u32 bd_id; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 327 | bool flood; |
| 328 | bool uu_flood; |
| 329 | bool forward; |
| 330 | bool learn; |
| 331 | bool arp_term; |
| 332 | bool arp_ufwd; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 333 | u8 mac_age; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 334 | string bd_tag[64]; |
| 335 | bool is_add [default=true]; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 336 | }; |
| 337 | |
Laszlo Kiraly | 0f8f435 | 2022-09-16 13:20:07 +0200 | [diff] [blame] | 338 | /** \brief L2 bridge domain add delete request version 2 |
| 339 | @param client_index - opaque cookie to identify the sender |
| 340 | @param context - sender context, to match reply w/ request |
| 341 | @param bd_id - if the id == ~0 creates a bridge domain with an unused id |
| 342 | if the id != ~0 the id of the bridge domain to create/delete |
| 343 | @param flood - enable/disable bcast/mcast flooding in the bd |
| 344 | @param uu_flood - enable/disable unknown unicast flood in the bd |
| 345 | @param forward - enable/disable forwarding on all interfaces in the bd |
| 346 | @param learn - enable/disable learning on all interfaces in the bd |
| 347 | @param arp_term - enable/disable arp termination in the bd |
| 348 | @param arp_ufwd - enable/disable arp unicast forwarding in the bd |
| 349 | @param mac_age - mac aging time in min, 0 for disabled |
| 350 | @param is_add - add or delete flag |
| 351 | */ |
| 352 | define bridge_domain_add_del_v2 |
| 353 | { |
| 354 | u32 client_index; |
| 355 | u32 context; |
| 356 | u32 bd_id; |
| 357 | bool flood; |
| 358 | bool uu_flood; |
| 359 | bool forward; |
| 360 | bool learn; |
| 361 | bool arp_term; |
| 362 | bool arp_ufwd; |
| 363 | u8 mac_age; |
| 364 | string bd_tag[64]; |
| 365 | bool is_add [default=true]; |
| 366 | }; |
| 367 | |
| 368 | /** \brief L2 bridge domain add delete version 2 response |
| 369 | @param context - sender context, to match reply w/ request |
| 370 | @param retval - return code for the set bridge flags request |
| 371 | @param resulting_id - the id for the new bridge domain |
| 372 | */ |
| 373 | define bridge_domain_add_del_v2_reply |
| 374 | { |
| 375 | u32 context; |
| 376 | i32 retval; |
| 377 | u32 bd_id; |
| 378 | }; |
| 379 | |
| 380 | |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 381 | /** \brief L2 bridge domain request operational state details |
| 382 | @param client_index - opaque cookie to identify the sender |
| 383 | @param context - sender context, to match reply w/ request |
| 384 | @param bd_id - the bridge domain id desired or ~0 to request all bds |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 385 | @param sw_if_index - filter by sw_if_index UNIMPLEMENTED |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 386 | */ |
| 387 | define bridge_domain_dump |
| 388 | { |
| 389 | u32 client_index; |
| 390 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 391 | u32 bd_id [default=0xffffffff]; |
| 392 | vl_api_interface_index_t sw_if_index [default=0xffffffff]; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 393 | }; |
| 394 | |
Ole Troan | 01384fe | 2017-05-12 11:55:35 +0200 | [diff] [blame] | 395 | /** \brief L2 bridge domain sw interface operational state response |
| 396 | @param bd_id - the bridge domain id |
| 397 | @param sw_if_index - sw_if_index in the domain |
| 398 | @param shg - split horizon group for the interface |
| 399 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 400 | typedef bridge_domain_sw_if |
Ole Troan | 01384fe | 2017-05-12 11:55:35 +0200 | [diff] [blame] | 401 | { |
| 402 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 403 | vl_api_interface_index_t sw_if_index; |
| 404 | /* FIXME: set_int_l2_mode() u32/ api u8 */ |
Ole Troan | 01384fe | 2017-05-12 11:55:35 +0200 | [diff] [blame] | 405 | u8 shg; |
| 406 | }; |
| 407 | |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 408 | /** \brief L2 bridge domain operational state response |
| 409 | @param bd_id - the bridge domain id |
| 410 | @param flood - bcast/mcast flooding state on all interfaces in the bd |
Paul Vinciguerra | bdc0e6b | 2018-09-22 05:32:50 -0700 | [diff] [blame] | 411 | @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] | 412 | @param forward - forwarding state on all interfaces in the bd |
| 413 | @param learn - learning state on all interfaces in the bd |
| 414 | @param arp_term - arp termination state on all interfaces in the bd |
Mohsin Kazmi | 5e6f734 | 2019-04-05 17:40:20 +0200 | [diff] [blame] | 415 | @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] | 416 | @param mac_age - mac aging time in min, 0 for disabled |
Jerome Tollet | 50570ec | 2017-09-14 12:53:56 +0100 | [diff] [blame] | 417 | @param bd_tag - optional textual tag for the bridge domain |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 418 | @param n_sw_ifs - number of sw_if_index's in the domain |
| 419 | */ |
Ole Troan | df87f80 | 2020-11-18 19:17:48 +0100 | [diff] [blame] | 420 | define bridge_domain_details |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 421 | { |
| 422 | u32 context; |
| 423 | u32 bd_id; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 424 | bool flood; |
| 425 | bool uu_flood; |
| 426 | bool forward; |
| 427 | bool learn; |
| 428 | bool arp_term; |
| 429 | bool arp_ufwd; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 430 | u8 mac_age; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 431 | string bd_tag[64]; |
| 432 | vl_api_interface_index_t bvi_sw_if_index; |
| 433 | vl_api_interface_index_t uu_fwd_sw_if_index; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 434 | u32 n_sw_ifs; |
Ole Troan | 01384fe | 2017-05-12 11:55:35 +0200 | [diff] [blame] | 435 | 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] | 436 | }; |
| 437 | |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 438 | /** \brief Flags that can be changed on a bridge domain */ |
| 439 | enum bd_flags |
| 440 | { |
Michal Cmarada | 5daf0c5 | 2019-03-15 10:46:07 +0100 | [diff] [blame] | 441 | BRIDGE_API_FLAG_NONE = 0x0, |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 442 | BRIDGE_API_FLAG_LEARN = 0x1, |
| 443 | BRIDGE_API_FLAG_FWD = 0x2, |
| 444 | BRIDGE_API_FLAG_FLOOD = 0x4, |
| 445 | BRIDGE_API_FLAG_UU_FLOOD = 0x8, |
| 446 | BRIDGE_API_FLAG_ARP_TERM = 0x10, |
Mohsin Kazmi | 5e6f734 | 2019-04-05 17:40:20 +0200 | [diff] [blame] | 447 | BRIDGE_API_FLAG_ARP_UFWD = 0x20, |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 448 | }; |
| 449 | |
| 450 | /** \brief Set bridge flags request |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 451 | @param client_index - opaque cookie to identify the sender |
| 452 | @param context - sender context, to match reply w/ request |
| 453 | @param bd_id - the bridge domain to set the flags for |
| 454 | @param is_set - if non-zero, set the flags, else clear them |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 455 | @param flags - flags that are non-zero to set or clear |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 456 | */ |
| 457 | define bridge_flags |
| 458 | { |
| 459 | u32 client_index; |
| 460 | u32 context; |
| 461 | u32 bd_id; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 462 | bool is_set; |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 463 | vl_api_bd_flags_t flags; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 464 | }; |
| 465 | |
| 466 | /** \brief Set bridge flags response |
| 467 | @param context - sender context, to match reply w/ request |
| 468 | @param retval - return code for the set bridge flags request |
John Lo | 8d00fff | 2017-08-03 00:35:36 -0400 | [diff] [blame] | 469 | @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] | 470 | */ |
| 471 | define bridge_flags_reply |
| 472 | { |
| 473 | u32 context; |
| 474 | i32 retval; |
| 475 | u32 resulting_feature_bitmap; |
| 476 | }; |
| 477 | |
Pavel Kotucek | adec587 | 2017-01-25 08:50:53 +0100 | [diff] [blame] | 478 | /** \brief L2 interface vlan tag rewrite configure request |
| 479 | @param client_index - opaque cookie to identify the sender |
| 480 | @param context - sender context, to match reply w/ request |
| 481 | @param sw_if_index - interface the operation is applied to |
| 482 | @param vtr_op - Choose from l2_vtr_op_t enum values |
| 483 | @param push_dot1q - first pushed flag dot1q id set, else dot1ad |
| 484 | @param tag1 - Needed for any push or translate vtr op |
| 485 | @param tag2 - Needed for any push 2 or translate x-2 vtr ops |
| 486 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 487 | autoreply define l2_interface_vlan_tag_rewrite |
Pavel Kotucek | adec587 | 2017-01-25 08:50:53 +0100 | [diff] [blame] | 488 | { |
| 489 | u32 client_index; |
| 490 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 491 | vl_api_interface_index_t sw_if_index; |
Pavel Kotucek | adec587 | 2017-01-25 08:50:53 +0100 | [diff] [blame] | 492 | u32 vtr_op; |
| 493 | u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad |
| 494 | u32 tag1; // first pushed tag |
| 495 | u32 tag2; // second pushed tag |
| 496 | }; |
| 497 | |
Pavel Kotucek | adec587 | 2017-01-25 08:50:53 +0100 | [diff] [blame] | 498 | /** \brief L2 interface pbb tag rewrite configure request |
| 499 | @param client_index - opaque cookie to identify the sender |
| 500 | @param context - sender context, to match reply w/ request |
| 501 | @param sw_if_index - interface the operation is applied to |
| 502 | @param vtr_op - Choose from l2_vtr_op_t enum values |
| 503 | @param inner_tag - needed for translate_qinq vtr op only |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 504 | @param outer_tag - needed for translate_qinq vtr op only |
Pavel Kotucek | adec587 | 2017-01-25 08:50:53 +0100 | [diff] [blame] | 505 | @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op |
| 506 | @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op |
| 507 | @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op |
| 508 | @param i_sid - I-tag service id, needed for any push or translate qinq vtr op |
| 509 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 510 | autoreply define l2_interface_pbb_tag_rewrite |
Pavel Kotucek | adec587 | 2017-01-25 08:50:53 +0100 | [diff] [blame] | 511 | { |
| 512 | u32 client_index; |
| 513 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 514 | vl_api_interface_index_t sw_if_index; |
Pavel Kotucek | adec587 | 2017-01-25 08:50:53 +0100 | [diff] [blame] | 515 | u32 vtr_op; |
| 516 | u16 outer_tag; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 517 | vl_api_mac_address_t b_dmac; |
| 518 | vl_api_mac_address_t b_smac; |
Pavel Kotucek | adec587 | 2017-01-25 08:50:53 +0100 | [diff] [blame] | 519 | u16 b_vlanid; |
| 520 | u32 i_sid; |
| 521 | }; |
| 522 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 523 | /** \brief L2 interface patch add / del request |
| 524 | @param client_index - opaque cookie to identify the sender |
| 525 | @param context - sender context, to match reply w/ request |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 526 | @param rx_sw_if_index - receive side interface |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 527 | @param tx_sw_if_index - transmit side interface |
| 528 | @param is_add - if non-zero set up the interface patch, else remove it |
| 529 | */ |
| 530 | autoreply define l2_patch_add_del |
| 531 | { |
| 532 | u32 client_index; |
| 533 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 534 | vl_api_interface_index_t rx_sw_if_index; |
| 535 | vl_api_interface_index_t tx_sw_if_index; |
| 536 | bool is_add [default=true]; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 537 | }; |
| 538 | |
| 539 | /** \brief Set L2 XConnect between two interfaces request |
| 540 | @param client_index - opaque cookie to identify the sender |
| 541 | @param context - sender context, to match reply w/ request |
| 542 | @param rx_sw_if_index - Receive interface index |
| 543 | @param tx_sw_if_index - Transmit interface index |
| 544 | @param enable - enable xconnect if not 0, else set to L3 mode |
| 545 | */ |
| 546 | autoreply define sw_interface_set_l2_xconnect |
| 547 | { |
| 548 | u32 client_index; |
| 549 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 550 | vl_api_interface_index_t rx_sw_if_index; |
| 551 | vl_api_interface_index_t tx_sw_if_index; |
| 552 | bool enable [default=true]; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 553 | }; |
| 554 | |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 555 | /** |
| 556 | * @brief An enumeration of the type of ports that can be added |
| 557 | * to a bridge domain |
| 558 | */ |
| 559 | enum l2_port_type |
| 560 | { |
| 561 | /* a 'normal' interface, i.e. not BVI or UU-Flood */ |
| 562 | L2_API_PORT_TYPE_NORMAL = 0, |
| 563 | /* a BVI interface in the BD */ |
| 564 | L2_API_PORT_TYPE_BVI = 1, |
| 565 | /* The interface on which to forward unknown unicast packets |
| 566 | * If this is not set for a BD then UU is flooded */ |
| 567 | L2_API_PORT_TYPE_UU_FWD = 2, |
| 568 | }; |
| 569 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 570 | /** \brief Interface bridge mode request |
| 571 | @param client_index - opaque cookie to identify the sender |
| 572 | @param context - sender context, to match reply w/ request |
| 573 | @param rx_sw_if_index - the interface |
| 574 | @param bd_id - bridge domain id |
Yichen Wang | 0a4e006 | 2018-10-01 11:15:25 -0700 | [diff] [blame] | 575 | @param port_type - port_mode, see #l2_port_type |
Yichen Wang | 5c7c49d | 2018-09-18 17:32:29 -0700 | [diff] [blame] | 576 | @param shg - Split horizon group, for bridge mode only |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 577 | @param enable - Enable beige mode if not 0, else set to L3 mode |
| 578 | */ |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 579 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 580 | autoreply define sw_interface_set_l2_bridge |
| 581 | { |
| 582 | u32 client_index; |
| 583 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 584 | vl_api_interface_index_t rx_sw_if_index; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 585 | u32 bd_id; |
Neale Ranns | b474380 | 2018-09-05 09:13:57 -0700 | [diff] [blame] | 586 | vl_api_l2_port_type_t port_type; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 587 | u8 shg; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 588 | bool enable [default=true]; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 589 | }; |
| 590 | |
| 591 | /** \brief Set bridge domain ip to mac entry request |
| 592 | @param client_index - opaque cookie to identify the sender |
| 593 | @param context - sender context, to match reply w/ request |
| 594 | @param bd_id - the bridge domain to set the flags for |
| 595 | @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] | 596 | @param ip - ipv4 or ipv6 address |
| 597 | @param mac - MAC address |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 598 | */ |
Neale Ranns | bc764c8 | 2019-06-19 07:07:13 -0700 | [diff] [blame] | 599 | |
| 600 | typedef bd_ip_mac |
| 601 | { |
| 602 | u32 bd_id; |
| 603 | vl_api_address_t ip; |
| 604 | vl_api_mac_address_t mac; |
| 605 | }; |
| 606 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 607 | autoreply define bd_ip_mac_add_del |
| 608 | { |
| 609 | u32 client_index; |
| 610 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 611 | bool is_add [default=true]; |
Neale Ranns | bc764c8 | 2019-06-19 07:07:13 -0700 | [diff] [blame] | 612 | vl_api_bd_ip_mac_t entry; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 613 | }; |
| 614 | |
John Lo | e26c81f | 2019-01-07 15:16:33 -0500 | [diff] [blame] | 615 | /** \brief Flush bridge domain IP to MAC entries |
| 616 | @param client_index - opaque cookie to identify the sender |
| 617 | @param bd_id - bridge domain identifier |
| 618 | */ |
| 619 | autoreply define bd_ip_mac_flush |
| 620 | { |
| 621 | u32 client_index; |
| 622 | u32 context; |
| 623 | u32 bd_id; |
| 624 | }; |
| 625 | |
Mohsin Kazmi | 5d82d2f | 2018-08-13 19:17:54 +0200 | [diff] [blame] | 626 | /** \brief bridge domain IP to MAC entry details structure |
| 627 | @param bd_id - bridge domain table id |
| 628 | @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address |
| 629 | @param ip_address - ipv4 or ipv6 address |
| 630 | @param mac_address - MAC address |
| 631 | */ |
| 632 | define bd_ip_mac_details |
| 633 | { |
| 634 | u32 context; |
Neale Ranns | bc764c8 | 2019-06-19 07:07:13 -0700 | [diff] [blame] | 635 | vl_api_bd_ip_mac_t entry; |
Mohsin Kazmi | 5d82d2f | 2018-08-13 19:17:54 +0200 | [diff] [blame] | 636 | }; |
| 637 | |
| 638 | /** \brief Dump bridge domain IP to MAC entries |
| 639 | @param client_index - opaque cookie to identify the sender |
| 640 | @param bd_id - bridge domain identifier |
| 641 | */ |
| 642 | define bd_ip_mac_dump |
| 643 | { |
| 644 | u32 client_index; |
| 645 | u32 context; |
| 646 | u32 bd_id; |
| 647 | }; |
| 648 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 649 | /** \brief L2 interface ethernet flow point filtering enable/disable request |
| 650 | @param client_index - opaque cookie to identify the sender |
| 651 | @param context - sender context, to match reply w/ request |
| 652 | @param sw_if_index - interface to enable/disable filtering on |
| 653 | @param enable_disable - if non-zero enable filtering, else disable |
| 654 | */ |
| 655 | autoreply define l2_interface_efp_filter |
| 656 | { |
| 657 | u32 client_index; |
| 658 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 659 | vl_api_interface_index_t sw_if_index; |
| 660 | bool enable_disable [default=true]; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 661 | }; |
| 662 | |
| 663 | /** \brief Interface set vpath request |
| 664 | @param client_index - opaque cookie to identify the sender |
| 665 | @param context - sender context, to match reply w/ request |
| 666 | @param sw_if_index - interface used to reach neighbor |
| 667 | @param enable - if non-zero enable, else disable |
| 668 | */ |
| 669 | autoreply define sw_interface_set_vpath |
| 670 | { |
| 671 | u32 client_index; |
| 672 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 673 | vl_api_interface_index_t sw_if_index; |
| 674 | bool enable [default=0xffffffff]; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 675 | }; |
| 676 | |
Neale Ranns | 192b13f | 2019-03-15 02:16:20 -0700 | [diff] [blame] | 677 | /** \brief Create BVI interface instance request |
| 678 | @param client_index - opaque cookie to identify the sender |
| 679 | @param context - sender context, to match reply w/ request |
| 680 | @param mac_address - mac addr to assign to the interface if none-zero |
| 681 | @param user_instance - requested instance, ~0 => dynamically allocate |
| 682 | */ |
| 683 | define bvi_create |
| 684 | { |
| 685 | u32 client_index; |
| 686 | u32 context; |
| 687 | vl_api_mac_address_t mac; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 688 | u32 user_instance [default=0xffffffff]; |
Neale Ranns | 192b13f | 2019-03-15 02:16:20 -0700 | [diff] [blame] | 689 | }; |
| 690 | |
| 691 | /** \brief Create BVI interface instance response |
| 692 | @param context - sender context, to match reply w/ request |
| 693 | @param sw_if_index - sw index of the interface that was created |
| 694 | @param retval - return code for the request |
| 695 | */ |
| 696 | define bvi_create_reply |
| 697 | { |
| 698 | u32 context; |
| 699 | i32 retval; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 700 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | 192b13f | 2019-03-15 02:16:20 -0700 | [diff] [blame] | 701 | }; |
| 702 | |
| 703 | /** \brief Delete BVI interface request |
| 704 | @param client_index - opaque cookie to identify the sender |
| 705 | @param context - sender context, to match reply w/ request |
| 706 | @param sw_if_index - sw index of the interface that was created |
| 707 | */ |
| 708 | autoreply define bvi_delete |
| 709 | { |
| 710 | u32 client_index; |
| 711 | u32 context; |
Jakub Grajciar | 145e330 | 2019-10-24 13:52:42 +0200 | [diff] [blame] | 712 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | 192b13f | 2019-03-15 02:16:20 -0700 | [diff] [blame] | 713 | }; |
| 714 | |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 715 | /** \brief Register for IP4 ARP resolution event on receiving ARP reply or |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 716 | MAC/IP info from ARP requests in L2 BDs |
| 717 | @param client_index - opaque cookie to identify the sender |
| 718 | @param context - sender context, to match reply w/ request |
| 719 | @param enable - 1 => register for events, 0 => cancel registration |
| 720 | @param pid - sender's pid |
| 721 | */ |
| 722 | autoreply define want_l2_arp_term_events |
| 723 | { |
| 724 | u32 client_index; |
| 725 | u32 context; |
| 726 | bool enable; |
| 727 | u32 pid; |
| 728 | }; |
| 729 | |
| 730 | /** \brief Tell client about an IP4 ARP resolution event or |
| 731 | MAC/IP info from ARP requests in L2 BDs |
| 732 | @param client_index - opaque cookie to identify the sender |
| 733 | @param pid - client pid registered to receive notification |
| 734 | @param ip - IP address of new ARP term entry |
| 735 | @param sw_if_index - interface of new ARP term entry |
| 736 | @param mac - MAC address of new ARP term entry |
| 737 | */ |
| 738 | define l2_arp_term_event |
| 739 | { |
| 740 | u32 client_index; |
| 741 | u32 pid; |
| 742 | vl_api_address_t ip; |
| 743 | vl_api_interface_index_t sw_if_index; |
| 744 | vl_api_mac_address_t mac; |
| 745 | }; |
| 746 | |
| 747 | service { |
| 748 | rpc want_l2_arp_term_events returns want_l2_arp_term_events_reply |
| 749 | events l2_arp_term_event; |
| 750 | }; |
| 751 | |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 752 | /* |
| 753 | * Local Variables: |
| 754 | * eval: (c-set-style "gnu") |
| 755 | * End: |
| 756 | */ |