--- embedaddon/quagga/bgpd/bgp_advertise.h 2012/02/21 17:26:12 1.1.1.1 +++ embedaddon/quagga/bgpd/bgp_advertise.h 2016/11/02 10:09:10 1.1.1.2 @@ -21,12 +21,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330 #ifndef _QUAGGA_BGP_ADVERTISE_H #define _QUAGGA_BGP_ADVERTISE_H -/* BGP advertise FIFO. */ -struct bgp_advertise_fifo -{ - struct bgp_advertise *next; - struct bgp_advertise *prev; -}; +#include /* BGP advertise attribute. */ struct bgp_advertise_attr @@ -44,7 +39,7 @@ struct bgp_advertise_attr struct bgp_advertise { /* FIFO for advertisement. */ - struct bgp_advertise_fifo fifo; + struct fifo fifo; /* Link list for same attribute advertise. */ struct bgp_advertise *next; @@ -97,11 +92,13 @@ struct bgp_adj_in /* BGP advertisement list. */ struct bgp_synchronize { - struct bgp_advertise_fifo update; - struct bgp_advertise_fifo withdraw; - struct bgp_advertise_fifo withdraw_low; + struct fifo update; + struct fifo withdraw; + struct fifo withdraw_low; }; +#define BGP_ADV_FIFO_HEAD(F) ((struct bgp_advertise *)FIFO_HEAD(F)) + /* BGP adjacency linked list. */ #define BGP_INFO_ADD(N,A,TYPE) \ do { \ @@ -138,7 +135,7 @@ extern int bgp_adj_out_lookup (struct peer *, struct p struct bgp_node *); extern void bgp_adj_in_set (struct bgp_node *, struct peer *, struct attr *); -extern void bgp_adj_in_unset (struct bgp_node *, struct peer *); +extern int bgp_adj_in_unset (struct bgp_node *, struct peer *); extern void bgp_adj_in_remove (struct bgp_node *, struct bgp_adj_in *); extern struct bgp_advertise *