1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Addpath TX ID selection, and related utilities
4 * Copyright (C) 2018 Amazon.com, Inc. or its affiliates
7 #ifndef _QUAGGA_BGPD_TX_ADDPATH_DATA_H
8 #define _QUAGGA_BGPD_TX_ADDPATH_DATA_H
9 #include "lib/id_alloc.h"
12 enum bgp_addpath_strat
{
14 BGP_ADDPATH_BEST_PER_AS
,
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
];
26 struct bgp_addpath_node_data
{
27 struct id_alloc_pool
*free_ids
[BGP_ADDPATH_MAX
];
30 struct bgp_addpath_info_data
{
31 uint32_t addpath_tx_id
[BGP_ADDPATH_MAX
];
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# */