From 50fe90edf3deab409ea7887c131bfe6ce89fa556 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 16 Jan 2000 16:44:50 +0000 Subject: First attempt on dynamic reconfiguration. There are still lots of bugs and problems to solve, but the hardest part works. --- nest/route.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'nest/route.h') diff --git a/nest/route.h b/nest/route.h index 903e9b9..da793d6 100644 --- a/nest/route.h +++ b/nest/route.h @@ -1,7 +1,7 @@ /* * BIRD Internet Routing Daemon -- Routing Table * - * (c) 1998--1999 Martin Mares + * (c) 1998--2000 Martin Mares * * Can be freely distributed and used under the terms of the GNU GPL. */ @@ -121,6 +121,11 @@ typedef struct rtable { char *name; /* Name of this table */ list hooks; /* List of announcement hooks */ int pipe_busy; /* Pipe loop detection */ + int use_count; /* Number of protocols using this table */ + struct config *deleted; /* Table doesn't exist in current configuration, + * delete as soon as use_count becomes 0 and remove + * obstacle from this routing table. + */ } rtable; typedef struct network { @@ -171,7 +176,9 @@ struct config; void rt_init(void); void rt_preconfig(struct config *); -void rt_commit(struct config *); +void rt_commit(struct config *new, struct config *old); +void rt_lock_table(rtable *); +void rt_unlock_table(rtable *); void rt_setup(pool *, rtable *, char *); static inline net *net_find(rtable *tab, ip_addr addr, unsigned len) { return (net *) fib_find(&tab->fib, &addr, len); } static inline net *net_get(rtable *tab, ip_addr addr, unsigned len) { return (net *) fib_get(&tab->fib, &addr, len); } -- cgit v1.2.3