Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 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 | |
| 16 | /** \file |
| 17 | |
| 18 | This file defines vpp BIER control-plane API messages which are generally |
| 19 | called through a shared memory interface. |
| 20 | */ |
Neale Ranns | 31ed744 | 2018-02-23 05:29:09 -0800 | [diff] [blame] | 21 | option version = "1.1.0"; |
Ole Troan | 9d42087 | 2017-10-12 13:06:35 +0200 | [diff] [blame] | 22 | import "vnet/fib/fib_types.api"; |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 23 | |
| 24 | /** \brief BIER Table Indentifier |
Neale Ranns | fa1da15 | 2017-12-12 05:32:50 -0800 | [diff] [blame] | 25 | @param bt_set - The BIER set |
| 26 | @param bt_sub_domain - the sud-domain |
| 27 | @param bt_bit_header_length - the number of bits in the header length |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 28 | */ |
| 29 | typeonly define bier_table_id |
| 30 | { |
| 31 | u8 bt_set; |
| 32 | u8 bt_sub_domain; |
| 33 | u8 bt_hdr_len_id; |
| 34 | }; |
| 35 | |
| 36 | /** \brief BIER Table Add / del route |
| 37 | @param client_index - opaque cookie to identify the sender |
| 38 | @param context - sender context, to match reply w/ request |
| 39 | @param bt_tbl_id - The BIER table-id the route is added in |
Neale Ranns | 9128637 | 2017-12-05 13:24:04 -0800 | [diff] [blame] | 40 | @param bt_label - The MPLS label for the table (0 or all ones means not set) |
| 41 | If the label is not set, then it is assumed that non-MPLS |
| 42 | encoding is used. |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 43 | @param bt_is_add - Is this a route add or delete |
| 44 | */ |
| 45 | autoreply define bier_table_add_del |
| 46 | { |
| 47 | u32 client_index; |
| 48 | u32 context; |
| 49 | vl_api_bier_table_id_t bt_tbl_id; |
| 50 | u32 bt_label; |
| 51 | u8 bt_is_add; |
| 52 | }; |
| 53 | |
| 54 | define bier_table_dump |
| 55 | { |
| 56 | u32 client_index; |
| 57 | u32 context; |
| 58 | }; |
| 59 | |
| 60 | define bier_table_details |
| 61 | { |
| 62 | u32 context; |
| 63 | u32 bt_label; |
| 64 | vl_api_bier_table_id_t bt_tbl_id; |
| 65 | }; |
| 66 | |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 67 | /** \brief BIER Route Add / del route |
| 68 | @param client_index - opaque cookie to identify the sender |
| 69 | @param context - sender context, to match reply w/ request |
| 70 | @param br_bp - The Bit-position value |
| 71 | @param br_tbl_id - The BIER table-id the route is added in |
| 72 | @param br_is_add - Is this a route add or delete |
| 73 | @param br_is_replace - Are the paths specfied replacing those already |
| 74 | present or are they to be combined. |
| 75 | @param br_n_paths - The number of paths |
| 76 | @param br_paths - The array of paths |
| 77 | */ |
| 78 | autoreply define bier_route_add_del |
| 79 | { |
| 80 | u32 client_index; |
| 81 | u32 context; |
Neale Ranns | be302d7 | 2017-12-19 01:34:30 -0800 | [diff] [blame] | 82 | u32 br_bp; |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 83 | u8 br_is_add; |
| 84 | u8 br_is_replace; |
| 85 | vl_api_bier_table_id_t br_tbl_id; |
| 86 | u8 br_n_paths; |
Neale Ranns | 31ed744 | 2018-02-23 05:29:09 -0800 | [diff] [blame] | 87 | vl_api_fib_path_t br_paths[br_n_paths]; |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 88 | }; |
| 89 | |
| 90 | define bier_route_dump |
| 91 | { |
| 92 | u32 client_index; |
| 93 | u32 context; |
| 94 | vl_api_bier_table_id_t br_tbl_id; |
| 95 | }; |
| 96 | |
| 97 | define bier_route_details |
| 98 | { |
| 99 | u32 client_index; |
| 100 | u32 context; |
| 101 | u16 br_bp; |
| 102 | vl_api_bier_table_id_t br_tbl_id; |
| 103 | u32 br_n_paths; |
Neale Ranns | 31ed744 | 2018-02-23 05:29:09 -0800 | [diff] [blame] | 104 | vl_api_fib_path_t br_paths[br_n_paths]; |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 105 | }; |
| 106 | |
| 107 | /** \brief BIER Imposition Add |
| 108 | @param client_index - opaque cookie to identify the sender |
| 109 | @param context - sender context, to match reply w/ request |
| 110 | @param bi_tbl_id - The BIER table-id used to forward post encap |
| 111 | @param bi_src - The source Bit-position in the encap. |
Neale Ranns | f051072 | 2018-01-31 11:35:41 -0800 | [diff] [blame] | 112 | @param bi_n_bytes - The number of bytes in the following bit-string. |
| 113 | VPP only supports BSL of 1024 and less, so this is |
| 114 | a u8 field. |
Neale Ranns | fa1da15 | 2017-12-12 05:32:50 -0800 | [diff] [blame] | 115 | @param bi_bytes - The bit-string represented as a byte array (MSB first) |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 116 | */ |
| 117 | define bier_imp_add |
| 118 | { |
| 119 | u32 client_index; |
| 120 | u32 context; |
| 121 | vl_api_bier_table_id_t bi_tbl_id; |
| 122 | u16 bi_src; |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 123 | u8 bi_n_bytes; |
| 124 | u8 bi_bytes[bi_n_bytes]; |
| 125 | }; |
| 126 | |
| 127 | /** \brief Reply for BIER route add / del request |
| 128 | @param context - returned sender context, to match reply w/ request |
| 129 | @param retval - return code |
| 130 | @param bi_index - The index of the created imposition object. |
| 131 | */ |
| 132 | define bier_imp_add_reply |
| 133 | { |
| 134 | u32 context; |
| 135 | i32 retval; |
| 136 | u32 bi_index; |
| 137 | }; |
| 138 | |
| 139 | /** \brief BIER Imposition Del |
| 140 | @param client_index - opaque cookie to identify the sender |
| 141 | @param context - sender context, to match reply w/ request |
| 142 | @param bi_index - The index of the imposition object (as returned |
| 143 | from the ADD) |
| 144 | */ |
| 145 | autoreply define bier_imp_del |
| 146 | { |
| 147 | u32 client_index; |
| 148 | u32 context; |
| 149 | u32 bi_index; |
| 150 | }; |
| 151 | |
| 152 | define bier_imp_dump |
| 153 | { |
| 154 | u32 client_index; |
| 155 | u32 context; |
| 156 | }; |
| 157 | |
| 158 | define bier_imp_details |
| 159 | { |
| 160 | u32 client_index; |
| 161 | u32 context; |
| 162 | vl_api_bier_table_id_t bi_tbl_id; |
| 163 | u16 bi_src; |
| 164 | u8 bi_n_bytes; |
| 165 | u8 bi_bytes[bi_n_bytes]; |
| 166 | }; |
| 167 | |
| 168 | /** \brief BIER Disposition Table Add / del route |
| 169 | @param client_index - opaque cookie to identify the sender |
| 170 | @param context - sender context, to match reply w/ request |
| 171 | @param bt_tbl_id - The BIER Disposition table-id. |
| 172 | */ |
| 173 | autoreply define bier_disp_table_add_del |
| 174 | { |
| 175 | u32 client_index; |
| 176 | u32 context; |
| 177 | u32 bdt_tbl_id; |
| 178 | u8 bdt_is_add; |
| 179 | }; |
| 180 | |
| 181 | define bier_disp_table_dump |
| 182 | { |
| 183 | u32 client_index; |
| 184 | u32 context; |
| 185 | }; |
| 186 | |
| 187 | define bier_disp_table_details |
| 188 | { |
| 189 | u32 context; |
| 190 | u32 bdt_tbl_id; |
| 191 | }; |
| 192 | |
| 193 | /** \brief BIER Disposition Entry Add / del |
| 194 | @param client_index - opaque cookie to identify the sender |
| 195 | @param context - sender context, to match reply w/ request |
Neale Ranns | ceb4d05 | 2017-12-13 09:13:41 -0800 | [diff] [blame] | 196 | @param bde_bp - The Bit-position value for the entry, i.e. the sender's |
| 197 | Use 0 for the default (match any source) entry. |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 198 | @param bde_tbl_id - The BIER dispositiontable-id the route is added in |
| 199 | @param bde_next_hop_sw_if_index - the nextop interface |
| 200 | @param bde_is_add - Is this a route add or delete |
| 201 | @param bde_payload_proto - The payload protocol for which the next-hop |
| 202 | is added |
Neale Ranns | fa1da15 | 2017-12-12 05:32:50 -0800 | [diff] [blame] | 203 | @param bde_paths - The outgoing paths for the entry |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 204 | */ |
| 205 | autoreply define bier_disp_entry_add_del |
| 206 | { |
| 207 | u32 client_index; |
| 208 | u32 context; |
| 209 | u16 bde_bp; |
| 210 | u32 bde_tbl_id; |
| 211 | u8 bde_is_add; |
| 212 | u8 bde_payload_proto; |
| 213 | u8 bde_n_paths; |
Neale Ranns | 31ed744 | 2018-02-23 05:29:09 -0800 | [diff] [blame] | 214 | vl_api_fib_path_t bde_paths[bde_n_paths]; |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 215 | }; |
| 216 | |
| 217 | define bier_disp_entry_dump |
| 218 | { |
| 219 | u32 client_index; |
| 220 | u32 context; |
| 221 | u32 bde_tbl_id; |
| 222 | }; |
| 223 | |
| 224 | define bier_disp_entry_details |
| 225 | { |
| 226 | u32 context; |
| 227 | u16 bde_bp; |
| 228 | u32 bde_tbl_id; |
| 229 | u8 bde_is_add; |
| 230 | u8 bde_payload_proto; |
| 231 | u8 bde_n_paths; |
Neale Ranns | 31ed744 | 2018-02-23 05:29:09 -0800 | [diff] [blame] | 232 | vl_api_fib_path_t bde_paths[bde_n_paths]; |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 233 | }; |
| 234 | |
| 235 | /* |
| 236 | * Local Variables: |
| 237 | * eval: (c-set-style "gnu") |
| 238 | * End: |
| 239 | */ |