#include "libfrr.h"
#include "ripd/ripd.h"
+#include "ripd/rip_errors.h"
/* ripd options. */
+#if CONFDATE > 20190521
+ CPP_NOTICE("-r / --retain has reached deprecation EOL, remove")
+#endif
static struct option longopts[] = {{"retain", no_argument, NULL, 'r'}, {0}};
/* ripd privileges */
.cap_num_p = 2,
.cap_num_i = 0};
-/* Route retain mode flag. */
-int retain_mode = 0;
-
/* Master of threads. */
struct thread_master *master;
zlog_info("ripd restarting!");
/* Reload config file. */
- vty_read_config(ripd_di.config_file, config_default);
+ vty_read_config(NULL, ripd_di.config_file, config_default);
/* Try to return to normal operation. */
}
{
zlog_notice("Terminating on signal");
- if (!retain_mode)
- rip_clean();
+ rip_clean();
rip_zclient_stop();
frr_fini();
},
};
+static const struct frr_yang_module_info *ripd_yang_modules[] = {
+ &frr_interface_info,
+ &frr_ripd_info,
+};
+
FRR_DAEMON_INFO(ripd, RIP, .vty_port = RIP_VTY_PORT,
.proghelp = "Implementation of the RIP routing protocol.",
.signals = ripd_signals, .n_signals = array_size(ripd_signals),
- .privs = &ripd_privs, )
+ .privs = &ripd_privs, .yang_modules = ripd_yang_modules,
+ .n_yang_modules = array_size(ripd_yang_modules), )
+
+#if CONFDATE > 20190521
+CPP_NOTICE("-r / --retain has reached deprecation EOL, remove")
+#endif
+#define DEPRECATED_OPTIONS "r"
/* Main routine of ripd. */
int main(int argc, char **argv)
{
frr_preinit(&ripd_di, argc, argv);
- frr_opt_add(
- "r", longopts,
- " -r, --retain When program terminates, retain added route by ripd.\n");
+
+ frr_opt_add("" DEPRECATED_OPTIONS, longopts, "");
/* Command line option parse. */
while (1) {
opt = frr_getopt(argc, argv, NULL);
+ if (opt && opt < 128 && strchr(DEPRECATED_OPTIONS, opt)) {
+ fprintf(stderr,
+ "The -%c option no longer exists.\nPlease refer to the manual.\n",
+ opt);
+ continue;
+ }
+
if (opt == EOF)
break;
switch (opt) {
case 0:
break;
- case 'r':
- retain_mode = 1;
- break;
default:
frr_help_exit(1);
break;
master = frr_init();
/* Library initialization. */
+ rip_error_init();
keychain_init();
- vrf_init(NULL, NULL, NULL, NULL);
+ vrf_init(NULL, NULL, NULL, NULL, NULL);
/* RIP related initialization. */
rip_init();
rip_if_init();
+ rip_cli_init();
rip_zclient_init(master);
rip_peer_init();