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