1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 1997, 98 Kunihiro Ishiguro <kunihiro@zebra.org>
8 #include <lib/version.h>
25 #include "ripd/ripd.h"
26 #include "ripd/rip_nb.h"
27 #include "ripd/rip_errors.h"
30 static struct option longopts
[] = {{0}};
33 zebra_capabilities_t _caps_p
[] = {ZCAP_NET_RAW
, ZCAP_BIND
, ZCAP_SYS_ADMIN
};
35 struct zebra_privs_t ripd_privs
= {
43 .vty_group
= VTY_GROUP
,
46 .cap_num_p
= array_size(_caps_p
),
49 /* Master of threads. */
50 struct thread_master
*master
;
52 static struct frr_daemon_info ripd_di
;
55 static void sighup(void)
57 zlog_info("SIGHUP received");
59 /* Reload config file. */
60 vty_read_config(NULL
, ripd_di
.config_file
, config_default
);
64 static void sigint(void)
66 zlog_notice("Terminating on signal");
76 /* SIGUSR1 handler. */
77 static void sigusr1(void)
82 static struct frr_signal_t ripd_signals
[] = {
101 static const struct frr_yang_module_info
*const ripd_yang_modules
[] = {
109 FRR_DAEMON_INFO(ripd
, RIP
, .vty_port
= RIP_VTY_PORT
,
111 .proghelp
= "Implementation of the RIP routing protocol.",
113 .signals
= ripd_signals
, .n_signals
= array_size(ripd_signals
),
115 .privs
= &ripd_privs
, .yang_modules
= ripd_yang_modules
,
116 .n_yang_modules
= array_size(ripd_yang_modules
),
119 #define DEPRECATED_OPTIONS ""
121 /* Main routine of ripd. */
122 int main(int argc
, char **argv
)
124 frr_preinit(&ripd_di
, argc
, argv
);
126 frr_opt_add("" DEPRECATED_OPTIONS
, longopts
, "");
128 /* Command line option parse. */
132 opt
= frr_getopt(argc
, argv
, NULL
);
134 if (opt
&& opt
< 128 && strchr(DEPRECATED_OPTIONS
, opt
)) {
136 "The -%c option no longer exists.\nPlease refer to the manual.\n",
152 /* Prepare master thread. */
155 /* Library initialization. */
160 /* RIP related initialization. */
164 rip_zclient_init(master
);