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.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/bgpd/bgp_advertise.h b/bgpd/bgp_advertise.h
index 51ba6267..6babc16c 100644
--- a/bgpd/bgp_advertise.h
+++ b/bgpd/bgp_advertise.h
@@ -23,6 +23,14 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include <lib/fifo.h>
+/* BGP advertise FIFO. */
+struct bgp_advertise_fifo
+{
+ struct bgp_advertise *next;
+ struct bgp_advertise *prev;
+ u_int32_t count;
+};
+
/* BGP advertise attribute. */
struct bgp_advertise_attr
{
@@ -124,6 +132,27 @@ struct bgp_synchronize
#define BGP_ADJ_OUT_ADD(N,A) BGP_INFO_ADD(N,A,adj_out)
#define BGP_ADJ_OUT_DEL(N,A) BGP_INFO_DEL(N,A,adj_out)
+#define BGP_ADV_FIFO_ADD(F, N) \
+ do { \
+ FIFO_ADD((F), (N)); \
+ (F)->count++; \
+ } while (0)
+
+#define BGP_ADV_FIFO_DEL(F, N) \
+ do { \
+ FIFO_DEL((N)); \
+ (F)->count--; \
+ } while (0)
+
+#define BGP_ADV_FIFO_INIT(F) \
+ do { \
+ FIFO_INIT((F)); \
+ (F)->count = 0; \
+ } while (0)
+
+#define BGP_ADV_FIFO_COUNT(F) \
+ (F)->count
+
/* Prototypes. */
extern void bgp_adj_out_set (struct bgp_node *, struct peer *, struct prefix *,
struct attr *, afi_t, safi_t, struct bgp_info *);