2 * Addpath TX ID selection, and related utilities
3 * Copyright (C) 2018 Amazon.com, Inc. or its affiliates
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the Free
7 * Software Foundation; either version 2 of the License, or (at your option)
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * You should have received a copy of the GNU General Public License along
16 * with this program; see the file COPYING; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef _QUAGGA_BGPD_TX_ADDPATH_DATA_H
21 #define _QUAGGA_BGPD_TX_ADDPATH_DATA_H
22 #include "lib/id_alloc.h"
25 enum bgp_addpath_strat
{
27 BGP_ADDPATH_BEST_PER_AS
,
32 /* TX Addpath structures */
33 struct bgp_addpath_bgp_data
{
34 unsigned int peercount
[AFI_MAX
][SAFI_MAX
][BGP_ADDPATH_MAX
];
35 unsigned int total_peercount
[AFI_MAX
][SAFI_MAX
];
36 struct id_alloc
*id_allocators
[AFI_MAX
][SAFI_MAX
][BGP_ADDPATH_MAX
];
39 struct bgp_addpath_node_data
{
40 struct id_alloc_pool
*free_ids
[BGP_ADDPATH_MAX
];
43 struct bgp_addpath_info_data
{
44 uint32_t addpath_tx_id
[BGP_ADDPATH_MAX
];
47 struct bgp_addpath_strategy_names
{
48 const char *config_name
;
49 const char *human_name
; /* path detail non-json */
50 const char *human_description
; /* non-json peer descriptions */
51 const char *type_json_name
; /* json peer listings */
52 const char *id_json_name
; /* path json output for tx ID# */