api: vxlan - Mark old message versions as deprecated
[vpp.git] / src / plugins / vxlan / vxlan.api
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
16 option version = "2.1.0";
17
18 import "vnet/interface_types.api";
19 import "vnet/ip/ip_types.api";
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
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
30     @param decap_next_index - index of decap next graph node
31     @param vni - The VXLAN Network Identifier, uint24
32 */
33 define vxlan_add_del_tunnel
34 {
35   option deprecated;
36
37   u32 client_index;
38   u32 context;
39   bool is_add [default=true];
40   u32 instance;         /* If non-~0, specifies a custom dev instance */
41   vl_api_address_t src_address;
42   vl_api_address_t dst_address;
43   vl_api_interface_index_t mcast_sw_if_index;
44   u32 encap_vrf_id;
45   u32 decap_next_index;
46   u32 vni;
47 };
48
49 /** \brief Create or delete a VXLAN tunnel
50     @param client_index - opaque cookie to identify the sender
51     @param context - sender context, to match reply w/ request
52     @param is_add - Use 1 to create the tunnel, 0 to remove it
53     @param instance - optional unique custom device instance, else ~0.
54     @param src_address - Source IP address
55     @param dst_address - Destination IP address, can be multicast
56     @param src_port - Source UDP port. It is not included in sent packets. Used only for port registration
57     @param dst_port - Destination UDP port
58     @param mcast_sw_if_index - Interface for multicast destination
59     @param encap_vrf_id - Encap route table FIB index
60     @param decap_next_index - index of decap next graph node
61     @param vni - The VXLAN Network Identifier, uint24
62 */
63 define vxlan_add_del_tunnel_v2
64 {
65   option deprecated;
66
67   u32 client_index;
68   u32 context;
69   bool is_add [default=true];
70   u32 instance [default=0xffffffff];    /* If non-~0, specifies a custom dev instance */
71   vl_api_address_t src_address;
72   vl_api_address_t dst_address;
73   u16 src_port;
74   u16 dst_port;
75   vl_api_interface_index_t mcast_sw_if_index;
76   u32 encap_vrf_id;
77   u32 decap_next_index;
78   u32 vni;
79 };
80
81 /** \brief Create or delete a VXLAN tunnel
82     @param client_index - opaque cookie to identify the sender
83     @param context - sender context, to match reply w/ request
84     @param is_add - Use 1 to create the tunnel, 0 to remove it
85     @param instance - optional unique custom device instance, else ~0.
86     @param src_address - Source IP address
87     @param dst_address - Destination IP address, can be multicast
88     @param src_port - Source UDP port. It is not included in sent packets. Used only for port registration
89     @param dst_port - Destination UDP port
90     @param mcast_sw_if_index - Interface for multicast destination
91     @param encap_vrf_id - Encap route table FIB index
92     @param decap_next_index - index of decap next graph node
93     @param vni - The VXLAN Network Identifier, uint24
94     @param is_l3 - if true, create the interface in L3 mode, w/o MAC
95 */
96 define vxlan_add_del_tunnel_v3
97 {
98   u32 client_index;
99   u32 context;
100   bool is_add [default=true];
101   u32 instance [default=0xffffffff];    /* If non-~0, specifies a custom dev instance */
102   vl_api_address_t src_address;
103   vl_api_address_t dst_address;
104   u16 src_port;
105   u16 dst_port;
106   vl_api_interface_index_t mcast_sw_if_index;
107   u32 encap_vrf_id;
108   u32 decap_next_index;
109   u32 vni;
110   bool is_l3 [default=false];
111 };
112
113 define vxlan_add_del_tunnel_reply
114 {
115   option deprecated;
116
117   u32 context;
118   i32 retval;
119   vl_api_interface_index_t sw_if_index;
120 };
121 define vxlan_add_del_tunnel_v2_reply
122 {
123   option deprecated;
124
125   u32 context;
126   i32 retval;
127   vl_api_interface_index_t sw_if_index;
128 };
129 define vxlan_add_del_tunnel_v3_reply
130 {
131   u32 context;
132   i32 retval;
133   vl_api_interface_index_t sw_if_index;
134 };
135
136 define vxlan_tunnel_dump
137 {
138   option deprecated;
139
140   u32 client_index;
141   u32 context;
142   vl_api_interface_index_t sw_if_index;
143 };
144 define vxlan_tunnel_v2_dump
145 {
146   u32 client_index;
147   u32 context;
148   vl_api_interface_index_t sw_if_index;
149 };
150
151 define vxlan_tunnel_details
152 {
153   option deprecated;
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   vl_api_interface_index_t mcast_sw_if_index;
161   u32 encap_vrf_id;
162   u32 decap_next_index;
163   u32 vni;
164 };
165 define vxlan_tunnel_v2_details
166 {
167   u32 context;
168   vl_api_interface_index_t sw_if_index;
169   u32 instance;
170   vl_api_address_t src_address;
171   vl_api_address_t dst_address;
172   u16 src_port;
173   u16 dst_port;
174   vl_api_interface_index_t mcast_sw_if_index;
175   u32 encap_vrf_id;
176   u32 decap_next_index;
177   u32 vni;
178 };
179
180 /** \brief Interface set vxlan-bypass request
181     @param client_index - opaque cookie to identify the sender
182     @param context - sender context, to match reply w/ request
183     @param sw_if_index - interface used to reach neighbor
184     @param is_ipv6 - if non-zero, enable ipv6-vxlan-bypass, else ipv4-vxlan-bypass
185     @param enable - if non-zero enable, else disable
186 */
187 autoreply define sw_interface_set_vxlan_bypass
188 {
189   u32 client_index;
190   u32 context;
191   vl_api_interface_index_t sw_if_index;
192   bool is_ipv6;
193   bool enable [default=true];
194 };
195
196 /** \brief Offload vxlan rx request
197     @param client_index - opaque cookie to identify the sender
198     @param context - sender context, to match reply w/ request
199     @param hw_if_index - rx hw interface
200     @param sw_if_index - vxlan interface to offload
201     @param enable - if non-zero enable, else disable
202 */
203 autoreply define vxlan_offload_rx
204 {
205   u32 client_index;
206   u32 context;
207   vl_api_interface_index_t hw_if_index;
208   vl_api_interface_index_t sw_if_index;
209   bool enable [default=true];
210 };