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 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 16 | /** \brief GPE locator structure |
Filip Tehlar | c3af7bf | 2017-01-13 14:13:09 +0100 | [diff] [blame] | 17 | @param is_ip4 - whether addr is IPv4 or v6 |
| 18 | @param weight - locator weight |
| 19 | @param addr - IPv4/6 address |
| 20 | */ |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 21 | typeonly manual_print manual_endian define gpe_locator |
Filip Tehlar | c3af7bf | 2017-01-13 14:13:09 +0100 | [diff] [blame] | 22 | { |
| 23 | u8 is_ip4; |
| 24 | u8 weight; |
| 25 | u8 addr[16]; |
| 26 | }; |
| 27 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 28 | /** \brief add or delete GPE tunnel |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 29 | @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 Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 42 | @param action - negative action when 0 locators configured |
Filip Tehlar | c3af7bf | 2017-01-13 14:13:09 +0100 | [diff] [blame] | 43 | @param loc_num - number of locators |
| 44 | @param locs - array of remote locators |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 45 | */ |
Filip Tehlar | 560274d | 2017-06-05 13:40:13 +0200 | [diff] [blame] | 46 | manual_print manual_endian define gpe_add_del_fwd_entry |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 47 | { |
| 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 Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 58 | u8 action; |
Filip Tehlar | c3af7bf | 2017-01-13 14:13:09 +0100 | [diff] [blame] | 59 | u32 loc_num; |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 60 | vl_api_gpe_locator_t locs[loc_num]; |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 61 | }; |
| 62 | |
Filip Tehlar | 560274d | 2017-06-05 13:40:13 +0200 | [diff] [blame] | 63 | define gpe_add_del_fwd_entry_reply |
| 64 | { |
| 65 | i32 retval; |
| 66 | u32 context; |
| 67 | u32 fwd_entry_index; |
| 68 | }; |
| 69 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 70 | /** \brief enable or disable gpe protocol |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 71 | @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 Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 75 | autoreply define gpe_enable_disable |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 76 | { |
| 77 | u32 client_index; |
| 78 | u32 context; |
| 79 | u8 is_en; |
| 80 | }; |
| 81 | |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 82 | /** \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 Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 87 | autoreply define gpe_add_del_iface |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 88 | { |
| 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 Tehlar | 0eb874e | 2017-05-18 14:23:32 +0200 | [diff] [blame] | 97 | define gpe_fwd_entry_vnis_get |
| 98 | { |
| 99 | u32 client_index; |
| 100 | u32 context; |
| 101 | }; |
| 102 | |
| 103 | manual_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 Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 111 | define gpe_fwd_entries_get |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 112 | { |
| 113 | u32 client_index; |
| 114 | u32 context; |
| 115 | u32 vni; |
| 116 | }; |
| 117 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 118 | typeonly manual_print manual_endian define gpe_fwd_entry |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 119 | { |
| 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 Tehlar | 0eb874e | 2017-05-18 14:23:32 +0200 | [diff] [blame] | 127 | u32 vni; |
| 128 | u8 action; |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 129 | }; |
| 130 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 131 | manual_print manual_endian define gpe_fwd_entries_get_reply |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 132 | { |
| 133 | u32 context; |
| 134 | i32 retval; |
| 135 | u32 count; |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 136 | vl_api_gpe_fwd_entry_t entries[count]; |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 137 | }; |
| 138 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 139 | define gpe_fwd_entry_path_dump |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 140 | { |
| 141 | u32 client_index; |
| 142 | u32 context; |
| 143 | u32 fwd_entry_index; |
| 144 | }; |
| 145 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 146 | manual_endian manual_print define gpe_fwd_entry_path_details |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 147 | { |
| 148 | u32 client_index; |
| 149 | u32 context; |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 150 | vl_api_gpe_locator_t lcl_loc; |
| 151 | vl_api_gpe_locator_t rmt_loc; |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 152 | }; |
| 153 | |
Filip Tehlar | 3e7b5693 | 2017-02-21 18:28:34 +0100 | [diff] [blame] | 154 | /** \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 Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 159 | autoreply define gpe_set_encap_mode |
Filip Tehlar | 3e7b5693 | 2017-02-21 18:28:34 +0100 | [diff] [blame] | 160 | { |
| 161 | u32 client_index; |
| 162 | u32 context; |
| 163 | u8 mode; |
| 164 | }; |
| 165 | |
Filip Tehlar | 3e7b5693 | 2017-02-21 18:28:34 +0100 | [diff] [blame] | 166 | /** \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 | */ |
| 171 | define 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 | */ |
| 182 | define gpe_get_encap_mode_reply |
| 183 | { |
| 184 | u32 context; |
| 185 | i32 retval; |
| 186 | u8 encap_mode; |
| 187 | }; |
| 188 | |
Florin Coras | a4e63e5 | 2017-06-07 21:50:57 -0700 | [diff] [blame] | 189 | /** \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 | */ |
| 198 | autoreply 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 | */ |
| 213 | define 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 | */ |
| 227 | typeonly manual_print manual_endian define gpe_native_fwd_rpath |
| 228 | { |
Florin Coras | a4e63e5 | 2017-06-07 21:50:57 -0700 | [diff] [blame] | 229 | u32 fib_index; |
| 230 | u32 nh_sw_if_index; |
| 231 | u8 is_ip4; |
| 232 | u8 nh_addr[16]; |
| 233 | }; |
| 234 | |
| 235 | manual_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 Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 243 | /* |
| 244 | * Local Variables: |
| 245 | * eval: (c-set-style "gnu") |
| 246 | * End: |
| 247 | */ |
Filip Tehlar | c3af7bf | 2017-01-13 14:13:09 +0100 | [diff] [blame] | 248 | |