]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
dcc68b5e MS |
2 | /* |
3 | * Addpath TX ID selection, and related utilities | |
4 | * Copyright (C) 2018 Amazon.com, Inc. or its affiliates | |
dcc68b5e MS |
5 | */ |
6 | ||
7 | #ifndef _QUAGGA_BGPD_TX_ADDPATH_DATA_H | |
8 | #define _QUAGGA_BGPD_TX_ADDPATH_DATA_H | |
9 | #include "lib/id_alloc.h" | |
10 | #include <stdint.h> | |
11 | ||
12 | enum bgp_addpath_strat { | |
13 | BGP_ADDPATH_ALL = 0, | |
14 | BGP_ADDPATH_BEST_PER_AS, | |
15 | BGP_ADDPATH_MAX, | |
16 | BGP_ADDPATH_NONE, | |
17 | }; | |
18 | ||
19 | /* TX Addpath structures */ | |
20 | struct bgp_addpath_bgp_data { | |
21 | unsigned int peercount[AFI_MAX][SAFI_MAX][BGP_ADDPATH_MAX]; | |
22 | unsigned int total_peercount[AFI_MAX][SAFI_MAX]; | |
23 | struct id_alloc *id_allocators[AFI_MAX][SAFI_MAX][BGP_ADDPATH_MAX]; | |
24 | }; | |
25 | ||
26 | struct bgp_addpath_node_data { | |
27 | struct id_alloc_pool *free_ids[BGP_ADDPATH_MAX]; | |
28 | }; | |
29 | ||
30 | struct bgp_addpath_info_data { | |
31 | uint32_t addpath_tx_id[BGP_ADDPATH_MAX]; | |
32 | }; | |
33 | ||
34 | struct bgp_addpath_strategy_names { | |
35 | const char *config_name; | |
36 | const char *human_name; /* path detail non-json */ | |
37 | const char *human_description; /* non-json peer descriptions */ | |
38 | const char *type_json_name; /* json peer listings */ | |
39 | const char *id_json_name; /* path json output for tx ID# */ | |
40 | }; | |
41 | ||
42 | #endif |