blob: f79d18c1a6033adb30dd3aec368dde459a3f99fe [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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040046autoreply manual_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 Tehlar82786c42017-02-20 15:20:37 +010063/** \brief enable or disable gpe protocol
Pavel Kotucekabea9662016-12-21 15:50:08 +010064 @param client_index - opaque cookie to identify the sender
65 @param context - sender context, to match reply w/ request
66 @param is_en - enable protocol if non-zero, else disable
67*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040068autoreply define gpe_enable_disable
Pavel Kotucekabea9662016-12-21 15:50:08 +010069{
70 u32 client_index;
71 u32 context;
72 u8 is_en;
73};
74
Pavel Kotucekabea9662016-12-21 15:50:08 +010075/** \brief add or delete gpe_iface
76 @param client_index - opaque cookie to identify the sender
77 @param context - sender context, to match reply w/ request
78 @param is_add - add address if non-zero, else delete
79*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040080autoreply define gpe_add_del_iface
Pavel Kotucekabea9662016-12-21 15:50:08 +010081{
82 u32 client_index;
83 u32 context;
84 u8 is_add;
85 u8 is_l2;
86 u32 dp_table;
87 u32 vni;
88};
89
Filip Tehlar82786c42017-02-20 15:20:37 +010090define gpe_fwd_entries_get
Filip Tehlar5fae99c2017-01-18 12:57:37 +010091{
92 u32 client_index;
93 u32 context;
94 u32 vni;
95};
96
Filip Tehlar82786c42017-02-20 15:20:37 +010097typeonly manual_print manual_endian define gpe_fwd_entry
Filip Tehlar5fae99c2017-01-18 12:57:37 +010098{
99 u32 fwd_entry_index;
100 u32 dp_table;
101 u8 eid_type;
102 u8 leid_prefix_len;
103 u8 reid_prefix_len;
104 u8 leid[16];
105 u8 reid[16];
106};
107
Filip Tehlar82786c42017-02-20 15:20:37 +0100108manual_print manual_endian define gpe_fwd_entries_get_reply
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100109{
110 u32 context;
111 i32 retval;
112 u32 count;
Filip Tehlar82786c42017-02-20 15:20:37 +0100113 vl_api_gpe_fwd_entry_t entries[count];
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100114};
115
Filip Tehlar82786c42017-02-20 15:20:37 +0100116define gpe_fwd_entry_path_dump
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100117{
118 u32 client_index;
119 u32 context;
120 u32 fwd_entry_index;
121};
122
Filip Tehlar82786c42017-02-20 15:20:37 +0100123manual_endian manual_print define gpe_fwd_entry_path_details
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100124{
125 u32 client_index;
126 u32 context;
Filip Tehlar82786c42017-02-20 15:20:37 +0100127 vl_api_gpe_locator_t lcl_loc;
128 vl_api_gpe_locator_t rmt_loc;
Filip Tehlar5fae99c2017-01-18 12:57:37 +0100129};
130
Filip Tehlar3e7b56932017-02-21 18:28:34 +0100131/** \brief Set GPE encapsulation mode
132 @param client_index - opaque cookie to identify the sender
133 @param context - sender context, to match reply w/ request
134 @param mode - LISP (value 0) or VXLAN (value 1)
135*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400136autoreply define gpe_set_encap_mode
Filip Tehlar3e7b56932017-02-21 18:28:34 +0100137{
138 u32 client_index;
139 u32 context;
140 u8 mode;
141};
142
Filip Tehlar3e7b56932017-02-21 18:28:34 +0100143/** \brief get GPE encapsulation mode
144 @param client_index - opaque cookie to identify the sender
145 @param context - sender context, to match reply w/ request
146 @param mode - LISP (value 0) or VXLAN (value 1)
147*/
148define gpe_get_encap_mode
149{
150 u32 client_index;
151 u32 context;
152};
153
154/** \brief Reply for set_encap_mode
155 @param context - returned sender context, to match reply w/ request
156 @param retval - return code
157 @param encap_mode - GPE encapsulation mode
158*/
159define gpe_get_encap_mode_reply
160{
161 u32 context;
162 i32 retval;
163 u8 encap_mode;
164};
165
Pavel Kotucekabea9662016-12-21 15:50:08 +0100166/*
167 * Local Variables:
168 * eval: (c-set-style "gnu")
169 * End:
170 */
Filip Tehlarc3af7bf2017-01-13 14:13:09 +0100171