diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-07-30 14:50:47 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-09-22 20:59:23 +0200 |
commit | b1e62edd5ed63256db05af56dfc1394eea4e7b3a (patch) | |
tree | 712d8e70c84d9443c3ef6c912f20b1da42457150 /bgpd/bgp_table.h | |
parent | Merge pull request #3021 from donaldsharp/more_upstream (diff) | |
download | frr-b1e62edd5ed63256db05af56dfc1394eea4e7b3a.tar.xz frr-b1e62edd5ed63256db05af56dfc1394eea4e7b3a.zip |
bgpd: Abstract aggregate retrieving/setting from info pointer
The aggregate 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 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bgpd/bgp_table.h b/bgpd/bgp_table.h index 60c2cbd4a..fc1942db5 100644 --- a/bgpd/bgp_table.h +++ b/bgpd/bgp_table.h @@ -313,4 +313,17 @@ static inline uint64_t bgp_table_version(struct bgp_table *table) void bgp_table_range_lookup(const struct bgp_table *table, struct prefix *p, uint8_t maxlen, struct list *matches); + +static inline struct bgp_aggregate * +bgp_aggregate_get_node_info(struct bgp_node *node) +{ + return node->info; +} + +static inline void bgp_aggregate_set_node_info(struct bgp_node *node, + struct bgp_aggregate *aggregate) +{ + node->info = aggregate; +} + #endif /* _QUAGGA_BGP_TABLE_H */ |