diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-07-30 17:40:02 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-11-16 15:43:35 +0100 |
commit | 6f94b685d0480f7ea427ddfd1c603399dd047aa3 (patch) | |
tree | 0bd62ffb42a51cf9c27efbf5e686a703748e1b2a /bgpd/bgp_table.h | |
parent | bgpd: Reduce size of 'struct bgp_node' by 8 bytes (diff) | |
download | frr-6f94b685d0480f7ea427ddfd1c603399dd047aa3.tar.xz frr-6f94b685d0480f7ea427ddfd1c603399dd047aa3.zip |
bgpd: Abstract bgp_info retrieving/setting from info pointer
The bgp_info data is stored as a void pointer in `struct bgp_node`.
Abstract retrieval of this data and setting of this data
into functions so that in the future we can move around
what is stored in bgp_node.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_table.h')
-rw-r--r-- | bgpd/bgp_table.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bgpd/bgp_table.h b/bgpd/bgp_table.h index f306a05da..87fbc39f4 100644 --- a/bgpd/bgp_table.h +++ b/bgpd/bgp_table.h @@ -376,4 +376,21 @@ static inline void bgp_nexthop_set_node_info(struct bgp_node *node, node->info = bnc; } +static inline struct bgp_path_info * +bgp_node_get_bgp_path_info(struct bgp_node *node) +{ + return node->info; +} + +static inline void bgp_node_set_bgp_path_info(struct bgp_node *node, + struct bgp_path_info *bi) +{ + node->info = bi; +} + +static inline bool bgp_node_has_bgp_path_info_data(struct bgp_node *node) +{ + return !!node->info; +} + #endif /* _QUAGGA_BGP_TABLE_H */ |