mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Protocols have their own explicit init routines
This commit is contained in:
@@ -2,6 +2,8 @@ src := alloc.c io.c krt.c log.c main.c random.c
|
||||
obj := $(src-o-files)
|
||||
$(all-daemon)
|
||||
$(cf-local)
|
||||
$(call proto-build,kif_build)
|
||||
$(call proto-build,krt_build)
|
||||
$(conf-y-targets): $(s)krt.Y
|
||||
|
||||
src := $(filter-out main.c, $(src))
|
||||
|
||||
@@ -243,6 +243,13 @@ struct protocol proto_unix_iface = {
|
||||
.copy_config = kif_copy_config
|
||||
};
|
||||
|
||||
void
|
||||
kif_build(void)
|
||||
{
|
||||
proto_build(&proto_unix_iface);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Tracing of routes
|
||||
*/
|
||||
@@ -1177,3 +1184,9 @@ struct protocol proto_unix_kernel = {
|
||||
.dump = krt_dump,
|
||||
#endif
|
||||
};
|
||||
|
||||
void
|
||||
krt_build(void)
|
||||
{
|
||||
proto_build(&proto_unix_kernel);
|
||||
}
|
||||
|
||||
@@ -906,8 +906,6 @@ main(int argc, char **argv)
|
||||
open_pid_file();
|
||||
|
||||
protos_build();
|
||||
proto_build(&proto_unix_kernel);
|
||||
proto_build(&proto_unix_iface);
|
||||
|
||||
struct config *conf = read_config();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user