summaryrefslogtreecommitdiffstats
path: root/proto/bgp/bgp.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2010-11-16 03:47:07 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2010-11-16 03:47:07 +0100
commit5b885bf70848908c7fed07c8efba18ea316379d4 (patch)
treeb4a94b0b5a49d2dd075a054270c386419c42900d /proto/bgp/bgp.h
parente6eee664723aa0e1d87eac65216cdf12636e3284 (diff)
downloadbird-5b885bf70848908c7fed07c8efba18ea316379d4.tar
bird-5b885bf70848908c7fed07c8efba18ea316379d4.zip
BGP: Allow receiving multicast routes
Diffstat (limited to 'proto/bgp/bgp.h')
-rw-r--r--proto/bgp/bgp.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h
index 359bd9c..6f998b0 100644
--- a/proto/bgp/bgp.h
+++ b/proto/bgp/bgp.h
@@ -80,6 +80,14 @@ struct bgp_conn {
unsigned hold_time, keepalive_time; /* Times calculated from my and neighbor's requirements */
};
+struct bgp_bucket_info {
+ 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_proto {
struct proto p;
struct bgp_config *cf; /* Shortcut to BGP configuration */
@@ -87,6 +95,7 @@ struct bgp_proto {
int start_state; /* Substates that partitions BS_START */
int is_internal; /* Internal BGP connection (local_as == remote_as) */
int as4_session; /* Session uses 4B AS numbers in AS_PATH (both sides support it) */
+ int multicast_session; /* Both sides support multicast routes */
u32 local_id; /* BGP identifier of this router */
u32 remote_id; /* BGP identifier of the neighbor */
u32 rr_cluster_id; /* Route reflector cluster ID */
@@ -101,11 +110,8 @@ struct bgp_proto {
rtable *igp_table; /* Table used for recursive next hop lookups */
struct event *event; /* Event for respawning and shutting process */
struct timer *startup_timer; /* Timer used to delay protocol startup due to previous errors (startup_delay) */
- 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_bucket_info unicast_buckets;
+ struct bgp_bucket_info multicast_buckets;
unsigned startup_delay; /* Time to delay protocol startup by due to errors */
bird_clock_t last_proto_error; /* Time of last error that leads to protocol stop */
u8 last_error_class; /* Error class of last error */
@@ -188,7 +194,7 @@ void bgp_rt_notify(struct proto *P, rtable *tbl UNUSED, net *n, rte *new, rte *o
int bgp_import_control(struct proto *, struct rte **, struct ea_list **, struct linpool *);
void bgp_attr_init(struct bgp_proto *);
unsigned int bgp_encode_attrs(struct bgp_proto *p, byte *w, ea_list *attrs, int remains);
-void bgp_free_bucket(struct bgp_proto *p, struct bgp_bucket *buck);
+void bgp_free_bucket(struct bgp_bucket_info *bi, struct bgp_bucket *buck);
void bgp_get_route_info(struct rte *, byte *buf, struct ea_list *attrs);
inline static void bgp_attach_attr_ip(struct ea_list **to, struct linpool *pool, unsigned attr, ip_addr a)