mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Protocols have now assigned startup phases
For now, there are 4 phases: Necessary (device), Connector (kernel, pipe), Generator (static, rpki) and Regular. Started and reconfigured are from Necessary to Regular, shutdown backwards. This way, kernel can flush routes before actually being shutdown.
This commit is contained in:
@@ -40,12 +40,20 @@ struct symbol;
|
||||
*/
|
||||
|
||||
|
||||
enum protocol_startup {
|
||||
PROTOCOL_STARTUP_REGULAR = 0, /* Regular network routing protocol, start last */
|
||||
PROTOCOL_STARTUP_GENERATOR = 1, /* Static route generator, start ahead of regulars */
|
||||
PROTOCOL_STARTUP_CONNECTOR = 2, /* Data connector, start first */
|
||||
PROTOCOL_STARTUP_NECESSARY = 3, /* Vital auxiliary data, start zeroth */
|
||||
};
|
||||
|
||||
struct protocol {
|
||||
node n;
|
||||
char *name;
|
||||
char *template; /* Template for automatic generation of names */
|
||||
int name_counter; /* Counter for automatic name generation */
|
||||
uint preference; /* Default protocol preference */
|
||||
enum protocol_startup startup; /* When to start / stop this protocol */
|
||||
uint channel_mask; /* Mask of accepted channel types (NB_*) */
|
||||
uint proto_size; /* Size of protocol data structure */
|
||||
uint config_size; /* Size of protocol config data structure */
|
||||
|
Reference in New Issue
Block a user