diff options
author | Lou Berger <lberger@labn.net> | 2018-12-11 17:13:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-11 17:13:25 +0100 |
commit | 9bdb632c68428cc20a92e00d593ae90cb94690ad (patch) | |
tree | ce01e44e50fe0c627e51d4c1123a3c194fa30954 /bgpd/bgp_table.h | |
parent | Merge pull request #3457 from opensourcerouting/keyless-lists (diff) | |
parent | bgpd: Cleanup bgp_connected_set|get function names (diff) | |
download | frr-9bdb632c68428cc20a92e00d593ae90cb94690ad.tar.xz frr-9bdb632c68428cc20a92e00d593ae90cb94690ad.zip |
Merge pull request #3093 from donaldsharp/bgp_node_continued
Bgp node continued
Diffstat (limited to 'bgpd/bgp_table.h')
-rw-r--r-- | bgpd/bgp_table.h | 64 |
1 files changed, 49 insertions, 15 deletions
diff --git a/bgpd/bgp_table.h b/bgpd/bgp_table.h index 4795ab741..040e83a8c 100644 --- a/bgpd/bgp_table.h +++ b/bgpd/bgp_table.h @@ -61,9 +61,10 @@ struct bgp_node { STAILQ_ENTRY(bgp_node) pq; + uint64_t version; + mpls_label_t local_label; - uint64_t version; uint8_t flags; #define BGP_NODE_PROCESS_SCHEDULED (1 << 0) #define BGP_NODE_USER_CLEAR (1 << 1) @@ -319,61 +320,94 @@ void bgp_table_range_lookup(const struct bgp_table *table, struct prefix *p, static inline struct bgp_aggregate * -bgp_aggregate_get_node_info(struct bgp_node *node) +bgp_node_get_bgp_aggregate_info(struct bgp_node *node) { return node->info; } -static inline void bgp_aggregate_set_node_info(struct bgp_node *node, - struct bgp_aggregate *aggregate) +static inline void +bgp_node_set_bgp_aggregate_info(struct bgp_node *node, + struct bgp_aggregate *aggregate) { node->info = aggregate; } -static inline struct bgp_distance *bgp_distance_get_node(struct bgp_node *node) +static inline struct bgp_distance * +bgp_node_get_bgp_distance_info(struct bgp_node *node) { return node->info; } -static inline void bgp_distance_set_node_info(struct bgp_node *node, - struct bgp_distance *distance) +static inline void bgp_node_set_bgp_distance_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) +static inline struct bgp_static * +bgp_node_get_bgp_static_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) +static inline void bgp_node_set_bgp_static_info(struct bgp_node *node, + struct bgp_static *bgp_static) { node->info = bgp_static; } static inline struct bgp_connected_ref * -bgp_connected_get_node_info(struct bgp_node *node) +bgp_node_get_bgp_connected_ref_info(struct bgp_node *node) { return node->info; } -static inline void bgp_connected_set_node_info(struct bgp_node *node, - struct bgp_connected_ref *bc) +static inline void +bgp_node_set_bgp_connected_ref_info(struct bgp_node *node, + struct bgp_connected_ref *bc) { node->info = bc; } static inline struct bgp_nexthop_cache * -bgp_nexthop_get_node_info(struct bgp_node *node) +bgp_node_get_bgp_nexthop_info(struct bgp_node *node) { return node->info; } -static inline void bgp_nexthop_set_node_info(struct bgp_node *node, +static inline void bgp_node_set_bgp_nexthop_info(struct bgp_node *node, struct bgp_nexthop_cache *bnc) { 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 struct bgp_table * +bgp_node_get_bgp_table_info(struct bgp_node *node) +{ + return node->info; +} + +static inline void bgp_node_set_bgp_table_info(struct bgp_node *node, + struct bgp_table *table) +{ + node->info = table; +} + +static inline bool bgp_node_has_bgp_path_info_data(struct bgp_node *node) +{ + return !!node->info; +} + #endif /* _QUAGGA_BGP_TABLE_H */ |