|
|
| version 1.1, 2012/02/21 17:26:12 | version 1.1.1.4, 2016/11/02 10:09:10 |
|---|---|
| Line 32 | Line 32 |
| #include "log.h" | #include "log.h" |
| #include "privs.h" | #include "privs.h" |
| #include "sigevent.h" | #include "sigevent.h" |
| #include "zclient.h" | |
| #include "vrf.h" | |
| #include "ripd/ripd.h" | #include "ripd/ripd.h" |
| Line 41 static struct option longopts[] = | Line 43 static 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'}, | |
| { "help", no_argument, NULL, 'h'}, | { "help", no_argument, NULL, 'h'}, |
| { "dryrun", no_argument, NULL, 'C'}, | { "dryrun", no_argument, NULL, 'C'}, |
| { "vty_addr", required_argument, NULL, 'A'}, | { "vty_addr", required_argument, NULL, 'A'}, |
| Line 109 Daemon which manages RIP version 1 and 2.\n\n\ | Line 112 Daemon which manages RIP version 1 and 2.\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\ |
| -C, --dryrun Check configuration for validity and exit\n\ | -C, --dryrun Check configuration for validity and exit\n\ |
| Line 123 Report bugs to %s\n", progname, ZEBRA_BUG_ADDRESS); | Line 127 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 static struct quagga_signal_t ripd_signals[] = | Line 184 static struct quagga_signal_t ripd_signals[] = |
| .handler = &sigint, | .handler = &sigint, |
| }, | }, |
| }; | }; |
| /* Main routine of ripd. */ | /* Main routine of ripd. */ |
| int | int |
| main (int argc, char **argv) | main (int argc, char **argv) |
| Line 206 main (int argc, char **argv) | Line 210 main (int argc, char **argv) |
| { | { |
| int opt; | int opt; |
| opt = getopt_long (argc, argv, "df:i:hA:P:u:g:rvC", longopts, 0); | opt = getopt_long (argc, argv, "df:i:z:hA:P:u:g:rvC", longopts, 0); |
| if (opt == EOF) | if (opt == EOF) |
| break; | break; |
| Line 227 main (int argc, char **argv) | Line 231 main (int argc, char **argv) |
| 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 ripd not | /* Deal with atoi() returning 0 on failure, and ripd not |
| listening on rip port... */ | listening on rip port... */ |
| Line 269 main (int argc, char **argv) | Line 276 main (int argc, char **argv) |
| /* Library initialization. */ | /* Library initialization. */ |
| zprivs_init (&ripd_privs); | zprivs_init (&ripd_privs); |
| signal_init (master, Q_SIGC(ripd_signals), ripd_signals); | signal_init (master, array_size(ripd_signals), ripd_signals); |
| cmd_init (1); | cmd_init (1); |
| vty_init (master); | vty_init (master); |
| memory_init (); | memory_init (); |
| keychain_init (); | keychain_init (); |
| vrf_init (); | |
| /* RIP related initialization. */ | /* RIP related initialization. */ |
| rip_init (); | rip_init (); |
| rip_if_init (); | rip_if_init (); |
| rip_zclient_init (); | rip_zclient_init (master); |
| rip_peer_init (); | rip_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); |