blob: 07ee3d7bf77c37e2907bd75312256b52fa18e61f [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
Filip Tehlar82786c42017-02-20 15:20:37 +010016/** \brief GPE locator structure
Filip Tehlarc3af7bf2017-01-13 14:13:09 +010017 @param is_ip4 - whether addr is IPv4 or v6
18 @param weight - locator weight
19 @param addr - IPv4/6 address
20*/
Filip Tehlar82786c42017-02-20 15:20:37 +010021typeonly manual_print manual_endian define gpe_locator
Filip Tehlarc3af7bf2017-01-13 14:13:09 +010022{
23 u8 is_ip4;
24 u8 weight;
25 u8 addr[16];
26};
27
Filip Tehlar82786c42017-02-20 15:20:37 +010028/** \brief add or delete GPE tunnel
Pavel Kotucekabea9662016-12-21 15:50:08 +010029 @param client_index - opaque cookie to identify the sender
30 @param context - sender context, to match reply w/ request
31 @param is_add - add address if non-zero, else delete
32 @param eid_type -
33 0 : ipv4
34 1 : ipv6
35 2 : mac
36 @param rmt_eid - remote eid
37 @param lcl_eid - local eid
38 @param rmt_len - remote prefix len
39 @param lcl_len - local prefix len
40 @param vni - virtual network identifier
41 @param dp_table - vrf/bridge domain id
Pavel Kotucekabea9662016-12-21 15:50:08 +010042 @param action - negative action when 0 locators configured
Filip Tehlarc3af7bf2017-01-13 14:13:09 +010043 @param loc_num - number of locators
44 @param locs - array of remote locators
Pavel Kotucekabea9662016-12-21 15:50:08 +010045*/
Filip Tehlar560274d2017-06-05 13:40:13 +020046manual_print manual_endian define gpe_add_del_fwd_entry
Pavel Kotucekabea9662016-12-21 15:50:08 +010047{
48 u32 client_index;
49 u32 context;
50 u8 is_add;
51 u8 eid_type;
52 u8 rmt_eid[16];
53 u8 lcl_eid[16];
54 u8 rmt_len;
55 u8 lcl_len;
56 u32 vni;
57 u32 dp_table;
Pavel Kotucekabea9662016-12-21 15:50:08 +010058 u8 action;
Filip Tehlarc3af7bf2017-01-13 14:13:09 +010059 u32 loc_num;
Filip Tehlar82786c42017-02-20 15:20:37 +010060 vl_api_gpe_locator_t locs[loc_num];
Pavel Kotucekabea9662016-12-21 15:50:08 +010061};
62
Filip Tehlar560274d2017-06-05 13:40:13 +020063define gpe_add_del_fwd_entry_reply
64{
65 i32 retval;
66 u32 context;
67 u32 fwd_entry_index;
68};
69
Filip Tehlar82786c42017-02-20 15:20:37 +010070/** \brief enable or disable gpe protocol
Pavel Kotucekabea9662016-12-21 15:50:08 +010071 @param client_index - opaque cookie to identify the sender
72 @param context - sender context, to match reply w/ request
73 @param is_en - enable protocol if non-zero, else disable
74*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040075autoreply define gpe_enable_disable
Pavel Kotucekabea9662016-12-21 15:50:08 +010076{
77 u32 client_index;
78 u32 context;
79 u8 is_en;
80};
81
Pavel Kotucekabea9662016-12-21 15:50:08 +010082/** \brief add or delete gpe_iface
83 @param client_index - opaque cookie to identify the sender
84 @param context - sender context, to match reply w/ request
85 @param is_add - add address if non-zero, else delete
86*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040087autoreply define gpe_add_del_iface
Pavel Kotucekabea9662016-12-21 15:50:08 +010088{
89 u32 client_index;
90 u32 context;
91 u8 is_add;
92 u8 is_l2;
93 u32 dp_table;
94 u32 vni;
95};
96
Filip Tehlar0eb874e2017-05-18 14:23:32 +020097define gpe_fwd_entry_vnis_get
98{
99 u32 client_index;
100 u32 context;
101};
102
103manual_print manual_endian define gpe_fwd_entry_vnis_get_reply
104{
105 u32 context;
106 i32 retval;
107 u32 count;
108 u32 vnis[count];
109};
110
Filip Tehlar82786c42017-02-20 15:20:37 +0100111define gpe_fwd_entries_get
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100112{
113 u32 client_index;
114 u32 context;
115 u32 vni;
116};
117
Filip Tehlar82786c42017-02-20 15:20:37 +0100118typeonly manual_print manual_endian define gpe_fwd_entry
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100119{
120 u32 fwd_entry_index;
121 u32 dp_table;
122 u8 eid_type;
123 u8 leid_prefix_len;
124 u8 reid_prefix_len;
125 u8 leid[16];
126 u8 reid[16];
Filip Tehlar0eb874e2017-05-18 14:23:32 +0200127 u32 vni;
128 u8 action;
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100129};
130
Filip Tehlar82786c42017-02-20 15:20:37 +0100131manual_print manual_endian define gpe_fwd_entries_get_reply
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100132{
133 u32 context;
134 i32 retval;
135 u32 count;
Filip Tehlar82786c42017-02-20 15:20:37 +0100136 vl_api_gpe_fwd_entry_t entries[count];
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100137};
138
Filip Tehlar82786c42017-02-20 15:20:37 +0100139define gpe_fwd_entry_path_dump
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100140{
141 u32 client_index;
142 u32 context;
143 u32 fwd_entry_index;
144};
145
Filip Tehlar82786c42017-02-20 15:20:37 +0100146manual_endian manual_print define gpe_fwd_entry_path_details
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100147{
148 u32 client_index;
149 u32 context;
Filip Tehlar82786c42017-02-20 15:20:37 +0100150 vl_api_gpe_locator_t lcl_loc;
151 vl_api_gpe_locator_t rmt_loc;
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100152};
153
Filip Tehlar3e7b56932017-02-21 18:28:34 +0100154/** \brief Set GPE encapsulation mode
155 @param client_index - opaque cookie to identify the sender
156 @param context - sender context, to match reply w/ request
157 @param mode - LISP (value 0) or VXLAN (value 1)
158*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400159autoreply define gpe_set_encap_mode
Filip Tehlar3e7b56932017-02-21 18:28:34 +0100160{
161 u32 client_index;
162 u32 context;
163 u8 mode;
164};
165
Filip Tehlar3e7b56932017-02-21 18:28:34 +0100166/** \brief get GPE encapsulation mode
167 @param client_index - opaque cookie to identify the sender
168 @param context - sender context, to match reply w/ request
169 @param mode - LISP (value 0) or VXLAN (value 1)
170*/
171define gpe_get_encap_mode
172{
173 u32 client_index;
174 u32 context;
175};
176
177/** \brief Reply for set_encap_mode
178 @param context - returned sender context, to match reply w/ request
179 @param retval - return code
180 @param encap_mode - GPE encapsulation mode
181*/
182define gpe_get_encap_mode_reply
183{
184 u32 context;
185 i32 retval;
186 u8 encap_mode;
187};
188
Florin Corasa4e63e52017-06-07 21:50:57 -0700189/** \brief Add native fwd rpath
190 @param context - returned sender context, to match reply w/ request
191 @param retval - return code
192 @param is_add - flag to indicate add or del
193 @param table_id - table id for route path
194 @param nh_sw_if_index - next-hop sw_if_index (~0 if not set)
195 @param is_ip4 - flag to indicate if nh is ip4
196 @param nh_addr - next hop ip address
197*/
198autoreply define gpe_add_del_native_fwd_rpath
199{
200 u32 client_index;
201 u32 context;
202 u8 is_add;
203 u32 table_id;
204 u32 nh_sw_if_index;
205 u8 is_ip4;
206 u8 nh_addr[16];
207};
208
209/** \brief get GPE native fwd rpath
210 @param client_index - opaque cookie to identify the sender
211 @param context - sender context, to match reply w/ request
212*/
213define gpe_native_fwd_rpaths_get
214{
215 u32 client_index;
216 u32 context;
217 u8 is_ip4;
218};
219
220/** \brief Reply for get native fwd rpath
221 @param context - returned sender context, to match reply w/ request
222 @param retval - return code
223 @param table_id - table id for route path
224 @param nh_sw_if_index - next-hop sw_if_index (~0 if not set)
225 @param nh_addr - next hop address
226*/
227typeonly manual_print manual_endian define gpe_native_fwd_rpath
228{
Florin Corasa4e63e52017-06-07 21:50:57 -0700229 u32 fib_index;
230 u32 nh_sw_if_index;
231 u8 is_ip4;
232 u8 nh_addr[16];
233};
234
235manual_print manual_endian define gpe_native_fwd_rpaths_get_reply
236{
237 u32 context;
238 i32 retval;
239 u32 count;
240 vl_api_gpe_native_fwd_rpath_t entries[count];
241};
242
Pavel Kotucekabea9662016-12-21 15:50:08 +0100243/*
244 * Local Variables:
245 * eval: (c-set-style "gnu")
246 * End:
247 */
Filip Tehlarc3af7bf2017-01-13 14:13:09 +0100248