blob: 685666970003b808c895b9a0e102a295f57622ec [file] [log] [blame]
Neale Ranns79a05f52018-09-11 07:39:43 -07001/* Hey Emacs use -*- mode: C -*- */
Mohsin Kazmi61b94c62018-08-20 18:32:39 +02002/*
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 Grajciarfb270962020-01-03 10:03:32 +010017option version = "1.1.1";
Neale Ranns79a05f52018-09-11 07:39:43 -070018import "vnet/ip/ip_types.api";
Jakub Grajciarfb270962020-01-03 10:03:32 +010019import "vnet/interface_types.api";
Neale Ranns79a05f52018-09-11 07:39:43 -070020
Neale Ranns4dd4cf42019-03-27 05:06:47 -070021enum vxlan_gbp_api_tunnel_mode
22{
23 VXLAN_GBP_API_TUNNEL_MODE_L2,
24 VXLAN_GBP_API_TUNNEL_MODE_L3,
25};
26
Neale Ranns79a05f52018-09-11 07:39:43 -070027/** \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 Grajciarfb270962020-01-03 10:03:32 +010032 @param encap_table_id - Encap route table
Neale Ranns79a05f52018-09-11 07:39:43 -070033 @param vni - The VXLAN Network Identifier, uint24
34 @param sw_ifindex - Ignored in add message, set in details
35*/
36typedef vxlan_gbp_tunnel
37{
38 u32 instance;
39 vl_api_address_t src;
40 vl_api_address_t dst;
Jakub Grajciarfb270962020-01-03 10:03:32 +010041 vl_api_interface_index_t mcast_sw_if_index;
Neale Ranns79a05f52018-09-11 07:39:43 -070042 u32 encap_table_id;
Neale Ranns79a05f52018-09-11 07:39:43 -070043 u32 vni;
Jakub Grajciarfb270962020-01-03 10:03:32 +010044 vl_api_interface_index_t sw_if_index;
Neale Ranns4dd4cf42019-03-27 05:06:47 -070045 vl_api_vxlan_gbp_api_tunnel_mode_t mode;
Neale Ranns79a05f52018-09-11 07:39:43 -070046};
Mohsin Kazmi61b94c62018-08-20 18:32:39 +020047
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 Kazmi61b94c62018-08-20 18:32:39 +020052*/
Neale Ranns79a05f52018-09-11 07:39:43 -070053define vxlan_gbp_tunnel_add_del
Mohsin Kazmi61b94c62018-08-20 18:32:39 +020054{
55 u32 client_index;
56 u32 context;
Jakub Grajciarfb270962020-01-03 10:03:32 +010057 bool is_add [default=true];
Neale Ranns79a05f52018-09-11 07:39:43 -070058 vl_api_vxlan_gbp_tunnel_t tunnel;
Neale Rannsb4687732020-09-22 11:24:18 +000059 option in_progress;
Mohsin Kazmi61b94c62018-08-20 18:32:39 +020060};
61
Neale Ranns79a05f52018-09-11 07:39:43 -070062define vxlan_gbp_tunnel_add_del_reply
Mohsin Kazmi61b94c62018-08-20 18:32:39 +020063{
64 u32 context;
65 i32 retval;
Jakub Grajciarfb270962020-01-03 10:03:32 +010066 vl_api_interface_index_t sw_if_index;
Neale Rannsb4687732020-09-22 11:24:18 +000067 option in_progress;
Mohsin Kazmi61b94c62018-08-20 18:32:39 +020068};
69
70define vxlan_gbp_tunnel_dump
71{
72 u32 client_index;
73 u32 context;
Paul Vinciguerrac0e94412020-04-28 01:12:04 -040074 vl_api_interface_index_t sw_if_index [default=0xffffffff];
Neale Rannsb4687732020-09-22 11:24:18 +000075 option in_progress;
Mohsin Kazmi61b94c62018-08-20 18:32:39 +020076};
77
78define vxlan_gbp_tunnel_details
79{
80 u32 context;
Neale Ranns79a05f52018-09-11 07:39:43 -070081 vl_api_vxlan_gbp_tunnel_t tunnel;
Neale Rannsb4687732020-09-22 11:24:18 +000082 option in_progress;
Mohsin Kazmi61b94c62018-08-20 18:32:39 +020083};
84
85/** \brief Interface set vxlan-bypass request
86 @param client_index - opaque cookie to identify the sender
87 @param context - sender context, to match reply w/ request
88 @param sw_if_index - interface used to reach neighbor
89 @param is_ipv6 - if non-zero, enable ipv6-vxlan-bypass, else ipv4-vxlan-bypass
90 @param enable - if non-zero enable, else disable
91*/
92autoreply define sw_interface_set_vxlan_gbp_bypass
93{
94 u32 client_index;
95 u32 context;
Jakub Grajciarfb270962020-01-03 10:03:32 +010096 vl_api_interface_index_t sw_if_index;
97 bool is_ipv6;
98 bool enable [default=true];
Neale Rannsb4687732020-09-22 11:24:18 +000099 option in_progress;
Mohsin Kazmi61b94c62018-08-20 18:32:39 +0200100};