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"
37 char backup_config_file
[256];
39 zebra_capabilities_t _caps_p
[] = {};
41 struct zebra_privs_t pathd_privs
= {
42 #if defined(FRR_USER) && defined(FRR_GROUP)
46 #if defined(VTY_GROUP)
47 .vty_group
= VTY_GROUP
,
50 .cap_num_p
= array_size(_caps_p
),
53 struct option longopts
[] = {{0}};
55 /* Master of threads. */
56 struct thread_master
*master
;
58 static struct frr_daemon_info pathd_di
;
61 static void sighup(void)
63 zlog_info("SIGHUP received");
65 /* Reload config file. */
66 vty_read_config(NULL
, pathd_di
.config_file
, config_default
);
69 /* SIGINT / SIGTERM handler. */
70 static void sigint(void)
72 zlog_notice("Terminating on signal");
77 /* SIGUSR1 handler. */
78 static void sigusr1(void)
83 struct quagga_signal_t path_signals
[] = {
102 static const struct frr_yang_module_info
*pathd_yang_modules
[] = {
108 #define PATH_VTY_PORT 2621
110 FRR_DAEMON_INFO(pathd
, PATH
, .vty_port
= PATH_VTY_PORT
,
112 .proghelp
= "Implementation of PATH.",
114 .signals
= path_signals
, .n_signals
= array_size(path_signals
),
116 .privs
= &pathd_privs
, .yang_modules
= pathd_yang_modules
,
117 .n_yang_modules
= array_size(pathd_yang_modules
),
120 int main(int argc
, char **argv
, char **envp
)
122 frr_preinit(&pathd_di
, argc
, argv
);
123 frr_opt_add("", longopts
, "");
128 opt
= frr_getopt(argc
, argv
, NULL
);
147 path_zebra_init(master
);