Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [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 | #ifndef __FIB_TABLE_H__ |
| 17 | #define __FIB_TABLE_H__ |
| 18 | |
| 19 | #include <vnet/ip/ip.h> |
| 20 | #include <vnet/adj/adj.h> |
| 21 | #include <vnet/fib/fib_entry.h> |
| 22 | #include <vnet/mpls/mpls.h> |
| 23 | #include <vnet/mpls/packet.h> |
| 24 | |
| 25 | /** |
Neale Ranns | 53da221 | 2018-02-24 02:11:19 -0800 | [diff] [blame] | 26 | * Flags for the source data |
| 27 | */ |
| 28 | typedef enum fib_table_attribute_t_ { |
| 29 | /** |
| 30 | * Marker. Add new values after this one. |
| 31 | */ |
| 32 | FIB_TABLE_ATTRIBUTE_FIRST, |
| 33 | /** |
| 34 | * the table is for IP6 link local addresses |
| 35 | */ |
| 36 | FIB_TABLE_ATTRIBUTE_IP6_LL = FIB_TABLE_ATTRIBUTE_FIRST, |
| 37 | /** |
Neale Ranns | 9db6ada | 2019-11-08 12:42:31 +0000 | [diff] [blame] | 38 | * the table is currently resync-ing |
| 39 | */ |
| 40 | FIB_TABLE_ATTRIBUTE_RESYNC, |
| 41 | /** |
Neale Ranns | 53da221 | 2018-02-24 02:11:19 -0800 | [diff] [blame] | 42 | * Marker. add new entries before this one. |
| 43 | */ |
Neale Ranns | 9db6ada | 2019-11-08 12:42:31 +0000 | [diff] [blame] | 44 | FIB_TABLE_ATTRIBUTE_LAST = FIB_TABLE_ATTRIBUTE_RESYNC, |
Neale Ranns | 53da221 | 2018-02-24 02:11:19 -0800 | [diff] [blame] | 45 | } fib_table_attribute_t; |
| 46 | |
| 47 | #define FIB_TABLE_ATTRIBUTE_MAX (FIB_TABLE_ATTRIBUTE_LAST+1) |
| 48 | |
| 49 | #define FIB_TABLE_ATTRIBUTES { \ |
| 50 | [FIB_TABLE_ATTRIBUTE_IP6_LL] = "ip6-ll", \ |
Neale Ranns | 9db6ada | 2019-11-08 12:42:31 +0000 | [diff] [blame] | 51 | [FIB_TABLE_ATTRIBUTE_RESYNC] = "resync", \ |
Neale Ranns | 53da221 | 2018-02-24 02:11:19 -0800 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | #define FOR_EACH_FIB_TABLE_ATTRIBUTE(_item) \ |
| 55 | for (_item = FIB_TABLE_ATTRIBUTE_FIRST; \ |
| 56 | _item < FIB_TABLE_ATTRIBUTE_MAX; \ |
| 57 | _item++) |
| 58 | |
| 59 | typedef enum fib_table_flags_t_ { |
| 60 | FIB_TABLE_FLAG_NONE = 0, |
| 61 | FIB_TABLE_FLAG_IP6_LL = (1 << FIB_TABLE_ATTRIBUTE_IP6_LL), |
Neale Ranns | 9db6ada | 2019-11-08 12:42:31 +0000 | [diff] [blame] | 62 | FIB_TABLE_FLAG_RESYNC = (1 << FIB_TABLE_ATTRIBUTE_RESYNC), |
Neale Ranns | 53da221 | 2018-02-24 02:11:19 -0800 | [diff] [blame] | 63 | } __attribute__ ((packed)) fib_table_flags_t; |
| 64 | |
Neale Ranns | 9db6ada | 2019-11-08 12:42:31 +0000 | [diff] [blame] | 65 | extern u8* format_fib_table_flags(u8 *s, va_list *args); |
| 66 | |
Neale Ranns | 53da221 | 2018-02-24 02:11:19 -0800 | [diff] [blame] | 67 | /** |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 68 | * @brief |
| 69 | * A protocol Independent FIB table |
| 70 | */ |
| 71 | typedef struct fib_table_t_ |
| 72 | { |
| 73 | /** |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 74 | * Which protocol this table serves. Used to switch on the union above. |
| 75 | */ |
| 76 | fib_protocol_t ft_proto; |
| 77 | |
| 78 | /** |
Neale Ranns | 53da221 | 2018-02-24 02:11:19 -0800 | [diff] [blame] | 79 | * Table flags |
| 80 | */ |
| 81 | fib_table_flags_t ft_flags; |
| 82 | |
| 83 | /** |
Neale Ranns | 1500254 | 2017-09-10 04:39:11 -0700 | [diff] [blame] | 84 | * per-source number of locks on the table |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 85 | */ |
Miklos Tirpak | 4a94cd2 | 2019-12-20 11:55:43 +0100 | [diff] [blame] | 86 | u32 *ft_locks; |
Neale Ranns | 3bab8f9 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 87 | u32 ft_total_locks; |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 88 | |
| 89 | /** |
| 90 | * Table ID (hash key) for this FIB. |
| 91 | */ |
| 92 | u32 ft_table_id; |
| 93 | |
| 94 | /** |
| 95 | * Index into FIB vector. |
| 96 | */ |
| 97 | fib_node_index_t ft_index; |
| 98 | |
| 99 | /** |
| 100 | * flow hash configuration |
| 101 | */ |
| 102 | u32 ft_flow_hash_config; |
| 103 | |
| 104 | /** |
| 105 | * Per-source route counters |
| 106 | */ |
Neale Ranns | 3bab8f9 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 107 | u32 *ft_src_route_counts; |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 108 | |
| 109 | /** |
| 110 | * Total route counters |
| 111 | */ |
| 112 | u32 ft_total_route_counts; |
| 113 | |
| 114 | /** |
Neale Ranns | 9db6ada | 2019-11-08 12:42:31 +0000 | [diff] [blame] | 115 | * Epoch - number of resyncs performed |
| 116 | */ |
| 117 | u32 ft_epoch; |
| 118 | |
| 119 | /** |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 120 | * Table description |
| 121 | */ |
| 122 | u8* ft_desc; |
| 123 | } fib_table_t; |
| 124 | |
Jon Loeliger | d465fd0 | 2024-03-22 12:22:36 -0500 | [diff] [blame] | 125 | |
| 126 | /** |
| 127 | * @brief |
| 128 | * Default names for IP4, IP6, and MPLS FIB table index 0. |
| 129 | * Nominally like "ipv4-VRF:0", but this will override that name if set |
| 130 | * in a config section of the startup.conf file. |
| 131 | */ |
| 132 | extern char *fib_table_default_names[FIB_PROTOCOL_MAX]; |
| 133 | |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 134 | /** |
| 135 | * @brief |
| 136 | * Format the description/name of the table |
| 137 | */ |
Christophe Fontaine | d3c008d | 2017-10-02 18:10:54 +0200 | [diff] [blame] | 138 | extern u8* format_fib_table_name(u8* s, va_list *ap); |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 139 | |
| 140 | /** |
| 141 | * @brief |
| 142 | * Perfom a longest prefix match in the non-forwarding table |
| 143 | * |
| 144 | * @param fib_index |
| 145 | * The index of the FIB |
| 146 | * |
| 147 | * @param prefix |
| 148 | * The prefix to lookup |
| 149 | * |
| 150 | * @return |
| 151 | * The index of the fib_entry_t for the best match, which may be the default route |
| 152 | */ |
| 153 | extern fib_node_index_t fib_table_lookup(u32 fib_index, |
| 154 | const fib_prefix_t *prefix); |
| 155 | |
| 156 | /** |
| 157 | * @brief |
| 158 | * Perfom an exact match in the non-forwarding table |
| 159 | * |
| 160 | * @param fib_index |
| 161 | * The index of the FIB |
| 162 | * |
| 163 | * @param prefix |
| 164 | * The prefix to lookup |
| 165 | * |
| 166 | * @return |
| 167 | * The index of the fib_entry_t for the exact match, or INVALID |
| 168 | * is there is no match. |
| 169 | */ |
| 170 | extern fib_node_index_t fib_table_lookup_exact_match(u32 fib_index, |
| 171 | const fib_prefix_t *prefix); |
| 172 | |
| 173 | /** |
| 174 | * @brief |
| 175 | * Get the less specific (covering) prefix |
| 176 | * |
| 177 | * @param fib_index |
| 178 | * The index of the FIB |
| 179 | * |
| 180 | * @param prefix |
| 181 | * The prefix to lookup |
| 182 | * |
| 183 | * @return |
| 184 | * The index of the less specific fib_entry_t. |
| 185 | */ |
| 186 | extern fib_node_index_t fib_table_get_less_specific(u32 fib_index, |
| 187 | const fib_prefix_t *prefix); |
| 188 | |
| 189 | /** |
| 190 | * @brief |
Neale Ranns | a055830 | 2017-04-13 00:44:52 -0700 | [diff] [blame] | 191 | * Add a 'special' entry to the FIB. |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 192 | * A special entry is an entry that the FIB is not expect to resolve |
| 193 | * via the usual mechanisms (i.e. recurisve or neighbour adj DB lookup). |
Neale Ranns | a055830 | 2017-04-13 00:44:52 -0700 | [diff] [blame] | 194 | * Instead the will link to a DPO valid for the source and/or the flags. |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 195 | * This add is reference counting per-source. So n 'removes' are required |
| 196 | * for n 'adds', if the entry is no longer required. |
Neale Ranns | a055830 | 2017-04-13 00:44:52 -0700 | [diff] [blame] | 197 | * If the source needs to provide non-default forwarding use: |
| 198 | * fib_table_entry_special_dpo_add() |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 199 | * |
Neale Ranns | a055830 | 2017-04-13 00:44:52 -0700 | [diff] [blame] | 200 | * @param fib_index |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 201 | * The index of the FIB |
| 202 | * |
| 203 | * @param prefix |
| 204 | * The prefix to add |
| 205 | * |
| 206 | * @param source |
| 207 | * The ID of the client/source adding the entry. |
| 208 | * |
| 209 | * @param flags |
| 210 | * Flags for the entry. |
| 211 | * |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 212 | * @return |
| 213 | * the index of the fib_entry_t that is created (or exists already). |
| 214 | */ |
| 215 | extern fib_node_index_t fib_table_entry_special_add(u32 fib_index, |
| 216 | const fib_prefix_t *prefix, |
| 217 | fib_source_t source, |
Neale Ranns | a055830 | 2017-04-13 00:44:52 -0700 | [diff] [blame] | 218 | fib_entry_flag_t flags); |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 219 | |
| 220 | /** |
| 221 | * @brief |
| 222 | * Add a 'special' entry to the FIB that links to the DPO passed |
| 223 | * A special entry is an entry that the FIB is not expect to resolve |
| 224 | * via the usual mechanisms (i.e. recurisve or neighbour adj DB lookup). |
| 225 | * Instead the client/source provides the DPO to link to. |
| 226 | * This add is reference counting per-source. So n 'removes' are required |
| 227 | * for n 'adds', if the entry is no longer required. |
| 228 | * |
| 229 | * @param fib_index |
| 230 | * The index of the FIB |
| 231 | * |
| 232 | * @param prefix |
| 233 | * The prefix to add |
| 234 | * |
| 235 | * @param source |
| 236 | * The ID of the client/source adding the entry. |
| 237 | * |
| 238 | * @param flags |
| 239 | * Flags for the entry. |
| 240 | * |
| 241 | * @param dpo |
| 242 | * The DPO to link to. |
| 243 | * |
| 244 | * @return |
| 245 | * the index of the fib_entry_t that is created (or existed already). |
| 246 | */ |
| 247 | extern fib_node_index_t fib_table_entry_special_dpo_add(u32 fib_index, |
| 248 | const fib_prefix_t *prefix, |
| 249 | fib_source_t source, |
| 250 | fib_entry_flag_t stype, |
| 251 | const dpo_id_t *dpo); |
| 252 | |
| 253 | /** |
| 254 | * @brief |
| 255 | * Update a 'special' entry to the FIB that links to the DPO passed |
| 256 | * A special entry is an entry that the FIB is not expect to resolve |
| 257 | * via the usual mechanisms (i.e. recurisve or neighbour adj DB lookup). |
| 258 | * Instead the client/source provides the DPO to link to. |
| 259 | * Special entries are add/remove reference counted per-source. So n |
| 260 | * 'removes' are required for n 'adds', if the entry is no longer required. |
Neale Ranns | 948e00f | 2016-10-20 13:39:34 +0100 | [diff] [blame] | 261 | * An 'update' is an 'add' if no 'add' has already been called, otherwise an 'add' |
| 262 | * is therefore assumed to act on the reference instance of that add. |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 263 | * |
| 264 | * @param fib_entry_index |
| 265 | * The index of the FIB entry to update |
| 266 | * |
| 267 | * @param source |
| 268 | * The ID of the client/source adding the entry. |
| 269 | * |
| 270 | * @param flags |
| 271 | * Flags for the entry. |
| 272 | * |
| 273 | * @param dpo |
| 274 | * The DPO to link to. |
| 275 | * |
| 276 | * @return |
| 277 | * the index of the fib_entry_t that is created (or existed already). |
| 278 | */ |
Neale Ranns | 948e00f | 2016-10-20 13:39:34 +0100 | [diff] [blame] | 279 | extern fib_node_index_t fib_table_entry_special_dpo_update (u32 fib_index, |
| 280 | const fib_prefix_t *prefix, |
| 281 | fib_source_t source, |
| 282 | fib_entry_flag_t stype, |
| 283 | const dpo_id_t *dpo); |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 284 | |
| 285 | /** |
| 286 | * @brief |
| 287 | * Remove a 'special' entry from the FIB. |
| 288 | * This add is reference counting per-source. So n 'removes' are required |
| 289 | * for n 'adds', if the entry is no longer required. |
| 290 | * |
| 291 | * @param fib_index |
| 292 | * The index of the FIB |
| 293 | * |
| 294 | * @param prefix |
| 295 | * The prefix to remove |
| 296 | * |
| 297 | * @param source |
| 298 | * The ID of the client/source adding the entry. |
| 299 | * |
| 300 | */ |
| 301 | extern void fib_table_entry_special_remove(u32 fib_index, |
| 302 | const fib_prefix_t *prefix, |
| 303 | fib_source_t source); |
| 304 | |
| 305 | /** |
| 306 | * @brief |
| 307 | * Add one path to an entry (aka route) in the FIB. If the entry does not |
| 308 | * exist, it will be created. |
| 309 | * See the documentation for fib_route_path_t for more descirptions of |
| 310 | * the path parameters. |
| 311 | * |
| 312 | * @param fib_index |
| 313 | * The index of the FIB |
| 314 | * |
| 315 | * @param prefix |
| 316 | * The prefix for the entry to add |
| 317 | * |
| 318 | * @param source |
| 319 | * The ID of the client/source adding the entry. |
| 320 | * |
| 321 | * @param flags |
| 322 | * Flags for the entry. |
| 323 | * |
| 324 | * @paran next_hop_proto |
| 325 | * The protocol of the next hop. This cannot be derived in the event that |
| 326 | * the next hop is all zeros. |
| 327 | * |
| 328 | * @param next_hop |
| 329 | * The address of the next-hop. |
| 330 | * |
| 331 | * @param sw_if_index |
| 332 | * The index of the interface. |
| 333 | * |
| 334 | * @param next_hop_fib_index, |
| 335 | * The fib index of the next-hop for recursive resolution |
| 336 | * |
| 337 | * @param next_hop_weight |
| 338 | * [un]equal cost path weight |
| 339 | * |
Neale Ranns | ad422ed | 2016-11-02 14:20:04 +0000 | [diff] [blame] | 340 | * @param next_hop_label_stack |
| 341 | * The path's out-going label stack. NULL is there is none. |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 342 | * |
| 343 | * @param pf |
| 344 | * Flags for the path |
| 345 | * |
| 346 | * @return |
| 347 | * the index of the fib_entry_t that is created (or existed already). |
| 348 | */ |
| 349 | extern fib_node_index_t fib_table_entry_path_add(u32 fib_index, |
| 350 | const fib_prefix_t *prefix, |
| 351 | fib_source_t source, |
| 352 | fib_entry_flag_t flags, |
Neale Ranns | da78f95 | 2017-05-24 09:15:43 -0700 | [diff] [blame] | 353 | dpo_proto_t next_hop_proto, |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 354 | const ip46_address_t *next_hop, |
| 355 | u32 next_hop_sw_if_index, |
| 356 | u32 next_hop_fib_index, |
| 357 | u32 next_hop_weight, |
Neale Ranns | 31ed744 | 2018-02-23 05:29:09 -0800 | [diff] [blame] | 358 | fib_mpls_label_t *next_hop_label_stack, |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 359 | fib_route_path_flags_t pf); |
| 360 | /** |
| 361 | * @brief |
| 362 | * Add n paths to an entry (aka route) in the FIB. If the entry does not |
| 363 | * exist, it will be created. |
| 364 | * See the documentation for fib_route_path_t for more descirptions of |
| 365 | * the path parameters. |
| 366 | * |
| 367 | * @param fib_index |
| 368 | * The index of the FIB |
| 369 | * |
| 370 | * @param prefix |
| 371 | * The prefix for the entry to add |
| 372 | * |
| 373 | * @param source |
| 374 | * The ID of the client/source adding the entry. |
| 375 | * |
| 376 | * @param flags |
| 377 | * Flags for the entry. |
| 378 | * |
| 379 | * @param rpaths |
Neale Ranns | ad422ed | 2016-11-02 14:20:04 +0000 | [diff] [blame] | 380 | * A vector of paths. Not const since they may be modified. |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 381 | * |
| 382 | * @return |
| 383 | * the index of the fib_entry_t that is created (or existed already). |
| 384 | */ |
| 385 | extern fib_node_index_t fib_table_entry_path_add2(u32 fib_index, |
| 386 | const fib_prefix_t *prefix, |
| 387 | fib_source_t source, |
| 388 | fib_entry_flag_t flags, |
Neale Ranns | ad422ed | 2016-11-02 14:20:04 +0000 | [diff] [blame] | 389 | fib_route_path_t *rpath); |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 390 | |
| 391 | /** |
| 392 | * @brief |
| 393 | * remove one path to an entry (aka route) in the FIB. If this is the entry's |
| 394 | * last path, then the entry will be removed, unless it has other sources. |
| 395 | * See the documentation for fib_route_path_t for more descirptions of |
| 396 | * the path parameters. |
| 397 | * |
| 398 | * @param fib_index |
| 399 | * The index of the FIB |
| 400 | * |
| 401 | * @param prefix |
| 402 | * The prefix for the entry to add |
| 403 | * |
| 404 | * @param source |
| 405 | * The ID of the client/source adding the entry. |
| 406 | * |
| 407 | * @paran next_hop_proto |
| 408 | * The protocol of the next hop. This cannot be derived in the event that |
| 409 | * the next hop is all zeros. |
| 410 | * |
| 411 | * @param next_hop |
| 412 | * The address of the next-hop. |
| 413 | * |
| 414 | * @param sw_if_index |
| 415 | * The index of the interface. |
| 416 | * |
| 417 | * @param next_hop_fib_index, |
| 418 | * The fib index of the next-hop for recursive resolution |
| 419 | * |
| 420 | * @param next_hop_weight |
| 421 | * [un]equal cost path weight |
| 422 | * |
| 423 | * @param pf |
| 424 | * Flags for the path |
| 425 | */ |
| 426 | extern void fib_table_entry_path_remove(u32 fib_index, |
| 427 | const fib_prefix_t *prefix, |
| 428 | fib_source_t source, |
Neale Ranns | da78f95 | 2017-05-24 09:15:43 -0700 | [diff] [blame] | 429 | dpo_proto_t next_hop_proto, |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 430 | const ip46_address_t *next_hop, |
| 431 | u32 next_hop_sw_if_index, |
| 432 | u32 next_hop_fib_index, |
| 433 | u32 next_hop_weight, |
| 434 | fib_route_path_flags_t pf); |
| 435 | |
| 436 | /** |
| 437 | * @brief |
| 438 | * Remove n paths to an entry (aka route) in the FIB. If this is the entry's |
| 439 | * last path, then the entry will be removed, unless it has other sources. |
| 440 | * See the documentation for fib_route_path_t for more descirptions of |
| 441 | * the path parameters. |
| 442 | * |
| 443 | * @param fib_index |
| 444 | * The index of the FIB |
| 445 | * |
| 446 | * @param prefix |
| 447 | * The prefix for the entry to add |
| 448 | * |
| 449 | * @param source |
| 450 | * The ID of the client/source adding the entry. |
| 451 | * |
| 452 | * @param rpaths |
| 453 | * A vector of paths. |
| 454 | */ |
| 455 | extern void fib_table_entry_path_remove2(u32 fib_index, |
| 456 | const fib_prefix_t *prefix, |
| 457 | fib_source_t source, |
Neale Ranns | ad422ed | 2016-11-02 14:20:04 +0000 | [diff] [blame] | 458 | fib_route_path_t *paths); |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 459 | |
| 460 | /** |
| 461 | * @brief |
| 462 | * Update an entry to have a new set of paths. If the entry does not |
| 463 | * exist, it will be created. |
| 464 | * The difference between an 'path-add' and an update, is that path-add is |
| 465 | * an incremental addition of paths, whereas an update is a wholesale swap. |
| 466 | * |
| 467 | * @param fib_index |
| 468 | * The index of the FIB |
| 469 | * |
| 470 | * @param prefix |
| 471 | * The prefix for the entry to add |
| 472 | * |
| 473 | * @param source |
| 474 | * The ID of the client/source adding the entry. |
| 475 | * |
| 476 | * @param rpaths |
Neale Ranns | ad422ed | 2016-11-02 14:20:04 +0000 | [diff] [blame] | 477 | * A vector of paths. Not const since they may be modified. |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 478 | * |
| 479 | * @return |
| 480 | * the index of the fib_entry_t that is created (or existed already). |
| 481 | */ |
| 482 | extern fib_node_index_t fib_table_entry_update(u32 fib_index, |
| 483 | const fib_prefix_t *prefix, |
| 484 | fib_source_t source, |
| 485 | fib_entry_flag_t flags, |
Neale Ranns | ad422ed | 2016-11-02 14:20:04 +0000 | [diff] [blame] | 486 | fib_route_path_t *paths); |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 487 | |
| 488 | /** |
| 489 | * @brief |
| 490 | * Update the entry to have just one path. If the entry does not |
| 491 | * exist, it will be created. |
| 492 | * See the documentation for fib_route_path_t for more descirptions of |
| 493 | * the path parameters. |
| 494 | * |
| 495 | * @param fib_index |
| 496 | * The index of the FIB |
| 497 | * |
| 498 | * @param prefix |
| 499 | * The prefix for the entry to add |
| 500 | * |
| 501 | * @param source |
| 502 | * The ID of the client/source adding the entry. |
| 503 | * |
| 504 | * @param flags |
| 505 | * Flags for the entry. |
| 506 | * |
| 507 | * @paran next_hop_proto |
| 508 | * The protocol of the next hop. This cannot be derived in the event that |
| 509 | * the next hop is all zeros. |
| 510 | * |
| 511 | * @param next_hop |
| 512 | * The address of the next-hop. |
| 513 | * |
| 514 | * @param sw_if_index |
| 515 | * The index of the interface. |
| 516 | * |
| 517 | * @param next_hop_fib_index, |
| 518 | * The fib index of the next-hop for recursive resolution |
| 519 | * |
| 520 | * @param next_hop_weight |
| 521 | * [un]equal cost path weight |
| 522 | * |
Neale Ranns | ad422ed | 2016-11-02 14:20:04 +0000 | [diff] [blame] | 523 | * @param next_hop_label_stack |
| 524 | * The path's out-going label stack. NULL is there is none. |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 525 | * |
| 526 | * @param pf |
| 527 | * Flags for the path |
| 528 | * |
| 529 | * @return |
| 530 | * the index of the fib_entry_t that is created (or existed already). |
| 531 | */ |
| 532 | extern fib_node_index_t fib_table_entry_update_one_path(u32 fib_index, |
| 533 | const fib_prefix_t *prefix, |
| 534 | fib_source_t source, |
| 535 | fib_entry_flag_t flags, |
Neale Ranns | da78f95 | 2017-05-24 09:15:43 -0700 | [diff] [blame] | 536 | dpo_proto_t next_hop_proto, |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 537 | const ip46_address_t *next_hop, |
| 538 | u32 next_hop_sw_if_index, |
| 539 | u32 next_hop_fib_index, |
| 540 | u32 next_hop_weight, |
Neale Ranns | 31ed744 | 2018-02-23 05:29:09 -0800 | [diff] [blame] | 541 | fib_mpls_label_t *next_hop_label_stack, |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 542 | fib_route_path_flags_t pf); |
| 543 | |
| 544 | /** |
| 545 | * @brief |
| 546 | * Add a MPLS local label for the prefix/route. If the entry does not |
| 547 | * exist, it will be created. In theory more than one local label can be |
| 548 | * added, but this is not yet supported. |
| 549 | * |
| 550 | * @param fib_index |
| 551 | * The index of the FIB |
| 552 | * |
| 553 | * @param prefix |
| 554 | * The prefix for the entry to which to add the label |
| 555 | * |
| 556 | * @param label |
| 557 | * The MPLS label to add |
| 558 | * |
| 559 | * @return |
| 560 | * the index of the fib_entry_t that is created (or existed already). |
| 561 | */ |
| 562 | extern fib_node_index_t fib_table_entry_local_label_add(u32 fib_index, |
| 563 | const fib_prefix_t *prefix, |
| 564 | mpls_label_t label); |
| 565 | /** |
| 566 | * @brief |
| 567 | * remove a MPLS local label for the prefix/route. |
| 568 | * |
| 569 | * @param fib_index |
| 570 | * The index of the FIB |
| 571 | * |
| 572 | * @param prefix |
| 573 | * The prefix for the entry to which to add the label |
| 574 | * |
| 575 | * @param label |
| 576 | * The MPLS label to add |
| 577 | */ |
| 578 | extern void fib_table_entry_local_label_remove(u32 fib_index, |
| 579 | const fib_prefix_t *prefix, |
| 580 | mpls_label_t label); |
| 581 | |
| 582 | /** |
| 583 | * @brief |
| 584 | * Delete a FIB entry. If the entry has no more sources, then it is |
| 585 | * removed from the table. |
| 586 | * |
| 587 | * @param fib_index |
| 588 | * The index of the FIB |
| 589 | * |
| 590 | * @param prefix |
| 591 | * The prefix for the entry to remove |
| 592 | * |
| 593 | * @param source |
| 594 | * The ID of the client/source adding the entry. |
| 595 | */ |
| 596 | extern void fib_table_entry_delete(u32 fib_index, |
| 597 | const fib_prefix_t *prefix, |
| 598 | fib_source_t source); |
| 599 | |
| 600 | /** |
| 601 | * @brief |
| 602 | * Delete a FIB entry. If the entry has no more sources, then it is |
| 603 | * removed from the table. |
| 604 | * |
| 605 | * @param entry_index |
| 606 | * The index of the FIB entry |
| 607 | * |
| 608 | * @param source |
| 609 | * The ID of the client/source adding the entry. |
| 610 | */ |
| 611 | extern void fib_table_entry_delete_index(fib_node_index_t entry_index, |
| 612 | fib_source_t source); |
| 613 | |
| 614 | /** |
| 615 | * @brief |
Neale Ranns | 008dbe1 | 2018-09-07 09:32:36 -0700 | [diff] [blame] | 616 | * Return the stats index for a FIB entry |
| 617 | * @param fib_index |
| 618 | * The table's FIB index |
| 619 | * @param prefix |
| 620 | * The entry's prefix's |
| 621 | */ |
| 622 | extern u32 fib_table_entry_get_stats_index(u32 fib_index, |
| 623 | const fib_prefix_t *prefix); |
| 624 | |
| 625 | /** |
| 626 | * @brief |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 627 | * Flush all entries from a table for the source |
| 628 | * |
| 629 | * @param fib_index |
| 630 | * The index of the FIB |
| 631 | * |
| 632 | * @paran proto |
| 633 | * The protocol of the entries in the table |
| 634 | * |
| 635 | * @param source |
| 636 | * the source to flush |
| 637 | */ |
| 638 | extern void fib_table_flush(u32 fib_index, |
| 639 | fib_protocol_t proto, |
| 640 | fib_source_t source); |
| 641 | |
| 642 | /** |
| 643 | * @brief |
Neale Ranns | 9db6ada | 2019-11-08 12:42:31 +0000 | [diff] [blame] | 644 | * Resync all entries from a table for the source |
| 645 | * this is the mark part of the mark and sweep algorithm. |
| 646 | * All entries in this FIB that are sourced by 'source' are marked |
| 647 | * as stale. |
| 648 | * |
| 649 | * @param fib_index |
| 650 | * The index of the FIB |
| 651 | * |
| 652 | * @paran proto |
| 653 | * The protocol of the entries in the table |
| 654 | * |
| 655 | * @param source |
| 656 | * the source to flush |
| 657 | */ |
| 658 | extern void fib_table_mark(u32 fib_index, |
| 659 | fib_protocol_t proto, |
| 660 | fib_source_t source); |
| 661 | |
| 662 | /** |
| 663 | * @brief |
| 664 | * Signal that the table has converged, i.e. all updates are complete. |
| 665 | * this is the sweep part of the mark and sweep algorithm. |
| 666 | * All entries in this FIB that are sourced by 'source' and marked |
| 667 | * as stale are flushed. |
| 668 | * |
| 669 | * @param fib_index |
| 670 | * The index of the FIB |
| 671 | * |
| 672 | * @paran proto |
| 673 | * The protocol of the entries in the table |
| 674 | * |
| 675 | * @param source |
| 676 | * the source to flush |
| 677 | */ |
| 678 | extern void fib_table_sweep(u32 fib_index, |
| 679 | fib_protocol_t proto, |
| 680 | fib_source_t source); |
| 681 | |
| 682 | /** |
| 683 | * @brief |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 684 | * Get the index of the FIB bound to the interface |
| 685 | * |
| 686 | * @paran proto |
| 687 | * The protocol of the FIB (and thus the entries therein) |
| 688 | * |
| 689 | * @param sw_if_index |
| 690 | * The interface index |
| 691 | * |
| 692 | * @return fib_index |
| 693 | * The index of the FIB |
| 694 | */ |
| 695 | extern u32 fib_table_get_index_for_sw_if_index(fib_protocol_t proto, |
| 696 | u32 sw_if_index); |
| 697 | |
| 698 | /** |
| 699 | * @brief |
| 700 | * Get the Table-ID of the FIB bound to the interface |
| 701 | * |
| 702 | * @paran proto |
| 703 | * The protocol of the FIB (and thus the entries therein) |
| 704 | * |
| 705 | * @param sw_if_index |
| 706 | * The interface index |
| 707 | * |
| 708 | * @return fib_index |
| 709 | * The tableID of the FIB |
| 710 | */ |
| 711 | extern u32 fib_table_get_table_id_for_sw_if_index(fib_protocol_t proto, |
| 712 | u32 sw_if_index); |
| 713 | |
| 714 | /** |
| 715 | * @brief |
Neale Ranns | 25b0494 | 2018-04-04 09:34:50 -0700 | [diff] [blame] | 716 | * Get the Table-ID of the FIB from protocol and index |
| 717 | * |
| 718 | * @param fib_index |
| 719 | * The FIB index |
| 720 | * |
| 721 | * @paran proto |
| 722 | * The protocol of the FIB (and thus the entries therein) |
| 723 | * |
| 724 | * @return fib_index |
| 725 | * The tableID of the FIB |
| 726 | */ |
| 727 | extern u32 fib_table_get_table_id(u32 fib_index, fib_protocol_t proto); |
| 728 | |
| 729 | /** |
| 730 | * @brief |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 731 | * Get the index of the FIB for a Table-ID. This DOES NOT create the |
| 732 | * FIB if it does not exist. |
| 733 | * |
| 734 | * @paran proto |
| 735 | * The protocol of the FIB (and thus the entries therein) |
| 736 | * |
| 737 | * @param table-id |
| 738 | * The Table-ID |
| 739 | * |
| 740 | * @return fib_index |
| 741 | * The index of the FIB, which may be INVALID. |
| 742 | */ |
| 743 | extern u32 fib_table_find(fib_protocol_t proto, u32 table_id); |
| 744 | |
| 745 | |
| 746 | /** |
| 747 | * @brief |
| 748 | * Get the index of the FIB for a Table-ID. This DOES create the |
| 749 | * FIB if it does not exist. |
| 750 | * |
| 751 | * @paran proto |
| 752 | * The protocol of the FIB (and thus the entries therein) |
| 753 | * |
| 754 | * @param table-id |
| 755 | * The Table-ID |
| 756 | * |
| 757 | * @return fib_index |
| 758 | * The index of the FIB |
Neale Ranns | 1500254 | 2017-09-10 04:39:11 -0700 | [diff] [blame] | 759 | * |
| 760 | * @param source |
| 761 | * The ID of the client/source. |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 762 | */ |
| 763 | extern u32 fib_table_find_or_create_and_lock(fib_protocol_t proto, |
Neale Ranns | 1500254 | 2017-09-10 04:39:11 -0700 | [diff] [blame] | 764 | u32 table_id, |
| 765 | fib_source_t source); |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 766 | |
| 767 | /** |
| 768 | * @brief |
Neale Ranns | 2297af0 | 2017-09-12 09:45:04 -0700 | [diff] [blame] | 769 | * Get the index of the FIB for a Table-ID. This DOES create the |
| 770 | * FIB if it does not exist. |
| 771 | * |
| 772 | * @paran proto |
| 773 | * The protocol of the FIB (and thus the entries therein) |
| 774 | * |
| 775 | * @param table-id |
| 776 | * The Table-ID |
| 777 | * |
| 778 | * @return fib_index |
| 779 | * The index of the FIB |
| 780 | * |
| 781 | * @param source |
| 782 | * The ID of the client/source. |
| 783 | * |
| 784 | * @param name |
| 785 | * The client is choosing the name they want the table to have |
| 786 | */ |
| 787 | extern u32 fib_table_find_or_create_and_lock_w_name(fib_protocol_t proto, |
| 788 | u32 table_id, |
| 789 | fib_source_t source, |
| 790 | const u8 *name); |
| 791 | |
| 792 | /** |
| 793 | * @brief |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 794 | * Create a new table with no table ID. This means it does not get |
| 795 | * added to the hash-table and so can only be found by using the index returned. |
| 796 | * |
| 797 | * @paran proto |
| 798 | * The protocol of the FIB (and thus the entries therein) |
| 799 | * |
| 800 | * @param fmt |
| 801 | * A string to describe the table |
| 802 | * |
Neale Ranns | 1500254 | 2017-09-10 04:39:11 -0700 | [diff] [blame] | 803 | * @param source |
| 804 | * The ID of the client/source. |
| 805 | * |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 806 | * @return fib_index |
| 807 | * The index of the FIB |
| 808 | */ |
| 809 | extern u32 fib_table_create_and_lock(fib_protocol_t proto, |
Neale Ranns | 1500254 | 2017-09-10 04:39:11 -0700 | [diff] [blame] | 810 | fib_source_t source, |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 811 | const char *const fmt, |
| 812 | ...); |
| 813 | |
| 814 | /** |
| 815 | * @brief |
| 816 | * Get the flow hash configured used by the table |
| 817 | * |
| 818 | * @param fib_index |
| 819 | * The index of the FIB |
| 820 | * |
| 821 | * @paran proto |
Neale Ranns | d792d9c | 2017-10-21 10:53:20 -0700 | [diff] [blame] | 822 | * The protocol the packets the flow hash will be calculated for. |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 823 | * |
| 824 | * @return The flow hash config |
| 825 | */ |
| 826 | extern flow_hash_config_t fib_table_get_flow_hash_config(u32 fib_index, |
| 827 | fib_protocol_t proto); |
| 828 | |
| 829 | /** |
| 830 | * @brief |
Neale Ranns | 41da54f | 2017-05-02 10:15:19 -0700 | [diff] [blame] | 831 | * Get the flow hash configured used by the protocol |
| 832 | * |
| 833 | * @paran proto |
| 834 | * The protocol of the FIB (and thus the entries therein) |
| 835 | * |
| 836 | * @return The flow hash config |
| 837 | */ |
| 838 | extern flow_hash_config_t fib_table_get_default_flow_hash_config(fib_protocol_t proto); |
| 839 | |
| 840 | /** |
| 841 | * @brief |
Neale Ranns | 227038a | 2017-04-21 01:07:59 -0700 | [diff] [blame] | 842 | * Set the flow hash configured used by the table |
| 843 | * |
| 844 | * @param fib_index |
| 845 | * The index of the FIB |
| 846 | * |
| 847 | * @paran proto |
| 848 | * The protocol of the FIB (and thus the entries therein) |
| 849 | * |
| 850 | * @param hash_config |
| 851 | * The flow-hash config to set |
| 852 | * |
| 853 | * @return none |
| 854 | */ |
| 855 | extern void fib_table_set_flow_hash_config(u32 fib_index, |
| 856 | fib_protocol_t proto, |
| 857 | flow_hash_config_t hash_config); |
| 858 | |
| 859 | /** |
| 860 | * @brief |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 861 | * Take a reference counting lock on the table |
| 862 | * |
| 863 | * @param fib_index |
| 864 | * The index of the FIB |
| 865 | * |
| 866 | * @paran proto |
| 867 | * The protocol of the FIB (and thus the entries therein) |
Neale Ranns | 1500254 | 2017-09-10 04:39:11 -0700 | [diff] [blame] | 868 | * |
| 869 | * @param source |
| 870 | * The ID of the client/source. |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 871 | */ |
| 872 | extern void fib_table_unlock(u32 fib_index, |
Neale Ranns | 1500254 | 2017-09-10 04:39:11 -0700 | [diff] [blame] | 873 | fib_protocol_t proto, |
| 874 | fib_source_t source); |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 875 | |
| 876 | /** |
| 877 | * @brief |
| 878 | * Release a reference counting lock on the table. When the last lock |
| 879 | * has gone. the FIB is deleted. |
| 880 | * |
| 881 | * @param fib_index |
| 882 | * The index of the FIB |
| 883 | * |
| 884 | * @paran proto |
| 885 | * The protocol of the FIB (and thus the entries therein) |
Neale Ranns | 1500254 | 2017-09-10 04:39:11 -0700 | [diff] [blame] | 886 | * |
| 887 | * @param source |
| 888 | * The ID of the client/source. |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 889 | */ |
| 890 | extern void fib_table_lock(u32 fib_index, |
Neale Ranns | 1500254 | 2017-09-10 04:39:11 -0700 | [diff] [blame] | 891 | fib_protocol_t proto, |
| 892 | fib_source_t source); |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 893 | |
| 894 | /** |
| 895 | * @brief |
| 896 | * Return the number of entries in the FIB added by a given source. |
| 897 | * |
| 898 | * @param fib_index |
| 899 | * The index of the FIB |
| 900 | * |
| 901 | * @paran proto |
| 902 | * The protocol of the FIB (and thus the entries therein) |
| 903 | * |
| 904 | * @return number of sourced entries. |
| 905 | */ |
| 906 | extern u32 fib_table_get_num_entries(u32 fib_index, |
| 907 | fib_protocol_t proto, |
| 908 | fib_source_t source); |
| 909 | |
| 910 | /** |
| 911 | * @brief |
| 912 | * Get a pointer to a FIB table |
| 913 | */ |
| 914 | extern fib_table_t *fib_table_get(fib_node_index_t index, |
| 915 | fib_protocol_t proto); |
| 916 | |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 917 | /** |
Neale Ranns | 8954199 | 2017-04-06 04:41:02 -0700 | [diff] [blame] | 918 | * @brief return code controlling how a table walk proceeds |
| 919 | */ |
| 920 | typedef enum fib_table_walk_rc_t_ |
| 921 | { |
| 922 | /** |
| 923 | * Continue on to the next entry |
| 924 | */ |
| 925 | FIB_TABLE_WALK_CONTINUE, |
| 926 | /** |
| 927 | * Do no traverse down this sub-tree |
| 928 | */ |
| 929 | FIB_TABLE_WALK_SUB_TREE_STOP, |
| 930 | /** |
| 931 | * Stop the walk completely |
| 932 | */ |
| 933 | FIB_TABLE_WALK_STOP, |
| 934 | } fib_table_walk_rc_t; |
| 935 | |
| 936 | /** |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 937 | * @brief Call back function when walking entries in a FIB table |
| 938 | */ |
Neale Ranns | 8954199 | 2017-04-06 04:41:02 -0700 | [diff] [blame] | 939 | typedef fib_table_walk_rc_t (*fib_table_walk_fn_t)(fib_node_index_t fei, |
| 940 | void *ctx); |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 941 | |
| 942 | /** |
| 943 | * @brief Walk all entries in a FIB table |
| 944 | * N.B: This is NOT safe to deletes. If you need to delete walk the whole |
| 945 | * table and store elements in a vector, then delete the elements |
| 946 | */ |
| 947 | extern void fib_table_walk(u32 fib_index, |
| 948 | fib_protocol_t proto, |
| 949 | fib_table_walk_fn_t fn, |
| 950 | void *ctx); |
| 951 | |
Neale Ranns | c87aafa | 2017-11-29 00:59:31 -0800 | [diff] [blame] | 952 | /** |
Neale Ranns | 976b259 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 953 | * @brief Walk all entries in a FIB table |
| 954 | * N.B: This is NOT safe to deletes. If you need to delete walk the whole |
| 955 | * table and store elements in a vector, then delete the elements |
| 956 | */ |
| 957 | extern void fib_table_walk_w_src(u32 fib_index, |
| 958 | fib_protocol_t proto, |
| 959 | fib_source_t src, |
| 960 | fib_table_walk_fn_t fn, |
| 961 | void *ctx); |
| 962 | |
| 963 | /** |
Neale Ranns | 8954199 | 2017-04-06 04:41:02 -0700 | [diff] [blame] | 964 | * @brief Walk all entries in a sub-tree FIB table. The 'root' paraneter |
| 965 | * is the prefix at the root of the sub-tree. |
| 966 | * N.B: This is NOT safe to deletes. If you need to delete walk the whole |
| 967 | * table and store elements in a vector, then delete the elements |
| 968 | */ |
| 969 | extern void fib_table_sub_tree_walk(u32 fib_index, |
| 970 | fib_protocol_t proto, |
| 971 | const fib_prefix_t *root, |
| 972 | fib_table_walk_fn_t fn, |
| 973 | void *ctx); |
| 974 | |
| 975 | /** |
Neale Ranns | c87aafa | 2017-11-29 00:59:31 -0800 | [diff] [blame] | 976 | * @brief format (display) the memory used by the FIB tables |
| 977 | */ |
| 978 | extern u8 *format_fib_table_memory(u8 *s, va_list *args); |
| 979 | |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 980 | /** |
| 981 | * Debug function |
| 982 | */ |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 983 | extern void fib_table_assert_empty(const fib_table_t *fib_table); |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 984 | |
| 985 | |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 986 | #endif |