summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_advertise.h
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_advertise.h')
-rw-r--r--bgpd/bgp_advertise.h38
1 files changed, 22 insertions, 16 deletions
diff --git a/bgpd/bgp_advertise.h b/bgpd/bgp_advertise.h
index 94168e2..4982106 100644
--- a/bgpd/bgp_advertise.h
+++ b/bgpd/bgp_advertise.h
@@ -11,26 +11,19 @@
PREDECL_DLIST(bgp_adv_fifo);
struct update_subgroup;
+struct bgp_advertise;
-/* BGP advertise attribute. */
-struct bgp_advertise_attr {
- /* Head of advertisement pointer. */
- struct bgp_advertise *adv;
-
- /* Reference counter. */
- unsigned long refcnt;
+PREDECL_DLIST(bgp_advertise_attr_fifo);
- /* Attribute pointer to be announced. */
- struct attr *attr;
-};
+struct bgp_advertise_attr;
+/* BGP advertise attribute. */
struct bgp_advertise {
/* FIFO for advertisement. */
struct bgp_adv_fifo_item fifo;
- /* Link list for same attribute advertise. */
- struct bgp_advertise *next;
- struct bgp_advertise *prev;
+ /* FIFO for this item in the bgp_advertise_attr fifo */
+ struct bgp_advertise_attr_fifo_item item;
/* Prefix information. */
struct bgp_dest *dest;
@@ -45,8 +38,21 @@ struct bgp_advertise {
struct bgp_path_info *pathi;
};
+DECLARE_DLIST(bgp_advertise_attr_fifo, struct bgp_advertise, item);
DECLARE_DLIST(bgp_adv_fifo, struct bgp_advertise, fifo);
+/* BGP advertise attribute. */
+struct bgp_advertise_attr {
+ /* Head of advertisement pointer. */
+ struct bgp_advertise_attr_fifo_head fifo;
+
+ /* Reference counter. */
+ unsigned long refcnt;
+
+ /* Attribute pointer to be announced. */
+ struct attr *attr;
+};
+
/* BGP adjacency out. */
struct bgp_adj_out {
/* RB Tree of adjacency entries */
@@ -63,14 +69,14 @@ struct bgp_adj_out {
uint32_t addpath_tx_id;
+ /* Attribute hash */
+ uint32_t attr_hash;
+
/* Advertised attribute. */
struct attr *attr;
/* Advertisement information. */
struct bgp_advertise *adv;
-
- /* Attribute hash */
- uint32_t attr_hash;
};
RB_HEAD(bgp_adj_out_rb, bgp_adj_out);