1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2020 NetDEF, Inc.
7 #include <lib/version.h>
21 #include "path_zebra.h"
22 #include "path_errors.h"
25 char backup_config_file
[256];
27 zebra_capabilities_t _caps_p
[] = {};
29 struct zebra_privs_t pathd_privs
= {
30 #if defined(FRR_USER) && defined(FRR_GROUP)
34 #if defined(VTY_GROUP)
35 .vty_group
= VTY_GROUP
,
38 .cap_num_p
= array_size(_caps_p
),
41 struct option longopts
[] = {{0}};
43 /* Master of threads. */
44 struct event_loop
*master
;
46 static struct frr_daemon_info pathd_di
;
49 static void sighup(void)
51 zlog_info("SIGHUP received");
53 /* Reload config file. */
54 vty_read_config(NULL
, pathd_di
.config_file
, config_default
);
57 /* SIGINT / SIGTERM handler. */
58 static void sigint(void)
60 zlog_notice("Terminating on signal");
61 zlog_notice("Unregisterfrom opaque,etc ");
67 /* SIGUSR1 handler. */
68 static void sigusr1(void)
73 struct frr_signal_t path_signals
[] = {
92 static const struct frr_yang_module_info
*pathd_yang_modules
[] = {
98 #define PATH_VTY_PORT 2621
100 FRR_DAEMON_INFO(pathd
, PATH
, .vty_port
= PATH_VTY_PORT
,
102 .proghelp
= "Implementation of PATH.",
104 .signals
= path_signals
, .n_signals
= array_size(path_signals
),
106 .privs
= &pathd_privs
, .yang_modules
= pathd_yang_modules
,
107 .n_yang_modules
= array_size(pathd_yang_modules
),
110 int main(int argc
, char **argv
, char **envp
)
112 frr_preinit(&pathd_di
, argc
, argv
);
113 frr_opt_add("", longopts
, "");
118 opt
= frr_getopt(argc
, argv
, NULL
);
136 path_zebra_init(master
);
138 path_ted_init(master
);