From c2b28c99103a643dd29ad48152999d6dac7722fe Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 12 Apr 2000 14:09:26 +0000 Subject: Real bucket lists. --- proto/bgp/bgp.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'proto/bgp/bgp.h') diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h index 78bb426..965196b 100644 --- a/proto/bgp/bgp.h +++ b/proto/bgp/bgp.h @@ -9,6 +9,8 @@ #ifndef _BIRD_BGP_H_ #define _BIRD_BGP_H_ +#include "nest/route.h" + struct linpool; struct eattr; @@ -53,8 +55,24 @@ struct bgp_proto { ip_addr next_hop; /* Either the peer or multihop_via */ struct neighbor *neigh; /* Neighbor entry corresponding to next_hop */ ip_addr local_addr; /* Address of the local end of the link to next_hop */ - struct bgp_bucket **bucket_table; /* Hash table of attribute buckets */ + struct bgp_bucket **bucket_hash; /* Hash table of attribute buckets */ unsigned int hash_size, hash_count, hash_limit; + struct fib prefix_fib; /* Prefixes to be sent */ + list bucket_queue; /* Queue of buckets to send */ + struct bgp_bucket *withdraw_bucket; /* Withdrawn routes */ +}; + +struct bgp_prefix { + struct fib_node n; /* Node in prefix fib */ + node bucket_node; /* Node in per-bucket list */ +}; + +struct bgp_bucket { + struct bgp_bucket *hash_next, *hash_prev; /* Node in bucket hash table */ + node send_node; /* Node in send queue */ + unsigned hash; /* Hash over extended attributes */ + list prefixes; /* Prefixes in this buckets */ + ea_list eattrs[0]; /* Per-bucket extended attributes */ }; #define BGP_PORT 179 -- cgit v1.2.3