diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-15 18:18:44 +0200 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-08-07 02:26:47 +0200 |
commit | c20fa244a165921b638bb5a4ae427f9238f382dd (patch) | |
tree | 8b40ed963f3a50d36dc007cd18b2dcc38f5af393 /eigrpd | |
parent | eigrpd: Use the eigrp->vrf_id where we can immediately transform (diff) | |
download | frr-c20fa244a165921b638bb5a4ae427f9238f382dd.tar.xz frr-c20fa244a165921b638bb5a4ae427f9238f382dd.zip |
eigrpd: Add various vrf handling functions
Basic enable/disable/add/delete vrf handling functions.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd')
-rw-r--r-- | eigrpd/eigrp_main.c | 2 | ||||
-rw-r--r-- | eigrpd/eigrp_vrf.c | 50 | ||||
-rw-r--r-- | eigrpd/eigrp_vrf.h | 23 | ||||
-rw-r--r-- | eigrpd/subdir.am | 2 |
4 files changed, 77 insertions, 0 deletions
diff --git a/eigrpd/eigrp_main.c b/eigrpd/eigrp_main.c index 1781a8817..299825dd1 100644 --- a/eigrpd/eigrp_main.c +++ b/eigrpd/eigrp_main.c @@ -65,6 +65,7 @@ #include "eigrpd/eigrp_snmp.h" #include "eigrpd/eigrp_filter.h" #include "eigrpd/eigrp_errors.h" +#include "eigrpd/eigrp_vrf.h" //#include "eigrpd/eigrp_routemap.h" /* eigprd privileges */ @@ -182,6 +183,7 @@ int main(int argc, char **argv, char **envp) master = eigrp_om->master; eigrp_error_init(); + eigrp_vrf_init(); vrf_init(NULL, NULL, NULL, NULL, NULL); /*EIGRPd init*/ diff --git a/eigrpd/eigrp_vrf.c b/eigrpd/eigrp_vrf.c new file mode 100644 index 000000000..c8c849105 --- /dev/null +++ b/eigrpd/eigrp_vrf.c @@ -0,0 +1,50 @@ +/* + * eigrp - vrf code + * Copyright (C) 2019 Cumulus Networks, Inc. + * Donald Sharp + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; see the file COPYING; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include <zebra.h> + +#include "vrf.h" + +#include "eigrpd/eigrp_vrf.h" + +static int eigrp_vrf_new(struct vrf *vrf) +{ + return 0; +} + +static int eigrp_vrf_enable(struct vrf *vrf) +{ + return 0; +} + +static int eigrp_vrf_disable(struct vrf *vrf) +{ + return 0; +} + +static int eigrp_vrf_delete(struct vrf *vrf) +{ + return 0; +} + +void eigrp_vrf_init(void) +{ + vrf_init(eigrp_vrf_new, eigrp_vrf_enable, + eigrp_vrf_disable, eigrp_vrf_delete, NULL); +} diff --git a/eigrpd/eigrp_vrf.h b/eigrpd/eigrp_vrf.h new file mode 100644 index 000000000..423a4be55 --- /dev/null +++ b/eigrpd/eigrp_vrf.h @@ -0,0 +1,23 @@ +/* + * eigrp - vrf code + * Copyright (C) 2019 Cumulus Networks, Inc. + * Donald Sharp + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; see the file COPYING; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef __EIGRP_VRF_H__ + +extern void eigrp_vrf_init(void); +#endif diff --git a/eigrpd/subdir.am b/eigrpd/subdir.am index cc4676658..5a65c654e 100644 --- a/eigrpd/subdir.am +++ b/eigrpd/subdir.am @@ -35,6 +35,7 @@ eigrpd_libeigrp_a_SOURCES = \ eigrpd/eigrp_snmp.c \ eigrpd/eigrp_topology.c \ eigrpd/eigrp_update.c \ + eigrpd/eigrp_vrf.c \ eigrpd/eigrp_vty.c \ eigrpd/eigrp_zebra.c \ eigrpd/eigrpd.c \ @@ -66,6 +67,7 @@ noinst_HEADERS += \ eigrpd/eigrp_packet.h \ eigrpd/eigrp_snmp.h \ eigrpd/eigrp_structs.h \ + eigrpd/eigrp_vrf.h \ eigrpd/eigrp_vty.h \ eigrpd/eigrp_zebra.h \ # end |