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
18 * along with GNU Zebra; see the file COPYING. If not, write to the Free
19 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 #include <lib/version.h>
31 #include "memory_vty.h"
41 #include "ripngd/ripngd.h"
44 struct option longopts
[] =
46 { "retain", no_argument
, NULL
, 'r'},
50 /* ripngd privileges */
51 zebra_capabilities_t _caps_p
[] =
57 struct zebra_privs_t ripngd_privs
=
66 .vty_group
= VTY_GROUP
,
74 /* RIPngd program name */
76 /* Route retain mode flag. */
79 /* Master of threads. */
80 struct thread_master
*master
;
82 static struct frr_daemon_info ripngd_di
;
88 zlog_info ("SIGHUP received");
92 /* Reload config file. */
93 vty_read_config (ripngd_di
.config_file
, config_default
);
95 /* Try to return to normal operation. */
102 zlog_notice ("Terminating on signal");
110 /* SIGUSR1 handler. */
117 struct quagga_signal_t ripng_signals
[] =
137 FRR_DAEMON_INFO(ripngd
, RIPNG
,
138 .vty_port
= RIPNG_VTY_PORT
,
140 .proghelp
= "Implementation of the RIPng routing protocol.",
142 .signals
= ripng_signals
,
143 .n_signals
= array_size(ripng_signals
),
145 .privs
= &ripngd_privs
,
148 /* RIPngd main routine. */
150 main (int argc
, char **argv
)
152 frr_preinit (&ripngd_di
, argc
, argv
);
153 frr_opt_add ("r", longopts
,
154 " -r, --retain When program terminates, retain added route by ripd.\n");
160 opt
= frr_getopt (argc
, argv
, NULL
);
178 master
= frr_init ();