]> git.proxmox.com Git - mirror_frr.git/blobdiff - sharpd/sharp_main.c
Merge pull request #5083 from zays26/feature/vtysh-master
[mirror_frr.git] / sharpd / sharp_main.c
index 34b84f6062e91c174432638ea4de1b302b98031f..39453ee9adc1d49e6a2ad1047d65878818673ab2 100644 (file)
 
 #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,9 @@ 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);
 
        access_list_init();