diff options
author | David Lamparter <equinox@diac24.net> | 2009-10-14 18:27:40 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2010-02-04 02:53:48 +0100 |
commit | db0516ace09969cba08f5a6aaddf97b29b5ecb78 (patch) | |
tree | 8821406a797a3388d26fbe328eeea753328cad4a /ospfd/ospf_main.c | |
parent | ac9ed56d887357049bae1bc901e80b58961d6380 (diff) | |
download | quagga-db0516ace09969cba08f5a6aaddf97b29b5ecb78.tar.bz2 quagga-db0516ace09969cba08f5a6aaddf97b29b5ecb78.tar.xz |
lib: fs namespacing 3/5: use path_state for zserv socket
this uses the path_state helper for determining the path of quagga's
zserv.api socket. this allows for running multiple instances of zebra
each with its own interface.
Diffstat (limited to 'ospfd/ospf_main.c')
-rw-r--r-- | ospfd/ospf_main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index 30993aa3..0e9e182a 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -38,6 +38,7 @@ #include "memory.h" #include "privs.h" #include "sigevent.h" +#include "paths.h" #include "ospfd/ospfd.h" #include "ospfd/ospf_interface.h" @@ -78,6 +79,7 @@ char config_default[MAXPATHLEN]; struct option longopts[] = { { "daemon", no_argument, NULL, 'd'}, + { "namespace", required_argument, NULL, 'N'}, { "config_file", required_argument, NULL, 'f'}, { "pid_file", required_argument, NULL, 'i'}, { "dryrun", no_argument, NULL, 'C'}, @@ -117,6 +119,7 @@ usage (char *progname, int status) printf ("Usage : %s [OPTION...]\n\ Daemon which manages OSPF.\n\n\ -d, --daemon Runs in daemon mode\n\ +-N, --namespace Insert argument into all paths\n\ -f, --config_file Set configuration file name\n\ -i, --pid_file Set process identifier file name\n\ -A, --vty_addr Set vty's bind address\n\ @@ -217,7 +220,7 @@ main (int argc, char **argv) { int opt; - opt = getopt_long (argc, argv, "df:i:hA:P:u:g:avC", longopts, 0); + opt = getopt_long (argc, argv, "dN:f:i:hA:P:u:g:avC", longopts, 0); if (opt == EOF) break; @@ -229,6 +232,9 @@ main (int argc, char **argv) case 'd': daemon_mode = 1; break; + case 'N': + path_set_namespace (optarg); + break; case 'f': config_file = optarg; break; |