3 * Copyright (C) 2018 Cumulus Networks, Inc.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include <lib/version.h>
35 #include "static_vrf.h"
36 #include "static_vty.h"
37 #include "static_routes.h"
38 #include "static_zebra.h"
40 char backup_config_file
[256];
44 zebra_capabilities_t _caps_p
[] = {
47 struct zebra_privs_t static_privs
= {
48 #if defined(FRR_USER) && defined(FRR_GROUP)
52 #if defined(VTY_GROUP)
53 .vty_group
= VTY_GROUP
,
56 .cap_num_p
= array_size(_caps_p
),
59 struct option longopts
[] = { { 0 } };
61 /* Master of threads. */
62 struct thread_master
*master
;
65 static void sighup(void)
67 zlog_info("SIGHUP received");
70 /* SIGINT / SIGTERM handler. */
71 static void sigint(void)
73 zlog_notice("Terminating on signal");
78 /* SIGUSR1 handler. */
79 static void sigusr1(void)
84 struct quagga_signal_t static_signals
[] = {
103 static const struct frr_yang_module_info
*staticd_yang_modules
[] = {
106 #define STATIC_VTY_PORT 2616
108 FRR_DAEMON_INFO(staticd
, STATIC
, .vty_port
= STATIC_VTY_PORT
,
110 .proghelp
= "Implementation of STATIC.",
112 .signals
= static_signals
,
113 .n_signals
= array_size(static_signals
),
115 .privs
= &static_privs
, .yang_modules
= staticd_yang_modules
,
116 .n_yang_modules
= array_size(staticd_yang_modules
),
119 int main(int argc
, char **argv
, char **envp
)
121 frr_preinit(&staticd_di
, argc
, argv
);
122 frr_opt_add("", longopts
, "");
127 opt
= frr_getopt(argc
, argv
, NULL
);
149 snprintf(backup_config_file
, sizeof(backup_config_file
),
150 "%s/zebra.conf", frr_sysconfdir
);
151 staticd_di
.backup_config_file
= backup_config_file
;