mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Better support for multitable protocols.
The nest-protocol interaction is changed to better handle multitable protocols. Multitable protocols now declare that by 'multitable' field, which tells nest that a protocol handles things related to proto-rtable interaction (table locking, announce hook adding, reconfiguration of filters) itself. Filters and stats are moved to announce hooks, a protocol could have different filters and stats to different tables. The patch is based on one from Alexander V. Chernikov, thanks.
This commit is contained in:
@@ -90,7 +90,7 @@ void dump_attrs(rte *e)
|
||||
* @p: protocol instance
|
||||
*
|
||||
* The start() hook is called by the core when it wishes to start
|
||||
* the instance.
|
||||
* the instance. Multitable protocols should lock their tables here.
|
||||
*
|
||||
* Result: new protocol state
|
||||
*/
|
||||
@@ -109,6 +109,17 @@ int start(struct proto *p)
|
||||
int shutdown(struct proto *p)
|
||||
{ DUMMY; }
|
||||
|
||||
/**
|
||||
* cleanup - request instance cleanup
|
||||
* @p: protocol instance
|
||||
*
|
||||
* The cleanup() hook is called by the core when the protocol became
|
||||
* hungry/down, i.e. all protocol ahooks and routes are flushed.
|
||||
* Multitable protocols should unlock their tables here.
|
||||
*/
|
||||
void cleanup(struct proto *p)
|
||||
{ DUMMY; }
|
||||
|
||||
/**
|
||||
* get_status - get instance status
|
||||
* @p: protocol instance
|
||||
|
Reference in New Issue
Block a user