diff options
author | Martin Mares <mj@ucw.cz> | 2000-01-16 17:44:50 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-01-16 17:44:50 +0100 |
commit | 50fe90edf3deab409ea7887c131bfe6ce89fa556 (patch) | |
tree | d9aad4ed34285a59cfcc0286a22ca5ccdb63a82f /nest/route.h | |
parent | 394aec8fdd112a81da1e2f6f0e09ee74256dc24e (diff) | |
download | bird-50fe90edf3deab409ea7887c131bfe6ce89fa556.tar bird-50fe90edf3deab409ea7887c131bfe6ce89fa556.zip |
First attempt on dynamic reconfiguration. There are still lots of bugs
and problems to solve, but the hardest part works.
Diffstat (limited to 'nest/route.h')
-rw-r--r-- | nest/route.h | 11 |
1 files changed, 9 insertions, 2 deletions
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 <mj@ucw.cz> + * (c) 1998--2000 Martin Mares <mj@ucw.cz> * * 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); } |