From 2560505196b924f5c447f6c1d493ed9b74a13108 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Wed, 13 Oct 2021 20:08:37 +0300 Subject: lib: northbound cli show/cmd functions must not modify data nodes To ensure this, add a const modifier to functions' arguments. Would be great do this initially and avoid this large code change, but better late than never. Signed-off-by: Igor Ryzhov --- eigrpd/eigrp_cli.h | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) (limited to 'eigrpd/eigrp_cli.h') diff --git a/eigrpd/eigrp_cli.h b/eigrpd/eigrp_cli.h index c5f2fd8009..8b16dea39a 100644 --- a/eigrpd/eigrp_cli.h +++ b/eigrpd/eigrp_cli.h @@ -25,45 +25,56 @@ #define _EIGRP_CLI_H_ /*Prototypes*/ -extern void eigrp_cli_show_header(struct vty *vty, struct lyd_node *dnode, +extern void eigrp_cli_show_header(struct vty *vty, const 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, +extern void eigrp_cli_show_end_header(struct vty *vty, + const struct lyd_node *dnode); +extern void eigrp_cli_show_router_id(struct vty *vty, + const struct lyd_node *dnode, bool show_defaults); extern void eigrp_cli_show_passive_interface(struct vty *vty, - struct lyd_node *dnode, + const struct lyd_node *dnode, bool show_defaults); -extern void eigrp_cli_show_active_time(struct vty *vty, struct lyd_node *dnode, +extern void eigrp_cli_show_active_time(struct vty *vty, + const struct lyd_node *dnode, bool show_defaults); -extern void eigrp_cli_show_variance(struct vty *vty, struct lyd_node *dnode, +extern void eigrp_cli_show_variance(struct vty *vty, + const struct lyd_node *dnode, bool show_defaults); extern void eigrp_cli_show_maximum_paths(struct vty *vty, - struct lyd_node *dnode, + const struct lyd_node *dnode, bool show_defaults); -extern void eigrp_cli_show_metrics(struct vty *vty, struct lyd_node *dnode, +extern void eigrp_cli_show_metrics(struct vty *vty, + const struct lyd_node *dnode, bool show_defaults); -extern void eigrp_cli_show_network(struct vty *vty, struct lyd_node *dnode, +extern void eigrp_cli_show_network(struct vty *vty, + const struct lyd_node *dnode, bool show_defaults); -extern void eigrp_cli_show_neighbor(struct vty *vty, struct lyd_node *dnode, +extern void eigrp_cli_show_neighbor(struct vty *vty, + const struct lyd_node *dnode, bool show_defaults); -extern void eigrp_cli_show_redistribute(struct vty *vty, struct lyd_node *dnode, +extern void eigrp_cli_show_redistribute(struct vty *vty, + const struct lyd_node *dnode, bool show_defaults); -extern void eigrp_cli_show_delay(struct vty *vty, struct lyd_node *dnode, +extern void eigrp_cli_show_delay(struct vty *vty, const struct lyd_node *dnode, bool show_defaults); -extern void eigrp_cli_show_bandwidth(struct vty *vty, struct lyd_node *dnode, +extern void eigrp_cli_show_bandwidth(struct vty *vty, + const struct lyd_node *dnode, bool show_defaults); extern void eigrp_cli_show_hello_interval(struct vty *vty, - struct lyd_node *dnode, + const struct lyd_node *dnode, bool show_defaults); -extern void eigrp_cli_show_hold_time(struct vty *vty, struct lyd_node *dnode, +extern void eigrp_cli_show_hold_time(struct vty *vty, + const struct lyd_node *dnode, bool show_defaults); extern void eigrp_cli_show_summarize_address(struct vty *vty, - struct lyd_node *dnode, + const struct lyd_node *dnode, bool show_defaults); extern void eigrp_cli_show_authentication(struct vty *vty, - struct lyd_node *dnode, + const struct lyd_node *dnode, bool show_defaults); -extern void eigrp_cli_show_keychain(struct vty *vty, struct lyd_node *dnode, +extern void eigrp_cli_show_keychain(struct vty *vty, + const struct lyd_node *dnode, bool show_defaults); extern void eigrp_cli_init(void); -- cgit v1.2.3