summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_main.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2009-10-15 13:48:17 +0200
committerDavid Lamparter <equinox@diac24.net>2010-02-04 02:53:48 +0100
commit771d0b2c006702b739e707bc3967679bbb68389e (patch)
treefb8368af8256a8e1deaeac2be27030234d8ef58a /bgpd/bgp_main.c
parentdb0516ace09969cba08f5a6aaddf97b29b5ecb78 (diff)
downloadquagga-771d0b2c006702b739e707bc3967679bbb68389e.tar.bz2
quagga-771d0b2c006702b739e707bc3967679bbb68389e.tar.xz
lib: fs namespacing 4/5: add -N command-line parameter
this adds a -N option to all daemons which specifies the namespace name to include in all paths through path_set_namespace
Diffstat (limited to 'bgpd/bgp_main.c')
-rw-r--r--bgpd/bgp_main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index f6dc1cae..f761f238 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -53,6 +53,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
static const 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'},
{ "bgp_port", required_argument, NULL, 'p'},
@@ -151,6 +152,7 @@ usage (char *progname, int status)
Daemon which manages kernel routing table management and \
redistribution between different routing protocols.\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\
-p, --bgp_port Set bgp protocol's port number\n\
@@ -331,7 +333,7 @@ main (int argc, char **argv)
/* Command line argument treatment. */
while (1)
{
- opt = getopt_long (argc, argv, "df:i:hp:l:A:P:rnu:g:vC", longopts, 0);
+ opt = getopt_long (argc, argv, "dN:f:i:hp:l:A:P:rnu:g:vC", longopts, 0);
if (opt == EOF)
break;
@@ -343,6 +345,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;