[cleanup] Make command nodes static
The cmd_nodes used to configure vty, can mostly be static so
(basic data hiding 101).
diff --git a/lib/command.c b/lib/command.c
index 4887f94..0bbd99e 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -41,37 +41,37 @@
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)# ",
diff --git a/lib/filter.c b/lib/filter.c
index 7aeb8de..af8d587 100644
--- a/lib/filter.c
+++ b/lib/filter.c
@@ -1857,7 +1857,7 @@
}
/* 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 @@
}
#ifdef HAVE_IPV6
-struct cmd_node access_ipv6_node =
+static struct cmd_node access_ipv6_node =
{
ACCESS_IPV6_NODE,
"",
diff --git a/lib/keychain.c b/lib/keychain.c
index af0a1d7..6719ceb 100644
--- a/lib/keychain.c
+++ b/lib/keychain.c
@@ -848,14 +848,14 @@
argv[3], argv[4]);
}
-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)# ",
diff --git a/lib/plist.c b/lib/plist.c
index 4b498c4..0f802a8 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -2623,7 +2623,7 @@
/* 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 @@
#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. */
diff --git a/lib/routemap.c b/lib/routemap.c
index 58ed09a..5f7a318 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -1280,7 +1280,7 @@
}
/* Route map node structure. */
-struct cmd_node rmap_node =
+static struct cmd_node rmap_node =
{
RMAP_NODE,
"%s(config-route-map)# ",
diff --git a/lib/smux.c b/lib/smux.c
index fd0c89c..349cc2f 100644
--- a/lib/smux.c
+++ b/lib/smux.c
@@ -73,7 +73,7 @@
int fail = 0;
/* SMUX node. */
-struct cmd_node smux_node =
+static struct cmd_node smux_node =
{
SMUX_NODE,
"" /* SMUX has no interface. */