1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright (C) 1998, 1999 Kunihiro Ishiguro
9 #include <lib/version.h>
26 #include "ripngd/ripngd.h"
27 #include "ripngd/ripng_nb.h"
30 struct option longopts
[] = {{0}};
32 /* ripngd privileges */
33 zebra_capabilities_t _caps_p
[] = {ZCAP_NET_RAW
, ZCAP_BIND
, ZCAP_SYS_ADMIN
};
35 struct zebra_privs_t ripngd_privs
= {
43 .vty_group
= VTY_GROUP
,
46 .cap_num_p
= array_size(_caps_p
),
50 /* Master of threads. */
51 struct thread_master
*master
;
53 static struct frr_daemon_info ripngd_di
;
56 static void sighup(void)
58 zlog_info("SIGHUP received");
60 /* Reload config file. */
61 vty_read_config(NULL
, ripngd_di
.config_file
, config_default
);
65 static void sigint(void)
67 zlog_notice("Terminating on signal");
69 ripng_vrf_terminate();
76 /* SIGUSR1 handler. */
77 static void sigusr1(void)
82 struct frr_signal_t ripng_signals
[] = {
101 static const struct frr_yang_module_info
*const ripngd_yang_modules
[] = {
109 FRR_DAEMON_INFO(ripngd
, RIPNG
, .vty_port
= RIPNG_VTY_PORT
,
111 .proghelp
= "Implementation of the RIPng routing protocol.",
113 .signals
= ripng_signals
,
114 .n_signals
= array_size(ripng_signals
),
116 .privs
= &ripngd_privs
,
118 .yang_modules
= ripngd_yang_modules
,
119 .n_yang_modules
= array_size(ripngd_yang_modules
),
122 #define DEPRECATED_OPTIONS ""
124 /* RIPngd main routine. */
125 int main(int argc
, char **argv
)
127 frr_preinit(&ripngd_di
, argc
, argv
);
129 frr_opt_add("" DEPRECATED_OPTIONS
, longopts
, "");
134 opt
= frr_getopt(argc
, argv
, NULL
);
136 if (opt
&& opt
< 128 && strchr(DEPRECATED_OPTIONS
, opt
)) {
138 "The -%c option no longer exists.\nPlease refer to the manual.\n",