blob: 2370fb5157c31bc870ac5b6c1438439140c7848e [file] [log] [blame]
Pavel Kotucekadb13d62016-12-19 14:35:35 +01001/*
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 Glazychev839dcc02020-12-01 02:39:21 +070016option version = "2.1.0";
Jakub Grajciar7c0eb562020-03-02 13:55:31 +010017
18import "vnet/interface_types.api";
19import "vnet/ip/ip_types.api";
Jon Loeliger3d460bd2018-02-01 16:36:12 -060020
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 Loeliger3d460bd2018-02-01 16:36:12 -060025 @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 Grajciar7c0eb562020-03-02 13:55:31 +010030 @param decap_next_index - index of decap next graph node
Jon Loeliger3d460bd2018-02-01 16:36:12 -060031 @param vni - The VXLAN Network Identifier, uint24
32*/
Dave Barach0d056e52017-09-28 15:11:16 -040033define vxlan_add_del_tunnel
Pavel Kotucekadb13d62016-12-19 14:35:35 +010034{
35 u32 client_index;
36 u32 context;
Jakub Grajciar7c0eb562020-03-02 13:55:31 +010037 bool is_add [default=true];
Jon Loeliger3d460bd2018-02-01 16:36:12 -060038 u32 instance; /* If non-~0, specifies a custom dev instance */
Jakub Grajciar7c0eb562020-03-02 13:55:31 +010039 vl_api_address_t src_address;
40 vl_api_address_t dst_address;
41 vl_api_interface_index_t mcast_sw_if_index;
Pavel Kotucekadb13d62016-12-19 14:35:35 +010042 u32 encap_vrf_id;
43 u32 decap_next_index;
44 u32 vni;
45};
46
Artem Glazychev839dcc02020-12-01 02:39:21 +070047/** \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*/
61define 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
Pavel Kotucekadb13d62016-12-19 14:35:35 +010077define vxlan_add_del_tunnel_reply
78{
79 u32 context;
80 i32 retval;
Jakub Grajciar7c0eb562020-03-02 13:55:31 +010081 vl_api_interface_index_t sw_if_index;
Pavel Kotucekadb13d62016-12-19 14:35:35 +010082};
Artem Glazychev839dcc02020-12-01 02:39:21 +070083define vxlan_add_del_tunnel_v2_reply
84{
85 u32 context;
86 i32 retval;
87 vl_api_interface_index_t sw_if_index;
88};
Pavel Kotucekadb13d62016-12-19 14:35:35 +010089
90define vxlan_tunnel_dump
91{
92 u32 client_index;
93 u32 context;
Jakub Grajciar7c0eb562020-03-02 13:55:31 +010094 vl_api_interface_index_t sw_if_index;
Pavel Kotucekadb13d62016-12-19 14:35:35 +010095};
Artem Glazychev839dcc02020-12-01 02:39:21 +070096define vxlan_tunnel_v2_dump
97{
98 u32 client_index;
99 u32 context;
100 vl_api_interface_index_t sw_if_index;
101};
Pavel Kotucekadb13d62016-12-19 14:35:35 +0100102
103define vxlan_tunnel_details
104{
105 u32 context;
Jakub Grajciar7c0eb562020-03-02 13:55:31 +0100106 vl_api_interface_index_t sw_if_index;
Jon Loeliger3d460bd2018-02-01 16:36:12 -0600107 u32 instance;
Jakub Grajciar7c0eb562020-03-02 13:55:31 +0100108 vl_api_address_t src_address;
109 vl_api_address_t dst_address;
110 vl_api_interface_index_t mcast_sw_if_index;
Pavel Kotucekadb13d62016-12-19 14:35:35 +0100111 u32 encap_vrf_id;
112 u32 decap_next_index;
113 u32 vni;
Pavel Kotucekadb13d62016-12-19 14:35:35 +0100114};
Artem Glazychev839dcc02020-12-01 02:39:21 +0700115define vxlan_tunnel_v2_details
116{
117 u32 context;
118 vl_api_interface_index_t sw_if_index;
119 u32 instance;
120 vl_api_address_t src_address;
121 vl_api_address_t dst_address;
122 u16 src_port;
123 u16 dst_port;
124 vl_api_interface_index_t mcast_sw_if_index;
125 u32 encap_vrf_id;
126 u32 decap_next_index;
127 u32 vni;
128};
Pavel Kotucekadb13d62016-12-19 14:35:35 +0100129
130/** \brief Interface set vxlan-bypass request
131 @param client_index - opaque cookie to identify the sender
132 @param context - sender context, to match reply w/ request
133 @param sw_if_index - interface used to reach neighbor
134 @param is_ipv6 - if non-zero, enable ipv6-vxlan-bypass, else ipv4-vxlan-bypass
135 @param enable - if non-zero enable, else disable
136*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400137autoreply define sw_interface_set_vxlan_bypass
Pavel Kotucekadb13d62016-12-19 14:35:35 +0100138{
139 u32 client_index;
140 u32 context;
Jakub Grajciar7c0eb562020-03-02 13:55:31 +0100141 vl_api_interface_index_t sw_if_index;
142 bool is_ipv6;
143 bool enable [default=true];
Pavel Kotucekadb13d62016-12-19 14:35:35 +0100144};
eyal bariaf86a482018-04-17 11:20:27 +0300145
146/** \brief Offload vxlan rx request
147 @param client_index - opaque cookie to identify the sender
148 @param context - sender context, to match reply w/ request
149 @param hw_if_index - rx hw interface
150 @param sw_if_index - vxlan interface to offload
151 @param enable - if non-zero enable, else disable
152*/
153autoreply define vxlan_offload_rx
154{
155 u32 client_index;
156 u32 context;
Jakub Grajciar7c0eb562020-03-02 13:55:31 +0100157 vl_api_interface_index_t hw_if_index;
158 vl_api_interface_index_t sw_if_index;
159 bool enable [default=true];
eyal bariaf86a482018-04-17 11:20:27 +0300160};