summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_table.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-07-30 16:30:41 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-09-22 20:59:23 +0200
commita78beeb544e9b6407cf71e45bdb4cd70788e2c2d (patch)
tree08152a1ab735f2d86d4bd9ee763b03ce80e1447c /bgpd/bgp_table.h
parentbgpd: Abstract distance retrieving/setting from info pointer (diff)
downloadfrr-a78beeb544e9b6407cf71e45bdb4cd70788e2c2d.tar.xz
frr-a78beeb544e9b6407cf71e45bdb4cd70788e2c2d.zip
bgpd: Abstract bgp_static retrieving/setting from info pointer
The bgp_static 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.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/bgpd/bgp_table.h b/bgpd/bgp_table.h
index 6c52d27a8..e7206cf4e 100644
--- a/bgpd/bgp_table.h
+++ b/bgpd/bgp_table.h
@@ -331,10 +331,20 @@ 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)
+static inline void bgp_distance_set_node_info(struct bgp_node *node,
+ struct bgp_distance *distance)
{
node->info = distance;
}
+static inline struct bgp_static *bgp_static_get_node_info(struct bgp_node *node)
+{
+ return node->info;
+}
+
+static inline void bgp_static_set_node_info(struct bgp_node *node,
+ struct bgp_static *bgp_static)
+{
+ node->info = bgp_static;
+}
#endif /* _QUAGGA_BGP_TABLE_H */