3 * Copyright (C) 1998, 1999 Kunihiro Ishiguro
5 * This file is part of GNU Zebra.
7 * GNU Zebra is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
12 * GNU Zebra is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; see the file COPYING; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #include <lib/version.h>
30 #include "memory_vty.h"
40 #include "ripngd/ripngd.h"
43 struct option longopts
[] =
45 { "retain", no_argument
, NULL
, 'r'},
49 /* ripngd privileges */
50 zebra_capabilities_t _caps_p
[] =
56 struct zebra_privs_t ripngd_privs
=
65 .vty_group
= VTY_GROUP
,
73 /* RIPngd program name */
75 /* Route retain mode flag. */
78 /* Master of threads. */
79 struct thread_master
*master
;
81 static struct frr_daemon_info ripngd_di
;
87 zlog_info ("SIGHUP received");
91 /* Reload config file. */
92 vty_read_config (ripngd_di
.config_file
, config_default
);
94 /* Try to return to normal operation. */
101 zlog_notice ("Terminating on signal");
109 /* SIGUSR1 handler. */
116 struct quagga_signal_t ripng_signals
[] =
136 FRR_DAEMON_INFO(ripngd
, RIPNG
,
137 .vty_port
= RIPNG_VTY_PORT
,
139 .proghelp
= "Implementation of the RIPng routing protocol.",
141 .signals
= ripng_signals
,
142 .n_signals
= array_size(ripng_signals
),
144 .privs
= &ripngd_privs
,
147 /* RIPngd main routine. */
149 main (int argc
, char **argv
)
151 frr_preinit (&ripngd_di
, argc
, argv
);
152 frr_opt_add ("r", longopts
,
153 " -r, --retain When program terminates, retain added route by ripd.\n");
159 opt
= frr_getopt (argc
, argv
, NULL
);
177 master
= frr_init ();
180 vrf_init (NULL
, NULL
, NULL
, NULL
);