From b66c8fbba5ad80272314caa4a629f14404604400 Mon Sep 17 00:00:00 2001 From: Donnie Savage Date: Fri, 11 Dec 2020 15:24:02 -0500 Subject: [PATCH] eigrpd: Create eigrp_cli.h and move forward declarations Move the forward declarations for eigrp_cli.c from eigrpd.h into eigrp_cli.h. Signed-off-by: Donald Sharp Signed-off-by: Donnie Savage --- eigrpd/eigrp_cli.c | 1 + eigrpd/eigrp_cli.h | 70 +++++++++++++++++++++++++++++++++++++++ eigrpd/eigrp_main.c | 1 + eigrpd/eigrp_northbound.c | 1 + eigrpd/eigrpd.h | 44 ------------------------ eigrpd/subdir.am | 1 + 6 files changed, 74 insertions(+), 44 deletions(-) create mode 100644 eigrpd/eigrp_cli.h diff --git a/eigrpd/eigrp_cli.c b/eigrpd/eigrp_cli.c index 3610b3a869..00d8ea8867 100644 --- a/eigrpd/eigrp_cli.c +++ b/eigrpd/eigrp_cli.c @@ -29,6 +29,7 @@ #include "eigrp_structs.h" #include "eigrpd.h" #include "eigrp_zebra.h" +#include "eigrp_cli.h" #ifndef VTYSH_EXTRACT_PL #include "eigrpd/eigrp_cli_clippy.c" diff --git a/eigrpd/eigrp_cli.h b/eigrpd/eigrp_cli.h new file mode 100644 index 0000000000..c5f2fd8009 --- /dev/null +++ b/eigrpd/eigrp_cli.h @@ -0,0 +1,70 @@ +/* + * EIGRP CLI Functions. + * Copyright (C) 2019 + * Authors: + * Donnie Savage + * + * This file is part of FRR. + * + * FRR 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, or (at your option) any + * later version. + * + * FRR 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_CLI_H_ +#define _EIGRP_CLI_H_ + +/*Prototypes*/ +extern void eigrp_cli_show_header(struct vty *vty, struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_end_header(struct vty *vty, struct lyd_node *dnode); +extern void eigrp_cli_show_router_id(struct vty *vty, struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_passive_interface(struct vty *vty, + struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_active_time(struct vty *vty, struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_variance(struct vty *vty, struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_maximum_paths(struct vty *vty, + struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_metrics(struct vty *vty, struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_network(struct vty *vty, struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_neighbor(struct vty *vty, struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_redistribute(struct vty *vty, struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_delay(struct vty *vty, struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_bandwidth(struct vty *vty, struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_hello_interval(struct vty *vty, + struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_hold_time(struct vty *vty, struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_summarize_address(struct vty *vty, + struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_authentication(struct vty *vty, + struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_show_keychain(struct vty *vty, struct lyd_node *dnode, + bool show_defaults); +extern void eigrp_cli_init(void); + +#endif /*EIGRP_CLI_H_ */ diff --git a/eigrpd/eigrp_main.c b/eigrpd/eigrp_main.c index 6c44ce361c..77e6ee275d 100644 --- a/eigrpd/eigrp_main.c +++ b/eigrpd/eigrp_main.c @@ -66,6 +66,7 @@ #include "eigrpd/eigrp_filter.h" #include "eigrpd/eigrp_errors.h" #include "eigrpd/eigrp_vrf.h" +#include "eigrpd/eigrp_cli.h" //#include "eigrpd/eigrp_routemap.h" /* eigprd privileges */ diff --git a/eigrpd/eigrp_northbound.c b/eigrpd/eigrp_northbound.c index 5b87f72640..482667f633 100644 --- a/eigrpd/eigrp_northbound.c +++ b/eigrpd/eigrp_northbound.c @@ -34,6 +34,7 @@ #include "eigrp_interface.h" #include "eigrp_network.h" #include "eigrp_zebra.h" +#include "eigrp_cli.h" /* Helper functions. */ static void redistribute_get_metrics(const struct lyd_node *dnode, diff --git a/eigrpd/eigrpd.h b/eigrpd/eigrpd.h index bcf7c4eb2b..1eb2203d62 100644 --- a/eigrpd/eigrpd.h +++ b/eigrpd/eigrpd.h @@ -76,50 +76,6 @@ extern struct eigrp *eigrp_get(uint16_t as, vrf_id_t vrf_id); extern struct eigrp *eigrp_lookup(vrf_id_t vrf_id); extern void eigrp_router_id_update(struct eigrp *eigrp); -/* eigrp_cli.c */ -extern void eigrp_cli_show_header(struct vty *vty, struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_end_header(struct vty *vty, struct lyd_node *dnode); -extern void eigrp_cli_show_router_id(struct vty *vty, struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_passive_interface(struct vty *vty, - struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_active_time(struct vty *vty, struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_variance(struct vty *vty, struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_maximum_paths(struct vty *vty, - struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_metrics(struct vty *vty, struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_network(struct vty *vty, struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_neighbor(struct vty *vty, struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_redistribute(struct vty *vty, - struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_delay(struct vty *vty, struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_bandwidth(struct vty *vty, struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_hello_interval(struct vty *vty, - struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_hold_time(struct vty *vty, struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_summarize_address(struct vty *vty, - struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_authentication(struct vty *vty, - struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_show_keychain(struct vty *vty, struct lyd_node *dnode, - bool show_defaults); -extern void eigrp_cli_init(void); - /* eigrp_northbound.c */ extern const struct frr_yang_module_info frr_eigrpd_info; diff --git a/eigrpd/subdir.am b/eigrpd/subdir.am index 98f39440c3..9ad4d72d94 100644 --- a/eigrpd/subdir.am +++ b/eigrpd/subdir.am @@ -55,6 +55,7 @@ clippy_scan += \ # end noinst_HEADERS += \ + eigrpd/eigrp_cli.h \ eigrpd/eigrp_const.h \ eigrpd/eigrp_errors.h \ eigrpd/eigrp_filter.h \ -- 2.39.5