summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_main.c')
-rw-r--r--ospfd/ospf_main.c8
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;