version 1.1.1.1, 2012/02/21 17:26:11
|
version 1.1.1.4, 2016/11/02 10:09:12
|
Line 34
|
Line 34
|
#include "if.h" |
#include "if.h" |
#include "privs.h" |
#include "privs.h" |
#include "sigevent.h" |
#include "sigevent.h" |
|
#include "vrf.h" |
|
|
#include "ripngd/ripngd.h" |
#include "ripngd/ripngd.h" |
|
|
Line 47 struct option longopts[] =
|
Line 48 struct option longopts[] =
|
{ "daemon", no_argument, NULL, 'd'}, |
{ "daemon", no_argument, NULL, 'd'}, |
{ "config_file", required_argument, NULL, 'f'}, |
{ "config_file", required_argument, NULL, 'f'}, |
{ "pid_file", required_argument, NULL, 'i'}, |
{ "pid_file", required_argument, NULL, 'i'}, |
|
{ "socket", required_argument, NULL, 'z'}, |
{ "dryrun", no_argument, NULL, 'C'}, |
{ "dryrun", no_argument, NULL, 'C'}, |
{ "help", no_argument, NULL, 'h'}, |
{ "help", no_argument, NULL, 'h'}, |
{ "vty_addr", required_argument, NULL, 'A'}, |
{ "vty_addr", required_argument, NULL, 'A'}, |
Line 112 Daemon which manages RIPng.\n\n\
|
Line 114 Daemon which manages RIPng.\n\n\
|
-d, --daemon Runs in daemon mode\n\ |
-d, --daemon Runs in daemon mode\n\ |
-f, --config_file Set configuration file name\n\ |
-f, --config_file Set configuration file name\n\ |
-i, --pid_file Set process identifier file name\n\ |
-i, --pid_file Set process identifier file name\n\ |
|
-z, --socket Set path of zebra socket\n\ |
-A, --vty_addr Set vty's bind address\n\ |
-A, --vty_addr Set vty's bind address\n\ |
-P, --vty_port Set vty's port number\n\ |
-P, --vty_port Set vty's port number\n\ |
-r, --retain When program terminates, retain added route by ripngd.\n\ |
-r, --retain When program terminates, retain added route by ripngd.\n\ |
Line 125 Report bugs to %s\n", progname, ZEBRA_BUG_ADDRESS);
|
Line 128 Report bugs to %s\n", progname, ZEBRA_BUG_ADDRESS);
|
} |
} |
exit (status); |
exit (status); |
} |
} |
| |
/* SIGHUP handler. */ |
/* SIGHUP handler. */ |
static void |
static void |
sighup (void) |
sighup (void) |
Line 180 struct quagga_signal_t ripng_signals[] =
|
Line 183 struct quagga_signal_t ripng_signals[] =
|
.handler = &sigint, |
.handler = &sigint, |
}, |
}, |
}; |
}; |
| |
/* RIPngd main routine. */ |
/* RIPngd main routine. */ |
int |
int |
main (int argc, char **argv) |
main (int argc, char **argv) |
Line 205 main (int argc, char **argv)
|
Line 208 main (int argc, char **argv)
|
{ |
{ |
int opt; |
int opt; |
|
|
opt = getopt_long (argc, argv, "df:i:hA:P:u:g:vC", longopts, 0); | opt = getopt_long (argc, argv, "df:i:z:hA:P:u:g:vC", longopts, 0); |
|
|
if (opt == EOF) |
if (opt == EOF) |
break; |
break; |
Line 225 main (int argc, char **argv)
|
Line 228 main (int argc, char **argv)
|
break; |
break; |
case 'i': |
case 'i': |
pid_file = optarg; |
pid_file = optarg; |
break; | break; |
| case 'z': |
| zclient_serv_path_set (optarg); |
| break; |
case 'P': |
case 'P': |
/* Deal with atoi() returning 0 on failure, and ripngd not |
/* Deal with atoi() returning 0 on failure, and ripngd not |
listening on ripngd port... */ |
listening on ripngd port... */ |
Line 267 main (int argc, char **argv)
|
Line 273 main (int argc, char **argv)
|
|
|
/* Library inits. */ |
/* Library inits. */ |
zprivs_init (&ripngd_privs); |
zprivs_init (&ripngd_privs); |
signal_init (master, Q_SIGC(ripng_signals), ripng_signals); | signal_init (master, array_size(ripng_signals), ripng_signals); |
cmd_init (1); |
cmd_init (1); |
vty_init (master); |
vty_init (master); |
memory_init (); |
memory_init (); |
|
vrf_init (); |
|
|
/* RIPngd inits. */ |
/* RIPngd inits. */ |
ripng_init (); |
ripng_init (); |
zebra_init (); | zebra_init (master); |
ripng_peer_init (); |
ripng_peer_init (); |
|
|
/* Sort all installed commands. */ |
|
sort_node (); |
|
|
|
/* Get configuration file. */ |
/* Get configuration file. */ |
vty_read_config (config_file, config_default); |
vty_read_config (config_file, config_default); |