summaryrefslogtreecommitdiff
path: root/sharpd/sharp_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sharpd/sharp_main.c')
-rw-r--r--sharpd/sharp_main.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sharpd/sharp_main.c b/sharpd/sharp_main.c
index 175a276089..39453ee9ad 100644
--- a/sharpd/sharp_main.c
+++ b/sharpd/sharp_main.c
@@ -46,10 +46,9 @@
#include "sharp_zebra.h"
#include "sharp_vty.h"
+#include "sharp_globals.h"
-uint32_t total_routes = 0;
-uint32_t installed_routes = 0;
-uint32_t removed_routes = 0;
+DEFINE_MGROUP(SHARPD, "sharpd")
zebra_capabilities_t _caps_p[] = {
};
@@ -125,7 +124,13 @@ FRR_DAEMON_INFO(sharpd, SHARP, .vty_port = SHARP_VTY_PORT,
.privs = &sharp_privs, .yang_modules = sharpd_yang_modules,
.n_yang_modules = array_size(sharpd_yang_modules), )
-extern void sharp_vty_init(void);
+struct sharp_global sg;
+
+static void sharp_global_init(void)
+{
+ memset(&sg, 0, sizeof(sg));
+ sg.nhs = list_new();
+}
int main(int argc, char **argv, char **envp)
{
@@ -151,6 +156,8 @@ int main(int argc, char **argv, char **envp)
master = frr_init();
+ sharp_global_init();
+
nexthop_group_init(NULL, NULL, NULL, NULL);
vrf_init(NULL, NULL, NULL, NULL, NULL);