From 7fc626de5f618133ad2a478d13defa3a110b89ea Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 1 Dec 2008 11:10:34 -0800 Subject: [cleanup] Make command nodes static The cmd_nodes used to configure vty, can mostly be static so (basic data hiding 101). --- bgpd/bgp_debug.c | 2 +- bgpd/bgp_dump.c | 2 +- bgpd/bgp_filter.c | 2 +- bgpd/bgp_vty.c | 14 +++++++------- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'bgpd') diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 1d5bf6b9..fa316c5e 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -856,7 +856,7 @@ bgp_config_write_debug (struct vty *vty) return write; } -struct cmd_node debug_node = +static struct cmd_node debug_node = { DEBUG_NODE, "", diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index e815ea3c..53dea805 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -773,7 +773,7 @@ DEFUN (no_dump_bgp_routes, } /* BGP node structure. */ -struct cmd_node bgp_dump_node = +static struct cmd_node bgp_dump_node = { DUMP_NODE, "", diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c index 89e48bf8..bdb756cb 100644 --- a/bgpd/bgp_filter.c +++ b/bgpd/bgp_filter.c @@ -671,7 +671,7 @@ config_write_as_list (struct vty *vty) return write; } -struct cmd_node as_list_node = +static struct cmd_node as_list_node = { AS_LIST_NODE, "", diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 76c537b4..e79e4775 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -8775,42 +8775,42 @@ bgp_config_write_redistribute (struct vty *vty, struct bgp *bgp, afi_t afi, } /* BGP node structure. */ -struct cmd_node bgp_node = +static struct cmd_node bgp_node = { BGP_NODE, "%s(config-router)# ", 1, }; -struct cmd_node bgp_ipv4_unicast_node = +static struct cmd_node bgp_ipv4_unicast_node = { BGP_IPV4_NODE, "%s(config-router-af)# ", 1, }; -struct cmd_node bgp_ipv4_multicast_node = +static struct cmd_node bgp_ipv4_multicast_node = { BGP_IPV4M_NODE, "%s(config-router-af)# ", 1, }; -struct cmd_node bgp_ipv6_unicast_node = +static struct cmd_node bgp_ipv6_unicast_node = { BGP_IPV6_NODE, "%s(config-router-af)# ", 1, }; -struct cmd_node bgp_ipv6_multicast_node = +static struct cmd_node bgp_ipv6_multicast_node = { BGP_IPV6M_NODE, "%s(config-router-af)# ", 1, }; -struct cmd_node bgp_vpnv4_node = +static struct cmd_node bgp_vpnv4_node = { BGP_VPNV4_NODE, "%s(config-router-af)# ", @@ -10734,7 +10734,7 @@ community_list_config_write (struct vty *vty) return write; } -struct cmd_node community_list_node = +static struct cmd_node community_list_node = { COMMUNITY_LIST_NODE, "", -- cgit v1.2.1