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 | |
Ole Troan | 9d42087 | 2017-10-12 13:06:35 +0200 | [diff] [blame] | 16 | option version = "1.0.0"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 17 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 18 | /** \brief GPE locator structure |
Filip Tehlar | c3af7bf | 2017-01-13 14:13:09 +0100 | [diff] [blame] | 19 | @param is_ip4 - whether addr is IPv4 or v6 |
| 20 | @param weight - locator weight |
| 21 | @param addr - IPv4/6 address |
| 22 | */ |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 23 | typeonly manual_print manual_endian define gpe_locator |
Filip Tehlar | c3af7bf | 2017-01-13 14:13:09 +0100 | [diff] [blame] | 24 | { |
| 25 | u8 is_ip4; |
| 26 | u8 weight; |
| 27 | u8 addr[16]; |
| 28 | }; |
| 29 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 30 | /** \brief add or delete GPE tunnel |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 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 |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 44 | @param action - negative action when 0 locators configured |
Filip Tehlar | c3af7bf | 2017-01-13 14:13:09 +0100 | [diff] [blame] | 45 | @param loc_num - number of locators |
| 46 | @param locs - array of remote locators |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 47 | */ |
Filip Tehlar | 560274d | 2017-06-05 13:40:13 +0200 | [diff] [blame] | 48 | manual_print manual_endian define gpe_add_del_fwd_entry |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 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; |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 60 | u8 action; |
Filip Tehlar | c3af7bf | 2017-01-13 14:13:09 +0100 | [diff] [blame] | 61 | u32 loc_num; |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 62 | vl_api_gpe_locator_t locs[loc_num]; |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 63 | }; |
| 64 | |
Filip Tehlar | 560274d | 2017-06-05 13:40:13 +0200 | [diff] [blame] | 65 | define gpe_add_del_fwd_entry_reply |
| 66 | { |
Filip Tehlar | 560274d | 2017-06-05 13:40:13 +0200 | [diff] [blame] | 67 | u32 context; |
Ondrej Fabry | b11f903 | 2018-08-14 12:39:40 +0200 | [diff] [blame] | 68 | i32 retval; |
Filip Tehlar | 560274d | 2017-06-05 13:40:13 +0200 | [diff] [blame] | 69 | u32 fwd_entry_index; |
| 70 | }; |
| 71 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 72 | /** \brief enable or disable gpe protocol |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 77 | autoreply define gpe_enable_disable |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 78 | { |
| 79 | u32 client_index; |
| 80 | u32 context; |
| 81 | u8 is_en; |
| 82 | }; |
| 83 | |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 89 | autoreply define gpe_add_del_iface |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 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 | |
Filip Tehlar | 0eb874e | 2017-05-18 14:23:32 +0200 | [diff] [blame] | 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 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 113 | define gpe_fwd_entries_get |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 114 | { |
| 115 | u32 client_index; |
| 116 | u32 context; |
| 117 | u32 vni; |
| 118 | }; |
| 119 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 120 | typeonly manual_print manual_endian define gpe_fwd_entry |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 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]; |
Filip Tehlar | 0eb874e | 2017-05-18 14:23:32 +0200 | [diff] [blame] | 129 | u32 vni; |
| 130 | u8 action; |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 131 | }; |
| 132 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 133 | manual_print manual_endian define gpe_fwd_entries_get_reply |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 134 | { |
| 135 | u32 context; |
| 136 | i32 retval; |
| 137 | u32 count; |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 138 | vl_api_gpe_fwd_entry_t entries[count]; |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 139 | }; |
| 140 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 141 | define gpe_fwd_entry_path_dump |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 142 | { |
| 143 | u32 client_index; |
| 144 | u32 context; |
| 145 | u32 fwd_entry_index; |
| 146 | }; |
| 147 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 148 | manual_endian manual_print define gpe_fwd_entry_path_details |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 149 | { |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 150 | u32 context; |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 151 | vl_api_gpe_locator_t lcl_loc; |
| 152 | vl_api_gpe_locator_t rmt_loc; |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 153 | }; |
| 154 | |
Filip Tehlar | 3e7b5693 | 2017-02-21 18:28:34 +0100 | [diff] [blame] | 155 | /** \brief Set GPE encapsulation mode |
| 156 | @param client_index - opaque cookie to identify the sender |
| 157 | @param context - sender context, to match reply w/ request |
| 158 | @param mode - LISP (value 0) or VXLAN (value 1) |
| 159 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 160 | autoreply define gpe_set_encap_mode |
Filip Tehlar | 3e7b5693 | 2017-02-21 18:28:34 +0100 | [diff] [blame] | 161 | { |
| 162 | u32 client_index; |
| 163 | u32 context; |
| 164 | u8 mode; |
| 165 | }; |
| 166 | |
Filip Tehlar | 3e7b5693 | 2017-02-21 18:28:34 +0100 | [diff] [blame] | 167 | /** \brief get GPE encapsulation mode |
| 168 | @param client_index - opaque cookie to identify the sender |
| 169 | @param context - sender context, to match reply w/ request |
| 170 | @param mode - LISP (value 0) or VXLAN (value 1) |
| 171 | */ |
| 172 | define gpe_get_encap_mode |
| 173 | { |
| 174 | u32 client_index; |
| 175 | u32 context; |
| 176 | }; |
| 177 | |
| 178 | /** \brief Reply for set_encap_mode |
| 179 | @param context - returned sender context, to match reply w/ request |
| 180 | @param retval - return code |
| 181 | @param encap_mode - GPE encapsulation mode |
| 182 | */ |
| 183 | define gpe_get_encap_mode_reply |
| 184 | { |
| 185 | u32 context; |
| 186 | i32 retval; |
| 187 | u8 encap_mode; |
| 188 | }; |
| 189 | |
Florin Coras | a4e63e5 | 2017-06-07 21:50:57 -0700 | [diff] [blame] | 190 | /** \brief Add native fwd rpath |
| 191 | @param context - returned sender context, to match reply w/ request |
| 192 | @param retval - return code |
| 193 | @param is_add - flag to indicate add or del |
| 194 | @param table_id - table id for route path |
| 195 | @param nh_sw_if_index - next-hop sw_if_index (~0 if not set) |
| 196 | @param is_ip4 - flag to indicate if nh is ip4 |
| 197 | @param nh_addr - next hop ip address |
| 198 | */ |
| 199 | autoreply define gpe_add_del_native_fwd_rpath |
| 200 | { |
| 201 | u32 client_index; |
| 202 | u32 context; |
| 203 | u8 is_add; |
| 204 | u32 table_id; |
| 205 | u32 nh_sw_if_index; |
| 206 | u8 is_ip4; |
| 207 | u8 nh_addr[16]; |
| 208 | }; |
| 209 | |
| 210 | /** \brief get GPE native fwd rpath |
| 211 | @param client_index - opaque cookie to identify the sender |
| 212 | @param context - sender context, to match reply w/ request |
| 213 | */ |
| 214 | define gpe_native_fwd_rpaths_get |
| 215 | { |
| 216 | u32 client_index; |
| 217 | u32 context; |
| 218 | u8 is_ip4; |
| 219 | }; |
| 220 | |
| 221 | /** \brief Reply for get native fwd rpath |
| 222 | @param context - returned sender context, to match reply w/ request |
| 223 | @param retval - return code |
| 224 | @param table_id - table id for route path |
| 225 | @param nh_sw_if_index - next-hop sw_if_index (~0 if not set) |
| 226 | @param nh_addr - next hop address |
| 227 | */ |
| 228 | typeonly manual_print manual_endian define gpe_native_fwd_rpath |
| 229 | { |
Florin Coras | a4e63e5 | 2017-06-07 21:50:57 -0700 | [diff] [blame] | 230 | u32 fib_index; |
| 231 | u32 nh_sw_if_index; |
| 232 | u8 is_ip4; |
| 233 | u8 nh_addr[16]; |
| 234 | }; |
| 235 | |
| 236 | manual_print manual_endian define gpe_native_fwd_rpaths_get_reply |
| 237 | { |
| 238 | u32 context; |
| 239 | i32 retval; |
| 240 | u32 count; |
| 241 | vl_api_gpe_native_fwd_rpath_t entries[count]; |
| 242 | }; |
| 243 | |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 244 | /* |
| 245 | * Local Variables: |
| 246 | * eval: (c-set-style "gnu") |
| 247 | * End: |
| 248 | */ |
Filip Tehlar | c3af7bf | 2017-01-13 14:13:09 +0100 | [diff] [blame] | 249 | |