diff options
| author | vdhingra <vdhingra@vmware.com> | 2020-04-24 05:38:43 -0700 |
|---|---|---|
| committer | vdhingra <vdhingra@vmware.com> | 2020-07-16 08:33:00 -0700 |
| commit | 88fa5104a04af60b7d1107f02ee84fb9c0a15abe (patch) | |
| tree | c2bbeecd9a5c384b7a615032c5fe13a1ff495c36 /staticd/static_main.c | |
| parent | 7441ea1afd4400ca74f97138e20e4ffb9f0b125e (diff) | |
staticd : Configuration northbound implementation
1. Modifies the data structs to make the distance, tag and table-id
property of a route, i.e created a hireachical data struct to save
route and nexthop information.
2. Backend northbound implementation
Signed-off-by: VishalDhingra <vdhingra@vmware.com>
Diffstat (limited to 'staticd/static_main.c')
| -rw-r--r-- | staticd/static_main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/staticd/static_main.c b/staticd/static_main.c index 3c5922b85a..0b5063a083 100644 --- a/staticd/static_main.c +++ b/staticd/static_main.c @@ -31,12 +31,14 @@ #include "vrf.h" #include "nexthop.h" #include "filter.h" +#include "routing_nb.h" #include "static_vrf.h" #include "static_vty.h" #include "static_routes.h" #include "static_zebra.h" #include "static_debug.h" +#include "static_nb.h" char backup_config_file[256]; @@ -63,10 +65,12 @@ struct option longopts[] = { { 0 } }; /* Master of threads. */ struct thread_master *master; +static struct frr_daemon_info staticd_di; /* SIGHUP handler. */ static void sighup(void) { zlog_info("SIGHUP received"); + vty_read_config(NULL, staticd_di.config_file, config_default); } /* SIGINT / SIGTERM handler. */ @@ -108,7 +112,10 @@ struct quagga_signal_t static_signals[] = { static const struct frr_yang_module_info *const staticd_yang_modules[] = { &frr_filter_info, + &frr_interface_info, &frr_vrf_info, + &frr_routing_info, + &frr_staticd_info, }; #define STATIC_VTY_PORT 2616 @@ -155,6 +162,9 @@ int main(int argc, char **argv, char **envp) static_zebra_init(); static_vty_init(); + hook_register(routing_conf_event, + routing_control_plane_protocols_name_validate); + snprintf(backup_config_file, sizeof(backup_config_file), "%s/zebra.conf", frr_sysconfdir); staticd_di.backup_config_file = backup_config_file; |
