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>
40 #include "ripngd/ripngd.h"
41 #include "ripngd/ripng_nb.h"
44 struct option longopts
[] = {{0}};
46 /* ripngd privileges */
47 zebra_capabilities_t _caps_p
[] = {ZCAP_NET_RAW
, ZCAP_BIND
, ZCAP_SYS_ADMIN
};
49 struct zebra_privs_t ripngd_privs
= {
57 .vty_group
= VTY_GROUP
,
60 .cap_num_p
= array_size(_caps_p
),
64 /* Master of threads. */
65 struct thread_master
*master
;
67 static struct frr_daemon_info ripngd_di
;
70 static void sighup(void)
72 zlog_info("SIGHUP received");
74 /* Reload config file. */
75 vty_read_config(NULL
, ripngd_di
.config_file
, config_default
);
79 static void sigint(void)
81 zlog_notice("Terminating on signal");
83 ripng_vrf_terminate();
90 /* SIGUSR1 handler. */
91 static void sigusr1(void)
96 struct quagga_signal_t ripng_signals
[] = {
115 static const struct frr_yang_module_info
*const ripngd_yang_modules
[] = {
120 FRR_DAEMON_INFO(ripngd
, RIPNG
, .vty_port
= RIPNG_VTY_PORT
,
122 .proghelp
= "Implementation of the RIPng routing protocol.",
124 .signals
= ripng_signals
,
125 .n_signals
= array_size(ripng_signals
),
127 .privs
= &ripngd_privs
,
129 .yang_modules
= ripngd_yang_modules
,
130 .n_yang_modules
= array_size(ripngd_yang_modules
), )
132 #define DEPRECATED_OPTIONS ""
134 /* RIPngd main routine. */
135 int main(int argc
, char **argv
)
137 frr_preinit(&ripngd_di
, argc
, argv
);
139 frr_opt_add("" DEPRECATED_OPTIONS
, longopts
, "");
144 opt
= frr_getopt(argc
, argv
, NULL
);
146 if (opt
&& opt
< 128 && strchr(DEPRECATED_OPTIONS
, opt
)) {
148 "The -%c option no longer exists.\nPlease refer to the manual.\n",