]> git.puffer.fish Git - matthieu/frr.git/commitdiff
[cleanup] Make command nodes static
authorStephen Hemminger <stephen.hemminger@vyatta.com>
Mon, 1 Dec 2008 19:10:34 +0000 (11:10 -0800)
committerPaul Jakma <paul@quagga.net>
Fri, 12 Jun 2009 16:10:29 +0000 (17:10 +0100)
The cmd_nodes used to configure vty, can mostly be static so
(basic data hiding 101).

29 files changed:
bgpd/bgp_debug.c
bgpd/bgp_dump.c
bgpd/bgp_filter.c
bgpd/bgp_vty.c
isisd/isis_circuit.c
isisd/isisd.c
lib/command.c
lib/filter.c
lib/keychain.c
lib/plist.c
lib/routemap.c
lib/smux.c
ospf6d/ospf6_interface.c
ospf6d/ospf6_top.c
ospf6d/ospf6_zebra.c
ospf6d/ospf6d.c
ospfd/ospf_dump.c
ospfd/ospf_vty.c
ripd/rip_debug.c
ripd/rip_interface.c
ripd/rip_zebra.c
ripd/ripd.c
ripngd/ripng_debug.c
ripngd/ripng_interface.c
ripngd/ripng_zebra.c
ripngd/ripngd.c
vtysh/vtysh.c
zebra/zebra_vty.c
zebra/zserv.c

index 1d5bf6b9cae6b66d705820217b153d6a7850b3bc..fa316c5e57c73228feedd247db17ef0a875b5a86 100644 (file)
@@ -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,
   "",
index e815ea3cc90f284fef1c46a9605c60609b11ae92..53dea805c08fb5e4b37e9822c79093e4b110b938 100644 (file)
@@ -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,
   "",
index 89e48bf8a8585027c9c3adf7dac8598f50a866d4..bdb756cb0d1432e77957fd506751564500b1b2a4 100644 (file)
@@ -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,
   "",
index 76c537b49e6ce751efebf5674cedb459dcdb38fc..e79e4775f5f852324f68edb189d5ed30ef6d0f26 100644 (file)
@@ -8775,42 +8775,42 @@ bgp_config_write_redistribute (struct vty *vty, struct bgp *bgp, afi_t afi,
 }
 \f
 /* 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,
   "",
index af24988e8773c9728a358e4481ae6df70f714daa..d2923b575135eb0aa59f1026343f6bc8af456bbf 100644 (file)
@@ -2028,7 +2028,7 @@ DEFUN (no_ipv6_router_isis,
 }
 #endif /* HAVE_IPV6 */
 
-struct cmd_node interface_node = {
+static struct cmd_node interface_node = {
   INTERFACE_NODE,
   "%s(config-if)# ",
   1,
index 7c669fcbf2bce5b7f805e2b6419858db214ca4e9..1e84a1cedb6732594242f5c93c2f298eaf787ca9 100644 (file)
@@ -2076,7 +2076,7 @@ isis_config_write (struct vty *vty)
   return write;
 }
 
-struct cmd_node isis_node = {
+static struct cmd_node isis_node = {
   ISIS_NODE,
   "%s(config-router)# ",
   1
index 4887f94fbddfb09b775cafc49b052efa310265c8..0bbd99e5bccdcbe148962abad0c1b241cda1a57e 100644 (file)
@@ -41,37 +41,37 @@ vector cmdvec = NULL;
 struct host host;
 
 /* Standard command node structures. */
-struct cmd_node auth_node =
+static struct cmd_node auth_node =
 {
   AUTH_NODE,
   "Password: ",
 };
 
-struct cmd_node view_node =
+static struct cmd_node view_node =
 {
   VIEW_NODE,
   "%s> ",
 };
 
-struct cmd_node restricted_node =
+static struct cmd_node restricted_node =
 {
   RESTRICTED_NODE,
   "%s$ ",
 };
 
-struct cmd_node auth_enable_node =
+static struct cmd_node auth_enable_node =
 {
   AUTH_ENABLE_NODE,
   "Password: ",
 };
 
-struct cmd_node enable_node =
+static struct cmd_node enable_node =
 {
   ENABLE_NODE,
   "%s# ",
 };
 
-struct cmd_node config_node =
+static struct cmd_node config_node =
 {
   CONFIG_NODE,
   "%s(config)# ",
index 7aeb8deb7e266c8ee4546206bd6bb57fc908c25c..af8d587ff32193595af544a0e53c92538333f25b 100644 (file)
@@ -1857,7 +1857,7 @@ config_write_access (struct vty *vty, afi_t afi)
 }
 
 /* Access-list node. */
-struct cmd_node access_node =
+static struct cmd_node access_node =
 {
   ACCESS_NODE,
   "",                          /* Access list has no interface. */
@@ -1953,7 +1953,7 @@ access_list_init_ipv4 (void)
 }
 
 #ifdef HAVE_IPV6
-struct cmd_node access_ipv6_node =
+static struct cmd_node access_ipv6_node =
 {
   ACCESS_IPV6_NODE,
   "",
index af0a1d74000083500acae6566a7d6680a75e846d..6719cebf79c23e94a7aaee19be0c8768ede24c98 100644 (file)
@@ -848,14 +848,14 @@ DEFUN (send_lifetime_duration_month_day,
                                    argv[3], argv[4]);
 }
 \f
-struct cmd_node keychain_node =
+static struct cmd_node keychain_node =
 {
   KEYCHAIN_NODE,
   "%s(config-keychain)# ",
   1
 };
 
-struct cmd_node keychain_key_node =
+static struct cmd_node keychain_key_node =
 {
   KEYCHAIN_KEY_NODE,
   "%s(config-keychain-key)# ",
index 4b498c4df458c78be4597dffdab7a4b68993f7d8..0f802a83b21c272b1c881ee735952a29bc9ad5d1 100644 (file)
@@ -2623,7 +2623,7 @@ prefix_list_reset_orf (void)
 
 
 /* Prefix-list node. */
-struct cmd_node prefix_node =
+static struct cmd_node prefix_node =
 {
   PREFIX_NODE,
   "",                          /* Prefix list has no interface. */
@@ -2732,7 +2732,7 @@ prefix_list_init_ipv4 (void)
 
 #ifdef HAVE_IPV6
 /* Prefix-list node. */
-struct cmd_node prefix_ipv6_node =
+static struct cmd_node prefix_ipv6_node =
 {
   PREFIX_IPV6_NODE,
   "",                          /* Prefix list has no interface. */
index 58ed09a7cf7a049360796131e18195a04a3aa381..5f7a3182037507d4d8fdddcccf9f561e49abf0a4 100644 (file)
@@ -1280,7 +1280,7 @@ route_map_config_write (struct vty *vty)
 }
 
 /* Route map node structure. */
-struct cmd_node rmap_node =
+static struct cmd_node rmap_node =
 {
   RMAP_NODE,
   "%s(config-route-map)# ",
index fd0c89c2b58cc553b3ed899ccc7c87ee70e98c17..349cc2f768d73b4d5fdd63f966820cd3862b79eb 100644 (file)
@@ -73,7 +73,7 @@ int debug_smux = 0;
 int fail = 0;
 
 /* SMUX node. */
-struct cmd_node smux_node =
+static struct cmd_node smux_node =
 {
   SMUX_NODE,
   ""                            /* SMUX has no interface. */
index 4215208425f8029225e17025abf4548ed2e12a7e..5a79862fe86bb1029c105c2724021310956028a0 100644 (file)
@@ -1509,7 +1509,7 @@ config_write_ospf6_interface (struct vty *vty)
   return 0;
 }
 
-struct cmd_node interface_node =
+static struct cmd_node interface_node =
 {
   INTERFACE_NODE,
   "%s(config-if)# ",
index d45d132178119d4486a14abdb30b655a5bea23b9..609df41c1490aeeb6fce3ad36d48179da4a35ebc 100644 (file)
@@ -650,7 +650,7 @@ config_write_ospf6 (struct vty *vty)
 }
 
 /* OSPF6 node structure. */
-struct cmd_node ospf6_node =
+static struct cmd_node ospf6_node =
 {
   OSPF6_NODE,
   "%s(config-ospf6)# ",
index b5ffc0aa6cbb14ed9bd5fd17b65acc10fb3f8eaa..7083c96601587d577908b11f5106a32ec33ca3d2 100644 (file)
@@ -335,7 +335,7 @@ config_write_ospf6_zebra (struct vty *vty)
 }
 
 /* Zebra node structure. */
-struct cmd_node zebra_node =
+static struct cmd_node zebra_node =
 {
   ZEBRA_NODE,
   "%s(config-zebra)# ",
index 1a615ffae504cd35fda3658ea9cf0e5d2f70cdd8..7a766c8d54bb5cedace3c5298fec970f6e067137 100644 (file)
@@ -92,7 +92,7 @@ DEFUN (show_version_ospf6,
   return CMD_SUCCESS;
 }
 
-struct cmd_node debug_node =
+static struct cmd_node debug_node =
 {
   DEBUG_NODE,
   "",
index 2fcbfe6415d748b008d2cfd4a7f6cf29c38a2234..de9ef05511d4a9c0dff6c3ad7d96d068eb2139bb 100644 (file)
@@ -1509,7 +1509,7 @@ DEFUN (show_debugging_ospf,
 }
 
 /* Debug node. */
-struct cmd_node debug_node =
+static struct cmd_node debug_node =
 {
   DEBUG_NODE,
   "",
index c4abe7e1a53cc2e6fef6562f540d9bed84845071..2e4b6078836c26cd0f9a704a87db14b35c7e7dac 100644 (file)
@@ -8073,7 +8073,7 @@ ospf_vty_show_init (void)
 
 \f
 /* ospfd's interface node. */
-struct cmd_node interface_node =
+static struct cmd_node interface_node =
 {
   INTERFACE_NODE,
   "%s(config-if)# ",
@@ -8184,13 +8184,6 @@ ospf_vty_if_init (void)
   install_element (INTERFACE_NODE, &no_ospf_transmit_delay_cmd);
 }
 
-/* Zebra node structure. */
-struct cmd_node zebra_node =
-{
-  ZEBRA_NODE,
-  "%s(config-router)#",
-};
-
 static void
 ospf_vty_zebra_init (void)
 {
@@ -8283,7 +8276,7 @@ ospf_vty_zebra_init (void)
 #endif /* 0 */
 }
 
-struct cmd_node ospf_node =
+static struct cmd_node ospf_node =
 {
   OSPF_NODE,
   "%s(config-router)# ",
index d788ea7e3e051647cd6fe201cb38e1850ff85b9f..64dc27c09a1e4c6ce67a8a41731f2e4073eee29e 100644 (file)
@@ -203,7 +203,7 @@ DEFUN (no_debug_rip_zebra,
 }
 
 /* Debug node. */
-struct cmd_node debug_node =
+static struct cmd_node debug_node =
 {
   DEBUG_NODE,
   "",                          /* Debug node has no interface. */
index 54d357ce0e0ee1608dde5e2b45d266ab693bfae7..827663ac7bebd8932675d1ec7e6d5d1e82838b2f 100644 (file)
@@ -2051,7 +2051,7 @@ config_write_rip_network (struct vty *vty, int config_mode)
   return 0;
 }
 
-struct cmd_node interface_node =
+static struct cmd_node interface_node =
 {
   INTERFACE_NODE,
   "%s(config-if)# ",
index b924199f79a55bd1468e95d3685274d478577b01..7729d9b472679e7261cc51df362627ef4b4853e1 100644 (file)
@@ -651,7 +651,7 @@ config_write_rip_redistribute (struct vty *vty, int config_mode)
 }
 
 /* Zebra node structure. */
-struct cmd_node zebra_node =
+static struct cmd_node zebra_node =
 {
   ZEBRA_NODE,
   "%s(config-router)# ",
index cb2603d08959cb8c60f68eef56da59086054868a..0e3f877d6bde9dce40e9c27b1d8cb1b08ce98495 100644 (file)
@@ -3680,7 +3680,7 @@ config_write_rip (struct vty *vty)
 }
 
 /* RIP node structure. */
-struct cmd_node rip_node =
+static struct cmd_node rip_node =
 {
   RIP_NODE,
   "%s(config-router)# ",
index 4ed4fa36e0e90bfe75fb4807988e304ab5b9054e..78f13a71b4d1f203c933cc69567183b5f85ffe3a 100644 (file)
@@ -204,7 +204,7 @@ DEFUN (no_debug_ripng_zebra,
 }
 
 /* Debug node. */
-struct cmd_node debug_node =
+static struct cmd_node debug_node =
 {
   DEBUG_NODE,
   "",                          /* Debug node has no interface. */
index d76e3a13e1291c72ecbf1b66e96a3875001f5b12..d70c299d3e784c4b4bd3eb641c33111df9008fe6 100644 (file)
@@ -1200,7 +1200,7 @@ interface_config_write (struct vty *vty)
 }
 
 /* ripngd's interface node. */
-struct cmd_node interface_node =
+static struct cmd_node interface_node =
 {
   INTERFACE_NODE,
   "%s(config-if)# ",
index 62185c0afc4f0140db5e8e806107020eac36e02a..4c4445506c8c93dc5670850e4da06f3bcf19ce33 100644 (file)
@@ -538,7 +538,7 @@ zebra_config_write (struct vty *vty)
 }
 
 /* Zebra node structure. */
-struct cmd_node zebra_node =
+static struct cmd_node zebra_node =
 {
   ZEBRA_NODE,
   "%s(config-router)# ",
index 7b00e0375f93cf7e198d613572854c9e8e8cbbb5..9deac032d5e236dfb8182843a0373228b5b09a80 100644 (file)
@@ -2682,7 +2682,7 @@ ripng_config_write (struct vty *vty)
 }
 
 /* RIPng node structure. */
-struct cmd_node cmd_ripng_node =
+static struct cmd_node cmd_ripng_node =
 {
   RIPNG_NODE,
   "%s(config-router)# ",
index bad05d98548a17434f2757a9c2b7a7d66b16c36b..32b626c70bd10c5ef1d3cd15b696c97a7773feb9 100644 (file)
@@ -711,97 +711,97 @@ vtysh_completion (char *text, int start, int end)
 #endif
 
 /* Vty node structures. */
-struct cmd_node bgp_node =
+static struct cmd_node bgp_node =
 {
   BGP_NODE,
   "%s(config-router)# ",
 };
 
-struct cmd_node rip_node =
+static struct cmd_node rip_node =
 {
   RIP_NODE,
   "%s(config-router)# ",
 };
 
-struct cmd_node isis_node =
+static struct cmd_node isis_node =
 {
   ISIS_NODE,
   "%s(config-router)# ",
 };
 
-struct cmd_node interface_node =
+static struct cmd_node interface_node =
 {
   INTERFACE_NODE,
   "%s(config-if)# ",
 };
 
-struct cmd_node rmap_node =
+static struct cmd_node rmap_node =
 {
   RMAP_NODE,
   "%s(config-route-map)# "
 };
 
-struct cmd_node zebra_node =
+static struct cmd_node zebra_node =
 {
   ZEBRA_NODE,
   "%s(config-router)# "
 };
 
-struct cmd_node bgp_vpnv4_node =
+static struct cmd_node bgp_vpnv4_node =
 {
   BGP_VPNV4_NODE,
   "%s(config-router-af)# "
 };
 
-struct cmd_node bgp_ipv4_node =
+static struct cmd_node bgp_ipv4_node =
 {
   BGP_IPV4_NODE,
   "%s(config-router-af)# "
 };
 
-struct cmd_node bgp_ipv4m_node =
+static struct cmd_node bgp_ipv4m_node =
 {
   BGP_IPV4M_NODE,
   "%s(config-router-af)# "
 };
 
-struct cmd_node bgp_ipv6_node =
+static struct cmd_node bgp_ipv6_node =
 {
   BGP_IPV6_NODE,
   "%s(config-router-af)# "
 };
 
-struct cmd_node bgp_ipv6m_node =
+static struct cmd_node bgp_ipv6m_node =
 {
   BGP_IPV6M_NODE,
   "%s(config-router-af)# "
 };
 
-struct cmd_node ospf_node =
+static struct cmd_node ospf_node =
 {
   OSPF_NODE,
   "%s(config-router)# "
 };
 
-struct cmd_node ripng_node =
+static struct cmd_node ripng_node =
 {
   RIPNG_NODE,
   "%s(config-router)# "
 };
 
-struct cmd_node ospf6_node =
+static struct cmd_node ospf6_node =
 {
   OSPF6_NODE,
   "%s(config-ospf6)# "
 };
 
-struct cmd_node keychain_node =
+static struct cmd_node keychain_node =
 {
   KEYCHAIN_NODE,
   "%s(config-keychain)# "
 };
 
-struct cmd_node keychain_key_node =
+static struct cmd_node keychain_key_node =
 {
   KEYCHAIN_KEY_NODE,
   "%s(config-keychain-key)# "
index 0c313921cd731e40fc6c57b7e81c1a8328dcca85..f50ab05e11ea5a55bb587a93040fe69d0f5406ec 100644 (file)
@@ -2030,10 +2030,10 @@ static int config_write_protocol(struct vty *vty)
 }   
 
 /* table node for protocol filtering */
-struct cmd_node protocol_node = { PROTOCOL_NODE, "", 1 };
+static struct cmd_node protocol_node = { PROTOCOL_NODE, "", 1 };
 
 /* IP node for static routes. */
-struct cmd_node ip_node = { IP_NODE,  "",  1 };
+static struct cmd_node ip_node = { IP_NODE,  "",  1 };
 
 /* Route VTY.  */
 void
index ef79eaad3da06f9dbfbf3b4dd17b951e5d2384aa..05380d6244571db9221a4aef3e773329e848795e 100644 (file)
@@ -1569,7 +1569,7 @@ config_write_table (struct vty *vty)
 }
 
 /* table node for routing tables. */
-struct cmd_node table_node =
+static struct cmd_node table_node =
 {
   TABLE_NODE,
   "",                          /* This node has no interface. */
@@ -1689,7 +1689,7 @@ config_write_forwarding (struct vty *vty)
 }
 
 /* table node for routing tables. */
-struct cmd_node forwarding_node =
+static struct cmd_node forwarding_node =
 {
   FORWARDING_NODE,
   "",                          /* This node has no interface. */