summaryrefslogtreecommitdiff
path: root/bgpd/bgp_table.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-07-30 10:29:28 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-09-22 14:59:23 -0400
commitca2e160d7dca2621260ddf03e2e07e4c8c4495af (patch)
tree65c7beab1848aff6e76334be1596b2425f2d1d3d /bgpd/bgp_table.h
parentb1e62edd5ed63256db05af56dfc1394eea4e7b3a (diff)
bgpd: Abstract distance retrieving/setting from info pointer
The bgp_distance 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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/bgpd/bgp_table.h b/bgpd/bgp_table.h
index fc1942db5a..6c52d27a82 100644
--- a/bgpd/bgp_table.h
+++ b/bgpd/bgp_table.h
@@ -326,4 +326,15 @@ static inline void bgp_aggregate_set_node_info(struct bgp_node *node,
node->info = aggregate;
}
+static inline struct bgp_distance *bgp_distance_get_node(struct bgp_node *node)
+{
+ return node->info;
+}
+
+static inline void bgp_distance_set_node(struct bgp_node *node,
+ struct bgp_distance *distance)
+{
+ node->info = distance;
+}
+
#endif /* _QUAGGA_BGP_TABLE_H */