diff options
author | paul <paul> | 2003-06-15 01:28:29 +0000 |
---|---|---|
committer | paul <paul> | 2003-06-15 01:28:29 +0000 |
commit | b21b19c5785487f2ff4a6ce38f45c2e6c35f4363 (patch) | |
tree | c79f90ce7bd798b3f1391010153d9fdf7c7418f0 /zebra/main.c | |
parent | 0e4f190ebf5a26e4b66fb49cd74ae0ff0c7e0863 (diff) | |
download | quagga-b21b19c5785487f2ff4a6ce38f45c2e6c35f4363.tar.bz2 quagga-b21b19c5785487f2ff4a6ce38f45c2e6c35f4363.tar.xz |
2003-06-15 Paul Jakma <paul@dishone.st>
* lib/vty.{c,h}: Remove vty layer depending on a 'master' global,
pass the thread master in explicitly to vty_init. Sort out some
header dependency problems with lib/command.h
* zebra/: Move globals to struct zebrad. Update vty_init().
* (.*)/\1_main.c: update call to vty_init().
Diffstat (limited to 'zebra/main.c')
-rw-r--r-- | zebra/main.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/zebra/main.c b/zebra/main.c index 85707f42..c47b83e3 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -36,8 +36,11 @@ #include "zebra/debug.h" #include "zebra/rib.h" -/* Master of threads. */ -struct thread_master *master; +/* Zebra instance */ +struct zebra_t zebrad = +{ + .rtm_table_default = 0, +}; /* process id. */ pid_t old_pid; @@ -280,7 +283,7 @@ main (int argc, char **argv) } /* Make master thread emulator. */ - master = thread_master_create (); + zebrad.master = thread_master_create (); /* privs initialise */ zprivs_init (&zserv_privs); @@ -288,7 +291,7 @@ main (int argc, char **argv) /* Vty related initialize. */ signal_init (); cmd_init (1); - vty_init (); + vty_init (zebrad.master); memory_init (); /* Zebra related initialize. */ @@ -345,7 +348,7 @@ main (int argc, char **argv) /* Make vty server socket. */ vty_serv_sock (vty_addr, vty_port, ZEBRA_VTYSH_PATH); - while (thread_fetch (master, &thread)) + while (thread_fetch (zebrad.master, &thread)) thread_call (&thread); /* Not reached... */ |