Fix context field position in API definition
[vpp.git] / src / vnet / lisp-gpe / lisp_gpe.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 = "1.0.0";
17
18 /** \brief GPE locator structure
19     @param is_ip4 - whether addr is IPv4 or v6
20     @param weight - locator weight
21     @param addr - IPv4/6 address
22 */
23 typeonly manual_print manual_endian define gpe_locator
24 {
25   u8 is_ip4;
26   u8 weight;
27   u8 addr[16];
28 };
29
30 /** \brief add or delete GPE tunnel
31     @param client_index - opaque cookie to identify the sender
32     @param context - sender context, to match reply w/ request
33     @param is_add - add address if non-zero, else delete
34     @param eid_type -
35       0 : ipv4
36       1 : ipv6
37       2 : mac
38     @param rmt_eid - remote eid
39     @param lcl_eid - local eid
40     @param rmt_len - remote prefix len
41     @param lcl_len - local prefix len
42     @param vni - virtual network identifier
43     @param dp_table - vrf/bridge domain id
44     @param action - negative action when 0 locators configured
45     @param loc_num - number of locators
46     @param locs - array of remote locators
47 */
48 manual_print manual_endian define gpe_add_del_fwd_entry
49 {
50   u32 client_index;
51   u32 context;
52   u8 is_add;
53   u8 eid_type;
54   u8 rmt_eid[16];
55   u8 lcl_eid[16];
56   u8 rmt_len;
57   u8 lcl_len;
58   u32 vni;
59   u32 dp_table;
60   u8 action;
61   u32 loc_num;
62   vl_api_gpe_locator_t locs[loc_num];
63 };
64
65 define gpe_add_del_fwd_entry_reply
66 {
67   u32 context;
68   i32 retval;
69   u32 fwd_entry_index;
70 };
71
72 /** \brief enable or disable gpe protocol
73     @param client_index - opaque cookie to identify the sender
74     @param context - sender context, to match reply w/ request
75     @param is_en - enable protocol if non-zero, else disable
76 */
77 autoreply define gpe_enable_disable
78 {
79   u32 client_index;
80   u32 context;
81   u8 is_en;
82 };
83
84 /** \brief add or delete gpe_iface
85     @param client_index - opaque cookie to identify the sender
86     @param context - sender context, to match reply w/ request
87     @param is_add - add address if non-zero, else delete
88 */
89 autoreply define gpe_add_del_iface
90 {
91   u32 client_index;
92   u32 context;
93   u8 is_add;
94   u8 is_l2;
95   u32 dp_table;
96   u32 vni;
97 };
98
99 define gpe_fwd_entry_vnis_get
100 {
101   u32 client_index;
102   u32 context;
103 };
104
105 manual_print manual_endian define gpe_fwd_entry_vnis_get_reply
106 {
107   u32 context;
108   i32 retval;
109   u32 count;
110   u32 vnis[count];
111 };
112
113 define gpe_fwd_entries_get
114 {
115   u32 client_index;
116   u32 context;
117   u32 vni;
118 };
119
120 typeonly manual_print manual_endian define gpe_fwd_entry
121 {
122   u32 fwd_entry_index;
123   u32 dp_table;
124   u8 eid_type;
125   u8 leid_prefix_len;
126   u8 reid_prefix_len;
127   u8 leid[16];
128   u8 reid[16];
129   u32 vni;
130   u8 action;
131 };
132
133 manual_print manual_endian define gpe_fwd_entries_get_reply
134 {
135   u32 context;
136   i32 retval;
137   u32 count;
138   vl_api_gpe_fwd_entry_t entries[count];
139 };
140
141 define gpe_fwd_entry_path_dump
142 {
143   u32 client_index;
144   u32 context;
145   u32 fwd_entry_index;
146 };
147
148 manual_endian manual_print define gpe_fwd_entry_path_details
149 {
150   u32 client_index;
151   u32 context;
152   vl_api_gpe_locator_t lcl_loc;
153   vl_api_gpe_locator_t rmt_loc;
154 };
155
156 /** \brief Set GPE encapsulation mode
157     @param client_index - opaque cookie to identify the sender
158     @param context - sender context, to match reply w/ request
159     @param mode - LISP (value 0) or VXLAN (value 1)
160 */
161 autoreply define gpe_set_encap_mode
162 {
163   u32 client_index;
164   u32 context;
165   u8 mode;
166 };
167
168 /** \brief get GPE encapsulation mode
169     @param client_index - opaque cookie to identify the sender
170     @param context - sender context, to match reply w/ request
171     @param mode - LISP (value 0) or VXLAN (value 1)
172 */
173 define gpe_get_encap_mode
174 {
175   u32 client_index;
176   u32 context;
177 };
178
179 /** \brief Reply for set_encap_mode
180     @param context - returned sender context, to match reply w/ request
181     @param retval - return code
182     @param encap_mode - GPE encapsulation mode
183 */
184 define gpe_get_encap_mode_reply
185 {
186   u32 context;
187   i32 retval;
188   u8 encap_mode;
189 };
190
191 /** \brief Add native fwd rpath
192     @param context - returned sender context, to match reply w/ request
193     @param retval - return code
194     @param is_add - flag to indicate add or del
195     @param table_id - table id for route path
196     @param nh_sw_if_index - next-hop sw_if_index (~0 if not set)
197     @param is_ip4 - flag to indicate if nh is ip4
198     @param nh_addr - next hop ip address
199 */
200 autoreply define gpe_add_del_native_fwd_rpath
201 {
202   u32 client_index;
203   u32 context;
204   u8 is_add;
205   u32 table_id;
206   u32 nh_sw_if_index;
207   u8 is_ip4;
208   u8 nh_addr[16];
209 };
210
211 /** \brief get GPE native fwd rpath
212     @param client_index - opaque cookie to identify the sender
213     @param context - sender context, to match reply w/ request
214 */
215 define gpe_native_fwd_rpaths_get
216 {
217   u32 client_index;
218   u32 context;
219   u8 is_ip4;
220 };
221
222 /** \brief Reply for get native fwd rpath
223     @param context - returned sender context, to match reply w/ request
224     @param retval - return code
225     @param table_id - table id for route path
226     @param nh_sw_if_index - next-hop sw_if_index (~0 if not set)
227     @param nh_addr - next hop address
228 */
229 typeonly manual_print manual_endian define gpe_native_fwd_rpath
230 {
231   u32 fib_index;
232   u32 nh_sw_if_index;
233   u8 is_ip4;
234   u8 nh_addr[16];
235 };
236
237 manual_print manual_endian define gpe_native_fwd_rpaths_get_reply
238 {
239   u32 context;
240   i32 retval;
241   u32 count;
242   vl_api_gpe_native_fwd_rpath_t entries[count];
243 };
244
245 /*
246  * Local Variables:
247  * eval: (c-set-style "gnu")
248  * End:
249  */
250