diff options
author | David Lamparter <equinox@diac24.net> | 2010-02-04 03:08:58 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2010-02-04 03:08:58 +0100 |
commit | d64aaf21c613c4ea3bcb41b718102126540c6d9e (patch) | |
tree | 8dfc10f8b03548eb7289643abac636a95fdf26e2 | |
parent | 406aadbf8ec3605115ba9a83d4994c2b61d0f5b3 (diff) | |
download | quagga-d64aaf21c613c4ea3bcb41b718102126540c6d9e.tar.bz2 quagga-d64aaf21c613c4ea3bcb41b718102126540c6d9e.tar.xz |
pimd: post-merge fixups
-rw-r--r-- | lib/route_types.txt | 3 | ||||
-rw-r--r-- | pimd/.gitignore | 19 | ||||
-rw-r--r-- | pimd/pim_main.c | 18 | ||||
-rw-r--r-- | pimd/pim_zebra.c | 3 | ||||
-rw-r--r-- | pimd/pim_zlookup.c | 7 |
5 files changed, 42 insertions, 8 deletions
diff --git a/lib/route_types.txt b/lib/route_types.txt index fde0bc8d..d2d4cb6c 100644 --- a/lib/route_types.txt +++ b/lib/route_types.txt @@ -58,6 +58,7 @@ ZEBRA_ROUTE_BGP, bgp, bgpd, 'B', 1, 1, "BGP" # possible). ZEBRA_ROUTE_HSLS, hsls, hslsd, 'H', 0, 0, "HSLS" ZEBRA_ROUTE_OLSR, olsr, olsrd, 'o', 0, 0, "OLSR" +ZEBRA_ROUTE_PIM, pim, pimd, 'P', 0, 0, "PIM-SSM" ## help strings ZEBRA_ROUTE_SYSTEM, "Reserved route type, for internal use only" @@ -72,3 +73,5 @@ ZEBRA_ROUTE_ISIS, "Intermediate System to Intermediate System (IS-IS)" ZEBRA_ROUTE_BGP, "Border Gateway Protocol (BGP)" ZEBRA_ROUTE_HSLS, "Hazy-Sighted Link State Protocol (HSLS)" ZEBRA_ROUTE_OLSR, "Optimised Link State Routing (OLSR)" +ZEBRA_ROUTE_PIM, "Protocol Independent Multicast, Source Specific Mode (PIM-SSM)" + diff --git a/pimd/.gitignore b/pimd/.gitignore new file mode 100644 index 00000000..b27998ea --- /dev/null +++ b/pimd/.gitignore @@ -0,0 +1,19 @@ +Makefile +Makefile.in +*.o +pimd +test_igmpv3_join +pimd.conf +libpim.a +tags +TAGS +.deps +.nfs* +*.lo +*.la +*.libs +.arch-inventory +.arch-ids +*~ +*.loT + diff --git a/pimd/pim_main.c b/pimd/pim_main.c index 3cf1869c..ace49cd7 100644 --- a/pimd/pim_main.c +++ b/pimd/pim_main.c @@ -35,6 +35,7 @@ #include "vty.h" #include "sigevent.h" #include "version.h" +#include "paths.h" #include "pimd.h" #include "pim_version.h" @@ -48,10 +49,11 @@ extern int zclient_debug; extern struct host host; extern const char *default_motd; -char config_default[] = SYSCONFDIR PIMD_DEFAULT_CONFIG; +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'}, { "vty_addr", required_argument, NULL, 'A'}, @@ -86,7 +88,8 @@ struct zebra_privs_t pimd_privs = }; char* progname; -const char *pid_file = PATH_PIMD_PID; +static char pid_file_default[MAXPATHLEN]; +const char *pid_file = pid_file_default; static void usage(int status) { @@ -96,6 +99,7 @@ static void usage(int status) printf ("Usage : %s [OPTION...]\n\ Daemon which manages PIM.\n\n\ -d, --daemon Run 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\ @@ -138,7 +142,7 @@ int main(int argc, char** argv, char** envp) { while (1) { int opt; - opt = getopt_long (argc, argv, "df:i:A:P:vZh", longopts, 0); + opt = getopt_long (argc, argv, "dN:f:i:A:P:vZh", longopts, 0); if (opt == EOF) break; @@ -149,6 +153,9 @@ int main(int argc, char** argv, char** envp) { case 'd': daemon_mode = 1; break; + case 'N': + path_set_namespace (optarg); + break; case 'f': config_file = optarg; break; @@ -180,6 +187,9 @@ int main(int argc, char** argv, char** envp) { } } + strcpy (config_default, path_config ("pimd.conf")); + strcpy (pid_file_default, path_state ("pimd.pid")); + master = thread_master_create(); /* @@ -237,7 +247,7 @@ int main(int argc, char** argv, char** envp) { /* Create pimd VTY socket */ if (vty_port < 0) vty_port = PIMD_VTY_PORT; - vty_serv_sock(vty_addr, vty_port, PIM_VTYSH_PATH); + vty_serv_sock(vty_addr, vty_port, path_state ("pimd.vty")); zlog_notice("Quagga %s " PIMD_PROGNAME " %s starting, VTY interface at port TCP %d", QUAGGA_VERSION, PIMD_VERSION, vty_port); diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 3530434d..9e3a0ec3 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -29,6 +29,7 @@ #include "zclient.h" #include "stream.h" #include "network.h" +#include "paths.h" #include "pimd.h" #include "pim_pim.h" @@ -608,7 +609,7 @@ void pim_zebra_init() #ifdef HAVE_TCP_ZEBRA zlog_notice("zclient update contacting ZEBRA daemon at socket TCP %s,%d", "127.0.0.1", ZEBRA_PORT); #else - zlog_notice("zclient update contacting ZEBRA daemon at socket UNIX %s", ZEBRA_SERV_PATH); + zlog_notice("zclient update contacting ZEBRA daemon at socket UNIX %s", path_state (ZEBRA_SERV_NAME)); #endif /* Socket for receiving updates from Zebra daemon */ diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index 98548e79..5f3eeaba 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -29,6 +29,7 @@ #include "stream.h" #include "network.h" #include "thread.h" +#include "paths.h" #include "pimd.h" #include "pim_pim.h" @@ -66,14 +67,14 @@ static int zclient_lookup_connect(struct thread *t) #else zlog_debug("%s: FIXME blocking connect: zclient_socket_un()", __PRETTY_FUNCTION__); - zlookup->sock = zclient_socket_un(ZEBRA_SERV_PATH); + zlookup->sock = zclient_socket_un(path_state (ZEBRA_SERV_NAME)); if (zlookup->sock < 0) { zlog_warn("%s: failure connecting UNIX socket %s", - __PRETTY_FUNCTION__, ZEBRA_SERV_PATH); + __PRETTY_FUNCTION__, path_state (ZEBRA_SERV_NAME)); } else if (zclient_debug) { zlog_notice("%s: connected UNIX socket %s", - __PRETTY_FUNCTION__, ZEBRA_SERV_PATH); + __PRETTY_FUNCTION__, path_state (ZEBRA_SERV_NAME)); } #endif /* HAVE_TCP_ZEBRA */ |