blob: 6c751eabffb65bbe8eb1979ce8fbfaf5e6a7fcaa [file] [log] [blame]
Pavel Kotucekabea9662016-12-21 15:50:08 +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
Jakub Grajciar58db6e12020-01-30 13:26:43 +010016option version = "2.0.0";
17
18import "vnet/interface_types.api";
19import "vnet/lisp-cp/lisp_types.api";
Dave Barach0d056e52017-09-28 15:11:16 -040020
Filip Tehlar82786c42017-02-20 15:20:37 +010021/** \brief GPE locator structure
Filip Tehlarc3af7bf2017-01-13 14:13:09 +010022 @param is_ip4 - whether addr is IPv4 or v6
23 @param weight - locator weight
24 @param addr - IPv4/6 address
25*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -040026typedef gpe_locator
Filip Tehlarc3af7bf2017-01-13 14:13:09 +010027{
Filip Tehlarc3af7bf2017-01-13 14:13:09 +010028 u8 weight;
Jakub Grajciar58db6e12020-01-30 13:26:43 +010029 vl_api_address_t addr;
Filip Tehlarc3af7bf2017-01-13 14:13:09 +010030};
31
Filip Tehlar82786c42017-02-20 15:20:37 +010032/** \brief add or delete GPE tunnel
Pavel Kotucekabea9662016-12-21 15:50:08 +010033 @param client_index - opaque cookie to identify the sender
34 @param context - sender context, to match reply w/ request
35 @param is_add - add address if non-zero, else delete
Pavel Kotucekabea9662016-12-21 15:50:08 +010036 @param rmt_eid - remote eid
37 @param lcl_eid - local eid
Pavel Kotucekabea9662016-12-21 15:50:08 +010038 @param vni - virtual network identifier
39 @param dp_table - vrf/bridge domain id
Pavel Kotucekabea9662016-12-21 15:50:08 +010040 @param action - negative action when 0 locators configured
Filip Tehlarc3af7bf2017-01-13 14:13:09 +010041 @param loc_num - number of locators
42 @param locs - array of remote locators
Pavel Kotucekabea9662016-12-21 15:50:08 +010043*/
Filip Tehlar560274d2017-06-05 13:40:13 +020044manual_print manual_endian define gpe_add_del_fwd_entry
Pavel Kotucekabea9662016-12-21 15:50:08 +010045{
46 u32 client_index;
47 u32 context;
Jakub Grajciar58db6e12020-01-30 13:26:43 +010048 bool is_add [default=true];
49 vl_api_eid_t rmt_eid;
50 vl_api_eid_t lcl_eid;
Pavel Kotucekabea9662016-12-21 15:50:08 +010051 u32 vni;
52 u32 dp_table;
Pavel Kotucekabea9662016-12-21 15:50:08 +010053 u8 action;
Filip Tehlarc3af7bf2017-01-13 14:13:09 +010054 u32 loc_num;
Filip Tehlar82786c42017-02-20 15:20:37 +010055 vl_api_gpe_locator_t locs[loc_num];
Pavel Kotucekabea9662016-12-21 15:50:08 +010056};
57
Filip Tehlar560274d2017-06-05 13:40:13 +020058define gpe_add_del_fwd_entry_reply
59{
Filip Tehlar560274d2017-06-05 13:40:13 +020060 u32 context;
Ondrej Fabryb11f9032018-08-14 12:39:40 +020061 i32 retval;
Filip Tehlar560274d2017-06-05 13:40:13 +020062 u32 fwd_entry_index;
63};
64
Filip Tehlar82786c42017-02-20 15:20:37 +010065/** \brief enable or disable gpe protocol
Pavel Kotucekabea9662016-12-21 15:50:08 +010066 @param client_index - opaque cookie to identify the sender
67 @param context - sender context, to match reply w/ request
Jakub Grajciar58db6e12020-01-30 13:26:43 +010068 @param is_enable [default=true] - enable protocol if non-zero, else disable
Pavel Kotucekabea9662016-12-21 15:50:08 +010069*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040070autoreply define gpe_enable_disable
Pavel Kotucekabea9662016-12-21 15:50:08 +010071{
72 u32 client_index;
73 u32 context;
Jakub Grajciar58db6e12020-01-30 13:26:43 +010074 bool is_enable [default=true];
Pavel Kotucekabea9662016-12-21 15:50:08 +010075};
76
Pavel Kotucekabea9662016-12-21 15:50:08 +010077/** \brief add or delete gpe_iface
78 @param client_index - opaque cookie to identify the sender
79 @param context - sender context, to match reply w/ request
80 @param is_add - add address if non-zero, else delete
81*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040082autoreply define gpe_add_del_iface
Pavel Kotucekabea9662016-12-21 15:50:08 +010083{
84 u32 client_index;
85 u32 context;
Jakub Grajciar58db6e12020-01-30 13:26:43 +010086 bool is_add [default=true];
87 bool is_l2;
Pavel Kotucekabea9662016-12-21 15:50:08 +010088 u32 dp_table;
89 u32 vni;
90};
91
Filip Tehlar0eb874e2017-05-18 14:23:32 +020092define gpe_fwd_entry_vnis_get
93{
94 u32 client_index;
95 u32 context;
96};
97
98manual_print manual_endian define gpe_fwd_entry_vnis_get_reply
99{
100 u32 context;
101 i32 retval;
102 u32 count;
103 u32 vnis[count];
104};
105
Filip Tehlar82786c42017-02-20 15:20:37 +0100106define gpe_fwd_entries_get
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100107{
108 u32 client_index;
109 u32 context;
110 u32 vni;
111};
112
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400113typedef gpe_fwd_entry
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100114{
115 u32 fwd_entry_index;
116 u32 dp_table;
Jakub Grajciar58db6e12020-01-30 13:26:43 +0100117 vl_api_eid_t leid;
118 vl_api_eid_t reid;
Filip Tehlar0eb874e2017-05-18 14:23:32 +0200119 u32 vni;
120 u8 action;
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100121};
122
Filip Tehlar82786c42017-02-20 15:20:37 +0100123manual_print manual_endian define gpe_fwd_entries_get_reply
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100124{
125 u32 context;
126 i32 retval;
127 u32 count;
Filip Tehlar82786c42017-02-20 15:20:37 +0100128 vl_api_gpe_fwd_entry_t entries[count];
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100129};
130
Filip Tehlar82786c42017-02-20 15:20:37 +0100131define gpe_fwd_entry_path_dump
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100132{
133 u32 client_index;
134 u32 context;
135 u32 fwd_entry_index;
136};
137
Filip Tehlar82786c42017-02-20 15:20:37 +0100138manual_endian manual_print define gpe_fwd_entry_path_details
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100139{
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100140 u32 context;
Filip Tehlar82786c42017-02-20 15:20:37 +0100141 vl_api_gpe_locator_t lcl_loc;
142 vl_api_gpe_locator_t rmt_loc;
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100143};
144
Filip Tehlar3e7b56932017-02-21 18:28:34 +0100145/** \brief Set GPE encapsulation mode
146 @param client_index - opaque cookie to identify the sender
147 @param context - sender context, to match reply w/ request
148 @param mode - LISP (value 0) or VXLAN (value 1)
149*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400150autoreply define gpe_set_encap_mode
Filip Tehlar3e7b56932017-02-21 18:28:34 +0100151{
152 u32 client_index;
153 u32 context;
Jakub Grajciar58db6e12020-01-30 13:26:43 +0100154 bool is_vxlan;
Filip Tehlar3e7b56932017-02-21 18:28:34 +0100155};
156
Filip Tehlar3e7b56932017-02-21 18:28:34 +0100157/** \brief get GPE encapsulation mode
158 @param client_index - opaque cookie to identify the sender
159 @param context - sender context, to match reply w/ request
160 @param mode - LISP (value 0) or VXLAN (value 1)
161*/
162define gpe_get_encap_mode
163{
164 u32 client_index;
165 u32 context;
166};
167
168/** \brief Reply for set_encap_mode
169 @param context - returned sender context, to match reply w/ request
170 @param retval - return code
171 @param encap_mode - GPE encapsulation mode
172*/
173define gpe_get_encap_mode_reply
174{
175 u32 context;
176 i32 retval;
Jakub Grajciar58db6e12020-01-30 13:26:43 +0100177 /* FIXME: gpe encap enum */
Filip Tehlar3e7b56932017-02-21 18:28:34 +0100178 u8 encap_mode;
179};
180
Florin Corasa4e63e52017-06-07 21:50:57 -0700181/** \brief Add native fwd rpath
182 @param context - returned sender context, to match reply w/ request
183 @param retval - return code
184 @param is_add - flag to indicate add or del
185 @param table_id - table id for route path
186 @param nh_sw_if_index - next-hop sw_if_index (~0 if not set)
187 @param is_ip4 - flag to indicate if nh is ip4
188 @param nh_addr - next hop ip address
189*/
190autoreply define gpe_add_del_native_fwd_rpath
191{
192 u32 client_index;
193 u32 context;
Jakub Grajciar58db6e12020-01-30 13:26:43 +0100194 bool is_add [default=true];
Florin Corasa4e63e52017-06-07 21:50:57 -0700195 u32 table_id;
Jakub Grajciar58db6e12020-01-30 13:26:43 +0100196 vl_api_interface_index_t nh_sw_if_index;
197 vl_api_address_t nh_addr;
Florin Corasa4e63e52017-06-07 21:50:57 -0700198};
199
200/** \brief get GPE native fwd rpath
201 @param client_index - opaque cookie to identify the sender
202 @param context - sender context, to match reply w/ request
203*/
204define gpe_native_fwd_rpaths_get
205{
206 u32 client_index;
207 u32 context;
Jakub Grajciar58db6e12020-01-30 13:26:43 +0100208 bool is_ip4;
Florin Corasa4e63e52017-06-07 21:50:57 -0700209};
210
211/** \brief Reply for get native fwd rpath
212 @param context - returned sender context, to match reply w/ request
213 @param retval - return code
214 @param table_id - table id for route path
215 @param nh_sw_if_index - next-hop sw_if_index (~0 if not set)
216 @param nh_addr - next hop address
217*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400218typedef gpe_native_fwd_rpath
Florin Corasa4e63e52017-06-07 21:50:57 -0700219{
Florin Corasa4e63e52017-06-07 21:50:57 -0700220 u32 fib_index;
Jakub Grajciar58db6e12020-01-30 13:26:43 +0100221 vl_api_interface_index_t nh_sw_if_index;
222 vl_api_address_t nh_addr;
Florin Corasa4e63e52017-06-07 21:50:57 -0700223};
224
225manual_print manual_endian define gpe_native_fwd_rpaths_get_reply
226{
227 u32 context;
228 i32 retval;
229 u32 count;
230 vl_api_gpe_native_fwd_rpath_t entries[count];
231};
232
Pavel Kotucekabea9662016-12-21 15:50:08 +0100233/*
234 * Local Variables:
235 * eval: (c-set-style "gnu")
236 * End:
237 */