2 * Copyright (C) 2020 NetDEF, Inc.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; either version 2 of the License, or (at your option)
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along
15 * with this program; see the file COPYING; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #include <lib/version.h>
34 #include "path_zebra.h"
35 #include "path_errors.h"
38 char backup_config_file
[256];
40 zebra_capabilities_t _caps_p
[] = {};
42 struct zebra_privs_t pathd_privs
= {
43 #if defined(FRR_USER) && defined(FRR_GROUP)
47 #if defined(VTY_GROUP)
48 .vty_group
= VTY_GROUP
,
51 .cap_num_p
= array_size(_caps_p
),
54 struct option longopts
[] = {{0}};
56 /* Master of threads. */
57 struct thread_master
*master
;
59 static struct frr_daemon_info pathd_di
;
62 static void sighup(void)
64 zlog_info("SIGHUP received");
66 /* Reload config file. */
67 vty_read_config(NULL
, pathd_di
.config_file
, config_default
);
70 /* SIGINT / SIGTERM handler. */
71 static void sigint(void)
73 zlog_notice("Terminating on signal");
74 zlog_notice("Unregisterfrom opaque,etc ");
80 /* SIGUSR1 handler. */
81 static void sigusr1(void)
86 struct frr_signal_t path_signals
[] = {
105 static const struct frr_yang_module_info
*pathd_yang_modules
[] = {
111 #define PATH_VTY_PORT 2621
113 FRR_DAEMON_INFO(pathd
, PATH
, .vty_port
= PATH_VTY_PORT
,
115 .proghelp
= "Implementation of PATH.",
117 .signals
= path_signals
, .n_signals
= array_size(path_signals
),
119 .privs
= &pathd_privs
, .yang_modules
= pathd_yang_modules
,
120 .n_yang_modules
= array_size(pathd_yang_modules
),
123 int main(int argc
, char **argv
, char **envp
)
125 frr_preinit(&pathd_di
, argc
, argv
);
126 frr_opt_add("", longopts
, "");
131 opt
= frr_getopt(argc
, argv
, NULL
);
149 path_zebra_init(master
);
151 path_ted_init(master
);