Neale Ranns | 79a05f5 | 2018-09-11 07:39:43 -0700 | [diff] [blame] | 1 | /* Hey Emacs use -*- mode: C -*- */ |
Mohsin Kazmi | 61b94c6 | 2018-08-20 18:32:39 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2018 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 | |
Jakub Grajciar | fb27096 | 2020-01-03 10:03:32 +0100 | [diff] [blame] | 17 | option version = "1.1.1"; |
Neale Ranns | 79a05f5 | 2018-09-11 07:39:43 -0700 | [diff] [blame] | 18 | import "vnet/ip/ip_types.api"; |
Jakub Grajciar | fb27096 | 2020-01-03 10:03:32 +0100 | [diff] [blame] | 19 | import "vnet/interface_types.api"; |
Neale Ranns | 79a05f5 | 2018-09-11 07:39:43 -0700 | [diff] [blame] | 20 | |
Neale Ranns | 4dd4cf4 | 2019-03-27 05:06:47 -0700 | [diff] [blame] | 21 | enum vxlan_gbp_api_tunnel_mode |
| 22 | { |
| 23 | VXLAN_GBP_API_TUNNEL_MODE_L2, |
| 24 | VXLAN_GBP_API_TUNNEL_MODE_L3, |
| 25 | }; |
| 26 | |
Neale Ranns | 79a05f5 | 2018-09-11 07:39:43 -0700 | [diff] [blame] | 27 | /** \brief Definition of a VXLAN GBP tunnel |
| 28 | @param instance - optional unique custom device instance, else ~0. |
| 29 | @param src - Source IP address |
| 30 | @param dst - Destination IP address, can be multicast |
| 31 | @param mcast_sw_if_index - Interface for multicast destination |
Jakub Grajciar | fb27096 | 2020-01-03 10:03:32 +0100 | [diff] [blame] | 32 | @param encap_table_id - Encap route table |
Neale Ranns | 79a05f5 | 2018-09-11 07:39:43 -0700 | [diff] [blame] | 33 | @param vni - The VXLAN Network Identifier, uint24 |
| 34 | @param sw_ifindex - Ignored in add message, set in details |
| 35 | */ |
| 36 | typedef vxlan_gbp_tunnel |
| 37 | { |
| 38 | u32 instance; |
| 39 | vl_api_address_t src; |
| 40 | vl_api_address_t dst; |
Jakub Grajciar | fb27096 | 2020-01-03 10:03:32 +0100 | [diff] [blame] | 41 | vl_api_interface_index_t mcast_sw_if_index; |
Neale Ranns | 79a05f5 | 2018-09-11 07:39:43 -0700 | [diff] [blame] | 42 | u32 encap_table_id; |
Neale Ranns | 79a05f5 | 2018-09-11 07:39:43 -0700 | [diff] [blame] | 43 | u32 vni; |
Jakub Grajciar | fb27096 | 2020-01-03 10:03:32 +0100 | [diff] [blame] | 44 | vl_api_interface_index_t sw_if_index; |
Neale Ranns | 4dd4cf4 | 2019-03-27 05:06:47 -0700 | [diff] [blame] | 45 | vl_api_vxlan_gbp_api_tunnel_mode_t mode; |
Neale Ranns | 79a05f5 | 2018-09-11 07:39:43 -0700 | [diff] [blame] | 46 | }; |
Mohsin Kazmi | 61b94c6 | 2018-08-20 18:32:39 +0200 | [diff] [blame] | 47 | |
| 48 | /** \brief Create or delete a VXLAN-GBP tunnel |
| 49 | @param client_index - opaque cookie to identify the sender |
| 50 | @param context - sender context, to match reply w/ request |
| 51 | @param is_add - Use 1 to create the tunnel, 0 to remove it |
Mohsin Kazmi | 61b94c6 | 2018-08-20 18:32:39 +0200 | [diff] [blame] | 52 | */ |
Neale Ranns | 79a05f5 | 2018-09-11 07:39:43 -0700 | [diff] [blame] | 53 | define vxlan_gbp_tunnel_add_del |
Mohsin Kazmi | 61b94c6 | 2018-08-20 18:32:39 +0200 | [diff] [blame] | 54 | { |
| 55 | u32 client_index; |
| 56 | u32 context; |
Jakub Grajciar | fb27096 | 2020-01-03 10:03:32 +0100 | [diff] [blame] | 57 | bool is_add [default=true]; |
Neale Ranns | 79a05f5 | 2018-09-11 07:39:43 -0700 | [diff] [blame] | 58 | vl_api_vxlan_gbp_tunnel_t tunnel; |
Mohsin Kazmi | 61b94c6 | 2018-08-20 18:32:39 +0200 | [diff] [blame] | 59 | }; |
| 60 | |
Neale Ranns | 79a05f5 | 2018-09-11 07:39:43 -0700 | [diff] [blame] | 61 | define vxlan_gbp_tunnel_add_del_reply |
Mohsin Kazmi | 61b94c6 | 2018-08-20 18:32:39 +0200 | [diff] [blame] | 62 | { |
| 63 | u32 context; |
| 64 | i32 retval; |
Jakub Grajciar | fb27096 | 2020-01-03 10:03:32 +0100 | [diff] [blame] | 65 | vl_api_interface_index_t sw_if_index; |
Mohsin Kazmi | 61b94c6 | 2018-08-20 18:32:39 +0200 | [diff] [blame] | 66 | }; |
| 67 | |
| 68 | define vxlan_gbp_tunnel_dump |
| 69 | { |
| 70 | u32 client_index; |
| 71 | u32 context; |
Jakub Grajciar | fb27096 | 2020-01-03 10:03:32 +0100 | [diff] [blame] | 72 | vl_api_interface_index_t sw_if_index; |
Mohsin Kazmi | 61b94c6 | 2018-08-20 18:32:39 +0200 | [diff] [blame] | 73 | }; |
| 74 | |
| 75 | define vxlan_gbp_tunnel_details |
| 76 | { |
| 77 | u32 context; |
Neale Ranns | 79a05f5 | 2018-09-11 07:39:43 -0700 | [diff] [blame] | 78 | vl_api_vxlan_gbp_tunnel_t tunnel; |
Mohsin Kazmi | 61b94c6 | 2018-08-20 18:32:39 +0200 | [diff] [blame] | 79 | }; |
| 80 | |
| 81 | /** \brief Interface set vxlan-bypass request |
| 82 | @param client_index - opaque cookie to identify the sender |
| 83 | @param context - sender context, to match reply w/ request |
| 84 | @param sw_if_index - interface used to reach neighbor |
| 85 | @param is_ipv6 - if non-zero, enable ipv6-vxlan-bypass, else ipv4-vxlan-bypass |
| 86 | @param enable - if non-zero enable, else disable |
| 87 | */ |
| 88 | autoreply define sw_interface_set_vxlan_gbp_bypass |
| 89 | { |
| 90 | u32 client_index; |
| 91 | u32 context; |
Jakub Grajciar | fb27096 | 2020-01-03 10:03:32 +0100 | [diff] [blame] | 92 | vl_api_interface_index_t sw_if_index; |
| 93 | bool is_ipv6; |
| 94 | bool enable [default=true]; |
Mohsin Kazmi | 61b94c6 | 2018-08-20 18:32:39 +0200 | [diff] [blame] | 95 | }; |