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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 46 | autoreply 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 | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 63 | /** \brief enable or disable gpe protocol |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 64 | @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 Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 68 | autoreply define gpe_enable_disable |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 69 | { |
| 70 | u32 client_index; |
| 71 | u32 context; |
| 72 | u8 is_en; |
| 73 | }; |
| 74 | |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 75 | /** \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 Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 80 | autoreply define gpe_add_del_iface |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 81 | { |
| 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 Tehlar | 0eb874e | 2017-05-18 14:23:32 +0200 | [diff] [blame] | 90 | define gpe_fwd_entry_vnis_get |
| 91 | { |
| 92 | u32 client_index; |
| 93 | u32 context; |
| 94 | }; |
| 95 | |
| 96 | manual_print manual_endian define gpe_fwd_entry_vnis_get_reply |
| 97 | { |
| 98 | u32 context; |
| 99 | i32 retval; |
| 100 | u32 count; |
| 101 | u32 vnis[count]; |
| 102 | }; |
| 103 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 104 | define gpe_fwd_entries_get |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 105 | { |
| 106 | u32 client_index; |
| 107 | u32 context; |
| 108 | u32 vni; |
| 109 | }; |
| 110 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 111 | typeonly manual_print manual_endian define gpe_fwd_entry |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 112 | { |
| 113 | u32 fwd_entry_index; |
| 114 | u32 dp_table; |
| 115 | u8 eid_type; |
| 116 | u8 leid_prefix_len; |
| 117 | u8 reid_prefix_len; |
| 118 | u8 leid[16]; |
| 119 | u8 reid[16]; |
Filip Tehlar | 0eb874e | 2017-05-18 14:23:32 +0200 | [diff] [blame] | 120 | u32 vni; |
| 121 | u8 action; |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 122 | }; |
| 123 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 124 | manual_print manual_endian define gpe_fwd_entries_get_reply |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 125 | { |
| 126 | u32 context; |
| 127 | i32 retval; |
| 128 | u32 count; |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 129 | vl_api_gpe_fwd_entry_t entries[count]; |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 130 | }; |
| 131 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 132 | define gpe_fwd_entry_path_dump |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 133 | { |
| 134 | u32 client_index; |
| 135 | u32 context; |
| 136 | u32 fwd_entry_index; |
| 137 | }; |
| 138 | |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 139 | manual_endian manual_print define gpe_fwd_entry_path_details |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 140 | { |
| 141 | u32 client_index; |
| 142 | u32 context; |
Filip Tehlar | 82786c4 | 2017-02-20 15:20:37 +0100 | [diff] [blame] | 143 | vl_api_gpe_locator_t lcl_loc; |
| 144 | vl_api_gpe_locator_t rmt_loc; |
Filip Tehlar | 5fae99c | 2017-01-18 12:57:37 +0100 | [diff] [blame] | 145 | }; |
| 146 | |
Filip Tehlar | 3e7b5693 | 2017-02-21 18:28:34 +0100 | [diff] [blame] | 147 | /** \brief Set GPE encapsulation mode |
| 148 | @param client_index - opaque cookie to identify the sender |
| 149 | @param context - sender context, to match reply w/ request |
| 150 | @param mode - LISP (value 0) or VXLAN (value 1) |
| 151 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 152 | autoreply define gpe_set_encap_mode |
Filip Tehlar | 3e7b5693 | 2017-02-21 18:28:34 +0100 | [diff] [blame] | 153 | { |
| 154 | u32 client_index; |
| 155 | u32 context; |
| 156 | u8 mode; |
| 157 | }; |
| 158 | |
Filip Tehlar | 3e7b5693 | 2017-02-21 18:28:34 +0100 | [diff] [blame] | 159 | /** \brief get GPE encapsulation mode |
| 160 | @param client_index - opaque cookie to identify the sender |
| 161 | @param context - sender context, to match reply w/ request |
| 162 | @param mode - LISP (value 0) or VXLAN (value 1) |
| 163 | */ |
| 164 | define gpe_get_encap_mode |
| 165 | { |
| 166 | u32 client_index; |
| 167 | u32 context; |
| 168 | }; |
| 169 | |
| 170 | /** \brief Reply for set_encap_mode |
| 171 | @param context - returned sender context, to match reply w/ request |
| 172 | @param retval - return code |
| 173 | @param encap_mode - GPE encapsulation mode |
| 174 | */ |
| 175 | define gpe_get_encap_mode_reply |
| 176 | { |
| 177 | u32 context; |
| 178 | i32 retval; |
| 179 | u8 encap_mode; |
| 180 | }; |
| 181 | |
Pavel Kotucek | abea966 | 2016-12-21 15:50:08 +0100 | [diff] [blame] | 182 | /* |
| 183 | * Local Variables: |
| 184 | * eval: (c-set-style "gnu") |
| 185 | * End: |
| 186 | */ |
Filip Tehlar | c3af7bf | 2017-01-13 14:13:09 +0100 | [diff] [blame] | 187 | |