Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015-2016 Cisco and/or its affiliates. |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | * you may not use this file except in compliance with the License. |
| 5 | * You may obtain a copy of the License at: |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | * See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | */ |
| 15 | |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 16 | option version = "2.1.0"; |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 17 | |
| 18 | import "vnet/interface_types.api"; |
| 19 | import "vnet/ip/ip_types.api"; |
Jon Loeliger | 3d460bd | 2018-02-01 16:36:12 -0600 | [diff] [blame] | 20 | |
| 21 | /** \brief Create or delete a VXLAN tunnel |
| 22 | @param client_index - opaque cookie to identify the sender |
| 23 | @param context - sender context, to match reply w/ request |
| 24 | @param is_add - Use 1 to create the tunnel, 0 to remove it |
Jon Loeliger | 3d460bd | 2018-02-01 16:36:12 -0600 | [diff] [blame] | 25 | @param instance - optional unique custom device instance, else ~0. |
| 26 | @param src_address - Source IP address |
| 27 | @param dst_address - Destination IP address, can be multicast |
| 28 | @param mcast_sw_if_index - Interface for multicast destination |
| 29 | @param encap_vrf_id - Encap route table FIB index |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 30 | @param decap_next_index - index of decap next graph node |
Jon Loeliger | 3d460bd | 2018-02-01 16:36:12 -0600 | [diff] [blame] | 31 | @param vni - The VXLAN Network Identifier, uint24 |
| 32 | */ |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 33 | define vxlan_add_del_tunnel |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 34 | { |
| 35 | u32 client_index; |
| 36 | u32 context; |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 37 | bool is_add [default=true]; |
Jon Loeliger | 3d460bd | 2018-02-01 16:36:12 -0600 | [diff] [blame] | 38 | u32 instance; /* If non-~0, specifies a custom dev instance */ |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 39 | vl_api_address_t src_address; |
| 40 | vl_api_address_t dst_address; |
| 41 | vl_api_interface_index_t mcast_sw_if_index; |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 42 | u32 encap_vrf_id; |
| 43 | u32 decap_next_index; |
| 44 | u32 vni; |
| 45 | }; |
| 46 | |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 47 | /** \brief Create or delete a VXLAN tunnel |
| 48 | @param client_index - opaque cookie to identify the sender |
| 49 | @param context - sender context, to match reply w/ request |
| 50 | @param is_add - Use 1 to create the tunnel, 0 to remove it |
| 51 | @param instance - optional unique custom device instance, else ~0. |
| 52 | @param src_address - Source IP address |
| 53 | @param dst_address - Destination IP address, can be multicast |
| 54 | @param src_port - Source UDP port. It is not included in sent packets. Used only for port registration |
| 55 | @param dst_port - Destination UDP port |
| 56 | @param mcast_sw_if_index - Interface for multicast destination |
| 57 | @param encap_vrf_id - Encap route table FIB index |
| 58 | @param decap_next_index - index of decap next graph node |
| 59 | @param vni - The VXLAN Network Identifier, uint24 |
| 60 | */ |
| 61 | define vxlan_add_del_tunnel_v2 |
| 62 | { |
| 63 | u32 client_index; |
| 64 | u32 context; |
| 65 | bool is_add [default=true]; |
| 66 | u32 instance [default=0xffffffff]; /* If non-~0, specifies a custom dev instance */ |
| 67 | vl_api_address_t src_address; |
| 68 | vl_api_address_t dst_address; |
| 69 | u16 src_port; |
| 70 | u16 dst_port; |
| 71 | vl_api_interface_index_t mcast_sw_if_index; |
| 72 | u32 encap_vrf_id; |
| 73 | u32 decap_next_index; |
| 74 | u32 vni; |
| 75 | }; |
| 76 | |
Nathan Skrzypczak | 3e38422 | 2021-04-21 19:56:34 +0200 | [diff] [blame] | 77 | /** \brief Create or delete a VXLAN tunnel |
| 78 | @param client_index - opaque cookie to identify the sender |
| 79 | @param context - sender context, to match reply w/ request |
| 80 | @param is_add - Use 1 to create the tunnel, 0 to remove it |
| 81 | @param instance - optional unique custom device instance, else ~0. |
| 82 | @param src_address - Source IP address |
| 83 | @param dst_address - Destination IP address, can be multicast |
| 84 | @param src_port - Source UDP port. It is not included in sent packets. Used only for port registration |
| 85 | @param dst_port - Destination UDP port |
| 86 | @param mcast_sw_if_index - Interface for multicast destination |
| 87 | @param encap_vrf_id - Encap route table FIB index |
| 88 | @param decap_next_index - index of decap next graph node |
| 89 | @param vni - The VXLAN Network Identifier, uint24 |
| 90 | @param is_l3 - if true, create the interface in L3 mode, w/o MAC |
| 91 | */ |
| 92 | define vxlan_add_del_tunnel_v3 |
| 93 | { |
| 94 | u32 client_index; |
| 95 | u32 context; |
| 96 | bool is_add [default=true]; |
| 97 | u32 instance [default=0xffffffff]; /* If non-~0, specifies a custom dev instance */ |
| 98 | vl_api_address_t src_address; |
| 99 | vl_api_address_t dst_address; |
| 100 | u16 src_port; |
| 101 | u16 dst_port; |
| 102 | vl_api_interface_index_t mcast_sw_if_index; |
| 103 | u32 encap_vrf_id; |
| 104 | u32 decap_next_index; |
| 105 | u32 vni; |
| 106 | bool is_l3 [default=false]; |
| 107 | }; |
| 108 | |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 109 | define vxlan_add_del_tunnel_reply |
| 110 | { |
| 111 | u32 context; |
| 112 | i32 retval; |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 113 | vl_api_interface_index_t sw_if_index; |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 114 | }; |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 115 | define vxlan_add_del_tunnel_v2_reply |
| 116 | { |
| 117 | u32 context; |
| 118 | i32 retval; |
| 119 | vl_api_interface_index_t sw_if_index; |
| 120 | }; |
Nathan Skrzypczak | 3e38422 | 2021-04-21 19:56:34 +0200 | [diff] [blame] | 121 | define vxlan_add_del_tunnel_v3_reply |
| 122 | { |
| 123 | u32 context; |
| 124 | i32 retval; |
| 125 | vl_api_interface_index_t sw_if_index; |
| 126 | }; |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 127 | |
| 128 | define vxlan_tunnel_dump |
| 129 | { |
| 130 | u32 client_index; |
| 131 | u32 context; |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 132 | vl_api_interface_index_t sw_if_index; |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 133 | }; |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 134 | define vxlan_tunnel_v2_dump |
| 135 | { |
| 136 | u32 client_index; |
| 137 | u32 context; |
| 138 | vl_api_interface_index_t sw_if_index; |
| 139 | }; |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 140 | |
| 141 | define vxlan_tunnel_details |
| 142 | { |
| 143 | u32 context; |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 144 | vl_api_interface_index_t sw_if_index; |
Jon Loeliger | 3d460bd | 2018-02-01 16:36:12 -0600 | [diff] [blame] | 145 | u32 instance; |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 146 | vl_api_address_t src_address; |
| 147 | vl_api_address_t dst_address; |
| 148 | vl_api_interface_index_t mcast_sw_if_index; |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 149 | u32 encap_vrf_id; |
| 150 | u32 decap_next_index; |
| 151 | u32 vni; |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 152 | }; |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 153 | define vxlan_tunnel_v2_details |
| 154 | { |
| 155 | u32 context; |
| 156 | vl_api_interface_index_t sw_if_index; |
| 157 | u32 instance; |
| 158 | vl_api_address_t src_address; |
| 159 | vl_api_address_t dst_address; |
| 160 | u16 src_port; |
| 161 | u16 dst_port; |
| 162 | vl_api_interface_index_t mcast_sw_if_index; |
| 163 | u32 encap_vrf_id; |
| 164 | u32 decap_next_index; |
| 165 | u32 vni; |
| 166 | }; |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 167 | |
| 168 | /** \brief Interface set vxlan-bypass request |
| 169 | @param client_index - opaque cookie to identify the sender |
| 170 | @param context - sender context, to match reply w/ request |
| 171 | @param sw_if_index - interface used to reach neighbor |
| 172 | @param is_ipv6 - if non-zero, enable ipv6-vxlan-bypass, else ipv4-vxlan-bypass |
| 173 | @param enable - if non-zero enable, else disable |
| 174 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 175 | autoreply define sw_interface_set_vxlan_bypass |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 176 | { |
| 177 | u32 client_index; |
| 178 | u32 context; |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 179 | vl_api_interface_index_t sw_if_index; |
| 180 | bool is_ipv6; |
| 181 | bool enable [default=true]; |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 182 | }; |
eyal bari | af86a48 | 2018-04-17 11:20:27 +0300 | [diff] [blame] | 183 | |
| 184 | /** \brief Offload vxlan rx request |
| 185 | @param client_index - opaque cookie to identify the sender |
| 186 | @param context - sender context, to match reply w/ request |
| 187 | @param hw_if_index - rx hw interface |
| 188 | @param sw_if_index - vxlan interface to offload |
| 189 | @param enable - if non-zero enable, else disable |
| 190 | */ |
| 191 | autoreply define vxlan_offload_rx |
| 192 | { |
| 193 | u32 client_index; |
| 194 | u32 context; |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 195 | vl_api_interface_index_t hw_if_index; |
| 196 | vl_api_interface_index_t sw_if_index; |
| 197 | bool enable [default=true]; |
eyal bari | af86a48 | 2018-04-17 11:20:27 +0300 | [diff] [blame] | 198 | }; |